@clickview/curator 1.0.15-dev.0 → 1.0.15-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/curator-app.css.map +1 -1
- package/dist/curator-app.js +17 -1
- package/dist/curator-app.js.map +1 -1
- package/dist/libs/analytics/src/Analytics.d.ts +10 -0
- package/dist/libs/analytics/src/AnalyticsHelper.d.ts +30 -0
- package/dist/libs/analytics/src/constants/EventFirehose.d.ts +4 -0
- package/dist/libs/analytics/src/constants/GlobalChannels.d.ts +3 -0
- package/dist/libs/analytics/src/constants/Services.d.ts +4 -0
- package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +25 -3
- package/dist/libs/analytics/src/models/AnalyticsEvent.d.ts +49 -0
- package/dist/libs/analytics/src/services/ContextService.d.ts +19 -0
- package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +5 -1
- package/dist/projects/curator/src/apps/playlists/PlaylistsApplication.d.ts +0 -1
- package/dist/projects/curator/src/apps/playlists/services/PlaylistDataService.d.ts +22 -0
- package/dist/projects/curator/src/apps/playlists/services/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/series/services/SeriesDataService.d.ts +17 -0
- package/dist/projects/curator/src/apps/series/services/index.d.ts +1 -0
- package/dist/projects/curator/src/apps/videos/services/VideoDataService.d.ts +14 -0
- package/dist/projects/curator/src/apps/videos/services/index.d.ts +1 -0
- package/package.json +45 -45
- package/tooling/externals.js +0 -1
- package/dist/projects/curator/src/apps/subjects/components/levels/edit-level-nav/EditLevelNav.d.ts +0 -7
- package/dist/projects/curator/src/apps/subjects/components/levels/level-audiences/LevelAudiences.d.ts +0 -11
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/LevelMemberItem.d.ts +0 -12
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/LevelMemberList.d.ts +0 -25
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/LevelMemberListHeader.d.ts +0 -14
- package/dist/projects/curator/src/apps/subjects/components/levels/level-member-list/index.d.ts +0 -1
- package/dist/projects/curator/src/apps/subjects/enums/ObjectMemberType.d.ts +0 -10
- package/dist/projects/curator/src/apps/subjects/utils/LevelMemberHelper.d.ts +0 -8
- package/dist/projects/curator/src/apps/subjects/utils/LevelsNavHelper.d.ts +0 -4
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-level-members/EditLevelMembersUtils.d.ts +0 -16
- package/dist/projects/curator/src/apps/subjects/views/levels/edit-level-members/EditLevelMembersView.d.ts +0 -16
- package/dist/projects/curator/src/apps/subjects/views/levels/level-audiences/LevelAudiencesView.d.ts +0 -6
- package/dist/projects/curator/src/apps/subjects/views/levels/level-nav/LevelNavView.d.ts +0 -6
- package/dist/projects/curator/src/apps/subjects/views/levels/levels-redirect/LevelsRedirectView.d.ts +0 -2
- package/dist/projects/curator/src/apps/subjects/views/levels/levels-redirect/index.d.ts +0 -1
package/dist/curator-app.js
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("_"),require("Yup"),require("Formik"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","_","Yup","Formik","ReactBootstrap","Backbone","ReactRedux","Marionette","FontAwesome","DOMPurify","SortableHOC","ReactDOM","ReactTransitionGroup","Polyglot","Cropper","Handlebars"],t):"object"==typeof exports?exports["@clickview/curator"]=t(require("React"),require("_"),require("Yup"),require("Formik"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):e["@clickview/curator"]=t(e.React,e._,e.Yup,e.Formik,e.ReactBootstrap,e.Backbone,e.ReactRedux,e.Marionette,e.FontAwesome,e.DOMPurify,e.SortableHOC,e.ReactDOM,e.ReactTransitionGroup,e.Polyglot,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,a,o,s,c,l,u,p,f,d,m,h){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=169)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t){e.exports=o},function(e,t){e.exports=s},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t,n){e.exports={alertItem:"_3ppPT",alertBox:"_2gPqV",alertList:"_1_wrK",icon:"_2gpnl",alertContent:"_1akpi",heading:"_3jnJY"}},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function l(e){return e.replace(c,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const p=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const d={},m=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){d[" "+e]||(m.test(e)?d[" "+e]=e+"/":d[" "+e]=v(e,"/",!0));const n=-1===(e=d[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(h,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function v(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,s)}else if(i.test(e))return e.replace(a,s);return e},unescape:l,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(l(n)).replace(p,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(n)&&(n=y(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:y,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:v,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},function(e,t,n){e.exports={input:"_3MysI",suggestionsContainerOpen:"ahMdW",sectionContainer:"xstWL",suggestionHighlighted:"_3YTCa"}},function(e,t){e.exports=c},function(e,t,n){e.exports=n(155)()},function(e,t){function n(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1},getDefaults:n,changeDefaults:function(t){e.exports.defaults=t}}},function(e,t,n){e.exports={svg:"_3OUhC",iconButton:"_3t3VL",iconWithText:"_2KLHo",iconOnly:"_2rQWb"}},function(e,t){e.exports=l},function(e,t,n){e.exports={buttonList:"_2v9CT",dropdownToggle:"AYBvQ"}},function(e,t){e.exports=u},function(e,t){e.exports=p},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!0;var o={},s=void 0,c=void 0;for(s=0,c=n.length;s<c;s++)o[n[s]]=!0;for(s=0,c=i.length;s<c;s++){var l=i[s],u=e[l],p=t[l];if(u!==p){if(!o[l]||null===u||null===p||"object"!==(void 0===u?"undefined":r(u))||"object"!==(void 0===p?"undefined":r(p)))return!0;var f=Object.keys(u),d=Object.keys(p);if(f.length!==d.length)return!0;for(var m=0,h=f.length;m<h;m++){var g=f[m];if(u[g]!==p[g])return!0}}}return!1}},function(e,t,n){const{defaults:r}=n(15),{cleanUrl:i,escape:a}=n(11);e.exports=class{constructor(e){this.options=e||r}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return r?'<pre><code class="'+this.options.langPrefix+a(r,!0)+'">'+(n?e:a(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:a(e,!0))+"</code></pre>"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+a(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}},function(e,t){e.exports=f},function(e,t){e.exports={prefix:"cv",iconName:"add-to-playlist",icon:["24","24",[],"","M20.1 16.4h1.8a.6.6 0 1 1 0 1.2h-1.8v1.8a.6.6 0 1 1-1.2 0v-1.8h-1.8a.6.6 0 1 1 0-1.2h1.8v-1.8a.6.6 0 0 1 1.2 0v1.8zM10.5 9a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm5.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V12a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16zm-8-2.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close",icon:["24","24",[],"","M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"]}},function(e,t){e.exports={prefix:"cv",iconName:"delete",icon:["24","24",[],"","M14.5 7h4a.5.5 0 1 1 0 1h-1.14a1 1 0 0 1-.005.09l-.909 10a1 1 0 0 1-.996.91h-6.9a1 1 0 0 1-.996-.91l-.91-10A1.013 1.013 0 0 1 6.64 8H5.5a.5.5 0 0 1 0-1h4A1.5 1.5 0 0 1 11 5.5h2A1.5 1.5 0 0 1 14.5 7zm-1 0a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5h3zm-4 3a.463.463 0 0 0-.462.499L9.462 16a.54.54 0 0 0 .574.498.463.463 0 0 0 .426-.498l-.424-5.502A.54.54 0 0 0 9.5 10zm2.5 0a.5.5 0 0 0-.5.5V16a.5.5 0 1 0 1 0v-5.5a.5.5 0 0 0-.5-.5zm2.5 0a.54.54 0 0 0-.538.499L13.538 16a.463.463 0 0 0 .462.5.54.54 0 0 0 .538-.499l.424-5.502A.463.463 0 0 0 14.5 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit",icon:["24","24",[],"","M7.636 17.834l8.746-8.745-1.414-1.414-8.8 8.8 1.468 1.36zm-2.42.973c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zm2.614-1.906l.707.707a1.5 1.5 0 0 1 0 2.121L7.45 19.435c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L16.167 5.06a1.5 1.5 0 0 1 2.122 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"expand",icon:["24","24",[],"","M14.06 21.28l-.353.354-.707-.707.354-.354 7.22-7.22.353-.353.707.707-.354.354-7.22 7.22zm4 .465l-.353.353-.707-.707.354-.353 3.684-3.684.353-.354.707.707-.353.354-3.684 3.684z"]}},function(e,t){e.exports={prefix:"cv",iconName:"minus",icon:["24","24",[],"",""]}},function(e,t){e.exports={prefix:"cv",iconName:"more",icon:["24","24",[],"","M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"new-window",icon:["24","24",[],"","M17.395 5.526h-3.244a.763.763 0 0 1 0-1.526h5.086a.76.76 0 0 1 .763.763v5.086a.763.763 0 0 1-1.526 0V6.605l-5.172 5.172a.763.763 0 1 1-1.079-1.08l5.172-5.171zM8.5 5.5a.75.75 0 0 1 0 1.5H6.75a.25.25 0 0 0-.25.25v10c0 .138.112.25.25.25h10a.25.25 0 0 0 .25-.25V15.5a.75.75 0 1 1 1.5 0v1.75A1.75 1.75 0 0 1 16.75 19h-10A1.75 1.75 0 0 1 5 17.25v-10c0-.966.784-1.75 1.75-1.75H8.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"plus",icon:["24","24",[],"","M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2H11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"preview",icon:["24","24",[],"","M17.278 17.333a3.056 3.056 0 1 0 0-6.11 3.056 3.056 0 0 0 0 6.11zm3.53-.637c.03.022.06.048.087.076l1.729 1.728a.794.794 0 1 1-1.124 1.124l-1.728-1.729a.801.801 0 0 1-.076-.088 4.278 4.278 0 1 1 1.112-1.112zM7.713 9C7.32 9 7 8.776 7 8.5s.32-.5.714-.5h8.572c.394 0 .714.224.714.5s-.32.5-.714.5H7.714zm-.357 3.5C7.16 12.5 7 12.276 7 12s.16-.5.357-.5h4.286c.197 0 .357.224.357.5s-.16.5-.357.5H7.357zM7.5 16a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm8.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V9a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"search",icon:["24","24",[],"","M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"]}},function(e,t){e.exports={prefix:"cv",iconName:"share",icon:["24","24",[],"","M15.091 15.463a2.187 2.187 0 1 1-.392.782L8.91 13.35a2.187 2.187 0 1 1-.1-2.82l5.88-2.812a2.187 2.187 0 1 1 .378.79l-5.811 2.778a2.184 2.184 0 0 1 .045 1.281l5.79 2.896z"]}},function(e,t){e.exports={prefix:"cv",iconName:"upload",icon:["24","24",[],"","M5.5 18.5h13v-2.75a.75.75 0 1 1 1.5 0V19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3.25a.75.75 0 1 1 1.5 0v2.75zm7.249-11.796v8.57c0 .401-.35.726-.781.726-.432 0-.781-.325-.781-.725V6.704L7.89 9.658a.869.869 0 0 1-1.145 0 .692.692 0 0 1-.009-1.05l4.66-4.174a.869.869 0 0 1 1.144 0l4.66 4.174a.69.69 0 0 1 0 1.042.871.871 0 0 1-1.155.008L12.75 6.704z"]}},function(e,t){e.exports={prefix:"cv",iconName:"down",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"right",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"up-down",icon:["24","24",[],"","M8 14l8 .014L12 18l-4-4zm0-4l4-4 4 3.986L8 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"no-edit",icon:["24","24",[],"","M11.321 14.15l.707.707-4.578 4.578c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L9.2 12.028l.707.707-3.739 3.74 1.468 1.36 3.685-3.685zm2.828-2.829l2.233-2.232-1.414-1.414-2.233 2.232-.707-.707 4.14-4.14a1.5 1.5 0 0 1 2.12 0l.708.708a1.5 1.5 0 0 1 0 2.121l-4.14 4.14-.707-.708zm-8.933 7.486c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zM4.646 5.355a.5.5 0 0 1 .708-.708L19.496 18.79a.5.5 0 1 1-.707.707L4.646 5.354z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit-clickview",icon:["20","20",[],"","M17.6404852,5.71727477 L18.2297408,6.30653042 C18.7178962,6.79468579 18.7178962,7.58614201 18.2297408,8.07429738 L8.60812289,17.6959153 C6.71135346,18.0295451 5.75309028,18.1864816 5.73333333,18.1667246 C5.71357639,18.1469677 5.88616537,17.2043571 6.25110029,15.3388927 L15.8727182,5.71727477 C16.3608736,5.22911941 17.1523298,5.22911941 17.6404852,5.71727477 Z M8.7636789,16.361848 L16.05144,9.07408693 L14.8729287,7.89557563 L7.54002172,15.2284826 L8.7636789,16.361848 Z M6.74626541,17.1725049 C7.12145752,17.1092038 7.58975231,17.0283895 8.15085565,16.9301078 L6.99799308,15.862313 C6.89682248,16.3819093 6.8128974,16.8187273 6.74626541,17.1725049 Z M15.4621843,7.30631998 L16.6406956,8.48483128 L17.6404852,7.48504173 C17.8032036,7.32232327 17.8032036,7.05850453 17.6404852,6.89578608 L17.0512295,6.30653042 C16.8885111,6.14381197 16.6246923,6.14381197 16.4619739,6.30653042 L15.4621843,7.30631998 Z M6.33566019,14.9908489 C6.2812423,14.9851574 6.22594201,14.9756491 6.16991424,14.9622805 C5.78045547,14.8577915 5.5109401,14.5829916 5.41684139,14.197065 L5.16924027,13.2272939 L4.21481414,13.4992408 C3.82064978,13.614606 3.44283804,13.5120571 3.186267,13.236167 C2.88681965,12.9560388 2.78427075,12.578227 2.89864522,12.187493 L3.17158282,11.2296365 L2.20423564,10.9826478 C1.82188543,10.8870603 1.55144636,10.6218219 1.4331146,10.2152085 C1.34005988,9.82437875 1.44481708,9.45772856 1.72601896,9.19546209 L2.43808286,8.49887783 L1.73450689,7.81040417 C1.44481706,7.54002697 1.34005989,7.17337687 1.439649,6.75790801 C1.55144635,6.37593371 1.82188539,6.11069542 2.20181175,6.01572028 L3.17158282,5.76811916 L2.89963593,4.81369299 C2.78427075,4.41952863 2.88681965,4.04171689 3.16270985,3.78514587 C3.442838,3.48569854 3.82064974,3.38314964 4.2113838,3.49752411 L5.16924027,3.77046171 L5.41554008,2.80590417 C5.51183431,2.41109782 5.78619407,2.13673807 6.15902913,2.0463353 C6.55319349,1.93097012 6.93100525,2.03351902 7.20467421,2.32619001 L7.89999894,3.04211696 L8.594506,2.32703389 C8.87243071,2.03952554 9.24209506,1.93918808 9.61899753,2.04044384 C10.0138038,2.13673809 10.2881636,2.41109789 10.3831565,2.80069064 L10.6307576,3.77046171 L11.5851838,3.49851482 C11.9793481,3.38314964 12.3571599,3.48569854 12.6137309,3.76158875 C12.9131782,4.04171689 13.0157271,4.41952857 12.9013527,4.8102627 L12.6284151,5.76811916 L13.5957624,6.01510789 C13.9781125,6.11069542 14.2485515,6.37593369 14.3668833,6.78254721 C14.3761095,6.82129727 14.3833912,6.85980963 14.3887491,6.89800613 L12.4311686,8.86525019 C12.2885501,8.50246788 12.3664513,8.07377489 12.6626209,7.7840438 L13.3831727,7.07934901 C13.4057811,7.05824779 13.4051218,7.06055538 13.4006115,7.03880681 C13.3874896,6.9939735 13.3872742,6.99376225 13.3508029,6.98463799 L12.3810318,6.73703687 L12.3543769,6.72983797 C11.8232342,6.57849086 11.5153491,6.0252236 11.6666962,5.49408097 L11.9406245,4.53279433 C11.9501787,4.50015106 11.9538346,4.51362027 11.9070166,4.46830299 C11.8852565,4.44504217 11.8987257,4.44869811 11.8626522,4.45924293 L10.9047957,4.73218053 L10.8781408,4.73937942 C10.3430223,4.87600541 9.79846586,4.55296343 9.66183987,4.01784495 L9.41293742,3.04286026 C9.40513226,3.0108591 9.4140425,3.01976934 9.37095513,3.00912543 C9.33213613,2.99871057 9.33745796,2.99726608 9.31267674,3.02289983 L8.61735201,3.73882678 L8.59670876,3.75947002 C8.2005256,4.14425223 7.56742808,4.13500994 7.18264587,3.73882678 L6.48086195,3.01612347 C6.45910183,2.99286265 6.4725711,2.9965186 6.4179566,3.01196417 C6.38595535,3.01976935 6.39486559,3.01085911 6.3857591,3.04807388 L6.13815798,4.01784495 L6.13095909,4.04449986 C5.97961199,4.5756425 5.42634475,4.88352762 4.89520211,4.73218053 L3.93391535,4.45825223 C3.90127212,4.44869811 3.91474139,4.44504217 3.86942412,4.49186014 C3.84616328,4.51362028 3.84981922,4.50015102 3.86036404,4.53622453 L4.13330164,5.494081 L4.14050053,5.52073591 C4.27712653,6.05585439 3.95408454,6.60041087 3.41896607,6.73703687 L2.44677117,6.98525039 C2.41272371,6.99376225 2.41250834,6.99397349 2.40592081,7.01416766 C2.3948761,7.06055542 2.39421677,7.05824776 2.42531312,7.08745955 L3.13737702,7.78404381 L3.15291688,7.79958367 C3.53912638,8.1943756 3.53216895,8.82750235 3.13737702,9.21371185 L2.41682511,9.91840678 C2.39421677,9.93950789 2.3948761,9.93720022 2.3993864,9.95894886 C2.41250834,10.0037822 2.41272371,10.0039934 2.44919499,10.0131176 L3.41896606,10.2607188 L3.44562098,10.2679177 C3.97676362,10.4192648 4.28464874,10.972532 4.13330164,11.5036746 L3.85937334,12.4649614 C3.84981922,12.4976046 3.84616328,12.4841354 3.89298124,12.5294526 C3.91474137,12.5527135 3.90127209,12.5490575 3.93734565,12.5385127 L4.89520212,12.2655751 L4.92185702,12.2583762 C5.4569755,12.1217502 6.00153199,12.4447922 6.13815798,12.9799107 L6.38706042,13.9548953 C6.3957598,13.9905628 6.39169395,13.9864172 6.41528883,13.9929559 C6.46167656,14.0040006 6.45936885,14.00466 6.48858067,13.9735636 L7.18516493,13.2614997 L7.20070477,13.2459599 C7.4952939,12.9577749 7.92258715,12.888504 8.28097421,13.0359319 L6.33566019,14.9908489 Z M6.70489207,8.77616163 L9.31429327,6.16676041 C9.44212761,6.03892605 9.65593967,6.03389908 9.78471434,6.16267377 L10.2815938,6.65955323 C10.4116803,6.78963968 10.4085388,6.9989426 10.2775071,7.12997428 L6.95925927,10.4482222 C6.89767261,10.5098088 6.81613041,10.5428917 6.73375541,10.5462414 C6.63512454,10.5601257 6.53103126,10.5287286 6.45266973,10.450367 L4.80169873,8.79939603 C4.67185163,8.66954896 4.66967053,8.4612063 4.79975698,8.33111983 L5.29663643,7.83424043 C5.42541113,7.7054657 5.63211299,7.70338256 5.76491261,7.83618216 L6.70489207,8.77616163 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"caret",icon:["24","24",[],"","M8 10 16 10.0136253 12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-up",icon:["24","24",[],"","M12.733 8.305l5.963 5.906a1.046 1.046 0 0 1 0 1.473l-.01.011a1.034 1.034 0 0 1-1.467 0L12 10.526l-5.22 5.17a1.034 1.034 0 0 1-1.465 0l-.011-.012a1.046 1.046 0 0 1 0-1.473l5.963-5.906a1.034 1.034 0 0 1 1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-down",icon:["24","24",[],"","M11.267 15.695L5.304 9.79a1.046 1.046 0 0 1 0-1.473l.01-.011a1.034 1.034 0 0 1 1.467 0L12 13.474l5.22-5.17a1.034 1.034 0 0 1 1.465 0l.011.012a1.046 1.046 0 0 1 0 1.473l-5.963 5.906a1.034 1.034 0 0 1-1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-left",icon:["24","24",[],"","M8.305 11.267l5.906-5.963a1.046 1.046 0 0 1 1.473 0l.011.01a1.034 1.034 0 0 1 0 1.467L10.526 12l5.17 5.22c.406.41.406 1.055 0 1.465l-.012.011a1.046 1.046 0 0 1-1.473 0l-5.906-5.963a1.034 1.034 0 0 1 0-1.466z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-right",icon:["24","24",[],"","M15.695 11.267c.407.41.407 1.056 0 1.466L9.79 18.696a1.046 1.046 0 0 1-1.474 0l-.01-.01a1.034 1.034 0 0 1 0-1.467L13.474 12l-5.17-5.22a1.034 1.034 0 0 1 0-1.465l.012-.011a1.046 1.046 0 0 1 1.474 0l5.905 5.963z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-left",icon:["24","24",[],"","M7.182 11h11.89c.512 0 .928.448.928 1s-.416 1-.929 1H7.181l3.781 4.22a1.11 1.11 0 0 1 0 1.465c-.36.403-.943.418-1.311.045a.952.952 0 0 1-.032-.034l-5.343-5.963a1.112 1.112 0 0 1 0-1.466l5.343-5.963a.883.883 0 0 1 1.333 0c.378.421.378 1.066.01 1.477L7.182 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-right",icon:["24","24",[],"","M16.818 11H4.928C4.417 11 4 11.448 4 12s.416 1 .929 1h11.89l-3.781 4.22a1.112 1.112 0 0 0 0 1.465c.36.403.943.418 1.311.045a.952.952 0 0 0 .032-.034l5.343-5.963a1.112 1.112 0 0 0 0-1.466l-5.343-5.963a.883.883 0 0 0-1.333 0 1.115 1.115 0 0 0-.01 1.477L16.818 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"enter",icon:["24","24",[],"","M5.613 13.959a.599.599 0 0 1-.213-.46c0-.155.058-.309.176-.426l3.75-3.75a.6.6 0 0 1 .848.848L7.446 12.9H13.5A3.9 3.9 0 0 0 17.4 9V6.747a.6.6 0 0 1 1.2 0V9a5.1 5.1 0 0 1-5.1 5.1H7.452l2.722 2.723a.6.6 0 0 1-.848.848L5.613 13.96z"]}},function(e,t){e.exports={prefix:"cv",iconName:"archive",icon:["24","24",[],"","M19.64 10.28a.55.55 0 1 1 1.1 0v6.878c0 1.582-1.386 2.842-3.07 2.842H6.33c-1.684 0-3.07-1.26-3.07-2.842V10.28a.55.55 0 1 1 1.1 0v6.877c0 .95.87 1.742 1.97 1.742h11.34c1.1 0 1.97-.793 1.97-1.742V10.28zM20.19 4c.99 0 1.81.747 1.81 1.696V7.99a.55.55 0 0 1-.55.55H2.55A.55.55 0 0 1 2 7.99V5.696C2 4.747 2.821 4 3.81 4h16.38zm.71 1.696c0-.317-.307-.596-.71-.596H3.81c-.403 0-.71.28-.71.596v1.742h17.8V5.696zm-5.83 5.73c0 .95-.821 1.697-1.81 1.697h-2.52c-.989 0-1.81-.747-1.81-1.696 0-.95.821-1.696 1.81-1.696h2.52c.989 0 1.81.747 1.81 1.696zm-1.1 0c0-.316-.307-.595-.71-.595h-2.52c-.403 0-.71.28-.71.596 0 .317.307.596.71.596h2.52c.403 0 .71-.28.71-.596z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bell",icon:["24","24",[],"","M9.588 17.995H6.152c-.636 0-1.152-.53-1.152-1.182 0-.221.06-.438.175-.626l2.128-2.92V9.722c0-2.187 1.447-4.027 3.411-4.567v-.012A1.143 1.143 0 0 1 13 5.128c2.017.502 3.515 2.369 3.515 4.594v3.545l2.303 2.92a1.2 1.2 0 0 1-.366 1.628 1.13 1.13 0 0 1-.61.18h-3.716a2.286 2.286 0 0 1-4.538 0zm1.161 0a1.143 1.143 0 0 0 2.216 0H10.75zm4.615-4.31V9.723c0-1.958-1.547-3.546-3.455-3.546-1.908 0-3.454 1.588-3.454 3.546v3.939l-.23.314-2.073 2.838H17.83l-2.467-3.127z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bookmark",icon:["24","24",[],"","M8.5 5h7A1.5 1.5 0 0 1 17 6.5v12.131a.2.2 0 0 1-.309.168L12 15.75 7.309 18.8A.2.2 0 0 1 7 18.63V6.5A1.5 1.5 0 0 1 8.5 5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"broadcast",icon:["24","24",[],"","M4.571 19C4.256 19 4 18.776 4 18.5s.256-.5.571-.5H19.43c.315 0 .571.224.571.5s-.256.5-.571.5H4.57zM4.125 5h15.75C20.496 5 21 5.537 21 6.2v9.6c0 .663-.504 1.2-1.125 1.2H4.125C3.504 17 3 16.463 3 15.8V6.2C3 5.537 3.504 5 4.125 5zM4 6v10h16V6H4zm6 2.35a.192.192 0 0 1 .295-.162l4.164 2.65a.192.192 0 0 1 0 .324l-4.164 2.65A.192.192 0 0 1 10 13.65v-5.3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"calendar",icon:["24","24",[],"","M6.2 10.2V17a.8.8 0 0 0 .8.8h10a.8.8 0 0 0 .8-.8v-6.8H6.2zM16 5.5h2a1 1 0 0 1 1 1V17a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6.5a1 1 0 0 1 1-1h2v-.875a.625.625 0 1 1 1.25 0V5.5h5.5v-.875a.625.625 0 1 1 1.25 0V5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"cog",icon:["24","24",[],"","M18.458 12c0 .944.514 1.722 1.542 2.333a10.98 10.98 0 0 1-.667 1.584c-.944-.223-1.805.055-2.583.833-.694.694-.917 1.556-.667 2.583A10.98 10.98 0 0 1 14.5 20c-.611-1.028-1.444-1.542-2.5-1.542s-1.889.514-2.5 1.542c-.5-.167-1.042-.389-1.625-.667.25-1.055.042-1.916-.625-2.583-.667-.667-1.528-.875-2.583-.625C4.389 15.542 4.167 15 4 14.5c1.028-.611 1.542-1.444 1.542-2.5 0-.944-.514-1.722-1.542-2.333a8.484 8.484 0 0 1 .667-1.584c.944.223 1.805-.055 2.583-.833.667-.667.875-1.528.625-2.583C8.458 4.389 9 4.167 9.5 4c.611 1.028 1.444 1.542 2.5 1.542S13.889 5.028 14.5 4c.5.167 1.042.389 1.625.667-.25 1.055-.042 1.916.625 2.583.778.778 1.639 1.056 2.583.833.306.611.528 1.14.667 1.584-1.028.61-1.542 1.389-1.542 2.333zM12 16.083c1.111 0 2.07-.402 2.875-1.208.806-.806 1.208-1.764 1.208-2.875s-.402-2.07-1.208-2.875c-.806-.806-1.764-1.208-2.875-1.208s-2.07.402-2.875 1.208c-.806.806-1.208 1.764-1.208 2.875s.402 2.07 1.208 2.875c.806.806 1.764 1.208 2.875 1.208z"]}},function(e,t){e.exports={prefix:"cv",iconName:"folder",icon:["24","24",[],"","M12.685 6H18.5A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18.5v-13A1.5 1.5 0 0 1 5.5 4h4.66a1.5 1.5 0 0 1 1.095.474L12.685 6zM5.5 5a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-6.248l-1.727-1.842A.5.5 0 0 0 10.161 5H5.5zM5 10V9h14v1H5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"handle",icon:["16","16",[],"","M1 0h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7.4a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1V15a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-1.2a1 1 0 0 1 1-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c4.001-4.053 1.158-11.055-4.532-11.055-3.417 0-4.985 2.511-5.596 2.98-.614-.471-2.172-2.98-5.596-2.98-5.672 0-8.55 6.984-4.531 11.055z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart-outline",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c2.491-2.523 2.491-6.63 0-9.154-1.21-1.226-2.819-1.901-4.532-1.901s-3.321.675-4.531 1.9l-1.065 1.08-1.065-1.079c-1.21-1.226-2.819-1.901-4.531-1.901-1.713 0-3.322.675-4.532 1.901-2.491 2.524-2.491 6.631 0 9.153zm-8.527-17.822c.926-.937 2.157-1.454 3.464-1.454 1.308 0 2.538.517 3.463 1.455l1.599 1.62c.281.285.786.285 1.067 0l1.599-1.621c.928-.937 2.158-1.454 3.465-1.454 1.308 0 2.538.517 3.464 1.454 1.917 1.943 1.917 5.104 0 7.048l-9.06 9.181-9.061-9.182c-1.917-1.942-1.917-5.104 0-7.047z"]}},function(e,t){e.exports={prefix:"cv",iconName:"interactive",icon:["24","24",[],"","M5.978 13.65l7.525-9.99a.2.2 0 0 1 .357.154l-1.289 7.5 5.194-1.04a.2.2 0 0 1 .198.318l-7.447 9.733a.2.2 0 0 1-.355-.16l1.268-6.566-5.277.37a.2.2 0 0 1-.174-.32z"]}},function(e,t){e.exports={prefix:"cv",iconName:"link",icon:["24","24",[],"","M17 10c2.2 0 4 1.8 4 4s-1.8 4-4 4h-5a3.99 3.99 0 0 1-3-1.367v-.028a4.447 4.447 0 0 1-.889-2.679c0-.698.162-1.356.443-1.94A4 4 0 0 1 12 10h1.872v.098c0 .573-.322 1.081-.818 1.402H12c-.722 0-1.368.316-1.824.811-.453.418-.732.976-.732 1.591v.196c0 .575.244 1.1.645 1.508.46.545 1.146.894 1.911.894h5c1.375 0 2.5-1.125 2.5-2.5s-1.125-2.5-2.5-2.5h-.686a5.22 5.22 0 0 0 .24-1.5H17zm-9.556 3.926l.002.074H7c-2.2 0-4-1.8-4-4s1.8-4 4-4h5c1.462 0 2.743.797 3.441 1.975a4.48 4.48 0 0 1-.44 4.63v.024a3.982 3.982 0 0 1-3 1.37h-1.873v-.096c0-.574.322-1.082.817-1.403H12c.722 0 1.368-.316 1.824-.811.452-.418.731-.976.731-1.591v-.195c0-.576-.244-1.101-.645-1.51A2.496 2.496 0 0 0 12 7.5H7A2.507 2.507 0 0 0 4.5 10c0 1.375 1.125 2.5 2.5 2.5h.642c-.128.452-.198.93-.198 1.426z"]}},function(e,t){e.exports={prefix:"cv",iconName:"playlist",icon:["24","24",[],"","M4,19.0049107 C4,19.5548349 4.44525903,20 4.99508929,20 L19.0049107,20 C19.5548349,20 20,19.554741 20,19.0049107 L20,4.99508929 C20,4.44516513 19.554741,4 19.0049107,4 L4.99508929,4 C4.44516513,4 4,4.44525903 4,4.99508929 L4,19.0049107 Z M4.99508929,3 L19.0049107,3 C20.1067681,3 21,3.8926228 21,4.99508929 L21,19.0049107 C21,20.1067681 20.1073772,21 19.0049107,21 L4.99508929,21 C3.8932319,21 3,20.1073772 3,19.0049107 L3,4.99508929 C3,3.8932319 3.8926228,3 4.99508929,3 Z M17.5,17.3 C17.7761424,17.3 18,17.0761424 18,16.8 C18,16.5238576 17.7761424,16.3 17.5,16.3 L9.5,16.3 C9.22385763,16.3 9,16.5238576 9,16.8 C9,17.0761424 9.22385763,17.3 9.5,17.3 L17.5,17.3 Z M17.5,12.7 C17.7761424,12.7 18,12.4761424 18,12.2 C18,11.9238576 17.7761424,11.7 17.5,11.7 L9.5,11.7 C9.22385763,11.7 9,11.9238576 9,12.2 C9,12.4761424 9.22385763,12.7 9.5,12.7 L17.5,12.7 Z M8.07195299,7.22930174 L6.86542219,6.50538326 C6.38401051,6.21653625 6,6.43413716 6,6.98678206 L6,8.51032805 C6,9.06455544 6.38746271,9.27850253 6.86542219,8.99172685 L8.07195299,8.26780837 C8.55336467,7.97896136 8.54991246,7.51607743 8.07195299,7.22930174 Z M8.07195299,11.7293017 L6.86542219,11.0053833 C6.38401051,10.7165363 6,10.9341372 6,11.4867821 L6,13.010328 C6,13.5645554 6.38746271,13.7785025 6.86542219,13.4917268 L8.07195299,12.7678084 C8.55336467,12.4789614 8.54991246,12.0160774 8.07195299,11.7293017 Z M8.07195299,16.2293017 L6.86542219,15.5053833 C6.38401051,15.2165363 6,15.4341372 6,15.9867821 L6,17.510328 C6,18.0645554 6.38746271,18.2785025 6.86542219,17.9917268 L8.07195299,17.2678084 C8.55336467,16.9789614 8.54991246,16.5160774 8.07195299,16.2293017 Z M17.5,8.3 C17.7761424,8.3 18,8.07614237 18,7.8 C18,7.52385763 17.7761424,7.3 17.5,7.3 L9.5,7.3 C9.22385763,7.3 9,7.52385763 9,7.8 C9,8.07614237 9.22385763,8.3 9.5,8.3 L17.5,8.3 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"publisher-archive",icon:["24","24",[],"","M19.6403207,10.2808023 C19.6403207,9.97696656 19.8864872,9.73065903 20.1901489,9.73065903 C20.4938106,9.73065903 20.7399771,9.97696656 20.7399771,10.2808023 L20.7399771,17.1575931 C20.7399771,18.7397289 19.3544729,20 17.6701031,20 L6.32989691,20 C4.64552709,20 3.26002291,18.7397289 3.26002291,17.1575931 L3.26002291,10.2808023 C3.26002291,9.97696656 3.50618937,9.73065903 3.80985109,9.73065903 C4.11351281,9.73065903 4.35967927,9.97696656 4.35967927,10.2808023 L4.35967927,17.1575931 C4.35967927,18.1074218 5.23070097,18.8997135 6.32989691,18.8997135 L17.6701031,18.8997135 C18.769299,18.8997135 19.6403207,18.1074218 19.6403207,17.1575931 L19.6403207,10.2808023 Z M20.1901489,4 C21.1786273,4 22,4.74713037 22,5.69627507 L22,7.98853868 C22,8.29237442 21.7538335,8.53868195 21.4501718,8.53868195 L2.54982818,8.53868195 C2.24616646,8.53868195 2,8.29237442 2,7.98853868 L2,5.69627507 C2,4.74713037 2.82137271,4 3.80985109,4 L20.1901489,4 Z M20.9003436,5.69627507 C20.9003436,5.37943754 20.5934534,5.10028653 20.1901489,5.10028653 L3.80985109,5.10028653 C3.40654659,5.10028653 3.09965636,5.37943754 3.09965636,5.69627507 L3.09965636,7.43839542 L20.9003436,7.43839542 L20.9003436,5.69627507 Z M15.069874,11.4269341 C15.069874,12.3760788 14.2485013,13.1232092 13.2600229,13.1232092 L10.7399771,13.1232092 C9.75149871,13.1232092 8.930126,12.3760788 8.930126,11.4269341 C8.930126,10.4777894 9.75149871,9.73065903 10.7399771,9.73065903 L13.2600229,9.73065903 C14.2485013,9.73065903 15.069874,10.4777894 15.069874,11.4269341 Z M13.9702176,11.4269341 C13.9702176,11.1100966 13.6633274,10.8309456 13.2600229,10.8309456 L10.7399771,10.8309456 C10.3366726,10.8309456 10.0297824,11.1100966 10.0297824,11.4269341 C10.0297824,11.7437716 10.3366726,12.0229226 10.7399771,12.0229226 L13.2600229,12.0229226 C13.6633274,12.0229226 13.9702176,11.7437716 13.9702176,11.4269341 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"resources",icon:["24","24",[],"","M4 6.83c0-.523.423-.948.948-.948H17.17c.524 0 .949.423.949.949v12.22a.947.947 0 0 1-.949.949H4.95a.947.947 0 0 1-.95-.948V6.83zm.941 12.222c0 .005 12.228.007 12.228.007.005 0 .007-12.228.007-12.228 0-.005-12.228-.007-12.228-.007-.005 0-.007 12.228-.007 12.228zm2.353-9.405a.47.47 0 1 1 0-.941h7.588a.47.47 0 1 1 0 .941H7.294zm0 2.824a.47.47 0 1 1 0-.942h7.588a.47.47 0 1 1 0 .942H7.294zm0 2.823a.47.47 0 1 1 0-.941h2.88a.47.47 0 1 1 0 .941h-2.88zM6.353 4.941a.47.47 0 1 1 0-.941h11.766C19.155 4 20 4.848 20 5.88v12.232a.47.47 0 1 1-.941 0V5.88a.945.945 0 0 0-.94-.938H6.353z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star-o",icon:["24","24",[],"","M11.64 16.055a.768.768 0 0 1 .72 0l3.767 1.998-.806-4.602 3.357-3.249-4.626-.654L12 5.35 9.948 9.548l-4.626.654 3.357 3.25-.807 4.601 3.768-1.998zm-3.75 3.148a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star",icon:["24","24",[],"","M7.89 19.203a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"tag",icon:["24","24",[],"","M9.85651379,4 C10.5597673,4 11.2342681,4.27911643 11.7318501,4.77635695 L11.7318501,4.77635695 L19.5192508,12.5634018 C20.1602555,13.2045708 20.1602555,14.2439177 19.5192159,14.8851217 L19.5192159,14.8851217 L14.8855145,19.5192848 C14.2443321,20.1602442 13.2049876,20.1602442 12.5637184,19.519198 L12.5637184,19.519198 L4.7762613,11.7314233 C4.27913559,11.2340016 4,10.5595161 4,9.85635067 L4,9.85635067 L4,5.64191268 C4,4.7351029 4.73513649,4 5.64195885,4 L5.64195885,4 L9.85651379,4 Z M9.85658948,5.26315824 L5.64195885,5.26315824 C5.4327466,5.26315824 5.26315823,5.43273884 5.26315823,5.64191268 L5.26315823,5.64191268 L5.26315823,9.85642637 C5.26315823,10.2247328 5.40935021,10.5779817 5.66959105,10.8383776 L5.66959105,10.8383776 L13.4568376,18.6259418 C13.6047616,18.7738142 13.8445582,18.7738142 13.9923822,18.6260417 L13.9923822,18.6260417 L18.6259486,13.9920135 C18.7738119,13.8441123 18.7738119,13.6043763 18.6260161,13.4565426 L18.6260161,13.4565426 L10.8388259,5.6697082 C10.5782887,5.40934993 10.2250082,5.26315824 9.85658948,5.26315824 L9.85658948,5.26315824 Z M7.78947471,6.10526373 C8.71963876,6.10526373 9.4736857,6.85931068 9.4736857,7.78947472 C9.4736857,8.71963876 8.71963876,9.4736857 7.78947471,9.4736857 C6.85931067,9.4736857 6.10526373,8.71963876 6.10526373,7.78947472 C6.10526373,6.85931068 6.85931067,6.10526373 7.78947471,6.10526373 Z M7.78947471,7.36842197 C7.5569337,7.36842197 7.36842197,7.55693371 7.36842197,7.78947472 C7.36842197,8.02201573 7.5569337,8.21052747 7.78947471,8.21052747 C8.02201572,8.21052747 8.21052746,8.02201573 8.21052746,7.78947472 C8.21052746,7.55693371 8.02201572,7.36842197 7.78947471,7.36842197 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"time",icon:["24","24",[],"","M12 4c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 1.077a6.88 6.88 0 0 0-4.896 2.027A6.877 6.877 0 0 0 5.077 12c0 1.85.72 3.588 2.027 4.896A6.877 6.877 0 0 0 12 18.923a6.88 6.88 0 0 0 4.896-2.027A6.877 6.877 0 0 0 18.923 12a6.88 6.88 0 0 0-2.027-4.896A6.877 6.877 0 0 0 12 5.077zm2.524 9.599a.6.6 0 0 1-.848.848l-2.5-2.5A.6.6 0 0 1 11 12.6V8.624a.6.6 0 0 1 1.2 0v3.727l2.324 2.325z"]}},function(e,t){e.exports={prefix:"cv",iconName:"video",icon:["24","24",[],"","M4.5 6a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm0-1h15A1.5 1.5 0 0 1 21 6.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5v-11A1.5 1.5 0 0 1 4.5 5zM10 9.26v5.48a.256.256 0 0 0 .39.218l4.482-2.74a.256.256 0 0 0 0-.436l-4.483-2.74a.256.256 0 0 0-.389.219z"]}},function(e,t){e.exports={prefix:"cv",iconName:"subject",icon:["24","24",[],"","M19.15,21.08H5.1c-1.09,0-1.98-0.89-1.98-1.98V5.06c0-1.09,0.89-1.98,1.98-1.98h14.04c1.09,0,1.98,0.89,1.98,1.98V19.1 C21.12,20.19,20.24,21.08,19.15,21.08z M20.12,19.16V5c0-0.51-0.41-0.92-0.92-0.92H7.04C6.54,4.08,6.12,4.49,6.12,5v14.16 c0,0.51,0.41,0.92,0.92,0.92h12.16C19.71,20.08,20.12,19.67,20.12,19.16z M19.12,6.95V6.81c0-0.36-0.29-0.65-0.65-0.65H8.78 c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69C18.83,7.6,19.12,7.31,19.12,6.95z M19.12,9.95V9.81 c0-0.36-0.29-0.65-0.65-0.65H8.78c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69 C18.83,10.6,19.12,10.31,19.12,9.95z"]}},function(e,t){e.exports={prefix:"cv",iconName:"series",icon:["24","24",[],"","M20.49,3.51c0.97,0,1.76,0.79,1.76,1.76v9.27c0,0.77-0.49,1.42-1.18,1.66l0.09-10.84c0-0.39-0.3-0.7-0.68-0.7l-14.27,0 C6.46,3.99,7.1,3.51,7.85,3.51H20.49z M18.38,5.56c0.97,0,1.76,0.79,1.76,1.75v9.27c0.01,0.77-0.49,1.42-1.17,1.66l0.09-10.86 c0-0.38-0.3-0.68-0.68-0.68l-14.28,0c0.25-0.67,0.89-1.14,1.64-1.14H18.38z M16.15,7.7c0.97,0,1.75,0.79,1.75,1.76v9.27 c0,0.97-0.79,1.75-1.75,1.75H3.5c-0.97,0-1.75-0.79-1.75-1.75V9.46c0-0.97,0.79-1.76,1.75-1.76H16.15z M16.14,8.85H3.51 c-0.38,0-0.68,0.3-0.68,0.68l0,0v9.13c0,0.38,0.3,0.68,0.68,0.68l0,0h12.62c0.38,0,0.68-0.3,0.68-0.68l0,0V9.53 C16.82,9.15,16.52,8.85,16.14,8.85L16.14,8.85z M8.46,12.41v3.37c0,0.18,0.21,0.28,0.35,0.18l2.31-1.69c0.12-0.09,0.12-0.27,0-0.35 L8.8,12.23C8.66,12.13,8.46,12.23,8.46,12.41"]}},function(e,t){e.exports={prefix:"cv",iconName:"white-wave",icon:["1200","244",[],"","M1104.19651,33.5198863 C1084.14716,45.4511816 1067.10689,82.9623447 1047.23647,124.40502 C1023.86518,173.149287 924.725009,160.996474 830.060105,199.668011 C735.395201,238.339548 706.121292,249.351671 618.615175,241.737466 C531.109058,234.12326 495.404437,207.34459 432.2827,199.668011 C370.933901,192.207048 283.214734,200.240922 234.995453,186.264588 C153.311618,162.588569 167.948341,80.4093241 122.421855,59.9864363 C102.62311,51.1048469 61.8158253,37.3273576 0,18.6539685 L0,0 L1200,0 C1161.79495,7.07406031 1129.86046,18.2473557 1104.19651,33.5198863 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"compass",icon:["24","24",[],"","M12,-1.71862524e-13 C13.3893905,-1.71862524e-13 14.5197317,1.12166968 14.5197317,2.50040137 C14.5197317,2.8215332 14.4594938,3.13263028 14.3442115,3.42156921 C16.2349366,3.84633285 17.9748233,4.78862459 19.3866372,6.17539419 L19.4316433,6.22680193 C21.3267651,8.11265804 22.5,10.713205 22.5,13.5805516 C22.5,19.3258216 17.7897333,24 12,24 L12,24 C6.21026669,24 1.5,19.3258216 1.5,13.5805516 L1.50006052,13.5243182 C1.50002021,13.5212739 1.5,13.5182249 1.5,13.5151711 L1.501,13.503 L1.50378159,13.2988768 C1.57785421,10.543134 2.73548466,8.05071265 4.56835673,6.22680193 L4.61336276,6.17539419 C6.02517671,4.78862459 7.76506343,3.84633285 9.65748913,3.42018903 C9.54056383,3.13263028 9.48031555,2.8215332 9.48031555,2.50040137 C9.48031555,1.12166968 10.6106095,-1.71862524e-13 12,-1.71862524e-13 Z M12,4.52624116 L11.6809164,4.53170146 C11.6454989,4.53291535 11.610132,4.53433052 11.5748169,4.53594584 L11.6816694,4.53162088 C11.5883913,4.53477816 11.4953516,4.53932139 11.4025747,4.54524062 L11.5748169,4.53594584 C11.4679256,4.54083509 11.3615084,4.54755809 11.2555967,4.55608379 L11.4025747,4.54524062 C11.3068176,4.55134999 11.2113405,4.55892518 11.1161702,4.56795525 L11.2555967,4.55608379 C11.095392,4.56897997 10.9363438,4.5860008 10.7785603,4.60703883 C10.7467123,4.6104578 10.7154515,4.61475211 10.6842289,4.61920452 L10.7785603,4.60703883 C10.6768565,4.62059949 10.5756781,4.63582921 10.4750543,4.65269924 L10.6842289,4.61920452 C10.600263,4.63117821 10.5165735,4.64429522 10.4331795,4.65854779 L10.4750543,4.65269924 C9.11485909,4.88074187 7.85598275,5.40850943 6.77005357,6.16492738 L8.00490498,7.39068924 C8.27354347,7.65726684 8.27354347,8.0894535 8.00490498,8.35612485 C7.87046765,8.48939021 7.69450873,8.55604633 7.5184081,8.55604633 C7.34230747,8.55604633 7.16634856,8.48943709 7.03200569,8.35612485 L5.70204148,7.03485023 C4.13204115,8.52299364 3.09475895,10.5601022 2.90659433,12.8322227 L4.30759576,12.8325787 C4.68743083,12.8325787 4.99546522,13.1382031 4.99546522,13.5151711 C4.99546522,13.892186 4.68747807,14.1977635 4.30764299,14.1977635 L2.89670934,14.1976473 C3.02371908,16.0609257 3.72135566,17.7714185 4.81716961,19.1579915 L4.97167812,19.3482139 C5.26113447,19.6949337 5.57609243,20.0199666 5.91367078,20.3204536 L7.03200569,19.2111609 C7.30069142,18.9445833 7.73612479,18.9445833 8.00490498,19.2111609 C8.27354347,19.4777385 8.27354347,19.9099252 8.00490498,20.1765497 L7.01386949,21.160078 C8.44796715,22.0922041 10.1613427,22.6346745 12,22.6346745 L12,22.6346745 C13.8583409,22.6346745 15.5887033,22.0805272 17.0320921,21.1300078 L16.0701299,20.1765497 C15.8014914,19.909972 15.8014914,19.4777854 16.0701299,19.2111609 C16.3388156,18.9445833 16.774249,18.9445833 17.042982,19.2111609 L18.1252566,20.2856043 C18.4481451,19.9948825 18.7500205,19.681572 19.0283219,19.3482139 L19.1828304,19.1579915 C20.2466397,17.8119151 20.9351906,16.1605635 21.0907063,14.3605101 L21.1032907,14.1976527 L21.1032907,14.1976527 L19.4302507,14.1977635 C19.0504157,14.1977635 18.7423813,13.8921391 18.7423813,13.5151711 C18.7423813,13.1381562 19.0504157,12.8325787 19.4302507,12.8325787 L21.0934057,12.8322227 C20.9067892,10.5787961 19.8849698,8.55653016 18.3366017,7.07169263 L17.0430292,8.35607798 C16.9085919,8.48943709 16.732633,8.55604633 16.5565323,8.55604633 C16.3804317,8.55604633 16.2044728,8.48943709 16.0701299,8.35612485 C15.8014914,8.08954725 15.8014914,7.65736059 16.0701299,7.39068924 L17.2742569,6.19598696 C16.1894526,5.4308071 14.9295636,4.89482891 13.5669368,4.65983993 C13.5528409,4.65615858 13.538853,4.65380129 13.5248569,4.65147595 L13.5669368,4.65983993 C13.4834378,4.64544029 13.3995531,4.63217086 13.3152992,4.62004816 L13.5248569,4.65147595 C13.4243139,4.63477151 13.3233471,4.61971567 13.2219896,4.60632197 L13.3152992,4.62004816 C13.1723723,4.59948341 13.0283832,4.58221861 12.8834131,4.56833442 C12.8374466,4.56355426 12.7909906,4.55949885 12.7444647,4.55579028 L12.8834131,4.56833442 C12.7886701,4.55926062 12.6935082,4.5516307 12.5979499,4.54546716 L12.7444647,4.55579028 C12.6381278,4.54731418 12.5314263,4.5406499 12.4243976,4.53581255 L12.5979499,4.54546716 C12.5053597,4.53949506 12.4123973,4.53489967 12.3190836,4.53170146 L12.4243976,4.53581255 C12.2834709,4.52944313 12.1419768,4.52624116 12,4.52624116 Z M12.2098775,18.4456908 C12.3524617,18.4551964 12.4902931,18.464702 12.6328773,18.4884661 C12.6851582,18.4932189 12.7421919,18.5074773 12.7944727,18.5169829 C12.8039783,18.5169829 12.813484,18.5169829 12.8229896,18.5217357 C12.8990345,18.5692638 12.984585,18.5740166 13.0701355,18.5930278 C13.0938996,18.5977806 13.1224164,18.6025334 13.1509332,18.612039 C13.1746973,18.6215447 13.1984613,18.6310503 13.2174725,18.6500615 C13.2364838,18.6690727 13.255495,18.6833311 13.2887647,18.688084 C13.3172815,18.6928368 13.3362927,18.7213536 13.3362927,18.7546232 C13.3362927,18.7831401 13.3315399,18.8116569 13.3267871,18.835421 C13.3077759,18.9304771 13.2887647,19.030286 13.2650006,19.1253422 C13.2602478,19.153859 13.2507422,19.1823759 13.2412366,19.2108927 C13.2174725,19.277432 13.2127197,19.3487241 13.1937085,19.4152634 C13.1794501,19.4532859 13.1746973,19.4960611 13.1556861,19.5340836 C13.1414276,19.5673532 13.131922,19.6006229 13.1034052,19.6386453 C13.0891468,19.6529038 13.084394,19.6766678 13.0796411,19.7004318 C13.0606299,19.7527127 13.0321131,19.7717239 12.9750794,19.7622183 L12.9750794,19.7622183 L12.960821,19.7622183 C12.8562592,19.7384543 12.7564503,19.7194431 12.6566413,19.6909262 C12.5473268,19.6624094 12.4380122,19.6529038 12.3286977,19.6576566 C12.3001808,19.6576566 12.271664,19.6671622 12.2431471,19.6766678 C12.2051247,19.6909262 12.1956191,19.7194431 12.1956191,19.7574655 C12.1956191,19.7764767 12.2003719,19.7907352 12.2193831,19.795488 C12.2811696,19.8287576 12.3382033,19.8620273 12.419001,19.8762857 C12.442765,19.8810385 12.4617762,19.8952969 12.4807875,19.9048025 C12.5045515,19.9190609 12.5235627,19.9285666 12.542574,19.9380722 C12.689911,20.0093643 12.8467536,20.0711508 12.9798322,20.1709597 C13.084394,20.2422518 13.1604389,20.3325551 13.2032141,20.4513753 L13.2032141,20.4513753 L13.3077759,20.7745662 C13.3410455,20.8933864 13.3362927,21.0217122 13.3315399,21.1452851 C13.3267871,21.2403413 13.3125287,21.3401502 13.279259,21.4304535 C13.2745062,21.4352064 13.2745062,21.4399592 13.2745062,21.4494648 C13.2840118,21.5587793 13.2507422,21.6585883 13.1889557,21.7441388 C13.084394,21.8962286 12.9513154,22.0293072 12.7897199,22.1291162 C12.6851582,22.1956555 12.5710908,22.2336779 12.4475178,22.257442 C12.3239448,22.281206 12.1956191,22.3144756 12.0672933,22.3287341 C11.9579787,22.3429925 11.8486642,22.3429925 11.7441024,22.3382397 C11.6157766,22.3239812 11.4922036,22.3002172 11.3638778,22.2764532 C11.3448666,22.2764532 11.3258554,22.2669476 11.3068442,22.2621948 C11.2165408,22.2194195 11.1262375,22.2051611 11.0311814,22.1956555 C10.9076084,22.1766442 10.7887882,22.1481274 10.6652152,22.1243634 C10.6366984,22.1196106 10.6081815,22.0958465 10.6081815,22.0625769 C10.6081815,21.9675207 10.5844175,21.8677118 10.5986759,21.7726556 C10.6129344,21.6015546 10.62244,21.4257007 10.6414512,21.2545997 C10.6509568,21.1642964 10.6747208,21.073993 10.6984849,20.9789369 C10.7127433,20.9219032 10.7507658,20.8981392 10.8125522,20.902892 C10.9028556,20.9123976 10.9931589,20.9171504 11.0787094,20.9314088 C11.188024,20.9456672 11.2925857,20.9599257 11.3971475,20.9931953 C11.4541812,21.0074537 11.5112149,21.0169593 11.5682485,21.0217122 C11.6633047,21.026465 11.753608,21.026465 11.8439113,21.026465 C11.8866866,21.026465 11.9294619,20.9836897 11.9342147,20.9456672 C11.9389675,20.9123976 11.9152034,20.8696223 11.8724282,20.8553639 C11.8391585,20.8458583 11.7963833,20.8363527 11.7583608,20.8315999 C11.7345968,20.8268471 11.7108328,20.8220943 11.6870687,20.8220943 C11.6015182,20.8173415 11.5254733,20.7935774 11.4446756,20.7650606 C11.3638778,20.7317909 11.2783273,20.7127797 11.1975296,20.6795101 C11.088215,20.6414876 10.9884061,20.5797011 10.8981028,20.508409 C10.817305,20.4466225 10.7792826,20.361072 10.7507658,20.2707687 C10.7079905,20.1234316 10.6937321,19.9713418 10.7127433,19.819252 C10.7270017,19.7051846 10.7317545,19.5911173 10.7507658,19.4818027 C10.793541,19.2441624 10.8885972,19.030286 11.0596982,18.859185 C11.2070352,18.711848 11.3876419,18.612039 11.5920126,18.5550054 C11.7060799,18.5217357 11.8249001,18.4932189 11.9437203,18.4694548 C12.0340236,18.4551964 12.124327,18.4551964 12.2098775,18.4456908 Z M14.7328664,9.61765309 C15.1590885,9.61765309 15.5675493,9.84298078 15.7988231,10.2056519 C16.0296718,10.5678544 16.0563136,11.0171504 15.8699625,11.4074308 L14.1147664,15.0838768 C13.9903906,15.3443138 13.7774449,15.5556727 13.5149472,15.6790944 L9.80998461,17.4209191 C9.63676546,17.5022939 9.45419332,17.5435907 9.2670864,17.5435907 C8.84086431,17.5435907 8.43240343,17.3182631 8.20112965,16.9555919 C7.97028099,16.5933895 7.94363916,16.1440935 8.12999028,15.753813 L9.88518638,12.077367 C10.0095622,11.81693 10.2225079,11.6055242 10.4850055,11.4821494 L14.1899681,9.74032473 C14.3631873,9.65894988 14.5457594,9.61765309 14.7328664,9.61765309 Z M14.4894526,11.1101033 L11.1110414,12.6984127 L9.51045294,16.050953 L12.8888641,14.4626436 L14.4894526,11.1101033 Z M13.0226075,6.1644377 C13.0938996,6.1691905 13.1651917,6.1691905 13.2364838,6.1691905 L13.2364838,6.1691905 L13.5121466,6.18344892 C13.5596746,6.18344892 13.5929443,6.21196577 13.5976971,6.26424664 C13.6309667,6.56842629 13.6547308,6.87260593 13.6357196,7.17678557 C13.5976971,7.72335837 13.6262139,8.27468397 13.6167083,8.82125677 C13.6167083,9.03513308 13.6214611,9.24900939 13.6452252,9.46763851 L13.6452252,9.46763851 L13.6452252,9.59121149 C13.6404724,9.6625036 13.6024499,9.69102044 13.5359106,9.68626763 C13.526405,9.68626763 13.5121466,9.69102044 13.502641,9.69102044 C13.4836297,9.69577324 13.4598657,9.70527886 13.4408545,9.70052605 C13.3695624,9.68626763 13.2935175,9.69102044 13.2222254,9.69102044 C13.1414276,9.68626763 13.0606299,9.69577324 12.9798322,9.70052605 C12.837248,9.71003166 12.689911,9.71953728 12.542574,9.72429009 C12.4997987,9.72904289 12.4760347,9.70527886 12.4570234,9.6672564 L12.4570234,9.6672564 L12.271664,9.34881834 C12.1195741,9.07315554 11.9532259,8.81175116 11.8201473,8.52658274 L11.8201473,8.52658274 L11.8011361,8.49331309 L11.8011361,8.53608835 C11.7916305,8.81650396 11.777372,9.09216676 11.7821249,9.37258237 C11.7821249,9.4628857 11.777372,9.55318904 11.7726192,9.64349237 C11.7678664,9.71478447 11.729844,9.75280693 11.6585519,9.76231254 L11.6585519,9.76231254 L11.5112149,9.77657096 C11.4066531,9.78607658 11.3068442,9.76231254 11.2070352,9.75280693 L11.2070352,9.75280693 L10.8077994,9.75280693 C10.7555186,9.75280693 10.6747208,9.78132377 10.6557096,9.72429009 C10.646204,9.70527886 10.6414512,9.69102044 10.646204,9.61972833 C10.646204,9.58170588 10.6509568,9.56269465 10.6509568,9.51991939 L10.6509568,9.51991939 L10.6604624,9.31079588 L10.6794736,8.66441414 C10.6889793,8.33171766 10.7032377,7.99902117 10.6937321,7.66632469 C10.6889793,7.45720118 10.6794736,7.24807768 10.669968,7.04370698 C10.669968,7.03420136 10.669968,7.01994294 10.6652152,7.01043733 C10.6319456,6.81081944 10.6366984,6.60644874 10.6557096,6.40207804 C10.6604624,6.39257243 10.6557096,6.37831401 10.6604624,6.36405559 C10.6604624,6.32603313 10.6984849,6.28801068 10.7365073,6.28325787 C10.769777,6.28325787 10.8077994,6.28801068 10.8410691,6.28801068 L10.8410691,6.28801068 L10.8838443,6.28801068 C11.0216757,6.26424664 11.1595071,6.24048261 11.3020914,6.24523541 L11.3020914,6.24523541 L11.458934,6.2357298 C11.5444845,6.23097699 11.630035,6.22622419 11.7155856,6.22622419 C11.729844,6.22622419 11.7488552,6.23097699 11.7631136,6.24048261 C11.7821249,6.25474103 11.8011361,6.25949384 11.8249001,6.25474103 C11.877181,6.24523541 11.9056978,6.25949384 11.9247091,6.30702191 C11.9864956,6.47812295 12.0767989,6.63971839 12.171855,6.79180821 C12.2478999,6.91538119 12.3001808,7.04370698 12.3477089,7.17678557 C12.3952369,7.29085294 12.4475178,7.4001675 12.5093043,7.50948206 L12.5093043,7.50948206 L12.5235627,7.52849329 C12.5235627,7.52849329 12.5283155,7.52849329 12.5330683,7.52374048 L12.5330683,7.52374048 L12.5330683,7.50472925 C12.5330683,7.28134733 12.5330683,7.0579654 12.5283155,6.83458347 C12.5283155,6.69199927 12.5188099,6.55416787 12.5188099,6.41633646 L12.5188099,6.41633646 L12.5188099,6.38781962 C12.5093043,6.30702191 12.5473268,6.24998822 12.6091133,6.20721296 C12.6328773,6.18344892 12.6613941,6.17394331 12.689911,6.17869612 C12.8039783,6.18344892 12.9132929,6.1644377 13.0226075,6.1644377 Z M12,1.36518483 C11.3691932,1.36518483 10.8560545,1.87443384 10.8560545,2.50035449 C10.8560545,2.7121822 10.9139202,2.91435368 11.0223297,3.09018146 C11.3472278,3.06046277 11.6746768,3.04536905 12,3.04536905 C12.3250871,3.04536905 12.6524415,3.06046277 12.977623,3.09027521 C13.0860798,2.91444743 13.1439455,2.7121822 13.1439455,2.50035449 C13.1439455,1.87438696 12.6308068,1.36518483 12,1.36518483 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"history",icon:["24","24",[],"","M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M12,2.05714286 C6.50871163,2.05714286 2.05714286,6.50871163 2.05714286,12 C2.05714286,17.4912884 6.50871163,21.9428571 12,21.9428571 C17.4912884,21.9428571 21.9428571,17.4912884 21.9428571,12 C21.9428571,6.50871163 17.4912884,2.05714286 12,2.05714286 Z M12,5.82857143 C12.5680643,5.82857143 13.0285714,6.28907854 13.0285714,6.85714286 L13.0285714,11.5739518 L17.0130241,15.5584045 C17.4147062,15.9600866 17.4147062,16.611342 17.0130241,17.0130241 C16.611342,17.4147062 15.9600866,17.4147062 15.5584045,17.0130241 L11.2726902,12.7273098 C11.0797956,12.5344153 10.9714286,12.2727941 10.9714286,12 L10.9714286,6.85714286 C10.9714286,6.28907854 11.4319357,5.82857143 12,5.82857143 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file",icon:["24","24",[],"","M6 4h7l6 5v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm6.586 1H6v14h12V9.414L12.586 5zM13 10h3.5a.5.5 0 1 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 1 1 1 0V10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-pdf",icon:["24","24",[],"","M9.833 15.006c-.328.765-.657 1.316-.997 1.619-.35.312-.762.394-1.138.15a1.345 1.345 0 0 1-.358-.322c-.298-.402-.194-.843.165-1.2.228-.227.563-.433.983-.63.226-.106.466-.204.706-.292.142-.358.286-.762.43-1.205a41.787 41.787 0 0 0 .866-3.123c-.435-.563-.75-1.057-.924-1.473-.28-.67-.211-1.242.372-1.494.56-.24 1.047-.086 1.307.391.17.312.234.736.231 1.26a7.96 7.96 0 0 1-.086 1.088c.158.195.33.398.513.606a30.903 30.903 0 0 0 1.73 1.81 14.011 14.011 0 0 0 .863.761c.464-.07.87-.106 1.213-.105.947.002 1.554.319 1.415 1.079-.107.585-.514.888-1.06.834-.365-.036-.781-.224-1.259-.532a8.753 8.753 0 0 1-.538-.38 21.15 21.15 0 0 0-.944.191c-.39.087-.798.188-1.22.3a45.345 45.345 0 0 0-2.27.667zM6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm4.43 8.39c-.07.21-.138.412-.207.606l.055-.016a46.181 46.181 0 0 1 1.608-.459 33.869 33.869 0 0 1 1.538-.37 15.994 15.994 0 0 1-.378-.35 31.732 31.732 0 0 1-1.882-1.98l-.083.32a38.471 38.471 0 0 1-.652 2.248zm-2.157 2.603c.12-.107.248-.279.382-.51a2.35 2.35 0 0 0-.553.37c-.092.092-.09.086-.083.096a.54.54 0 0 0 .138.116c.017.01.025.01.116-.072zm7.434-2.3c-.047 0-.095 0-.146.002.242.132.443.209.585.223.11.011.118.005.146-.145.005-.027-.095-.079-.585-.08zm-5.36-5.49c.065.156.16.334.283.53v-.05c.003-.393-.044-.696-.128-.85-.046-.086-.063-.091-.23-.02-.04.018-.05.092.075.39z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-img",icon:["24","24",[],"","M5 6v12h14V6H5zm0-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm2.4 10.3a.5.5 0 0 1-.8-.6l3-4a.5.5 0 0 1 .754-.054l.579.58 1.765-2.513a.5.5 0 0 1 .83.015l3.891 6a.5.5 0 0 1-.838.544l-3.49-5.379-1.682 2.394a.5.5 0 0 1-.763.067l-.592-.593L7.4 15.3zm.6-4.8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-ppt",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.07 6.96h1.22c.18 0 .353-.013.52-.04a1.21 1.21 0 0 0 .44-.155.844.844 0 0 0 .305-.325c.077-.14.115-.323.115-.55 0-.227-.038-.41-.115-.55a.844.844 0 0 0-.305-.325 1.21 1.21 0 0 0-.44-.155 3.288 3.288 0 0 0-.52-.04h-1.22v2.14zM9.5 8.6h3.22c.447 0 .827.065 1.14.195.313.13.568.302.765.515.197.213.34.457.43.73a2.715 2.715 0 0 1 0 1.695c-.09.277-.233.522-.43.735a2.133 2.133 0 0 1-.765.515c-.313.13-.693.195-1.14.195h-1.65v2.56H9.5V8.6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-word",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm8.77 10.74h-1.56L12 10.88h-.02l-1.19 4.86H9.2L7.31 8.6h1.57l1.13 4.86h.02l1.24-4.86h1.47l1.22 4.92h.02l1.17-4.92h1.54l-1.92 7.14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-zip",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5 0h1v1h-1V5zm1 1h1v1h-1V6zm-1 1h1v1h-1V7zm1 1h1v1h-1V8zm-1 1h1v1h-1V9zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-excel",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.09 7l-2.3-3.4h1.82l1.4 2.28 1.45-2.28h1.72l-2.29 3.41 2.49 3.73h-1.87l-1.56-2.47-1.59 2.47H8.6L11.09 12z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-240",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm1 4.818C4 9.644 4.94 8.8 6.261 8.8c1.272 0 2.182.777 2.182 1.81 0 .76-.45 1.334-1.285 2.178L5.58 14.347v.022h2.96v.932H4.062v-.769L6.407 12.2c.724-.737.923-1.064.923-1.54 0-.526-.473-.946-1.104-.946-.663 0-1.157.468-1.157 1.1v.017H4v-.013zm8.426 4.483v-1.206h-3.18v-.98c.553-1.043 1.264-2.178 2.646-4.187h1.62v4.235h.857v.932h-.856v1.206h-1.087zm-2.146-2.142v.03h2.164V9.773h-.018c-1.029 1.492-1.638 2.433-2.146 3.387zm7.234 2.27c-1.564 0-2.496-1.277-2.496-3.321 0-2.036.941-3.308 2.496-3.308 1.55 0 2.486 1.263 2.486 3.303s-.927 3.326-2.486 3.326zm0-.932c.843 0 1.333-.888 1.333-2.39 0-1.488-.499-2.375-1.333-2.375-.84 0-1.347.896-1.347 2.371 0 1.502.499 2.394 1.347 2.394z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-480",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm3.964 9.269v-1.2H3.8v-.976c.55-1.037 1.257-2.166 2.632-4.166h1.613v4.215h.853v.927h-.853v1.2h-1.08zm-2.136-2.132v.031h2.154V9.767h-.018c-1.024 1.485-1.63 2.421-2.136 3.37zm7.185 2.26c-1.467 0-2.47-.761-2.47-1.842 0-.822.58-1.468 1.442-1.63v-.022c-.72-.185-1.19-.743-1.19-1.433 0-.962.926-1.67 2.218-1.67 1.297 0 2.215.703 2.215 1.674 0 .681-.466 1.235-1.186 1.429v.022c.861.167 1.446.813 1.446 1.63 0 1.085-1.016 1.841-2.475 1.841zm0-.867c.76 0 1.297-.448 1.297-1.059 0-.62-.536-1.063-1.297-1.063-.76 0-1.296.448-1.296 1.063 0 .611.536 1.06 1.296 1.06zm0-2.988c.638 0 1.095-.395 1.095-.94 0-.55-.453-.945-1.095-.945-.646 0-1.098.395-1.098.945 0 .545.452.94 1.098.94zm5.709 3.854c-1.556 0-2.483-1.27-2.483-3.304 0-2.026.936-3.292 2.483-3.292 1.542 0 2.474 1.257 2.474 3.287 0 2.03-.923 3.31-2.474 3.31zm0-.927c.84 0 1.327-.883 1.327-2.377 0-1.481-.497-2.365-1.327-2.365-.835 0-1.34.892-1.34 2.36 0 1.494.496 2.382 1.34 2.382z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-hd",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm2 2.25h1.31v2.976h3.406V8.25h1.31v7.482h-1.31v-3.374H6.31v3.374H5V8.25zm7.597 0H15.7c.573 0 1.069.098 1.488.293.42.196.762.463 1.027.802.266.339.463.735.592 1.19.13.454.194.939.194 1.456a5.3 5.3 0 0 1-.194 1.457 3.43 3.43 0 0 1-.592 1.189 2.765 2.765 0 0 1-1.027.802c-.419.195-.915.293-1.488.293h-3.102V8.25zm1.31 6.413h1.29c.51 0 .927-.068 1.251-.204.325-.136.58-.325.765-.566.185-.241.311-.524.378-.849.066-.325.1-.676.1-1.053 0-.377-.034-.728-.1-1.053a2.043 2.043 0 0 0-.378-.849 1.832 1.832 0 0 0-.765-.566c-.324-.136-.742-.204-1.252-.204h-1.289v5.344z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm5.486 9.759c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C6.635 8.337 7.548 8 8.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397zm7 0c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C13.635 8.337 14.548 8 15.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397z"]}},function(e,t){e.exports={prefix:"cv",iconName:"contract",icon:["24","24",[],"","M8.5 8.5V5H10v5H5V8.5h3.5zm0 7H5V14h5v5H8.5v-3.5zm7-7H19V10h-5V5h1.5v3.5zm0 7V19H14v-5h5v1.5h-3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"full-screen",icon:["24","24",[],"","M6.5 6.5V10H5V5h5v1.5H6.5zm0 11H10V19H5v-5h1.5v3.5zm11-11H14V5h5v5h-1.5V6.5zm0 11V14H19v5h-5v-1.5h3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"mute",icon:["24","24",[],"","M16.733 12.018l-1.57-1.57a.555.555 0 1 1 .785-.785l1.57 1.57 1.57-1.57a.555.555 0 1 1 .785.785l-1.57 1.57 1.57 1.57a.555.555 0 1 1-.785.785l-1.57-1.57-1.57 1.57a.555.555 0 1 1-.785-.785l1.57-1.57zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"next",icon:["24","24",[],"","M16 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11zm-10.86.005a.5.5 0 0 1 .761-.427l9.003 5.5a.5.5 0 0 1 0 .853l-9.003 5.5a.5.5 0 0 1-.76-.426v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play",icon:["24","24",[],"","M7.5 6.505v11l9.002-5.5-9.002-5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play-circle",icon:["24","24",[],"","M0,12 C0,5.372583 5.372583,0 12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 Z M23,12 C23,5.92486775 18.0751322,1 12,1 C5.92486775,1 1,5.92486775 1,12 C1,18.0751322 5.92486775,23 12,23 C18.0751322,23 23,18.0751322 23,12 Z M9,7.49836245 C9,6.94698209 9.38671875,6.74169922 9.84669815,7.02918634 L17.1533018,11.5958137 C17.6209203,11.8880752 17.6132812,12.3666992 17.1533018,12.6541863 L9.84669815,17.2208137 C9.37907967,17.5130752 9,17.2950531 9,16.7516375 L9,7.49836245 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"pause",icon:["24","24",[],"","M8 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 8 17.5v-11zm6 0c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"previous",icon:["24","24",[],"","M5 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 5 17.5v-11zm13.602.005v11a.5.5 0 0 1-.76.426l-9.003-5.5a.5.5 0 0 1 0-.853l9.002-5.5a.5.5 0 0 1 .761.427z"]}},function(e,t){e.exports={prefix:"cv",iconName:"volume",icon:["24","24",[],"","M15.8 11.25c-.137-.815-.44-1.549-.727-2.009a.48.48 0 0 1 .167-.67.507.507 0 0 1 .687.163c.35.56.7 1.41.86 2.359.24 1.439.001 2.866-.866 4.183a.508.508 0 0 1-.691.147.48.48 0 0 1-.15-.674c.724-1.1.922-2.285.72-3.5zm1.86 5.959c1.856-3.7 1.676-7.108 0-10.416a.558.558 0 0 1 .201-.728.483.483 0 0 1 .678.215c1.828 3.61 2.028 7.398.001 11.438a.483.483 0 0 1-.677.218.557.557 0 0 1-.203-.727zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm3.186 5.646l-4.723 5.18-1.683-1.615a.772.772 0 0 0-1.06 0 .7.7 0 0 0 0 1.018l2.25 2.16a.771.771 0 0 0 1.094-.035l5.25-5.76a.7.7 0 0 0-.07-1.016.772.772 0 0 0-1.058.068z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle-o",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm0 1.212a7.737 7.737 0 0 0-5.508 2.28A7.737 7.737 0 0 0 4.212 12c0 2.081.809 4.037 2.28 5.508A7.737 7.737 0 0 0 12 19.788a7.737 7.737 0 0 0 5.508-2.28A7.737 7.737 0 0 0 19.788 12a7.737 7.737 0 0 0-2.28-5.508A7.737 7.737 0 0 0 12 4.212zm3.186 4.434a.772.772 0 0 1 1.058-.068.7.7 0 0 1 .07 1.016l-5.25 5.76a.771.771 0 0 1-1.094.035l-2.25-2.16a.7.7 0 0 1 0-1.018.772.772 0 0 1 1.06 0l1.683 1.616 4.723-5.181z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check",icon:["24","24",[],"","M16.247 7.341a1 1 0 0 1 1.506 1.318l-7 8a1 1 0 0 1-1.46.048l-3-3a1 1 0 0 1 1.414-1.414l2.244 2.244 6.296-7.196z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption-badge",icon:["24","24",[],"","M7.5 5A2.5 2.5 0 0 0 5 7.5v9A2.5 2.5 0 0 0 7.5 19h9a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16.5 5h-9zm0-1h9A3.5 3.5 0 0 1 20 7.5v9a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-9A3.5 3.5 0 0 1 7.5 4zM11 9a.5.5 0 1 1 0 1H9.5A1.5 1.5 0 0 0 8 11.5v1A1.5 1.5 0 0 0 9.5 14H11a.5.5 0 1 1 0 1H9.5A2.5 2.5 0 0 1 7 12.5v-1A2.5 2.5 0 0 1 9.5 9H11zm5 0a.5.5 0 1 1 0 1h-1.5a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 1.5 1.5H16a.5.5 0 1 1 0 1h-1.5a2.5 2.5 0 0 1-2.5-2.5v-1A2.5 2.5 0 0 1 14.5 9H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"question",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zM8.142 9.17c0 .247.103.476.309.687.206.212.46.318.76.318.508 0 .854-.303 1.036-.908.193-.579.428-1.017.707-1.314.278-.297.712-.446 1.302-.446.503 0 .914.147 1.233.442.319.294.478.656.478 1.085 0 .22-.052.423-.157.61a2.305 2.305 0 0 1-.385.51c-.153.153-.4.38-.744.68-.39.342-.701.638-.932.887-.23.25-.415.539-.554.868-.14.33-.209.72-.209 1.17 0 .358.095.629.285.81.19.183.425.274.703.274.536 0 .855-.279.956-.836a12.2 12.2 0 0 1 .133-.55c.03-.104.071-.209.125-.313.053-.105.135-.22.245-.346.11-.126.255-.272.438-.438a48.078 48.078 0 0 0 1.37-1.257c.254-.25.474-.545.658-.888.185-.343.278-.742.278-1.197a2.87 2.87 0 0 0-.486-1.608c-.325-.492-.784-.882-1.378-1.169-.595-.286-1.28-.43-2.057-.43-.836 0-1.567.172-2.194.515s-1.104.775-1.43 1.297c-.327.523-.49 1.038-.49 1.547zm3.868 9.579c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797a1.073 1.073 0 0 0-.793-.324c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"info",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zm-10-.38V15a2.5 2.5 0 0 0 2.5 2.5h.75a1 1 0 0 0 0-2h-.75a.5.5 0 0 1-.5-.5v-3.75a1.75 1.75 0 0 0-1.75-1.75h-.75a1 1 0 1 0 0 2h.5zm.636-3.25c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797A1.073 1.073 0 0 0 11.636 6c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"lock",icon:["24","24",[],"","M7.01 9.5C7.156 5.97 8.87 4 12 4s4.844 1.97 4.99 5.5h1.51a.5.5 0 0 1 .5.5v9.5a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5V10a.5.5 0 0 1 .5-.5h1.51zm2 0h5.98C14.88 7.037 13.932 6 12 6c-1.933 0-2.88 1.037-2.99 3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"verified",icon:["24","24",[],"","M10.407 12.368l-1.22-1.22a.49.49 0 0 0-.698.004l-.583.583a.494.494 0 0 0-.004.697l2.135 2.135c.107.108.25.154.388.142a.488.488 0 0 0 .352-.143l4.362-4.362a.494.494 0 0 0-.004-.698l-.582-.582a.495.495 0 0 0-.698-.004l-3.448 3.448zm7.922-.37l1.437 1.406c.208.194.277.437.208.728a.716.716 0 0 1-.541.531l-1.957.5.551 1.936a.671.671 0 0 1-.197.729.671.671 0 0 1-.73.198l-1.935-.552-.5 1.957a.716.716 0 0 1-.53.541 1.28 1.28 0 0 1-.199.021.686.686 0 0 1-.53-.229L12 18.328l-1.405 1.436c-.195.208-.437.278-.729.208a.696.696 0 0 1-.53-.541l-.5-1.957-1.937.552a.671.671 0 0 1-.728-.198.671.671 0 0 1-.198-.729l.551-1.936-1.957-.5a.716.716 0 0 1-.54-.53c-.07-.292 0-.535.207-.73l1.437-1.405-1.437-1.405c-.208-.194-.277-.437-.208-.729a.716.716 0 0 1 .541-.53l1.957-.5-.551-1.936a.671.671 0 0 1 .198-.73.671.671 0 0 1 .728-.197l1.936.552.5-1.957a.675.675 0 0 1 .531-.531.671.671 0 0 1 .729.198L12 5.68l1.405-1.447a.697.697 0 0 1 .73-.198c.284.07.46.246.53.53l.5 1.958L17.1 5.97a.671.671 0 0 1 .729.198.671.671 0 0 1 .197.729l-.551 1.936 1.957.5a.715.715 0 0 1 .541.53c.07.292 0 .535-.208.73l-1.437 1.404z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning-o",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 5L3.5 19h17L12 5zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm.75-3.677a.689.689 0 0 1-.7.677.689.689 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677.387 0 .7.303.7.677v5.646z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm.75-3.677V8.677a.689.689 0 0 0-.7-.677c-.387 0-.7.303-.7.677v5.646c0 .374.313.677.7.677.387 0 .7-.303.7-.677z"]}},function(e,t,n){const{noopTest:r,edit:i,merge:a}=n(11),o={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};o.def=i(o.def).replace("label",o._label).replace("title",o._title).getRegex(),o.bullet=/(?:[*+-]|\d{1,9}\.)/,o.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,o.item=i(o.item,"gm").replace(/bull/g,o.bullet).getRegex(),o.list=i(o.list).replace(/bull/g,o.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+o.def.source+")").getRegex(),o._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",o._comment=/<!--(?!-?>)[\s\S]*?-->/,o.html=i(o.html,"i").replace("comment",o._comment).replace("tag",o._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),o.paragraph=i(o._paragraph).replace("hr",o.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",o._tag).getRegex(),o.blockquote=i(o.blockquote).replace("paragraph",o.paragraph).getRegex(),o.normal=a({},o),o.gfm=a({},o.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),o.pedantic=a({},o.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",o._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:i(o.normal._paragraph).replace("hr",o.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",o.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const s={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~"};s.em=i(s.em).replace(/punctuation/g,s._punctuation).getRegex(),s._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,s._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,s._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,s.autolink=i(s.autolink).replace("scheme",s._scheme).replace("email",s._email).getRegex(),s._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,s.tag=i(s.tag).replace("comment",o._comment).replace("attribute",s._attribute).getRegex(),s._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,s._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,s._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,s.link=i(s.link).replace("label",s._label).replace("href",s._href).replace("title",s._title).getRegex(),s.reflink=i(s.reflink).replace("label",s._label).getRegex(),s.normal=a({},s),s.pedantic=a({},s.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",s._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",s._label).getRegex()}),s.gfm=a({},s.normal,{escape:i(s.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),s.gfm.url=i(s.gfm.url,"i").replace("email",s.gfm._extended_email).getRegex(),s.breaks=a({},s.gfm,{br:i(s.br).replace("{2,}","*").getRegex(),text:i(s.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:o,inline:s}},function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(23),{defaults:i}=n(15),{inline:a}=n(110),{findClosingBracket:o,escape:s}=n(11);e.exports=class e{constructor(e,t){if(this.options=t||i,this.links=e,this.rules=a.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=a.pedantic:this.options.gfm&&(this.options.breaks?this.rules=a.breaks:this.rules=a.gfm)}static get rules(){return a}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,i,a,c,l,u="";for(;t;)if(c=this.rules.escape.exec(t))t=t.substring(c[0].length),u+=s(c[1]);else if(c=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(c[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(c[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(c[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(c[0])&&(this.inRawBlock=!1),t=t.substring(c[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0];else if(c=this.rules.link.exec(t)){const r=o(c[2],"()");if(r>-1){const e=(0===c[0].indexOf("!")?5:4)+c[1].length+r;c[2]=c[2].substring(0,r),c[0]=c[0].substring(0,e).trim(),c[3]=""}t=t.substring(c[0].length),this.inLink=!0,i=c[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),n?(i=n[1],a=n[3]):a=""):a=c[3]?c[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(c,{href:e.escapes(i),title:e.escapes(a)}),this.inLink=!1}else if((c=this.rules.reflink.exec(t))||(c=this.rules.nolink.exec(t))){if(t=t.substring(c[0].length),n=(c[2]||c[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){u+=c[0].charAt(0),t=c[0].substring(1)+t;continue}this.inLink=!0,u+=this.outputLink(c,n),this.inLink=!1}else if(c=this.rules.strong.exec(t))t=t.substring(c[0].length),u+=this.renderer.strong(this.output(c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.em.exec(t))t=t.substring(c[0].length),u+=this.renderer.em(this.output(c[6]||c[5]||c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.code.exec(t))t=t.substring(c[0].length),u+=this.renderer.codespan(s(c[2].trim(),!0));else if(c=this.rules.br.exec(t))t=t.substring(c[0].length),u+=this.renderer.br();else if(c=this.rules.del.exec(t))t=t.substring(c[0].length),u+=this.renderer.del(this.output(c[1]));else if(c=this.rules.autolink.exec(t))t=t.substring(c[0].length),"@"===c[2]?(r=s(this.mangle(c[1])),i="mailto:"+r):(r=s(c[1]),i=r),u+=this.renderer.link(i,null,r);else if(this.inLink||!(c=this.rules.url.exec(t))){if(c=this.rules.text.exec(t))t=t.substring(c[0].length),this.inRawBlock?u+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]):u+=this.renderer.text(s(this.smartypants(c[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===c[2])r=s(c[0]),i="mailto:"+r;else{do{l=c[0],c[0]=this.rules._backpedal.exec(c[0])[0]}while(l!==c[0]);r=s(c[0]),i="www."===c[1]?"http://"+r:r}t=t.substring(c[0].length),u+=this.renderer.link(i,null,r)}return u}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",i=0;for(;i<t;i++)n=e.charCodeAt(i),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},function(e,t,n){var r=n(153);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t){e.exports=d},function(e,t,n){"use strict";e.exports=n(154).default},function(e,t){e.exports=m},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e,t,n){const r=n(167),i=n(168),a=n(23),o=n(113),s=n(112),c=n(111),{merge:l,checkSanitizeDeprecation:u,escape:p}=n(11),{getDefaults:f,changeDefaults:d,defaults:m}=n(15);function h(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=l({},h.defaults,t||{}),u(t);const a=t.highlight;let o,s,c=0;try{o=r.lex(e,t)}catch(e){return n(e)}s=o.length;const p=function(e){if(e)return t.highlight=a,n(e);let r;try{r=i.parse(o,t)}catch(t){e=t}return t.highlight=a,e?n(e):n(null,r)};if(!a||a.length<3)return p();if(delete t.highlight,!s)return p();for(;c<o.length;c++)!function(e){"code"!==e.type?--s||p():a(e.text,e.lang,(function(t,n){return t?p(t):null==n||n===e.text?--s||p():(e.text=n,e.escaped=!0,void(--s||p()))}))}(o[c])}else try{return t=l({},h.defaults,t||{}),u(t),i.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||h.defaults).silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}h.options=h.setOptions=function(e){return l(h.defaults,e),d(h.defaults),h},h.getDefaults=f,h.defaults=m,h.Parser=i,h.parser=i.parse,h.Renderer=a,h.TextRenderer=o,h.Lexer=r,h.lexer=r.lex,h.InlineLexer=s,h.inlineLexer=s.output,h.Slugger=c,h.parse=h,e.exports=h},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t){e.exports=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=p(a),s=p(n(14)),c=p(n(157)),l=p(n(158)),u=n(166);function p(e){return e&&e.__esModule?e:{default:e}}var f=function(){return!0},d=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return m.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,c.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,i=n.onSuggestionHighlighted,a=n.highlightFirstSuggestion;if(!(0,c.default)(r,e.suggestions)&&r.length>0&&a)this.highlightFirstSuggestion();else if(i){var o=this.getHighlightedSuggestion();o!=t.highlightedSuggestion&&i({suggestion:o})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(i){var a=i.valueBeforeUpDown;return null===t?a=null:null===a&&void 0!==n&&(a=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:a}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,i=n.multiSection,a=n.getSectionSuggestions;return i?a(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,i=r.value,a=r.onChange;t!==i&&a(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,i=n.value;return t.length>0&&r(i)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,a=t.onSuggestionsFetchRequested,s=t.renderSuggestion,c=t.inputProps,p=t.multiSection,d=t.renderSectionTitle,m=t.id,h=t.getSectionSuggestions,g=t.theme,y=t.getSuggestionValue,v=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,S=this.state,E=S.isFocused,C=S.isCollapsed,I=S.highlightedSectionIndex,O=S.highlightedSuggestionIndex,A=S.valueBeforeUpDown,j=v?f:this.props.shouldRenderSuggestions,T=c.value,w=c.onFocus,L=c.onKeyDown,k=this.willRenderSuggestions(this.props),x=v||E&&!C&&k,N=x?n:[],P=r({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=j(T);e.setState({isFocused:!0,isCollapsed:!n}),w&&w(t),n&&a({value:T,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,i=j(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},b?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!i})),i?a({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var i=t.keyCode;switch(i){case 40:case 38:if(C)j(T)&&(a({value:T,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var o=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex,c=void 0;c=null===s?null===A?T:A:e.getSuggestionValueByIndex(o,s),e.updateHighlightedSuggestion(o,s,T),e.maybeCallOnChange(t,c,40===i?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var l=e.getHighlightedSuggestion();if(x&&!v&&e.closeSuggestions(),null!=l){var u=y(l);e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:u,suggestionIndex:O,sectionIndex:I,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:x&&t.preventDefault();var p=x&&!v;if(null===A){if(!p){e.maybeCallOnChange(t,"","escape"),j("")?a({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,A,"escape");p?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}L&&L(t)}}),_={query:this.getQuery()};return o.default.createElement(l.default,{multiSection:p,items:N,renderInputComponent:i,renderItemsContainer:this.renderSuggestionsContainer,renderItem:s,renderItemData:_,renderSectionTitle:d,getSectionItems:h,highlightedSectionIndex:I,highlightedItemIndex:O,inputProps:P,itemProps:this.itemProps,theme:(0,u.mapToAutowhateverTheme)(g),id:m,ref:this.storeAutowhateverRef})}}]),t}(a.Component);d.propTypes={suggestions:s.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:s.default.func,onSuggestionHighlighted:s.default.func,renderInputComponent:s.default.func,renderSuggestionsContainer:s.default.func,getSuggestionValue:s.default.func.isRequired,renderSuggestion:s.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:s.default.func,alwaysRenderSuggestions:s.default.bool,multiSection:s.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:s.default.bool,highlightFirstSuggestion:s.default.bool,theme:s.default.object,id:s.default.string},d.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return o.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:u.defaultTheme,id:"1"};var m=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,i=n.itemIndex;e.updateHighlightedSuggestion(r,i),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,i=r.alwaysRenderSuggestions,a=r.onSuggestionSelected,o=r.onSuggestionsFetchRequested;a&&a(t,n),i?o({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,i=n.focusInputOnSuggestionClick,a=e.getSuggestionIndices(e.findSuggestionElement(t.target)),o=a.sectionIndex,s=a.suggestionIndex,c=e.getSuggestion(o,s),l=e.props.getSuggestionValue(c);e.maybeCallOnChange(t,l,"click"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:l,suggestionIndex:s,sectionIndex:o,method:"click"}),r||e.closeSuggestions(),!0===i?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,i=n.value,a=n.onBlur,o=e.getHighlightedSuggestion(),s=r(i);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),a&&a(e.blurEvent,{highlightedSuggestion:o})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=d},function(e,t,n){"use strict";var r=n(156);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";e.exports=n(159).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=d(o),c=d(n(14)),l=d(n(160)),u=d(n(161)),p=d(n(163)),f=d(n(164));function d(e){return e&&e.__esModule?e:{default:e}}var m={},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,a=t.highlightedSectionIndex,o=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var s="ArrowDown"===e.key?"next":"prev",c=n.sectionIterator[s]([a,o]),l=i(c,2),u=l[0],p=l[1];r.onKeyDown(e,{newHighlightedSectionIndex:u,newHighlightedItemIndex:p});break;default:r.onKeyDown(e,{highlightedSectionIndex:a,highlightedItemIndex:o})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,l.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,i=n.items,a=n.renderItem,o=n.renderItemData,c=n.renderSectionTitle,l=n.highlightedSectionIndex,u=n.highlightedItemIndex,d=n.itemProps;return i.map((function(n,i){var m="react-autowhatever-"+r+"-",h=m+"section-"+i+"-",g=0===i;return s.default.createElement("div",t(h+"container","sectionContainer",g&&"sectionContainerFirst"),s.default.createElement(p.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:h}),s.default.createElement(f.default,{items:e.sectionsItems[i],itemProps:d,renderItem:a,renderItemData:o,sectionIndex:i,highlightedItemIndex:l===i?u:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:m,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,i=n.renderItem,a=n.renderItemData,o=n.highlightedSectionIndex,c=n.highlightedItemIndex,l=n.itemProps;return s.default.createElement(f.default,{items:e,itemProps:l,renderItem:i,renderItemData:a,highlightedItemIndex:null===o?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,i=t.multiSection,a=t.renderInputComponent,o=t.renderItemsContainer,c=t.highlightedSectionIndex,l=t.highlightedItemIndex,u=this.state.isInputFocused,p=i?this.renderSections():this.renderItems(),f=null!==p,d=this.getItemId(c,l),m="react-autowhatever-"+n,h=r({role:"combobox","aria-haspopup":"listbox","aria-owns":m,"aria-expanded":f},e("react-autowhatever-"+n+"-container","container",f&&"containerOpen"),this.props.containerProps),g=a(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":d},e("react-autowhatever-"+n+"-input","input",f&&"inputOpen",u&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),y=o({containerProps:r({id:m,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:p});return s.default.createElement("div",h,g,y)}}]),t}(o.Component);h.propTypes={id:c.default.string,multiSection:c.default.bool,renderInputComponent:c.default.func,renderItemsContainer:c.default.func,items:c.default.array.isRequired,renderItem:c.default.func,renderItemData:c.default.object,renderSectionTitle:c.default.func,getSectionItems:c.default.func,containerProps:c.default.object,inputProps:c.default.object,itemProps:c.default.oneOfType([c.default.object,c.default.func]),highlightedSectionIndex:c.default.number,highlightedItemIndex:c.default.number,theme:c.default.oneOfType([c.default.object,c.default.array])},h.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return s.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return s.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:m,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:m,inputProps:m,itemProps:m,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=h},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var t=e.data,n=e.multiSection;function i(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||o===t[a]-1?null===(a=function(e){for(null===e?e=0:e++;e<t.length&&0===t[e];)e++;return e===t.length?null:e}(a))?[null,null]:[a,0]:[a,o+1]:0===t||o===t-1?[null,null]:null===o?[null,0]:[null,o+1]}return{next:i,prev:function(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||0===o?null===(a=function(e){for(null===e?e=t.length-1:e--;e>=0&&0===t[e];)e--;return-1===e?null:e}(a))?[null,null]:[a,t[a]-1]:[a,o-1]:0===t||0===o?[null,null]:null===o?[null,t-1]:[null,o-1]},isLast:function(e){return null===i(e)[1]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a,o=n(162),s=(a=o)&&a.__esModule?a:{default:a},c=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),a=n[0],o=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var l=n.map((function(e){return a[e]})).filter(c);return"string"==typeof l[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,i(l)):l.join(" ")}:{key:e,style:s.default.apply(void 0,[{}].concat(i(l)))}}},e.exports=t.default},function(e,t,n){"use strict";var r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function a(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter((function(t){return r.call(e,t)}))}e.exports=Object.assign||function(e,t){for(var n,r,o=i(e),s=1;s<arguments.length;s++){n=arguments[s],r=a(Object(n));for(var c=0;c<r.length;c++)o[r[c]]=n[r[c]]}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=c(i),o=c(n(14)),s=c(n(22));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,i=e.sectionKeyPrefix,o=n(t);return o?a.default.createElement("div",r(i+"title","sectionTitle"),o):null}}]),t}(i.Component);p.propTypes={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=u(a),s=u(n(14)),c=u(n(165)),l=u(n(22));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;p(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,i=t.itemProps,a=t.renderItem,s=t.renderItemData,l=t.sectionIndex,u=t.highlightedItemIndex,p=t.getItemId,f=t.theme,d=t.keyPrefix,m=null===l?d:d+"section-"+l+"-",h="function"==typeof i;return o.default.createElement("ul",r({role:"listbox"},f(m+"items-list","itemsList")),n.map((function(t,n){var d=0===n,g=n===u,y=m+"item-"+n,v=h?i({sectionIndex:l,itemIndex:n}):i,b=r({id:p(l,n),"aria-selected":g},f(y,"item",d&&"itemFirst",g&&"itemHighlighted"),v);return g&&(b.ref=e.storeHighlightedItemReference),o.default.createElement(c.default,r({},b,{sectionIndex:l,isHighlighted:g,itemIndex:n,item:t,renderItem:a,renderItemData:s}))})))}}]),t}(a.Component);d.propTypes={items:s.default.array.isRequired,itemProps:s.default.oneOfType([s.default.object,s.default.func]),renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,sectionIndex:s.default.number,highlightedItemIndex:s.default.number,onHighlightedItemChange:s.default.func.isRequired,getItemId:s.default.func.isRequired,theme:s.default.func.isRequired,keyPrefix:s.default.string.isRequired},d.defaultProps={sectionIndex:null},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=l(a),s=l(n(14)),c=l(n(22));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){var e,n,r;u(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:i})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:i})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:i})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:i})},p(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,c.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,i=e.renderItem,a=e.renderItemData,s=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete s.sectionIndex,delete s.itemIndex,"function"==typeof s.onMouseEnter&&(s.onMouseEnter=this.onMouseEnter),"function"==typeof s.onMouseLeave&&(s.onMouseLeave=this.onMouseLeave),"function"==typeof s.onMouseDown&&(s.onMouseDown=this.onMouseDown),"function"==typeof s.onClick&&(s.onClick=this.onClick),o.default.createElement("li",r({role:"option"},s,{ref:this.storeItemReference}),i(n,r({isHighlighted:t},a)))}}]),t}(a.Component);f.propTypes={sectionIndex:s.default.number,isHighlighted:s.default.bool.isRequired,itemIndex:s.default.number.isRequired,item:s.default.any.isRequired,renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,onMouseEnter:s.default.func,onMouseLeave:s.default.func,onMouseDown:s.default.func,onClick:s.default.func},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},function(e,t,n){const{defaults:r}=n(15),{block:i}=n(110),{rtrim:a,splitCells:o,escape:s}=n(11);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=i.normal,this.options.pedantic?this.rules=i.pedantic:this.options.gfm&&(this.rules=i.gfm)}static get rules(){return i}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,c,l,u,p,f,d,m,h,g,y,v,b,S,E;for(e=e.replace(/^ +$/gm,"");e;)if((c=this.rules.newline.exec(e))&&(e=e.substring(c[0].length),c[0].length>1&&this.tokens.push({type:"space"})),c=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(c[0].length),t&&"paragraph"===t.type?t.text+="\n"+c[0].trimRight():(c=c[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?c:a(c,"\n")}))}else if(c=this.rules.fences.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"code",lang:c[2]?c[2].trim():c[2],text:c[3]||""});else if(c=this.rules.heading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:c[1].length,text:c[2]});else if((c=this.rules.nptable.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),g=0;g<p.align.length;g++)/^ *-+: *$/.test(p.align[g])?p.align[g]="right":/^ *:-+: *$/.test(p.align[g])?p.align[g]="center":/^ *:-+ *$/.test(p.align[g])?p.align[g]="left":p.align[g]=null;for(g=0;g<p.cells.length;g++)p.cells[g]=o(p.cells[g],p.header.length);this.tokens.push(p)}else if(c=this.rules.hr.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"hr"});else if(c=this.rules.blockquote.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"blockquote_start"}),c=c[0].replace(/^ *> ?/gm,""),this.token(c,t),this.tokens.push({type:"blockquote_end"});else if(c=this.rules.list.exec(e)){for(e=e.substring(c[0].length),l=c[2],b=l.length>1,f={type:"list_start",ordered:b,start:b?+l:"",loose:!1},this.tokens.push(f),c=c[0].match(this.rules.item),d=[],n=!1,v=c.length,g=0;g<v;g++)p=c[g],h=p.length,p=p.replace(/^ *([*+-]|\d+\.) */,""),~p.indexOf("\n ")&&(h-=p.length,p=this.options.pedantic?p.replace(/^ {1,4}/gm,""):p.replace(new RegExp("^ {1,"+h+"}","gm"),"")),g!==v-1&&(u=i.bullet.exec(c[g+1])[0],(l.length>1?1===u.length:u.length>1||this.options.smartLists&&u!==l)&&(e=c.slice(g+1).join("\n")+e,g=v-1)),r=n||/\n\n(?!\s*$)/.test(p),g!==v-1&&(n="\n"===p.charAt(p.length-1),r||(r=n)),r&&(f.loose=!0),S=/^\[[ xX]\] /.test(p),E=void 0,S&&(E=" "!==p[1],p=p.replace(/^\[[ xX]\] +/,"")),m={type:"list_item_start",task:S,checked:E,loose:r},d.push(m),this.tokens.push(m),this.token(p,!1),this.tokens.push({type:"list_item_end"});if(f.loose)for(v=d.length,g=0;g<v;g++)d[g].loose=!0;this.tokens.push({type:"list_end"})}else if(c=this.rules.html.exec(e))e=e.substring(c[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===c[1]||"script"===c[1]||"style"===c[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]});else if(t&&(c=this.rules.def.exec(e)))e=e.substring(c[0].length),c[3]&&(c[3]=c[3].substring(1,c[3].length-1)),y=c[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[y]||(this.tokens.links[y]={href:c[2],title:c[3]});else if((c=this.rules.table.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),g=0;g<p.align.length;g++)/^ *-+: *$/.test(p.align[g])?p.align[g]="right":/^ *:-+: *$/.test(p.align[g])?p.align[g]="center":/^ *:-+ *$/.test(p.align[g])?p.align[g]="left":p.align[g]=null;for(g=0;g<p.cells.length;g++)p.cells[g]=o(p.cells[g].replace(/^ *\| *| *\| *$/g,""),p.header.length);this.tokens.push(p)}else if(c=this.rules.lheading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:"="===c[2].charAt(0)?1:2,text:c[1]});else if(t&&(c=this.rules.paragraph.exec(e)))e=e.substring(c[0].length),this.tokens.push({type:"paragraph",text:"\n"===c[1].charAt(c[1].length-1)?c[1].slice(0,-1):c[1]});else if(c=this.rules.text.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"text",text:c[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens}}},function(e,t,n){const r=n(23),i=n(111),a=n(112),o=n(113),{defaults:s}=n(15),{merge:c,unescape:l}=n(11);e.exports=class e{constructor(e){this.tokens=[],this.token=null,this.options=e||s,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new i}static parse(t,n){return new e(n).parse(t)}parse(e){this.inline=new a(e.links,this.options),this.inlineText=new a(e.links,c({},this.options,{renderer:new o})),this.tokens=e.reverse();let t="";for(;this.next();)t+=this.tok();return t}next(){return this.token=this.tokens.pop(),this.token}peek(){return this.tokens[this.tokens.length-1]||0}parseText(){let e=this.token.text;for(;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)}tok(){let e="";switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{let t,n,r,i,a="";for(r="",t=0;t<this.token.header.length;t++)r+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(a+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=this.token.cells[t],r="",i=0;i<n.length;i++)r+=this.renderer.tablecell(this.inline.output(n[i]),{header:!1,align:this.token.align[i]});e+=this.renderer.tablerow(r)}return this.renderer.table(a,e)}case"blockquote_start":for(e="";"blockquote_end"!==this.next().type;)e+=this.tok();return this.renderer.blockquote(e);case"list_start":{e="";const t=this.token.ordered,n=this.token.start;for(;"list_end"!==this.next().type;)e+=this.tok();return this.renderer.list(e,t,n)}case"list_item_start":{e="";const t=this.token.loose,n=this.token.checked,r=this.token.task;if(this.token.task)if(t)if("text"===this.peek().type){const e=this.peek();e.text=this.renderer.checkbox(n)+" "+e.text}else this.tokens.push({type:"text",text:this.renderer.checkbox(n)});else e+=this.renderer.checkbox(n);for(;"list_item_end"!==this.next().type;)e+=t||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(e,r,n)}case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:{const e='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(e);console.log(e)}}}}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"AppLinkHelper",(function(){return A})),n.d(r,"AppLinkUtility",(function(){return I})),n.d(r,"Application",(function(){return P})),n.d(r,"AppRouter",(function(){return F})),n.d(r,"Behavior",(function(){return U})),n.d(r,"Collection",(function(){return M})),n.d(r,"CollectionView",(function(){return V})),n.d(r,"ComponentCollection",(function(){return V})),n.d(r,"Error",(function(){return L})),n.d(r,"ErrorHelper",(function(){return N})),n.d(r,"SilentError",(function(){return k})),n.d(r,"LayoutView",(function(){return J})),n.d(r,"NestedModel",(function(){return Y})),n.d(r,"Service",(function(){return G})),n.d(r,"Model",(function(){return K})),n.d(r,"View",(function(){return H})),n.d(r,"Component",(function(){return q})),n.d(r,"EventNames",(function(){return g})),n.d(r,"LayoutService",(function(){return W})),n.d(r,"Middleware",(function(){return _})),n.d(r,"LocationUtils",(function(){return v})),n.d(r,"Shell",(function(){return Q}));var i={};n.r(i),n.d(i,"emptyResponse",(function(){return At})),n.d(i,"getResponse",(function(){return jt})),n.d(i,"getFetch",(function(){return Tt})),n.d(i,"fetch",(function(){return wt})),n.d(i,"useGetFetch",(function(){return Lt})),n.d(i,"useGetResponse",(function(){return kt})),n.d(i,"useBasicFetch",(function(){return xt})),n.d(i,"createMiddleware",(function(){return Rt})),n.d(i,"FlightReducer",(function(){return Mt})),n.d(i,"Simulator",(function(){return qt})),n.d(i,"Actions",(function(){return nt})),n.d(i,"RequestStatus",(function(){return rt})),n.d(i,"ajaxRequest",(function(){return st})),n.d(i,"normalize",(function(){return ft})),n.d(i,"denormalize",(function(){return ht}));n(121),n(122),n(123),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152);var a={UPLOAD_IMAGE:"upload:image"},o={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",SUBJECT_CLASSIFICATIONS:"subject:classifications",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},a),Playlists:Object.assign({PLAYLISTS:"index",SEARCH_PLAYLISTS:"search:playlists",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",EDIT_PLAYLIST_AUDIENCES:"edit:playlist:audiences",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",REMOVE_FROM_SUBJECT:"remove:from:subject"},a),Series:Object.assign({EDIT_SERIES:"edit:series",EDIT_SERIES_VIDEOS:"edit:series:videos",EDIT_SERIES_SUBJECTS:"edit:series:subjects",EDIT_SERIES_AUDIENCES:"edit:series:audiences",LEGACY_EDIT_SERIES:"legacy:edit:series"},a),Videos:Object.assign({EDIT_VIDEO:"edit:video",EDIT_VIDEO_AUDIENCES:"edit:video:audiences",EDIT_VIDEO_SUBJECTS:"edit:video:subjects",EDIT_VIDEO_ALIASES:"edit:video:aliases",LEGACY_EDIT_VIDEO:"legacy:edit:video"},a),DomainOptions:{DOMAIN_OPTIONS:"domain:options",NEW_DOMAIN_OPTION:"new:domain:option",EDIT_DOMAIN_OPTION:"edit:domain:option",DELETE_DOMAIN_OPTION:"delete:domain:option"},People:{PEOPLE:"people",NEW_PERSON:"new:person",EDIT_PERSON:"edit:person"},Companies:{COMPANIES:"companies",NEW_COMPANY:"new:company",EDIT_COMPANY:"edit:company"},Themes:Object.assign({THEMES:"themes",NEW_THEME:"new:theme",EDIT_THEME:"edit:theme",DELETE_THEME:"delete:theme"},a)},s={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",UPDATE_OBJECT_SUBJECTS:"update:object:subjects",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",UPDATE_OBJECT_CLASSIFICATIONS:"update:object:classifications",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",ADD_TO_LEVEL:"add:to:level",REMOVE_FROM_LEVEL:"remove:from:level",UPDATE_OBJECT_LEVELS:"update:object:levels",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",UPDATE_OBJECT_AUDIENCES:"update:object:audiences",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",SERIES_BY_ID:"series:by:id",UPDATE_SERIES:"update:series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image",LOCALE:"locale",PHRASES:"PHRASES"},c={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},l={CURATOR_LAYOUT:"CuratorLayout"},u={COMPANIES:"companies:application",DOMAIN_OPTIONS:"domain:options:application",PEOPLE:"people:application",PLAYLISTS:"playlists:application",SERIES:"series:application",SUBJECTS:"subjects:application",THEMES:"themes:application",VIDEOS:"videos:application"},p={IMAGE_UPLOAD:"image:upload:data:service",SUBJECT:"subject:data:service",USER:"user:data:service",LANGUAGE:"language:data:service"},f={IMAGE_UPLOAD:"ImageUploadDataService",SUBJECT:"SubjectDataService",USER:"UserDataService",LANGUAGE:"LanguageDataService"},d=n(0),m=n(1),h=n(5);const g={SHOW_POPUP:"show:popup",ROUTE:"route",LOCK_NAV:"lock:nav",UNLOCK_NAV:"unlock:nav",NAV_IS_LOCKED:"navigation:islocked",NAV_UNLOCKED_BY_USER:"navigation:unlocked:by:user",ROUTING_START:"routing:start",ROUTING_END:"routing:end",HAS_ACTIVE_ROUTE:"has:active:route",ROUTE_LOOKUP:"route:look:up",URL_CHANGE:"url:change",ERROR:"error",CURRENT_ROUTE:"route:current"},y={SHELL:"global:shell",ALERT:"global:alert",POPUP:"global:popup"},v={GetQuery:()=>v.DeserializeQueryParams(window.location.search.substring(1)),UpdateQuery(e){if(!e)return;const t=v.GetQuery();let n=v.SerializeQueryParams(m.extend(t,e));n&&(n="?"+n),v.UpdateUrl(`${v.GetCurrentPath()}${n}`,null,{replace:!0,trigger:!1})},UpdateUrl(e,t,n){const r=A.buildRoute(e,t);h.history.navigate(r,n),h.Radio.channel(y.SHELL).trigger(g.URL_CHANGE,t,n)},SerializeQueryParams:e=>e?"string"==typeof e?e:$.param(e,!0):"",DeserializeQueryParams:e=>e?m.reduce(e.split("&"),(e,t)=>{const n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)},{}):{},StartHistory(){h.History.started&&h.history.stop(),h.history.start({pushState:!0})},PageLoad(e,t=!1){t?window.open(e,"_blank"):window.location.href=e},Redirect(e,t=!0){const n=()=>t?window.location.replace(e):window.location.href=e;I.hasActiveRoute()?h.Radio.channel(y.SHELL).once("routing:end",n):n()},Reload(e=!0){window.location.reload(e)},GetCurrentPath:()=>window.location.pathname,GetCurrentQueryString:()=>window.location.search,GetCurrentUrl:()=>window.location.href,GetCurrentReferrer:()=>document.referrer,SetPageTitle(e){document.title=e}},b=/((\(\?)?:\w+)|(\*\w+)/,S=/[\(\)]/g,E=/\(\/\)/g,C=/\/$/,I={routingStarted(){h.Radio.channel(y.SHELL).trigger(g.ROUTING_START)},routingEnded(){if(!I.hasActiveRoute())return;h.Radio.channel(y.SHELL).trigger(g.ROUTING_END)},hasActiveRoute:()=>h.Radio.channel(y.SHELL).request(g.HAS_ACTIVE_ROUTE)},O=(e,t={})=>{t.usedHelper=!0;const{application:n,action:r}=e;h.Radio.channel(n).trigger(r,e,t)},A={getHref(e){if(!e)return"";const{application:t,action:n,args:r,params:i}=e;return"/"+h.Radio.channel(y.SHELL).request(g.ROUTE_LOOKUP,`${t}:${n}`,r,i)},buildRoute(e,t){if(!t)return e;let n=t.args,r=t.params;if(m.each(n,t=>{e=e.replace(b,t||"")}),e=(e=(e=e.replace(E,"")).replace(S,"")).replace(C,""),!r)return e;const i=v.SerializeQueryParams(r);return i.length?`${e}?${i}`:e},trigger(e,t){if(!e)return;if(!I.hasActiveRoute())return void O(e,t);h.Radio.channel(y.SHELL).once("routing:end",()=>{O(e,t)})},getCurrentAppLink:()=>h.Radio.channel(y.SHELL).request(g.CURRENT_ROUTE)};var j=n(7);function T(e,t,n,r){let i=e;return"string"==typeof e&&(i=h.Radio.channel(e)),r.call(this,i,t,n)}const w=class{constructor(){this.variables={}}static get Instance(){return this.instance||(this.instance=new this)}get name(){return"EnvironmentVariables"}get isDevelopment(){return this.variables.isDevelopment}get(e){return this.variables[e]}setUpVariables(e){this.variables=e}}.Instance;class L extends Error{constructor(e){super(e)}}class k extends L{get name(){return"SilentError"}}class x extends Error{get name(){return"CoreError"}}const N={throw(e){if(h.Radio.channel(y.SHELL).trigger(g.ERROR,e),!(e instanceof k||w.isDevelopment))throw e}};class P extends j.Application{constructor(e){super(e),this.mergeOptions(e,[...this.defaultProps,...this.props||[]]),m.result(this,"name")||N.throw(new x("BaseApplication must define a name")),m.result(this,"channelName")||N.throw(new x("BaseApplication must define a channelName")),this.listenTo(this.getGlobalRadioChannel("popup"),g.SHOW_POPUP,this.onShowPopup),this.listenTo(this.getGlobalRadioChannel("alert"),"show:alert",this.onShowAlert)}get defaultProps(){return["shell","layoutService"]}getGlobalRadioChannel(e){const t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||N.throw(new x(`Global channel ${t} does not exist`)),h.Radio.channel(t)}onLoadLayout(){if(this.layoutOptions&&this.layoutOptions.name){var e=m.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(m.extend(this.layoutOptions,{options:e})),this.layout||N.throw(new x(`Layout: ${this.layoutOptions.name} does not exist or was not registered`)),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}onShowPopup(e){this.layout.getRegion("popup")||N.throw(new x("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}onShowAlert(e){const{ctor:t,collection:n}=e,r=this.layout.getRegion("alert");r||N.throw(new x("Your application layout must define an alert region")),r.hasView()||this.layout.showChildView("alert",new t({collection:n}))}setDefaultQueryParams(e){this.defaultQueryParams&&(e=m.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}getAndClearDefaultQueryParams(){const e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class _{use(e){var t;this.go=(t=this.go,(n,r)=>t(n,()=>e(n,r)))}go(e,t){t(e)}}const D=/([A-Z])/g,R=/(^|:)(\w)/gi;class F extends j.AppRouter{constructor(e){super(e),this.bindDisposal(),this.processAppEvents()}bindDisposal(){this.listenTo(y.SHELL,g.ROUTE,e=>{e.application!==this.channelName&&this.destroyApp()})}processAppEvents(){this.appRoutes&&m.keys(this.appRoutes).length||N.throw(new x("Implementations of Core.AppRouter must define at least 1 appRoute")),m.each(m.keys(this.appRoutes),e=>{const t=this.appRoutes[e],n=this.toEventName(t);this.options.shell.addRouteLookup(`${this.channelName}:${n}`,(t,r)=>A.buildRoute(e,{application:this.channelName,action:n,args:t,params:r})),this.listenTo(this.channelName,n,(t,n)=>{n&&n.usedHelper||N.throw(new x("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(t,{isAppRoute:!0},()=>{const r=m.extend({},this.controller.getAndClearDefaultQueryParams(),t.params);t.params=r,v.UpdateUrl(e,t,n)})})}),this.appLinks&&m.each(this.appLinks,e=>{const t=this.toEventName(e);this.listenTo(this.channelName,t,(e,t)=>{t&&t.usedHelper||N.throw(new x("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(e,{isAppRoute:!1})})})}executeRoute(e,t,n){this.validateAppLink(e);const r=this.toMethodName(e.action);I.routingStarted();const i=h.Radio.channel(y.SHELL);if(this.options.shell.isNavLocked())return i.trigger(g.NAV_IS_LOCKED,e),void I.routingEnded();const a=new _;m.each(this.filters,e=>a.use(e)),a.go(e,()=>{i.trigger(g.ROUTE,e,t),this.createApp();const a=this.controller;if(m.isFunction(a[r])||(I.routingEnded(),N.throw(new x(`${r} does not exist on the ${m.result(a,"name")}.`))),!1===a.triggerMethod("before:action"))return a.triggerMethod("action:cancelled"),void I.routingEnded();a.triggerMethod("load:layout"),a[r].apply(a,[...e.args||[],e.params||{}]),m.isFunction(n)&&n(),I.routingEnded()})}createApp(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}destroyApp(){if(!this.controller)return;this.controller.destroy(),delete this.controller}_addAppRoute(e,t,n){this.route(t,n,(...e)=>{const t={application:this.channelName,action:this.toEventName(n),args:e.slice(0,e.length-1),params:v.DeserializeQueryParams(e[e.length-1])};this.executeRoute(t,{isAppRoute:!0},()=>{v.UpdateQuery(m.extend(this.controller.getAndClearDefaultQueryParams(),t.params))})})}toEventName(e){return e.replace(D,":$1").toLowerCase()}toMethodName(e){const t=e.replace(R,(e,t,n)=>n.toUpperCase());return t[0].toLowerCase()+t.slice(1,t.length)}validateAppLink(e){e.application&&e.action||(I.routingEnded(),N.throw(new x("Invalid AppLink")))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class U extends j.Behavior{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class M extends h.Collection{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class V extends j.CollectionView{constructor(e){super(e),m.result(this,"name")||N.throw(new x(`Error: View with cid:${this.cid} requires a name.`))}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class z extends L{get name(){return"DevError"}}class B extends j.View{constructor(e){super(e);const t=[...this.defaultProps,...this.props||[]];this.mergeOptions(e,t),m.result(this,"name")||N.throw(new x(`Error: View with cid:${this.cid} requires a name.`))}get defaultProps(){return["shell","layoutService"]}_setOptions(e){this.options=m.extend({},m.result(this,"defaults"),e)}_setAttributes(e){w.isDevelopment&&m.extend(e,{"cv-classname":this.name}),this.$el.attr(e)}get ui(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage}set ui(e){this.uiStorage=e}get elements(){return null}static AddViewDataExtension(e){B.ViewDataExtensions.push(e)}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}resetClassName(){this.$el.attr("class",m.result(this,"className"))}serializeData(){const e=super.serializeData(),t=m.result(this,"viewOptions"),n=m.extend({},e,{options:t});return B.ViewDataExtensions.length?m.extend(n,...m.map(B.ViewDataExtensions,e=>e instanceof Function?e(this):e)):n}viewOptions(){return this.options}undelegateAppLinks(){this.$el&&this.$el.off(".appLinks"+this.cid)}renderAppLinks(){let e=this.appLinks;e&&(e=this.normalizeUIKeys(e),this.undelegateAppLinks(),m.each(m.keys(e),t=>{let n=t;const r=e[t],i=A.getHref(r);"[this]"===n&&(n=null);const a=n?this.$el.find(t):this.$el;(a.is("a")||a.is("button"))&&(i&&"/"!==i&&a.attr("href",i),this.delegate("click.appLinks"+this.cid,n,(function(e){e.preventDefault(),A.trigger(r)})))}))}hasPartialLoadingRegions(){const e=this;return void 0!==e._hasPartialLoadingRegions||(e._hasPartialLoadingRegions=m.some(e.regions,e=>m.has(e,"partialLoading"))),e._hasPartialLoadingRegions}renderPartialLoading(e){h.Radio.channel(y.SHELL).trigger("render:partial:loading",this,e)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}render(){const e=this;if(e._isDestroyed)return this;let t=this.processRequriedResources(!0);return t&&(t=e.triggerMethod("before:render",this)),!1!==t&&(t=!0),t=t&&this.processRequriedResources(!1),!1===t?(e._partialLoadingRendered||!e.hasPartialLoadingRegions()||(e._partialLoadingRendered=!0,e._reInitRegions(),e._renderTemplate(),e.renderPartialLoading()),this):((e._isRendered||e._partialLoadingRendered)&&e._reInitRegions(),this.setTitle(),e._renderTemplate(),e.bindUIElements(),this.renderAppLinks(),e._partialLoadingRendered=!1,e._isRendered=!0,e.triggerMethod("render",this),this)}processRequriedResources(e){return!0}setTitle(){}}B.ViewDataExtensions=[];class H extends B{constructor(e){super(e),this.boundListeners={},this.resourceInstances={}}processRequriedResources(e){const t=m.keys(this.requiredResources);if(!t.length)return!0;const n=this;let r=!0;return m.each(t,t=>{const i=this.requiredResources[t];if(i.beforeOnBeforeRender!==e)return;const a=i.dataServiceName;this.resourceInstances[a]||(this.resourceInstances[a]=i.getInstance(this)),this.boundListeners[`${a}:${i.eventName}`]||(this.listenTo(this.resourceInstances[a].channelName,i.eventName,this.render),this.boundListeners[`${a}:${i.eventName}`]=!0),n[t]=i.getData(this.resourceInstances[a]),r=r&&!!n[t]}),r}setTitle(){m.isString(this.title)||!1===this.title||N.throw(new z(`Must define a title for ${this.name}.`));h.Radio.channel(y.SHELL).trigger("set:page:title",this.title)}}class q extends B{}class J extends H{constructor(e){super(e)}static getCacheKey(e){N.throw(new z(`Must define getCacheKey for ${this.name}.`))}unmountRegion(e){this.trigger("unmount:"+e)}}class K extends h.Model{mixin(e){const t=this;for(let n in e){if(t.hasOwnProperty(n)){const r=t[n];return void(t[n]=m.extend({},r,e[n]))}t[n]=e[n]}}addValidation(e){this.mixin({validation:e})}validate(e,t){super.validate.call(this,e,t)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Y extends K{set(e,t,n){let r,i;if(null===e)return this;for(r in"object"==typeof e?(i=e,n=t):(i={},i[e]=t),n||(n={}),i)m.has(this.associations,r)&&(i[r]=this.setAssociation(r,i[r],n));return super.set.call(this,i,n)}get(e){var t=e.indexOf(".");if(-1===t)return super.get.call(this,e);const n=e.substr(0,t),r=this.attributes[n];if(!r||!m.isFunction(r.get))return super.get.call(this,e);const i=e.substr(t+1);return r.get(i)}setAssociation(e,t,n){const r=this.associations[e],i=this.attributes[e];if(!m.isFunction(r))return t;if(n.unset)return i&&delete i.parent,delete this[e],i;if(i)return i instanceof K&&i.set(t,n),i instanceof M&&i.set(t,n),n.silent||this.trigger("change:"+e,this,t,n),i;const a=t instanceof K?t:new r(t,{parse:!0});return a.parent=this,this[e]=a,a}toJSON(...e){const t=super.toJSON.apply(this,e);return m.each(this.associations,(e,n)=>{m.has(t,n)&&m.isFunction(t[n].toJSON)?t[n]=t[n].toJSON():t[n]=(new e).toJSON()}),t}toFlatJSON(...e){return m.omit(super.toJSON.apply(this,e),m.keys(this.associations))}}class G extends j.Object{constructor(e){super(e),this.name||N.throw(new x("Your service must be named."))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class W extends j.Object{constructor(e){super(e),this.layouts={},this.requiredRegions=e.requiredRegions}clearLayout(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}registerLayout(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}getLayout(e){const{name:t,options:n={}}=e;this.layouts[t]||N.throw(new x(t+" was not registered as a template."));const r=this.layouts[t].getCacheKey(n);return this.currentLayoutCacheKey===r&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",n),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=r,this.currentLayout=new this.layouts[t](n),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}checkRequiredRegions(e){m.each(this.requiredRegions,t=>{m.has(m.result(e.prototype,"regions"),t)||N.throw(new x(`Layout: ${e.prototype.name} must define an ${t} region.`))})}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Z{constructor(e,t){this.application=e,this.options=t||{}}get Application(){return this.application}get Options(){return this.options}}class Q extends j.Application{initialize(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}bindListeners(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}bindNavLockListeners(){this.listenTo(y.SHELL,g.LOCK_NAV,()=>this.shellState.navLock=!0),this.listenTo(y.SHELL,g.UNLOCK_NAV,()=>this.shellState.navLock=!1)}bindAppLinkListeners(){this.listenTo(y.SHELL,g.ROUTING_START,()=>this.shellState.activeRoute=!0),this.listenTo(y.SHELL,g.ROUTING_END,()=>this.shellState.activeRoute=!1),this.listenTo(y.SHELL,g.ROUTE,e=>this.shellState.currentAppLink=e);const e=h.Radio.channel(y.SHELL);e.reply(g.HAS_ACTIVE_ROUTE,m.bind(this.hasActiveRoute,this)),e.reply(g.CURRENT_ROUTE,()=>this.shellState.currentAppLink)}bindErrorHandlers(){window.addEventListener("error",()=>{I.routingEnded()})}bindErrorListener(){const e=h.Radio.channel(y.SHELL);this.listenTo(e,g.ERROR,this.handleError)}bindRouteLookup(){h.Radio.channel(y.SHELL).reply(g.ROUTE_LOOKUP,(e,t,n)=>this.routeLookup[e]?this.routeLookup[e](t,n):"",this)}addRouteLookup(e,t){this.routeLookup[e]=t}registerApplication(e,t){return this.applications.push(new Z(e,t)),this}getGlobalRadioChannels(){return y}isNavLocked(){return this.shellState.navLock}start(e){e||(e={}),this.runInitializationSteps(this,(t,n)=>{this.runStartUpSteps(this,e,(t,n,r)=>{super.start(e)})})}hasActiveRoute(){return this.shellState.activeRoute}onStart(){m.each(this.applications,e=>{const t={appConstructor:e.Application,shell:this,appOptions:Object.assign({region:"",shell:this,layoutService:this.layoutService},e.Options)};new e.Application.router(t)}),this.bindListeners(),v.StartHistory()}addInitializationStep(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,(n,r)=>t(n,()=>e(n,r))),this}runInitializationSteps(e,t){t(e)}addStartUpStep(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,(n,r,i)=>t(n,r,()=>e(n,r,i))),this}runStartUpSteps(e,t,n){n(e,t)}registerLayout(e,t){return this.layoutService.registerLayout(e,t),this}registerErrorHandler(e,t){return e||N.throw(new x("An error must have a name in order to register a handler for it.")),m.any(this.errorHandlers,t=>t.errorType===e)&&N.throw(new x(`An error handler for ${e.prototype.name} has already been defined.`)),this.errorHandlers.push({errorType:e,handler:t}),this}handleError(e){const t=m.find(this.errorHandlers,t=>e instanceof t.errorType);t&&t.handler&&t.handler(e)}registerStore(e){this.store=e}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}const X={debounce:(e,t,n)=>m.debounce(e,t,n),throttle:(e,t,n)=>m.throttle(e,t,n),isFunction:e=>m.isFunction(e),useIdentity:()=>m.identity,memoize:(e,t)=>m.memoize(e,t)};var ee=n(20),te=n(6);class ne extends J{isReactComponent(e){return d&&d.isValidElement(e)}showChildView(e,t){this.isReactComponent(t)&&this.showChildReactComponent(e,t)}showChildReactComponent(e,t){this.isAttached()?this.renderChildReactComponent(e,t):this.listenToOnce(this,"attach",()=>this.renderChildReactComponent(e,t))}renderChildReactComponent(e,t){const n=this.getRegion(e),r=this.$el.find(n.el);r&&r.length&&(n.trigger("before:show"),ee.render(t,r[0],()=>n.trigger("show")),this.listenToOnce(this,"unmount:"+e,()=>ee.unmountComponentAtNode(r[0])),this.listenToOnce(this,"before:destroy",()=>ee.unmountComponentAtNode(r[0])))}wrapWithStore(e){return d.createElement(te.Provider,{store:this.options.store},e)}}const re="top:nav",ie="left:nav",ae="content",oe="popup",se="alert";var ce=n(114),le=n.n(ce),ue=n(21),pe=n.n(ue);function fe(e){return(fe="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})(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function me(e,t,n){return(me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ve(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ve(e);if(t){var i=ve(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ye(this,n)}}function ye(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(o,e);var t,n,i,a=ge(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).childComponents={},t}return t=o,i=[{key:"getCacheKey",value:function(e){var t="".concat(this.name),n=[];return Object.keys(e).forEach((function(t){n.push("".concat(t,":").concat(e[t]))})),n.length&&(n.sort(),t+=":".concat(n.join(":"))),t}}],(n=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[re],className:pe.a.topNavRegion},leftNav:{component:this.childComponents[ie],className:"py-3 ".concat(pe.a.leftNavRegion)},content:{component:this.childComponents[ae],className:"position-relative container py-3"},popup:{component:this.childComponents[oe]},alert:{component:this.childComponents[se]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){X.isFunction(this.options.getTopNavView)&&(this.childComponents[re]=this.options.getTopNavView(r.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(ie)}},{key:"closePopup",value:function(){this.unsetRegion(oe)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());me(ve(o.prototype),"showChildView",this).call(this,"layout",this.wrapWithStore(d.createElement(Oe,Object.assign({},e))))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return le.a}},{key:"className",get:function(){return"container-fluid ".concat(pe.a.curatorLayout)}}])&&de(t.prototype,n),i&&de(t,i),o}(ne),Se=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ee=function(e){var t=e.className,n=e.children;return d.createElement("div",{className:t},n)},Ce=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},Ie=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,a=e.alert;return d.createElement(d.Fragment,null,d.createElement("div",{className:"position-relative"},!!t.component&&d.createElement(Ee,{className:Ce("top-nav-region",t.className)},t.component),!!n.component&&d.createElement(Ee,{className:Ce("left-nav-region",n.className)},n.component),!!r.component&&d.createElement("div",{className:"content-container"},d.createElement(Ee,{className:Ce("content-region",r.className)},r.component))),!!i.component&&d.createElement(Ee,{className:Ce("popup-region",i.className)},i.component),!!a.component&&d.createElement(Ee,{className:Ce("alert-region",a.className)},a.component))},Oe=function(e){var t=e.provider,n=Se(e,["provider"]);return t?d.createElement(t,null,d.createElement(Ie,Object.assign({},n))):d.createElement(Ie,Object.assign({},n))};function Ae(e){return(Ae="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})(e)}function je(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Te(e,t)}(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 Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ke(e,t){return(ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pe(e);if(t){var i=Pe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ne(this,n)}}function Ne(e,t){return!t||"object"!==Ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ke(e,t)}(o,e);var t,n,i,a=xe(o);function o(){return we(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"initialize",value:function(){this.listenTo(y.SHELL,r.EventNames.ROUTING_END,this.updateNav)}},{key:"updateNav",value:function(){var e=this,t=r.AppLinkHelper.getCurrentAppLink().application;if(t!==this.currentApplication){this.currentApplication=t;var n=this.options.navItemMappings[t];if(n){var i=document.querySelector(this.options.navSelector);i&&i.children&&je(i.children).forEach((function(t){var r=t.querySelector("a");r&&(r.classList.remove(e.options.currentItemClassName),r.text===n&&r.classList.add(e.options.currentItemClassName))}))}}}},{key:"name",get:function(){return"CuratorAppNavService"}}])&&Le(t.prototype,n),i&&Le(t,i),o}(r.Service);class De extends G{constructor(e){super(e),m.result(this,"name")||N.throw(new z("Must provide a name when extending BaseDataService")),m.result(this,"channelName")||N.throw(new z("Must provide a channelName for "+m.result(this,"name")));const t=[...this.defaultProps,...this.props||[]];this.dataRequestSignatures={},this.mergeOptions(e,t)}get defaultProps(){return["dataProvider","cache","bootstrapData","defaultErrorHandler","alertService"]}getCursors(e){const t=this.cache.get(e);return t?t.cursors:{}}clearCacheAndGet(e){const{callback:t,errorCallback:n,eventPrefix:r}=e,{syncEvent:i,errorEvent:a}=this.getEventNames(r),o=this.cache.get(r);if(o&&o.openRequest){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),a,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),i,t),m.isFunction(n)&&n()};return this.listenToOnce(this.getChannel(),i,e),void this.listenToOnce(this.getChannel(),a,r)}this.cache.remove(e.eventPrefix),this.get(e)}get(e){const{callback:t,errorCallback:n,eventPrefix:r,resource:i,formatData:a,expiryTime:o,successHandler:s,errorHandler:c,bootstrapName:l}=e,{syncEvent:u,requestEvent:p,successEvent:f,errorEvent:d}=this.getEventNames(r),h=this.getChannel(),g=this.currentTimestamp();this.bootstrapData&&this.bootstrapData[l]&&(this.cacheData(r,this.bootstrapData[l],a,{openRequest:!1,timestamp:g}),delete this.bootstrapData[l]);const y=this.cache.get(r);let v;y&&(v=y.data);const b=y&&y.openRequest,S=this.isExpired(r,o);if(b){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),d,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),u,t),m.isFunction(n)&&n()};this.listenToOnce(h,u,e),this.listenToOnce(h,d,r)}if(this.cache.has(r)&&!S||(h.trigger(p),this.listenToResponse({eventPrefix:r,formatData:a,cacheOptions:{timestamp:g},callback:t,errorCallback:n,successHandler:s,errorHandler:c}),this.cacheData(r,null,null,{openRequest:!0,timestamp:g}),this.dataProvider.read(i,{channel:this.getTransportChannel(),successEvent:f,errorEvent:d})),v&&m.isFunction(t)&&!S&&t(v),v)return v}create(e){const{eventPrefix:t,resource:n,data:r,formatData:i,callback:a,errorCallback:o,invalidationKeys:s,successHandler:c,errorHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:t,formatData:i,invalidationKeys:s,callback:a,errorCallback:o,successHandler:c,errorHandler:l}),this.dataProvider.create(n,r,{channel:m,successEvent:p,errorEvent:f})}update(e){const{data:t,callback:n,errorCallback:r,resource:i,formatData:a,eventPrefix:o,invalidationKeys:s,errorHandler:c,successHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:o,formatData:a,invalidationKeys:s,callback:n,errorCallback:r,successHandler:l,errorHandler:c}),this.dataProvider.update(i,t,{channel:m,successEvent:p,errorEvent:f})}delete(e){const{eventPrefix:t,resource:n,callback:r,errorCallback:i,invalidationKeys:a,successHandler:o,errorHandler:s}=e,{successEvent:c,errorEvent:l}=this.getEventNames(t),u=this.getTransportChannel();this.listenToResponse({eventPrefix:t,invalidationKeys:a,callback:r,errorCallback:i,cacheOptions:{noCache:!0,clearCacheKey:!0},successHandler:o,errorHandler:s}),this.dataProvider.delete(n,{channel:u,successEvent:c,errorEvent:l})}listenToResponse(e){const{eventPrefix:t,formatData:n,callback:r,errorCallback:i,successHandler:a,errorHandler:o,invalidationKeys:s,cacheOptions:c={}}=e,{syncEvent:l,requestEvent:u,successEvent:p,errorEvent:f,successAlertEvent:d,errorAlertEvent:h}=this.getEventNames(t),g=this.getChannel(),y=this.getTransportChannel(),v=this.getAlertChannel();if(m.isFunction(r)&&this.listenToOnce(g,l,r),m.isFunction(i)&&this.listenToOnce(g,f,i),this.stopListening(v,d),this.stopListening(v,h),m.isFunction(a)&&this.listenToOnce(v,d,a),m.isFunction(o)&&this.listenToOnce(v,h,o),!m.isFunction(o)&&!1!==o&&m.isFunction(this.defaultErrorHandler)&&this.listenToOnce(v,h,this.defaultErrorHandler),this.hasRequestSignature(t))return;this.setRequestSignature(t);this.listenTo(y,p,(e,...r)=>{this.stopListening(g,f,i),v.trigger(d,e,...r);const a=c.noCache?this.formatData(e,n):this.cacheData(t,e,n);c.clearCacheKey&&this.cache.remove(t),g.trigger(l,a),s&&s.length&&this.cache.invalidate(s,e=>g.trigger(e+":invalidate"))}),this.listenTo(y,f,(...e)=>{this.stopListening(g,l,r);const n=this.dataProvider.parseError(...e);v.trigger(h,n),g.trigger(f,n),c.noCache||this.cacheData(t,null,null)})}cacheData(e,t,n,r={}){let{openRequest:i=!1,timestamp:a}=r;a||(a=this.currentTimestamp());const o=this.processPagination(t),s=this.formatData(t,n);return this.cache.set(e,{data:s,timestamp:a,cursors:o,openRequest:i}),s}processPagination(e){if(!e)return;const{pagination:t}=e;return t?t.cursors?t.cursors:m.isUndefined(t.offset)||m.isUndefined(t.pageSize)?t.page?this.convertLegacyPaginationToCursors(t):void 0:this.convertOffsetPaginationToCursors(t):void 0}formatData(e,t){return m.isFunction(t)?t(e):e}chain(){const e=[],t=(e,t)=>{m.isFunction(e)&&e(t)},n=(n,i)=>(e.push(()=>{const r=n.callback;n.callback=n=>{t(r,n),t(e.shift())},this[i](n)}),r),r={func:t=>(e.push(()=>{t(e.shift()||(()=>{}))}),r),get:e=>n(e,"get"),create:e=>n(e,"create"),update:e=>n(e,"update"),delete:e=>n(e,"delete"),run(){t(e.shift())}};return r}invalidateCache(e){e&&e.length&&this.cache.invalidate(e)}currentTimestamp(){return(new Date).valueOf()}isExpired(e,t){if(!t)return!1;const n=this.cache.get(e);if(!n||!n.timestamp)return!0;const r=1e3*t;return n.timestamp<this.currentTimestamp()-r}getEventNames(e){return{syncEvent:e+":sync",requestEvent:e+":request",successEvent:e+":success",errorEvent:e+":error",successAlertEvent:e+":success:alert",errorAlertEvent:e+":error:alert"}}getTransportChannel(){return h.Radio.channel(this.channelName+":transport")}getAlertChannel(){return h.Radio.channel(this.channelName+":alert")}setRequestSignature(e){this.dataRequestSignatures[e]=e}hasRequestSignature(e){return!!this.dataRequestSignatures[e]}convertOffsetPaginationToCursors(e){const{offset:t,pageSize:n,totalItems:r}=e,i=r>0&&t<r&&t+n,a=r>0&&t>0&&Math.max(t-n,0);let o={};if(i&&i<r&&(o.next=i.toString()),m.isNumber(a)&&(o.previous=a.toString()),!m.isEmpty(o))return o}convertLegacyPaginationToCursors(e){const{page:t,totalPages:n}=e,r=m.isNumber(t)&&t>0&&t<n&&t+1,i=m.isNumber(t)&&t>1&&t-1;let a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!m.isEmpty(a))return a}}function Re(e){return(Re="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})(e)}function Fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Be(e);if(t){var i=Be(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ze(this,n)}}function ze(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Be(e){return(Be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var He=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Me(e,t)}(a,e);var t,n,r,i=Ve(a);function a(){return Fe(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:s.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return f.IMAGE_UPLOAD}},{key:"channelName",get:function(){return p.IMAGE_UPLOAD}}])&&Ue(t.prototype,n),r&&Ue(t,r),a}(De);const qe={SHORT:120,STANDARD:600};var Je={dataServiceName:f.USER,dataChannelName:p.USER},$e={getCurrentUserFetchOptions:function(e,t){return Object.assign(Object.assign({},Je),{eventPrefix:s.CURRENT_USER,fetchData:function(e){return e.getCurrentUser()},setData:e,onError:t})}};class Ke{constructor(e){this.value=e}increment(){this.value+=1}decrement(){this.value-=1}getValue(){return this.value}}function Ye(e){return(Ye="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})(e)}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ze(e,t){return(Ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=et(e);if(t){var i=et(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xe(this,n)}}function Xe(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ze(e,t)}(a,e);var t,n,r,i=Qe(a);function a(){return Ge(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getLanguageConfig",value:function(e){var t={locale:"en",phrases:{}},n=new Ke(3),r=function(){n.decrement(),n.getValue()>0||e(t)};this.get({resource:"/api/locale",eventPrefix:s.LOCALE,expiryTime:qe.STANDARD,callback:function(e){t.locale=e,r()}}),this.get({resource:"/api/phrases/shared",eventPrefix:"".concat(s.PHRASES,":shared"),expiryTime:qe.STANDARD,callback:function(e){null===e.shared&&(e.shared={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}}),this.get({resource:"/api/phrases/subjects",eventPrefix:"".concat(s.PHRASES,":subjects"),expiryTime:qe.STANDARD,callback:function(e){null===e.subjects&&(e.subjects={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}})}},{key:"name",get:function(){return f.LANGUAGE}},{key:"channelName",get:function(){return p.LANGUAGE}}])&&We(t.prototype,n),r&&We(t,r),a}(De);const nt={API_REQUEST:"API_REQUEST",API_REPONSE:"API_RESPONSE",API_ERROR:"API_ERROR",INVALIDATE:"INVALIDATE",UPDATE:"UPDATE"};var rt,it;function at(e){const{getResponseHeader:t,responseJSON:n,status:r}=e;return{getResponseHeader:t,responseJSON:n,status:r}}!function(e){e.None="None",e.Fetching="Fetching",e.Success="Success",e.Error="Error"}(rt||(rt={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(it||(it={}));const ot=[it.POST,it.PUT];function st(e){const{resource:t,type:n,success:r,error:i,always:a}=e,o={url:t,method:n};ot.includes(n)&&e.data&&(o.data=JSON.stringify(e.data)),$.ajax(o).done((e,t,n)=>{r&&r(e,at(n))}).fail((e,t,n)=>{i&&i(at(e))}).always(()=>{a&&a()})}const ct="id";function lt(e,t={}){const{idAttribute:n=ct,namespace:r=""}=t;return e[n]||N.throw(new z("There was an issue during normalization. Object did not have an id attribute.")),`${r}__${e[n]}`}function ut(e,t,n={}){const{idAttribute:r=ct}=n,i=[];return e.forEach(e=>{e[r]&&i.push(lt(e,n)),pt(e,t,n)}),i}function pt(e,t,n={}){if(e)return Array.isArray(e)?ut(e,t,n):"object"==typeof e?function e(t,n,r={}){const{idAttribute:i=ct}=r,a=Object.assign({},t);if(Object.keys(t).forEach(o=>{const s=t[o];if(s)if(Array.isArray(s)){var c=ut(s,n,r);c.length&&(a[o]=c)}else if("object"==typeof s){var l=e(s,n,r);s[i]?a[o]=lt(s,r):a[o]=l}}),t[i]){const e=lt(t,r);return n[e]=a,e}return a}(e,t,n):e}function ft(e,t){const n={};return{result:pt(e,n,t),entities:n}}const dt={isEmpty:e=>m.isEmpty(e),values:e=>m.values(e),keys:e=>m.keys(e),deepClone:e=>(m.isArray(e)?m.map:m.mapObject)(e,e=>m.isObject(e)||m.isArray(e)?dt.deepClone(e):e),getEnumKeys:e=>Object.keys(e).filter(e=>!(parseInt(e)>=0)),isObject:e=>m.isObject(e),isEqual:(e,t)=>m.isEqual(e,t),omit:(e,t)=>m.omit(e,t)};function mt(e,t,n){if(e){if("string"==typeof e)return function(e,t,n){if(n[e])return n[e];n[e]={};const r=mt(t[e],t,n);return Object.assign(n[e],r),dt.isEmpty(n[e])&&delete n[e],n[e]}(e,t,n);if(Array.isArray(e))return e.map(e=>mt(e,t,n));if("object"==typeof e){const r={};return Object.keys(e).forEach(i=>{r[i]=mt(e[i],t,n)||e[i]}),r}}}function ht(e,t){return mt(e,t,{})}function gt(e,t){return e===t}function yt(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function vt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,n=null,r=null;return function(){return yt(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}function bt(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function St(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=0,o=r.pop(),s=bt(r),c=e.apply(void 0,[function(){return a++,o.apply(null,arguments)}].concat(n)),l=e((function(){for(var e=[],t=s.length,n=0;n<t;n++)e.push(s[n].apply(null,arguments));return c.apply(null,e)}));return l.resultFunc=o,l.dependencies=s,l.recomputations=function(){return a},l.resetRecomputations=function(){return a=0},l}}var Et=St(vt);const Ct={currentTimestamp:()=>(new Date).valueOf(),isExpired(e,t){if(!t)return!1;const n=1e3*t;return e<Ct.currentTimestamp()-n},currentTimeOfDay(e){e||(e=new Date);const t=e.getHours();return t>=12&&t<18?"afternoon":t>=18?"evening":"morning"}};class It{constructor(e){this.status=e.status,this.requestTime=e.requestTime,this.cacheDuration=e.cacheDuration,this.data=e.data,this.statusCode=e.statusCode}get shouldFetch(){return this.status===rt.None||this.isExpired}get isExpired(){return Ct.isExpired(this.requestTime,this.cacheDuration)}get isFetching(){return this.status===rt.Fetching}get hasError(){return this.status===rt.Error}get isComplete(){return this.status===rt.Success||this.status===rt.Error}}function Ot(e,t,n){if(!e||!t)return At();let r=t.response;return!1!==t.request.normalize&&(r=ht(t.response,n)),new It({status:t.status,statusCode:t.statusCode,requestTime:t.timestamp,cacheDuration:t.request.expiryTime,data:r})}function At(){return new It({status:rt.None})}function jt(e,t){return Ot(t,e.flightData.resources[t],e.flightData.entities)}function Tt(e,t){return()=>{wt(e,t)}}function wt(e,t){e({type:nt.API_REQUEST,request:t})}function Lt(e){return Tt(Object(te.useDispatch)(),e)}function kt(e,t){const n=Object(d.useMemo)(()=>{var n;return(null===(n=t)||void 0===n?void 0:n.optimize)?function(e){return St(vt,(e,t)=>{const n=["response","request"];return dt.isEqual(dt.omit(e,n),dt.omit(t,n))})(t=>t.flightData.resources[e],t=>{var n;const r=t.flightData.resources[e];return(null===(n=r)||void 0===n?void 0:n.entityIds)?r.entityIds.reduce((e,n)=>(e[n]=t.flightData.entities[n],e),{}):{}},(t,n)=>Ot(e,t,n))}(e):function(e){return Et(t=>t.flightData.resources[e],e=>e.flightData.entities,(t,n)=>Ot(e,t,n))}(e)},[e]);return Object(te.useSelector)(e=>n(e))}function xt(e,t){const n=Object(te.useDispatch)(),r=kt(e&&e.key,t),i=Tt(n,e);return e&&r.shouldFetch&&i(),r}const Nt={getMatchingKeyMap(e,t,n){const r=Array.isArray(t)?t:[t];let i=[];return r.forEach(t=>{const n=new RegExp(t,"i"),r=Object.keys(e.resources).filter(e=>n.test(e));i.push(...r)}),n&&(i=i.filter(e=>e!==n)),i.reduce((e,t)=>(e[t]=!0,e),{})}};var Pt;!function(e){e[e.Ok=200]="Ok",e[e.NoContent=204]="NoContent",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.Conflict=409]="Conflict",e[e.InternalServer=500]="InternalServer"}(Pt||(Pt={}));const _t={isSimulated(e){const t=e;return!!(t.successResponse||t.errorResponse||t.noResponse)},simulateFetchData(e,t){const{success:n,error:r,always:i}=e,a=t;window.setTimeout(()=>{a.noResponse||(a.successResponse?n(a.successResponse(),{status:Pt.Ok,getResponseHeader:e=>""}):a.errorResponse&&r(a.errorResponse()),i())},function(e){const t=e.timeout||300;return t/2+(Math.floor(Math.random()*t/2)+1)}(t))}};var Dt=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Rt(e){const{fetchData:t,bootstrappedData:n,defaultExpiryTime:r}=e,i=Object.freeze({key:null,url:null,type:it.GET,normalize:!0,formatData:e=>e,expiryTime:r});return function(e){return r=>a=>{if(a.type!==nt.API_REQUEST)return void r(a);const o=e.getState(),s=Object.assign({},i,a.request),{success:c,error:l,always:u,formatData:p}=s,f=Dt(s,["success","error","always","formatData"]),d=o.flightData.resources[f.key];if(r(a),d&&d.status===rt.Fetching)return;if(f.bootstrapName&&n[a.request.bootstrapName])return h(n[a.request.bootstrapName]),g(),void delete n[a.request.bootstrapName];const m={resource:f.url,type:f.type,data:f.data,success:h,error:function(t){e.dispatch({type:nt.API_ERROR,errorResponse:t.responseJSON,request:a.request,timestamp:Ct.currentTimestamp(),xhr:t}),l&&l(t)},always:g};return void(_t.isSimulated(f)?_t.simulateFetchData(m,f):t(m));function h(t,n){const r=p(t);let i={result:r,entities:{}};if(f.normalize&&(i=ft(r,f.normalizeOptions)),e.dispatch({type:nt.API_REPONSE,result:i.result,entities:i.entities,request:f,timestamp:Ct.currentTimestamp(),xhr:n}),f.updateState){(Array.isArray(f.updateState)?f.updateState:[f.updateState]).forEach(t=>{!function(t){const n=Nt.getMatchingKeyMap(o.flightData,t.keys),r=Object.assign({},Object.keys(o.flightData.resources).filter(e=>n[e]).reduce((e,t)=>{const n=o.flightData.resources[t];let r=n.response;return n.request.normalize&&(r=ht(n.response,o.flightData.entities)),e[t]=r,e},{})),i=t.updateData(r);Object.keys(i).forEach(t=>{const n=o.flightData.resources[t],r=i[t];let a={result:r,entities:{}};n.request.normalize&&(a=ft(r,n.request.normalizeOptions)),e.dispatch({type:nt.UPDATE,result:a.result,entities:a.entities,request:n.request})})}(t)})}if(!c)return;let a=i.result;f.normalize&&(a=ht(i.result,Object.assign(Object.assign({},o.flightData.entities),i.entities))),c(a)}function g(){f.invalidationKeys&&e.dispatch({type:nt.INVALIDATE,keys:f.invalidationKeys,request:f}),u&&u()}}}}function Ft(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{e[r]?n[r]=Object.assign(Object.assign({},e[r]),t[r]):n[r]=t[r]}),n}const Ut={resources:{},entities:{}};function Mt(e=Ut,t){switch(t.type){case nt.API_REQUEST:return function(e,t){const n=e.resources[t.request.key];return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Fetching,response:n?n.response:null,entityIds:n?n.entityIds:null}})}}(e,t);case nt.API_REPONSE:return function(e,t){var n;const r=t.entities?Object.keys(t.entities):[];return{entities:Ft(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Success,response:t.result,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status,entityIds:r}})}}(e,t);case nt.API_ERROR:return function(e,t){var n;return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Error,errorResponse:t.errorResponse,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status}})}}(e,t);case nt.INVALIDATE:return function(e,t){var n;const r=Nt.getMatchingKeyMap(e,t.keys,null===(n=t.request)||void 0===n?void 0:n.key);return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),Object.keys(e.resources).filter(e=>r[e]).reduce((t,n)=>{const r=e.resources[n];return t[n]=Object.assign({},r,{status:rt.None}),t},{}))}}(e,t);case nt.UPDATE:return function(e=Ut,t){const n=t.entities?Object.keys(t.entities):[];return{entities:Ft(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:Object.assign(Object.assign({},e.resources[t.request.key]),{request:t.request,response:t.result,entityIds:n})})}}(e,t)}return e}const Vt={first:e=>m.first(e),firstFew:(e,t)=>m.first(e,t),last:e=>m.last(e),lastFew:(e,t)=>m.last(e,t),max:(e,t)=>m.max(e,t),cloneAndReplaceAtIdx(e,t,n,r=null){let i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[...i,...Array(t+1-i.length).fill(r)]),i.splice(t,1,n),i},moveItem(e,t,n){const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},isEmpty:e=>e&&!e.length,findIndex:(e,t)=>m.findIndex(e,t),where:(e,t)=>m.where(e,t),groupBy:(e,t)=>m.groupBy(e,t),flatten:(e,t)=>m.flatten(e,t),intersection:(...e)=>m.intersection(...e),addOrRemove(e,t){const n=e.indexOf(t);return-1===n?e.push(t):e.splice(n,1),e},addOrRemoveImmutable(e,t){const n=e.indexOf(t),r=dt.deepClone(e);return-1===n?[...r,t]:[...r.slice(0,n),...r.slice(n+1)]},sortBy:(e,t)=>m.sortBy(e,t),chunk:(e,t)=>m.chunk(e,t),uniq:e=>m.uniq(e)},zt="id";function Bt(e,t){return localStorage.setItem(e,JSON.stringify(t)),t}function Ht(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}const qt={getAll(e,t){let n=Ht(e);return n&&n.length?n:!n&&t?(t.forEach(t=>qt.create(e,t)),Ht(e)):[]},get(e,t){const n=qt.getAll(e);return n.length?n.find(e=>e[zt]===t):null},create(e,t){const n=qt.getAll(e),r=Object.assign(Object.assign({},t),{[zt]:t[zt]||(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)+1).toString()});return n.push(r),Bt(e,n),r},update(e,t){const n=qt.getAll(e);if(!n.length)return t;const r=n.findIndex(e=>e[zt]===t[zt]);return n[r]=t,Bt(e,n),t},delete(e,t){const n=qt.getAll(e);n.length&&(Array.isArray(t)||(t=[t]),t.forEach(e=>{const t=n.findIndex(t=>t[zt]===e);n.splice(t,1)}),Bt(e,n))},assoc(e,t,n,r,i){const a=Array.isArray(i);let o=a?i:[i];"string"==typeof Vt.first(o)&&(o=qt.getAll(r).filter(e=>o.includes(e.id)));const s=o.map(e=>e.id?e:qt.create(r,e));let c=qt.getAll(e);if(!c.length)return;let l=c.find(e=>e.id===t);return l?(s.forEach(e=>{if(l[n])if(Array.isArray(l[n])){if(l[n].find(t=>t.id===e.id))return;l[n].push(e)}else l[n]=e;else l[n]=a?[e]:e}),c=c.map(e=>e.id!==l.id?e:l),Bt(e,c),a?s:Vt.first(s)):void 0},dissoc(e,t,n,r){let i=qt.getAll(e);if(!i.length)return;let a=i.find(e=>e.id===t);if(!a)return;let o=a[n];return o?(Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]),r.forEach(e=>{const t=o.findIndex(t=>t.id===e);o.splice(t,1)}),a[n]=o,i=i.map(e=>e.id!==a.id?e:a),Bt(e,i),i):void 0}};var Jt=function(e){var t="/api/master/v2/companies";return e?"".concat(t,"?cursor=").concat(e):t},$t=function(e){return"/api/master/v2/objects/".concat(e)},Kt=function(){return"/api/master/v2/companies"},Yt=function(e){return"/api/master/v2/objects/".concat(e)},Gt="companies",Wt="company",Zt="update:company",Qt=function(e){return{key:"".concat(Gt).concat(e?":".concat(e):""),url:Jt(e)}},Xt=function(e){return{key:"".concat(Wt,":").concat(e),url:$t(e)}},en=function(e,t,n){return{key:Wt,url:Kt(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[Gt]}},tn=function(e,t,n){return{key:"".concat(Zt,":").concat(e),url:Yt(e),data:t,type:it.PUT,always:n}},nn=n(3),rn=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function an(e){const{castInitialValues:t,castValuesOnSubmit:n,initialValues:r,onSubmit:i,resetOnSubmit:a}=e,o=rn(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit","resetOnSubmit"]),s=t&&e.validationSchema?e.validationSchema.cast(function e(t){const n=dt.deepClone(t);return Object.keys(n).forEach(t=>{n.hasOwnProperty(t)&&(dt.isObject(n[t])?n[t]=e(n[t]):null===n[t]&&delete n[t])}),n}(r)):r,c={allowInitialSubmit:e.allowInitialSubmit};return d.createElement(nn.Formik,Object.assign({enableReinitialize:!0},o,{initialValues:s,onSubmit:(t,{setSubmitting:r,resetForm:o})=>{const s=n&&e.validationSchema?e.validationSchema.cast(t):t;i(s,()=>{a&&o(),r(!1)})},initialStatus:c}),X.isFunction(e.children)?t=>e.children(t):d.Children.count(e.children)?e.children:null)}an.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0};var on=n(2),sn=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),cn=n(4);const ln={getCustomFormControlClassName(e,t,n,r){let i="form-control";return Object(nn.getIn)(t,n)&&Object(nn.getIn)(e,n)&&(i+=" is-invalid"),r&&(i+=" "+r),i}};function un(e){const{values:t}=Object(nn.useFormikContext)(),n=t[e.fieldName];return"string"!=typeof n?d.createElement(d.Fragment,null):d.createElement("div",{className:"float-right text-muted"},n.length,"/",e.limit)}var pn=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function fn(e){const{label:t}=e,n=pn(e,["label"]);return d.createElement(cn.Form.Group,null,d.createElement("div",{className:"custom-control custom-checkbox"},d.createElement(mn,Object.assign({className:"custom-control-input"},n)),d.createElement(cn.Form.Label,{className:"custom-control-label",htmlFor:n.id},t)))}var dn=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function mn(e){const{children:t}=e,n=dn(e,["children"]);return d.createElement(nn.Field,Object.assign({},n),X.isFunction(t)?e=>t(e):d.Children.count(t)?t:null)}function hn(e){const{label:t,className:n,showCharacterCounter:r}=e,i=dn(e,["label","className","showCharacterCounter"]),{errors:a,touched:o}=Object(nn.useFormikContext)();return"checkbox"===i.type?d.createElement(fn,Object.assign({},e)):d.createElement(cn.Form.Group,null,!!t&&d.createElement(cn.Form.Label,{htmlFor:i.id},t),d.createElement(mn,Object.assign({className:ln.getCustomFormControlClassName(a,o,i.name,n)},i)),!!r&&!!i.maxLength&&d.createElement(un,{fieldName:i.name,limit:i.maxLength}),d.createElement(nn.ErrorMessage,{name:i.name},e=>d.createElement(cn.Form.Control.Feedback,{type:"invalid"},e)))}function gn(e){var t;const[n,r]=d.useState(!1);return d.useEffect(()=>{var t;e.isValid&&(e.dirty||(null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit))?r(!0):r(!1)},[e.isValid,null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit,e.dirty,e.values]),d.useEffect(()=>{e.isSubmitting&&r(!1)},[e.isSubmitting]),n}var yn=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function vn(e){const{showSpinner:t,children:n}=e,r=yn(e,["showSpinner","children"]),i=d.useRef(),[a,o]=d.useState({});return d.useEffect(()=>{const{width:e,height:t}=a;if(e&&t)return;const n=i.current,r=n.offsetHeight,s=n.offsetWidth;r&&s&&o({width:s,height:r})}),d.useEffect(()=>{const{width:e,height:t}=a;if(!e||!t)return;const n=i.current;n.style.width=e+1+"px",n.style.height=t+1+"px"},[a]),d.createElement(cn.Button,Object.assign({ref:i,disabled:t},r),t?d.createElement(cn.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):n)}var bn=n(115),Sn=n(17);const En="AlertService",Cn="LanguageService";const In=class extends G{static get Instance(){return this.instance||(this.instance=new this)}get name(){return Cn}setConfig(e){this.polyglot=new bn({locale:e.locale,phrases:e.phrases.rootElement||e.phrases}),this.cache={}}getPhrase(e,t,n){const r=`${e}.${t}`;if(this.polyglot||N.throw(new z("LanguageService config must be set.")),!this.polyglot.has(r)){if(!w.isDevelopment){const e=window.trackJs;return e&&e.console.error(`No phrase set for ${r} in language config`),""}N.throw(new z(`No phrase set for ${r} in language config.`))}if(!n||m.isEmpty(n)){const e=this.cache[r];if(e)return e;const t=this.polyglot.t(r);return this.cache[r]=t,t}const i=m.omit(n,"smartCount");let a={};for(let e in i)a[e]=Sn.sanitize(i[e]);m.isNumber(n.smartCount)&&(a.smart_count=n.smartCount);const o=`${r}:${m.values(Object.assign({},a)).join(":")}`,s=this.cache[o];if(s)return s;const c=this.polyglot.t(r,a);return this.cache[o]=c,c}encloseNamespace(e){return(t,n)=>this.getPhrase(e,t,n)}}.Instance,On=d.createContext(""),An=d.memo((function(e){const{phrase:t,namespace:n,options:r}=e,i=d.useContext(On),a=n||i,o=In.getPhrase(a,t,r);return d.createElement("span",{dangerouslySetInnerHTML:{__html:o}})}),(e,t)=>e.namespace===t.namespace&&e.phrase===t.phrase&&dt.isEqual(e.options,t.options));function jn(e){const t=Object(nn.useFormikContext)(),n=gn(t);d.useEffect(()=>{function e(e){13===e.keyCode&&n&&t.validateForm().then(e=>{Object.keys(e).length||t.submitForm()})}return window.addEventListener("keypress",e),()=>window.removeEventListener("keypress",e)},[n]);let r="save";return e.isNew&&(r="create"),e.hasNext&&(r="next"),d.createElement(vn,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},d.createElement(An,{namespace:"shared.formButtons",phrase:r}))}function Tn(e){var t=Object(nn.useFormikContext)();return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this company",autoFocus:!0}),d.createElement(jn,{isNew:e.isNew}))}function wn(e){return d.createElement(an,{initialValues:e.company,validationSchema:sn,onSubmit:e.saveCompany},d.createElement(Tn,{isNew:!(e.company&&e.company.id)}))}function Ln(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(Xt(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(wn,{company:n.data,saveCompany:function(n,r){return i.fetch(t,tn(e.id,n,r))}}))}function kn(){var e=Object(te.useDispatch)();return d.createElement(wn,{saveCompany:function(t,n){i.fetch(e,en(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.Companies.EDIT_COMPANY,args:[e.id]})}),n))}})}var xn,Nn=n(116);!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)"}(xn||(xn={}));const Pn={isNumber:e=>Pn.isType(e,"number"),isString:e=>Pn.isType(e,"string"),isType:(e,t)=>typeof e===t};var _n,Dn=n(12),Rn=n.n(Dn);function Fn(e,t){return dt.isObject(e)&&e.hasOwnProperty(t)&&Pn.isString(e[t])}function Un(e,t,n){return({value:r})=>{if(r.length||n(),!(r.length<e.activationLength)){if(e.local){const n=X.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(r,e.local):function(e,t,n){const r=e.trim().toLowerCase();return r.length?t.filter(e=>!(!Fn(e,n)||!Pn.isString(e[n]))&&e[n].trim().toLowerCase().includes(r)):[]}(r,e.local,e.valueKey);t(e=>Object.assign(Object.assign({},e),{[_n.Local]:n}))}e.getRemoteUrl&&function(e,t,n){const r=X.isFunction(e)&&e(t);r&&i.ajaxRequest({resource:r,type:it.GET,success:n,error:()=>{}})}(e.getRemoteUrl,r,n=>t(t=>Object.assign(Object.assign({},t),{[_n.Remote]:X.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n})))}}}function Mn(e,t,n,r,i,a){const o=t=>e[t]||[],s=t?o(_n.Recent):[],c=o(_n.Local),l=o(_n.Remote);let u=[];s.length&&u.push({title:n,data:s});const p=[...c,...l];return Number.isInteger(a)&&u.length>a&&p.slice(0,a),X.isFunction(i)?u.push(...i(p)):u.push({title:r,data:p}),u}function Vn(e){return e.data}function zn(e){if(e.title)return d.createElement("strong",null,e.title)}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote"}(_n||(_n={}));const Bn={container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded "+Rn.a.suggestionsContainerOpen,suggestionsList:"list-unstyled m-0",suggestion:"cursor-pointer py-1 px-2",suggestionHighlighted:Rn.a.suggestionHighlighted,sectionContainer:"border-bottom py-1 "+Rn.a.sectionContainer};function Hn(e={}){return Object.assign(Bn,e)}var qn=n(13),Jn=n(25),$n=n.n(Jn),Kn=n(26),Yn=n.n(Kn),Gn=n(27),Wn=n.n(Gn),Zn=n(28),Qn=n.n(Zn),Xn=(n(29),n(30),n(31)),er=n.n(Xn),tr=n(32),nr=n.n(tr),rr=n(33),ir=n.n(rr),ar=n(34),or=n.n(ar),sr=n(35),cr=n.n(sr),lr=n(36),ur=n.n(lr),pr=n(37),fr=n.n(pr),dr=n(38),mr=n.n(dr),hr=n(39),gr=n.n(hr),yr=n(40),vr=n.n(yr),br=n(41),Sr=n.n(br),Er=n(42),Cr=n.n(Er),Ir=n(43),Or=n.n(Ir),Ar=n(44),jr=n.n(Ar),Tr=n(45),wr=n.n(Tr),Lr=n(46),kr=n.n(Lr),xr=n(47),Nr=n.n(xr),Pr=n(48),_r=n.n(Pr),Dr=n(49),Rr=n.n(Dr),Fr=n(50),Ur=n.n(Fr),Mr=(n(51),n(52)),Vr=n.n(Mr),zr=n(53),Br=n.n(zr),Hr=n(54),qr=n.n(Hr),Jr=(n(55),n(56),n(57)),$r=n.n(Jr),Kr=n(58),Yr=n.n(Kr),Gr=n(59),Wr=n.n(Gr),Zr=n(60),Qr=n.n(Zr),Xr=n(61),ei=n.n(Xr),ti=n(62),ni=n.n(ti),ri=(n(63),n(64)),ii=n.n(ri),ai=n(65),oi=n.n(ai),si=n(66),ci=n.n(si),li=n(67),ui=n.n(li),pi=n(68),fi=n.n(pi),di=n(69),mi=n.n(di),hi=n(70),gi=n.n(hi),yi=(n(71),n(72)),vi=n.n(yi),bi=n(73),Si=n.n(bi),Ei=n(74),Ci=n.n(Ei),Ii=n(75),Oi=n.n(Ii),Ai=n(76),ji=n.n(Ai),Ti=n(77),wi=n.n(Ti),Li=n(78),ki=n.n(Li),xi=n(79),Ni=n.n(xi),Pi=n(80),_i=n.n(Pi),Di=n(81),Ri=n.n(Di),Fi=n(82),Ui=n.n(Fi),Mi=n(83),Vi=n.n(Mi),zi=n(84),Bi=n.n(zi),Hi=(n(85),n(86),n(87),n(88)),qi=n.n(Hi),Ji=(n(89),n(90),n(91),n(92),n(93)),$i=n.n(Ji),Ki=n(94),Yi=n.n(Ki),Gi=(n(95),n(96),n(97),n(98)),Wi=n.n(Gi),Zi=n(99),Qi=n.n(Zi),Xi=n(100),ea=n.n(Xi),ta=n(101),na=n.n(ta),ra=n(102),ia=n.n(ra),aa=n(103),oa=n.n(aa),sa=n(104),ca=n.n(sa),la=(n(105),n(106),n(107),n(108)),ua=n.n(la),pa=n(109),fa=n.n(pa);const da=[$n.a,Wn.a,Qn.a,er.a,or.a,cr.a,ur.a,fr.a,ir.a,Yn.a,mr.a,gr.a,vr.a,Sr.a,Cr.a,nr.a,Or.a,jr.a,wr.a,Ur.a,kr.a,Nr.a,_r.a,Rr.a,Vr.a,Wr.a,ki.a,_i.a,Ni.a,Bi.a,Ri.a,Ui.a,Vi.a,ui.a,mi.a,fi.a,Br.a,qr.a,oi.a,ci.a,ii.a,$r.a,Qr.a,Si.a,Ci.a,ei.a,ni.a,Oi.a,Yr.a,vi.a,ji.a,wi.a,gi.a,$i.a,Yi.a,qi.a,ea.a,Qi.a,Wi.a,na.a,oa.a,ia.a,ca.a,fa.a,ua.a];var ma;!function(e){e.AddToPlaylists="add-to-playlist",e.Caret="caret",e.Delete="delete",e.Edit="edit",e.NoEdit="no-edit",e.Close="close",e.Folder="folder",e.Resources="resources",e.More="more",e.Bell="bell",e.Plus="plus",e.Search="search",e.Share="share",e.Upload="upload",e.Preview="preview",e.CircleCheck="circle-check",e.Down="down",e.Right="right",e.UpDown="up-down",e.ChevronUp="chevron-up",e.ChevronDown="chevron-down",e.ChevronLeft="chevron-left",e.ChevronRight="chevron-right",e.VisibleOff="visible-off",e.VisibleOn="visible-on",e.PublisherArchive="publisher-archive",e.Play="play",e.PlayCircle="play-circle",e.ArrowLeft="arrow-left",e.CheckCircleOutline="check-circle-o",e.CheckCircle="check-circle",e.Check="check",e.Lock="lock",e.Link="link",e.Info="info",e.Question="question",e.Star="star",e.StarOutline="star-o",e.Archive="archive",e.Warning="warning",e.WarningOutline="warning-o",e.NewWindow="new-window",e.File="file",e.FilePDF="file-pdf",e.FileExcel="file-excel",e.FilePowerpoint="file-ppt",e.FileWord="file-word",e.FileImg="file-img",e.FileZip="file-zip",e.Enter="enter",e.Calendar="calendar",e.CloseCaption="close-caption",e.CloseCaptionBadge="close-caption-badge",e.Playlist="playlist",e.Handle="handle",e.Subject="subject",e.Series="series",e.EditClickView="edit-clickview",e.Heart="heart",e.HeartOutline="heart-outline",e.WhiteWave="white-wave",e.Cog="cog",e.Video="video",e.Compass="compass",e.History="history",e.Tag="tag"}(ma||(ma={}));m.extend(qn.config,{autoReplaceSvg:!1,autoAddCss:!1,familyPrefix:"cv",autoA11y:!0,observeMutations:!1,replacementClass:"cv-svg",keepOriginalSource:!1}),qn.library.add(...da);const ha="cv";const ga=class{constructor(){}static get Instance(){return this.instance||(this.instance=new this)}getSvg(e,t={}){const n=this.faIconLookup(e,t),r=this.getIcon(n,t);if(r&&(!r||r.html.length))return r.html.pop()}getIcon(e,t){return qn.icon(e,t.iconOptions||{})}faIconLookup(e,t){let{prefix:n=ha}=t;return qn.findIconDefinition({prefix:n,iconName:e})}}.Instance,ya=ma,va={getRandomInt:(e=1e4)=>Math.floor(Math.random()*Math.floor(e))};function ba(e){const{title:t,placement:n,trigger:r,children:i}=e;return d.createElement(cn.OverlayTrigger,{placement:n,overlay:d.createElement(cn.Tooltip,{id:`${t}-${va.getRandomInt()}`},t),trigger:r},i)}ba.defaultProps={trigger:["hover","click","focus"],placement:"top"};const Sa="d-inline-block svg-container",Ea="span";var Ca;function Ia(e){const{svgName:t,className:n=Sa,tagName:r=Ea,size:i=Ca.Standard,onClick:a,title:o,tooltipPlacement:s="right"}=e,c=r,l={dangerouslySetInnerHTML:{__html:ga.getSvg(t)},className:`${n} ${i}`,onClick:X.isFunction(a)?a:null};return o?d.createElement(ba,{title:o,placement:s},d.createElement(c,Object.assign({},l))):d.createElement(c,Object.assign({},l))}!function(e){e.Standard="std",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xlg"}(Ca||(Ca={}));var Oa=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Aa=e=>{const t="d-inline-block svg-container";return X.isFunction(e)?t+" cursor-pointer":t};function ja(e){const{onClickSearchIcon:t,searchIconPlacement:n,className:r}=e,i=Oa(e,["onClickSearchIcon","searchIconPlacement","className"]);let a="form-control "+Rn.a.input,o="input-group-text bg-white";"right"===n&&(a+=" border-right-0",o+=" pl-0"),"left"===n&&(a+=" border-left-0",o+=" pr-0"),r&&(a+=" "+r);const s=()=>d.createElement("div",{className:o},d.createElement(Ia,{svgName:ya.Search,size:Ca.Small,onClick:t,className:Aa(t)}));return d.createElement("div",{className:"input-group"},"left"===n&&d.createElement("div",{className:"input-group-prepend"},d.createElement(s,null)),d.createElement("input",Object.assign({className:a},i)),"right"===n&&d.createElement("div",{className:"input-group-append"},d.createElement(s,null)))}const Ta=X.isFunction;function wa(e){const t=(n=e.initialSuggestions,r=e.recentSearches,{[_n.Recent]:r,[_n.Local]:n,[_n.Remote]:[]});var n,r;const[i,a]=d.useState(e.initialQuery||""),[o,s]=d.useState(t),c=function(e){const[t,n]=Object(d.useState)(window.matchMedia(e).matches);return Object(d.useEffect)(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const i=()=>n(r.matches);return r.addListener(i),()=>r.removeListener(i)},[e]),t}(xn.XS),l=()=>{s(t)},u=t=>{t.preventDefault(),Ta(e.onSubmit)&&e.onSubmit(i)};return d.createElement("form",{onSubmit:u},d.createElement(Nn,{suggestions:Mn(o,!i,e.recentSearchHeading||In.getPhrase("shared.searchBar","recentSearchHeading"),e.suggestionsHeading,e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:Un(e,s,l),onSuggestionsClearRequested:()=>{e.alwaysRenderSuggestions||l()},onSuggestionSelected:(t,{suggestion:n})=>{e.clearQueryOnSelect&&a(""),e.onSuggestionSelected(n)},getSuggestionValue:t=>e.updateQueryOnSelection?function(e,t){return Fn(t,e)?t[e]:""}(e.valueKey,t):i,renderSuggestion:t=>Ta(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return Fn(t,e)?d.createElement(d.Fragment,null,t[e]):d.createElement(d.Fragment,null)}(e.valueKey,t),alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!c,inputProps:{placeholder:e.placeholder||In.getPhrase("shared.searchBar","placeholder"),value:i,onChange:(t,{newValue:n})=>{a(n),Ta(e.onQueryChange)&&e.onQueryChange(n)},onKeyDown:t=>{8===t.keyCode&&e.onBackspace&&!i&&e.onBackspace()},autoFocus:!!e.autoFocusInput,onClickSearchIcon:!!e.submitOnClickSearchIcon&&u,searchIconPlacement:e.searchIconPlacement},renderInputComponent:ja,theme:Hn(e.theme),multiSection:!0,renderSectionTitle:zn,getSectionSuggestions:Vn}))}function La(e){const{appLink:t,className:n,children:i,tag:a="a"}=e;if(!t)return d.createElement("span",{className:n||""},i);let o=e.onClick;o||(o=e=>{e.preventDefault(),r.AppLinkHelper.trigger(t)});const s={onClick:o,href:r.AppLinkHelper.getHref(t),className:n};return d.createElement(a,Object.assign({},s),i)}function ka(e){var t=e.backToName,n=e.appLink;return d.createElement(La,{appLink:n,className:"d-inline-flex align-items-center"},d.createElement(Ia,{svgName:ya.ArrowLeft,size:Ca.Small}),d.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}function xa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Na(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Na(e,t)}(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 Na(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}wa.defaultProps={updateQueryOnSelection:!0,valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialSuggestions:[],searchIconPlacement:"right"};var Pa=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function _a(e){var t=e.selected,n=e.onToggle,r=Pa(e,["selected","onToggle"]),i=xa(d.useState(t),2),a=i[0],o=i[1];d.useEffect((function(){return o(t)}),[t]);return d.createElement(cn.Form.Check,Object.assign({type:"checkbox",id:"checkbox-".concat(va.getRandomInt()),checked:a,onChange:function(){o(!a),n(!a)}},r))}var Da,Ra,Fa,Ua,Ma=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Va(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,a=e.error,o=e.touched,s=Ma(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),c="custom-file-input cursor-pointer";a&&o&&(c+=" is-invalid");var l=Object.assign({type:"file",className:c,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&X.isFunction(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"custom-file"},d.createElement(nn.Field,Object.assign({},l,s),e.children),d.createElement(cn.Form.Label,{className:"custom-file-label",htmlFor:s.id},i)))}!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(Da||(Da={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners"}(Ra||(Ra={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(Fa||(Fa={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(Ua||(Ua={}));const za={urlBuilder(e,t){const n=m.map(t,(e,t)=>{if(t&&Array.isArray(e)){return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&")}return t&&void 0!==e?`${t}=${encodeURIComponent(e)}`:""}),r=m.reduce(n,(e,t)=>t?e?`${e}&${t}`:t:e);return r?`${e}?${r}`:e},buildFilter(e){let t=[];if(e.limit&&t.push("limit:"+e.limit),e.cursor&&t.push("page:"+e.cursor),e.before&&t.push("dateCreated:..."+e.before),t.length)return t.join(",")},makeHttps:e=>m.isString(e)?-1===e.indexOf("http://")?e:e=e.replace("http://","https://"):e,safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith("/")||(n+="/"),t?(n+=t.startsWith("/")?t.slice(1):t,n):n}};var Ba;!function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(Ba||(Ba={}));const Ha={[Ra.Banners]:Ba.Banner,[Ra.Thumbnails]:Ba.Thumbnail},qa=e=>"/v1/category-map/"+e,Ja={createUrl:(e,t)=>Ja._createUrl(e,t),createBannerUrl:(e,t,n)=>e&&e.url?Ja._createUrl(e.url,n):Ja._createCategoryMappedUrl(t,n),Rfc3986EncodeURIComponent:e=>encodeURIComponent(e).replace(/[!'()*]/g,escape),_createCategoryMappedUrl(e,t){const{fallbackBaseUrl:n,fallbackCategoryName:r,type:i}=e,a=za.safeUrlConcat(n,""+qa(Ha[i])),o=Object.assign({name:Ja.Rfc3986EncodeURIComponent(r)},t);return Ja._createUrl(a,o)},_createUrl(e,t){if(!e)return;if(dt.isEmpty(t))return e;const n=$.param(t),r=-1===e.indexOf("?")?"?":"&";return za.safeUrlConcat(e,`${r}${n}`)},legacyCreateThumbnailUrl(e,t){if(!e)return"";let n;if(!e)return;if(n=e instanceof r.Model?e.get("url"):"string"==typeof e?e:e.url,!n)return;const i=Object.assign({size:Da.Small,bgColor:"000"},t);return Ja._createUrl(n,i)}},$a={[Ra.Thumbnails]:{width:1280,height:720},[Ra.Banners]:{width:3600,height:666},[Ra.Covers]:{width:1080,height:1080},[Ra.Posters]:{width:1e3,height:1500},[Ra.TallPosters]:{width:1080,height:1920},[Ra.HeroBanners]:{width:1920,height:640}};var Ka,Ya={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return Ya.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=$a[t].width,a=$a[t].height;r.addEventListener("load",(function(){Ya.isImageValid(t,r)&&X.isFunction(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(a))}))},isImageValid:function(e,t){var n=$a[e].width,r=$a[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}},Ga={isItemActive:function(e,t){return t||(t=r.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)}};!function(e){e.Developer="Curator Devs",e.Content="Content",e.Curator="Curators",e.Support="Support",e.SalesSupport="Sales Support"}(Ka||(Ka={}));var Wa=function(){return[{value:"protected",access:"r"}]},Za=function(e){return[Ka.Developer,Ka.Content].some((function(t){return io.getGroupNames(e).includes(t)}))},Qa=function(e){return Object.values(e).every((function(e){return!!e}))},Xa=function(e,t){return!!e&&!!t&&e.toString()===t.toString()},eo=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function to(e){return function(e){if(Array.isArray(e))return no(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return no(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return no(e,t)}(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 no(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ro={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(Xa(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var a=e(r[i]);if(a)return a}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var a=ro.find(e,i);a&&(n=[a].concat(to(n))),i=a?r(a):null}return n}},io={getGroupNames:function(e){return e&&e.groups?e.groups.map((function(e){return e.name})):[]}};function ao(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oo(e,t)}(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 oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var so=d.createContext(void 0),co=function(e){var t=e.children,n=ao(d.useState(),2),r=n[0],i=n[1],a=ao(d.useState(!1),2),o=a[0],s=a[1],c=ao(d.useState(),2),l=c[0],u=c[1],p={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:o,getImage:function(){var e=l;return u(null),s(!1),e},setImage:function(e){u(e),s(!0)}};return d.createElement(so.Provider,{value:p},t)};const lo=class extends G{constructor(){super(),this.constructors={},this.destructors={},this.instances={},this.singletonInstances={},this.referenceCounts={}}get name(){return"InstanceManager"}static get Instance(){return this.instance||(this.instance=new this)}registerDataService(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e({dataProvider:this.getInstance(t.dataProvider),cache:this.getInstance(t.cache),bootstrapData:t.bootstrapData,defaultErrorHandler:t.defaultErrorHandler,alertService:t.alertService}),this.destructors[n]=()=>{this.instances[n]?this.instances[n].destroy():N.throw(new z(`Trying to destroy a ${n} instance that has already been destroyed`)),this.releaseInstance(t.dataProvider),this.releaseInstance(t.cache)},this}registerInstance(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e(t),this.destructors[n]=()=>m.isFunction(this.instances[n].destroy)&&this.instances[n].destroy(),this}registerSingleton(e){const t=e.name;return this.singletonInstances[t]=e,this}getInstance(e,t){return this.singletonInstances[e]?this.singletonInstances[e]:(this.constructors[e]||N.throw(new z(`${e} was not registered with ${this.name}`)),this.referenceCounts[e]++,t&&this.listenTo(t,"destroy",()=>this.releaseInstance(e)),this.instances[e]||(this.instances[e]=this.constructors[e]()),this.instances[e])}releaseInstance(e){if(this.instances[e])return window.setTimeout(()=>{this.referenceCounts[e]--,this.referenceCounts[e]<1&&(this.destructors[e](),delete this.instances[e])},0),this}validateConstructor(e){const t=e.prototype.name;t||N.throw(new z(`Classes registered with ${this.name} must have a unique name property.`)),this.constructors[t]&&N.throw(new z(`A class with the name: ${t} has already been registered with ${this.name}`))}}.Instance,uo={fetch(e,t){const{dataServiceName:n,eventPrefix:r,fetchData:i,setData:a,onError:o,deleteEventPrefix:s}=e;if(!X.isFunction(i))return void N.throw(new z("A fetchData function must be passed to fetch"));if(!X.isFunction(a))return void N.throw(new z("A setData function must be passed to fetch"));const c=o&&X.isFunction(o),l=lo.getInstance(n),u=h.Radio.channel(l.channelName),p=r+":request",f=r+":sync",d=r+":error",m=r+":invalidate",g=s&&s+":sync",y=()=>t(!1),v=()=>t(!0),b=()=>t(!1),S=()=>u.off(m,b);u.once(p,y),u.once(f,v),u.once(m,b),c&&u.once(d,o),g&&u.once(g,S);const E=i(l);return E&&(t(!0),e.setData(E)),()=>{lo.releaseInstance(n),u.off(p,y),u.off(f,v),u.off(m,b),c&&u.off(d,o),g&&u.off(g,S)}}};function po(e,t,n=!0){const[r,i]=d.useState(!1);d.useEffect(()=>{i(!1)},[...t]),d.useEffect(()=>{if(n)return uo.fetch(e,i)},[r,n])}const fo="UserDataService",mo="user:data:service",ho="current:user",go="workspace";class yo extends De{get name(){return fo}get channelName(){return mo}getCurrentUser(e,t){return this.get({resource:"/api/currentuser",eventPrefix:ho,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}getWorkspace(e,t){return this.get({resource:"/api/domain/v2/me/workspace?query=categorytree",eventPrefix:go,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}}const vo={dataServiceName:fo,dataChannelName:mo},bo={getCurrentUserFetchOptions:(e,t)=>Object.assign(Object.assign({},vo),{eventPrefix:ho,fetchData:e=>e.getCurrentUser(),setData:e,onError:t}),currentUser:{dataServiceName:fo,eventName:ho+":sync",getData:e=>e.getCurrentUser(),getInstance:e=>lo.getInstance(fo,e),beforeOnBeforeRender:!0}};function So(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eo(e,t)}(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 Eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Co,Io=d.createContext(void 0);function Oo(e){var t=e.children,n=So(d.useState(),2),r=n[0],i=n[1];return po(bo.getCurrentUserFetchOptions(i),[]),d.createElement(Io.Provider,{value:r},t)}function Ao(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jo(e,t)}(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 jo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function To(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wo=(To(Co={},Ra.Thumbnails,"Thumbnail"),To(Co,Ra.Banners,"Banner"),To(Co,Ra.Avatars,"Avatar"),To(Co,Ra.Logos,"Logo"),To(Co,Ra.Covers,"Cover"),To(Co,Ra.Posters,"Poster"),To(Co,Ra.TallPosters,"Tall Poster"),To(Co,Ra.HeroBanners,"Hero Banner"),Co);function Lo(e){var t,n=Object(nn.useFormikContext)(),i=Object(nn.getIn)(null===(t=n)||void 0===t?void 0:t.values,e.fieldName),a=d.useContext(so),o=a.setDataUrl,s=a.getImage,l=a.imageUploaded,u=Ao(d.useState(!1),2),p=u[0],f=u[1],m=Ao(d.useState(i),2),h=m[0],g=m[1],y=Ao(d.useState(!1),2),v=y[0],b=y[1];function S(t){f(!0),o(t.src),r.AppLinkHelper.trigger({application:e.application,action:e.uploadAction,args:[e.imageType]})}d.useEffect((function(){if(p){var t,r=s();if(r)f(!1),g(r),t=r,X.isFunction(e.setSelectedImage)?e.setSelectedImage(t):n&&n.setFieldValue(e.fieldName,{fileId:t.id,fileIdType:Ua.ImageAPIv2})}}),[l]);var E=e.label||wo[e.imageType]||"Image";return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"form-control h-auto py-2"},d.createElement("label",null,E),d.createElement("em",{className:"ml-1 text-muted"},"(Minimum dimensions are ".concat($a[e.imageType].width,"px")+" x ".concat($a[e.imageType].height,"px)")),d.createElement(Va,{label:"Choose a ".concat(E.toLowerCase()),name:"image",mimeType:c.IMAGES,onFileSelect:function(t){return Ya.onFileSelect(e.imageType,t,S)}}),!!h&&!!h.url&&d.createElement(d.Fragment,null,!v&&d.createElement("div",{className:"pb-2 ".concat(e.imageType===Ra.Banners?"w-100":"w-50")},d.createElement("img",{src:Ja.createUrl(h.url),className:"img img-fluid"})),d.createElement("div",{className:"d-flex justify-content-center"},d.createElement(Ia,{svgName:v?ya.ChevronDown:ya.ChevronUp,size:Ca.Large,className:"svg-container cursor-pointer",onClick:function(){return b(!v)},title:v?"Show image":"Hide image",tooltipPlacement:"top"})))))}var ko,xo=n(117),No=n.n(xo);function Po(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _o(e,t)}(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 _o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(ko||(ko={}));var Do=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function Ro(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,a=e.onCancel,o=d.useRef(),s=d.useRef(),c=Po(d.useState(!1),2),l=c[0],u=c[1],p=Po(d.useState(!1),2),f=p[0],m=p[1];return d.useEffect((function(){var e=new Image;e.src=t;var i=o.current.offsetWidth/e.width;return s.current=new No.a(o.current,{viewMode:ko.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return u(!0)}}),function(){return s.current.destroy()}}),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement("img",{ref:o,src:t,className:"img img-fluid mw-100"})),d.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},d.createElement(cn.Button,{variant:"link",onClick:a},"Cancel"),d.createElement(vn,{onClick:function(){if(l){m(!0);var e=s.current.getCroppedCanvas().toDataURL(function(e){var t=e.match(Do);if(t)return t[1]}(t));X.isFunction(i)&&i(e)}},disabled:!l,showSpinner:f},"Crop")))}function Fo(e,t){return t?{application:e.application,action:e.action,args:e.args,params:Object.assign({},e.params,{cursor:t})}:null}function Uo({appLink:e,cursors:t,className:n}){return d.createElement(On.Provider,{value:"shared.pagination"},d.createElement("div",{className:n},d.createElement(La,{appLink:Fo(e,t.previous),className:"btn btn-secondary mr-1 "+(t.previous?"":"disabled")},d.createElement(An,{phrase:"previous"})),d.createElement(La,{appLink:Fo(e,t.next),className:"btn btn-secondary "+(t.next?"":"disabled")},d.createElement(An,{phrase:"next"}))))}function Mo(e){if(!e.collection)return d.createElement(d.Fragment,null);var t=e.collection,n=t.data,r=t.pagination;return d.createElement(d.Fragment,null,!!n&&d.createElement(Zo,{objects:n,getObjectAppLink:e.getObjectAppLink,newObjectAppLink:e.newObjectAppLink,objectName:e.objectName}),!!r&&!!r.cursors&&d.createElement(Uo,{cursors:r.cursors,appLink:e.collectionAppLink}))}Uo.defaultProps={className:"py-2"};var Vo=n(18),zo=n.n(Vo);function Bo(e){let t="dropdown-item";return e&&(t+=" "+e),t}function Ho(e){if(!e.actions||!e.actions.length)return d.createElement(d.Fragment,null);const t="actions-dropdown-"+va.getRandomInt();let n="px-0 "+zo.a.dropdownToggle;return e.dropdownToggleClassName&&(n+=" "+e.dropdownToggleClassName),d.createElement(cn.Dropdown,{className:e.className?e.className:"",alignRight:!0},d.createElement(cn.Dropdown.Toggle,{as:"button",type:"button",id:t,className:n},d.createElement(Ia,{svgName:ya.More,size:Ca.Small})),d.createElement(cn.Dropdown.Menu,null,e.actions.map((e,t)=>d.createElement(La,{key:t,appLink:e.appLink,className:Bo(e.className)},e.label))))}Ho.defaultProps={dropdownToggleClassName:"btn btn-light"};var qo=n(16),Jo=n.n(qo);function $o(e){const{svgName:t,children:n,appLink:r,className:i,onClick:a}=e;let o=`${i} ${Jo.a.iconButton}`;o+=n?" "+Jo.a.iconWithText:" "+Jo.a.iconOnly;const s=d.createElement(Ia,{svgName:t,className:Jo.a.svg});return r?d.createElement(La,{appLink:r,className:o,onClick:a},s,n):d.createElement("button",{className:o,onClick:a},s,n)}function Ko(e){const{onClick:t,appLink:n,svgName:r,tooltip:i}=e.actionOptions;let a="ml-2";return e.actionOptions.className&&(a+=" "+e.actionOptions.className),i?d.createElement(ba,{title:i},d.createElement($o,{appLink:n,svgName:r,onClick:t,className:a},e.children)):r?d.createElement($o,{onClick:t,appLink:n,svgName:r,className:a},e.children):n?d.createElement(La,{onClick:t,appLink:n,className:a},e.children):d.createElement("button",{onClick:t,className:a},e.children)}function Yo(e){const t=[],n=[];e.actions.forEach(e=>{e.button?t.push(e):n.push(e)});let r="d-flex";return e.className&&(r+=" "+e.className),d.createElement("div",{className:r},d.createElement(d.Fragment,null,!!t.length&&d.createElement("span",{className:zo.a.buttonList},t.map((e,t)=>d.createElement(Ko,{key:t,actionOptions:e},e.label))),e.sortComponent?e.sortComponent:"",!!n.length&&d.createElement(Ho,{actions:n,className:!!t.length&&"ml-2",dropdownToggleClassName:e.actionsDropdownClassName})))}function Go(e){var t=e.object,n=e.actions;return d.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&d.createElement("h5",null,t.name),!!n&&d.createElement("span",null,d.createElement(Yo,{actions:n})))}function Wo(e){return d.createElement("tr",null,d.createElement("td",null,d.createElement(La,{appLink:e.appLink},e.object.name)),d.createElement("td",null))}function Zo(e){return d.createElement(cn.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Name"),d.createElement("th",null,d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(La,{appLink:e.newObjectAppLink},d.createElement(Ia,{svgName:ya.Plus,size:Ca.Small}),d.createElement("span",null,"New ".concat(e.objectName))))))),d.createElement("tbody",null,e.objects.map((function(t){return d.createElement(Wo,{key:t.id,object:t,appLink:e.getObjectAppLink(t)})}))))}function Qo(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?d.createElement("ul",{className:"list-unstyled"},t.map((function(e,t){return d.createElement("li",{key:t,className:"border rounded mb-3"},d.createElement(La,{appLink:n(e),className:"d-block p-3"},e.name))}))):d.createElement("div",{className:"py-3"},d.createElement("p",null,r)):d.createElement(d.Fragment,null)}Qo.defaultProps={emptyMessage:"There is nothing here."};function Xo(e){var t=Object(nn.useFormikContext)();return d.createElement(hn,{as:"select",label:"Rating",name:"rating",id:"rating",value:t.values.rating&&t.values.rating.id,onChange:function(e){return t.setFieldValue("rating",e.target.value?{id:e.target.value}:{})},disabled:e.disabled},d.createElement(d.Fragment,null,d.createElement("option",{value:""},"Please select a rating"),e.ratings.map((function(e,t){return d.createElement("option",{key:t,value:e.id},function(e){return"".concat(e.name).concat(e.code?" (".concat(e.code,")"):"")}(e))}))))}function es(e){var t=e.tabs,n=e.isItemActive;return d.createElement(cn.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return d.createElement(cn.Nav.Item,{key:t},d.createElement(La,{appLink:e.appLink,className:(r=n(e),r?"nav-link active":"nav-link")},e.label));var r})))}es.defaultProps={isItemActive:Ga.isItemActive};var ts=n(8),ns=n.n(ts);function rs(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,a=e.className,o=e.actions,s=ns.a.text;return a&&(s+=" ".concat(a)),i?d.createElement("a",{className:"".concat(s," text-muted ").concat(ns.a.disabled)},t):d.createElement(d.Fragment,null,n?d.createElement(La,{appLink:n,className:s},t):d.createElement("a",{onClick:r,className:s},t),!!o&&d.createElement(Yo,{className:ns.a.actions,actions:o}))}function is(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return as(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return as(e,t)}(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 as(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function os(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,a=e.isDisabled,o=e.actions,s=Array.isArray(n)&&n.some((function(e){return Xa(t.id,e)})),c=d.useMemo((function(){return Array.isArray(n)&&n.some((function(e){return ro.find(t,e)}))}),[t,n]),l=is(d.useState(c),2),u=l[0],p=l[1],f=!!t.children&&!!t.children.length,m={name:t.name,appLink:X.isFunction(r)?r(t):null,onSelect:X.isFunction(i)?function(){return i(t)}:null,isDisabled:!!X.isFunction(a)&&a(t),className:s&&ns.a.selected||c&&ns.a.parentOfSelected,actions:!!o&&o.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return d.createElement("li",{className:"position-relative".concat(u?"":" ".concat(ns.a.collapsed))},d.createElement("div",{className:"position-relative"},d.createElement("span",{className:ns.a.node},f&&d.createElement(Ia,{svgName:ya.ChevronDown,size:Ca.Small,className:"svg-container ".concat(ns.a.chevron),onClick:function(){return p(!u)}}),d.createElement(rs,Object.assign({},m))),u&&d.createElement(cs,Object.assign({},e))))}var ss=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function cs(e){var t=e.tree,n=ss(e,["tree"]);return t&&t.children?d.createElement("ul",{className:"m-0 p-0 ".concat(ns.a.tree)},t.children.map((function(e){return d.createElement(os,Object.assign({key:e.id,tree:e},n))}))):d.createElement(d.Fragment,null)}var ls={getChord:function(e,t){return ro.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,a,o=ro.find(t,e);o&&(n=Object.assign((r={},i=e,a=ls.getChord(t,o),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),n))})),n}};function us(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ps(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ps(e,t)}(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 ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fs=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ds(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,a=e.noSelectionMessage,o=e.isNodeDisabled,s=e.getSelectedItemAppLink,c=fs(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","isNodeDisabled","getSelectedItemAppLink"]),l=c.tree,u=c.selectedIds,p=us(d.useState(ls.getState(u,l)),2),f=p[0],m=p[1];d.useEffect((function(){return m(ls.getState(u,l))}),[u,l]);var h=us(d.useState(!!i),2),g=h[0],y=h[1];d.useEffect((function(){return y(!!i)}),[i]);var v=!r||!!n;return d.createElement(d.Fragment,null,v&&d.createElement("div",{className:"pb-2"},!!n&&d.createElement("label",{className:"m-0"},n),!r&&d.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return y(!g)}},g?"Expand":"Collapse")),!g&&d.createElement("div",{className:"py-2 border-top"},d.createElement(cs,Object.assign({onSelect:function(e){return X.isFunction(t)&&t(e)},isDisabled:o},c))),(!dt.isEmpty(f)||!!a)&&d.createElement("div",{className:"py-2 border-top"},d.createElement("label",null,"Selected:"),d.createElement("ul",{className:"m-0"},dt.isEmpty(f)?d.createElement("li",null,a):Object.keys(f).map((function(e,t){return d.createElement("li",{key:t},X.isFunction(s)?d.createElement(La,{appLink:s(e)},f[e]):f[e])})))))}var ms=n(19);const hs={isEmpty:e=>e&&!(e.data&&e.data.length),length:e=>e&&e.data&&e.data.length,at(e,t){if(e&&e.data&&e.data.length&&!(t>e.data.length))return e.data[t]},get(e,t){if(e&&e.data&&e.data.length)return e.data.find(e=>e.id&&e.id.toString()===t)},flattenCollections(e){if(!e||!e.length)return;let t=[];return e.forEach(e=>{t=[...t,...e.data]}),t},getNextCursor:e=>e.pagination&&e.pagination.cursors&&e.pagination.cursors.next};var gs=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function ys(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,a=void 0===i?"":i,o=e.itemNumber,s=X.isFunction(n)&&n(t);return d.createElement("tr",{className:gs(a)},!!o&&d.createElement("td",null,d.createElement("span",null,o)),d.createElement("td",null,s?d.createElement(La,{appLink:s},t.name):t.name),X.isFunction(r)&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Yo,{actions:r(t)}))))}var vs=Object(ms.SortableElement)((function(e){return d.createElement(ys,Object.assign({sortable:!0},e))})),bs=n(10),Ss=n.n(bs),Es=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Cs=function(e){var t=e.sortable,n=e.getVideoActions;return d.createElement("thead",null,d.createElement("tr",null,!!t&&d.createElement("th",null,"#"),d.createElement("th",null,"Name"),!!n&&d.createElement("th",null)))},Is=d.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=Es(e,["videos","sortable"]);return d.createElement("tbody",{ref:t},!hs.isEmpty(n)&&n.data.map((function(e,t){return r?d.createElement(vs,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:Ss.a.draggableVideoItem},i)):d.createElement(ys,Object.assign({video:e},i))})))}));var Os=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},As=Object(ms.SortableContainer)((function(e){var t=e.forwardedRef,n=Os(e,["forwardedRef"]);return d.createElement(Is,Object.assign({sortable:!0,ref:t},n))})),js=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(Ss.a.sortingContainer);var i=r.querySelector(".".concat(Ss.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},Ts=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(Ss.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function ws(e){var t=e.onSortEnd,n=e.emptyMessage,r=Os(e,["onSortEnd","emptyMessage"]),i=d.useRef();return hs.isEmpty(e.videos)?d.createElement("div",null,n):d.createElement(cn.Table,{responsive:!0},d.createElement(Cs,Object.assign({sortable:!0},e)),d.createElement(As,Object.assign({forwardedRef:i,onSortStart:js(i),onSortEnd:Ts(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:Ss.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}function Ls(e){var t=e.alias,n=e.onDelete;return d.createElement("li",{className:"list-group-item d-flex justify-content-between"},t.name,d.createElement(Ia,{svgName:ya.Delete,onClick:function(){return n(t.id)}}))}function ks(e){var t=e.aliases,n=e.onDelete;return d.createElement("ul",{className:"list-group mb-3"},t?t.map((function(e){return d.createElement(Ls,{key:e.id,alias:e,onDelete:n})})):d.createElement("span",null,"Currently there are no aliases for this object."))}ws.defaultProps={emptyMessage:"There are no videos in this list."};var xs=Object(on.object)().shape({name:Object(on.string)().trim().max(255,"Name is too long").required("Name is required").default("")});function Ns(){var e=Object(nn.useFormikContext)(),t=gn(e);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Create an alias",name:"name",id:"name",value:e.values.name,placeholder:"Add an alias"}),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(vn,{showSpinner:e.isSubmitting,type:"submit",disabled:!t},"Add")))}function Ps(e){var t=e.onSave;return d.createElement(an,{initialValues:{name:""},validationSchema:xs,onSubmit:function(e,n){t(e,n)},resetOnSubmit:!0},d.createElement(Ns,null))}function _s(e){var t=e.onSave,n=e.aliases,r=e.onDelete;return d.createElement("div",{className:"w-50"},d.createElement("h1",null,"Aliases"),d.createElement(ks,{aliases:n,onDelete:r}),d.createElement(Ps,{onSave:t}))}var Ds=u.COMPANIES,Rs=function(e){return{application:Ds,action:o.Companies.EDIT_COMPANY,args:[e.id]}},Fs=function(e){return r.AppLinkHelper.trigger(Rs(e))};function Us(e){var t=i.useBasicFetch(Qt(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(wa,{placeholder:"Search for a company",onSuggestionSelected:Fs,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/companies/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(Mo,{collection:t&&t.data,collectionAppLink:{application:Ds,action:o.Companies.COMPANIES},newObjectAppLink:{application:Ds,action:o.Companies.NEW_COMPANY},getObjectAppLink:Rs,objectName:"Company"}))}function Ms(e){return(Ms="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})(e)}function Vs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bs(e,t,n){return t&&zs(e.prototype,t),n&&zs(e,n),e}function Hs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qs(e,t)}function qs(e,t){return(qs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Js(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ks(e);if(t){var i=Ks(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $s(this,n)}}function $s(e,t){return!t||"object"!==Ms(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ks(e){return(Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ys,Gs,Ws=function(e){Hs(n,e);var t=Js(n);function n(){return Vs(this,n),t.apply(this,arguments)}return Bs(n,[{key:"channelName",get:function(){return u.COMPANIES}},{key:"appRoutes",get:function(){return{"manage/companies(/)":"companies","manage/companies/new(/)":"newCompany","manage/companies/:id(/)":"editCompany"}}}]),n}(r.AppRouter),Zs=function(e){Hs(n,e);var t=Js(n);function n(){return Vs(this,n),t.apply(this,arguments)}return Bs(n,[{key:"companies",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(Us,{cursor:t}))}},{key:"newCompany",value:function(){this.layout.showChildView(ae,d.createElement(kn,null))}},{key:"editCompany",value:function(e){this.layout.showChildView(ae,d.createElement(Ln,{id:e}))}},{key:"name",get:function(){return"Companies Application"}},{key:"channelName",get:function(){return u.COMPANIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Ws}}]),n}(r.Application),Qs=n(24);!function(e){e.Success="success",e.Warning="warning",e.Fail="danger",e.Info="info"}(Ys||(Ys={})),function(e){e.Success="Success! 🙌",e.Warning="Whoops...",e.Fail="Oops...",e.Info="FYI"}(Gs||(Gs={}));class Xs extends G{constructor(e){super(e)}initialize(){this.alertCollection=new M,this.listenTo(y.ALERT,"remove:alert",this.removeAlert),this.showAlerts()}get name(){return En}get defaults(){return{maxAlerts:3}}showAlerts(){const e=h.Radio.channel(y.ALERT);let t={collection:this.alertCollection};this.options.alertViewCtor&&(t=m.extend({},t,{ctor:this.options.alertViewCtor})),e.trigger("show:alert",t)}removeAlert(e){this.alertCollection.remove(e),this.showAlerts()}createAlert(e){this.alertCollection.length===this.options.maxAlerts&&this.alertCollection.shift(),e.id||(e=m.extend({},e,{id:this.generateUniqueAlertId()})),this.alertCollection.push(new K(e)),this.showAlerts()}clearAllAlerts(){this.alertCollection.reset(null)}success(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:e})),this):e.useXHR?m.bind((e,t)=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:t})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,e)),this)}error(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e})),this):e.useXHR?m.bind(e=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e.message})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlertIL_DEFAULT,e)),this)}generateUniqueAlertId(){return m.uniqueId("alert_")}}var ec=n(9),tc=n.n(ec);function nc(e){const{alert:t,svgName:n,svgClassName:r,closeAlert:i}=e,{message:a,heading:o,appLink:s,appLinkText:c,appLinkClassName:l=""}=t,u=Object(Sn.sanitize)(a);return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-inline-block "+tc.a.icon},d.createElement(Ia,{svgName:n,className:"svg-container "+r})),d.createElement("div",{className:"pl-2 d-inline-block "+tc.a.alertContent},d.createElement("p",{className:"p-0 m-0 pb-1 "+tc.a.heading},o),d.createElement("p",{className:"p-0 m-0 "+tc.a.message,dangerouslySetInnerHTML:{__html:u}}),!!s&&d.createElement(La,{className:l,appLink:s},c)),d.createElement("div",{className:"close d-inline-block cursor-pointer",role:"button","aria-hidden":"true",onClick:i},"×"))}const rc=e=>{switch(e.type){case Ys.Success:return ya.CheckCircleOutline;case Ys.Fail:case Ys.Warning:return ya.Warning;case Ys.Info:default:return ya.Info}};function ic({alert:e,closeAlert:t}){const[n,r]=d.useState(!0),i=d.useRef();d.useEffect(()=>{n?i.current=window.setTimeout(t,3e3):clearTimeout(i.current)},[n]);const a="text-"+e.type.toLowerCase();return d.createElement("li",{className:"bg-white mt-2 p-2 show clearfix "+tc.a.alertItem,onMouseEnter:()=>r(!1),onMouseLeave:()=>r(!0)},d.createElement(nc,{alert:e,svgName:rc(e),svgClassName:a,closeAlert:t}))}function ac({alerts:e,removeAlert:t}){return d.createElement("div",{className:tc.a.alertBox},d.createElement(Qs.TransitionGroup,{component:"ul",className:tc.a.alertList+" list-unstyled"},e&&e.map((e,n)=>d.createElement(Qs.CSSTransition,{key:n,timeout:200,classNames:"alert"},d.createElement(ic,{alert:e,closeAlert:()=>t(e.id)})))))}function oc(){return d.createElement("div",{className:"text-center p-5"},d.createElement(cn.Spinner,{as:"div",animation:"border",role:"status"}))}function sc(e){const{title:t,closeButton:n=!0,closePopup:r,onEntered:i,showLoadingSpinner:a}=e,o=Object.assign({show:!0,onHide:r},X.isFunction(i)?{onEntered:i}:{});return d.createElement(cn.Modal,Object.assign({},o),!!t&&d.createElement(cn.Modal.Header,{closeButton:n},d.createElement(cn.Modal.Title,null,t)),a?d.createElement(oc,null):d.createElement(cn.Modal.Body,null,e.children))}var cc=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function lc({buttons:e}){return d.createElement("div",{className:"d-flex justify-content-end border-top pt-3 px-3 mx-n3"},e.map((e,t)=>((e,t)=>{const{buttonText:n,type:r="button",isSpinnerButton:i,showSpinner:a=!1,className:o}=e,s=cc(e,["buttonText","type","isSpinnerButton","showSpinner","className"]),c=Object.assign({key:t,type:r,className:"ml-2"+(o?" "+o:"")},s);return i?d.createElement(vn,Object.assign({showSpinner:a},c),n):d.createElement(cn.Button,Object.assign({},c),n)})(e,t)))}var uc,pc;!function(e){e.Boolean="System.Boolean",e.String="System.String",e.StaffRequest="ClickView.DomainApi.Models.Options.Enums.StaffRequestOption, ClickView.DomainApi.Models, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null",e.Long="System.Int64"}(uc||(uc={})),function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(pc||(pc={}));var fc={namespace:"domain_options"},dc=function(){return"/api/domain/v3/settings/types"},mc=function(e){return"/api/domain/v3/settings/types/".concat(e)},hc=function(){return"/api/domain/v3/settings/types"},gc=function(e){return"/api/domain/v3/settings/types/".concat(e)},yc=function(e){return"/api/domain/v3/settings/types/".concat(e)},vc="domain:options",bc="domain:option",Sc="update:domain:option",Ec="delete:domain:option",Cc=function(){return{key:vc,url:dc(),normalizeOptions:fc}},Ic=function(e){return{key:"".concat(bc,":").concat(e),url:mc(e),normalizeOptions:fc}},Oc=function(e,t,n){return e.type===uc.String&&(e=Tc(e)),{key:bc,url:hc(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[vc],normalizeOptions:fc}},Ac=function(e,t){return e.type===uc.String&&(e=Tc(e)),{key:"".concat(Sc,":").concat(e.id),url:gc(e.id),data:e,type:it.PUT,always:t,formatData:function(){return e},normalizeOptions:fc}},jc=function(e,t){return{key:"".concat(Ec,":").concat(e),url:yc(e),type:it.DELETE,invalidationKeys:[vc],normalizeOptions:fc,success:t}};function Tc(e){var t=e.defaultValue;if('"'===t)return Object.assign(Object.assign({},e),{defaultValue:'"'.concat(t,'"')});var n=t.charAt(0),r=t.charAt(t.length-1);return'"'!==n&&(t='"'.concat(t)),'"'!==r&&(t="".concat(t,'"')),Object.assign(Object.assign({},e),{defaultValue:t})}function wc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Lc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lc(e,t)}(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 Lc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kc(e){var t=wc(d.useState(!1),2),n=t[0],a=t[1],s=i.useBasicFetch(Ic(e.optionId)),c=Object(te.useDispatch)(),l=function(){e.closePopup(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DOMAIN_OPTIONS})};return d.createElement(sc,{title:"Delete Domain Option",closePopup:e.closePopup,showLoadingSpinner:!s.data},s.data&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,s.data.name),"?")),d.createElement(lc,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){a(!0),i.fetch(c,jc(e.optionId,l))},buttonText:"Yes, delete this domain option",isSpinnerButton:!0,showSpinner:n}]})))}var xc,Nc=function(e){return{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]}},Pc={application:u.DOMAIN_OPTIONS,action:o.DomainOptions.NEW_DOMAIN_OPTION};function _c(){var e=i.useBasicFetch(Cc());if(!e.data)return d.createElement(d.Fragment,null);var t=e.data.map((function(e){return e.displayName&&(e.name=e.displayName),e}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a domain option type to edit:"),d.createElement(La,{appLink:Pc,className:"d-block"},d.createElement(Ia,{svgName:ya.Plus,size:Ca.Small}),d.createElement("span",null,"New Domain Option"))),d.createElement(Qo,{objects:t,getAppLink:Nc}))}!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"}(xc||(xc={}));var Dc=on.object().shape({id:on.string(),name:on.string().trim().max(64,"Name is too long").required("Name is required").default(""),displayName:on.string().trim().max(255,"Display name is too long").required("Display name is required").default(""),type:on.mixed().required("Type is required").default(uc.Boolean),entityType:on.mixed().required("Entity type is required").default(xc.Customer),kind:on.mixed().required("Kind is required").default(pc.Temporary),defaultValue:on.mixed().required("Default value is required").default("false")}).noUnknown();function Rc(e){var t=e.type,n=e.defaultValue;if(!t)return d.createElement(d.Fragment,null);var r={label:"Default Value",name:"defaultValue",id:"defaultValue",value:n};return t===uc.Boolean?d.createElement(hn,Object.assign({as:"select"},r),d.createElement("option",{value:"true"},"True"),d.createElement("option",{value:"false"},"False")):t===uc.Long||t===uc.StaffRequest?d.createElement(hn,Object.assign({as:"input",type:"number"},r)):t===uc.String?d.createElement(hn,Object.assign({as:"input"},r)):void 0}var Fc=[xc.Customer,xc.User];function Uc(e){var t=null===e.id||void 0===e.id,n=Object(nn.useFormikContext)(),r=gn(n);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name (snake_case)",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this domain option",autoFocus:!0}),d.createElement(hn,{label:"Display Name",type:"text",name:"displayName",id:"displayName",value:n.values.displayName,placeholder:"Enter a display name for this domain option"}),d.createElement(hn,{as:"select",label:"Kind",name:"kind",id:"kind",value:n.values.kind},dt.getEnumKeys(pc).map((function(e){return d.createElement("option",{key:e,value:pc[e]},e)}))),d.createElement(hn,{as:"select",label:"Entity",name:"entityType",id:"entityType",value:n.values.entityType},dt.getEnumKeys(xc).filter((function(e){return Fc.includes(xc[e])})).map((function(e){return d.createElement("option",{key:e,value:xc[e]},e)}))),d.createElement(hn,{as:"select",label:"Type",name:"type",id:"type",value:n.values.type},dt.getEnumKeys(uc).map((function(e){return d.createElement("option",{key:e,value:uc[e]},e)}))),d.createElement(Rc,{type:n.values.type,defaultValue:n.values.defaultValue}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(vn,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(cn.Button,{as:La,variant:"danger",appLink:{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DELETE_DOMAIN_OPTION,args:[e.id]}},"Delete")))}function Mc(e){return d.createElement(an,{initialValues:e.domainOption,validationSchema:Dc,onSubmit:e.saveDomainOption},d.createElement(Uc,{id:e.domainOption&&e.domainOption.id}))}function Vc(){var e=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Domain Option"),d.createElement(Mc,{saveDomainOption:function(t,n){i.fetch(e,Oc(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]})}),n))}}))}function zc(e){var t=e.optionId,n=i.useBasicFetch(Ic(t)),r=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Domain Option"),n.data&&d.createElement(Mc,{domainOption:n.data,saveDomainOption:function(e,t){return i.fetch(r,Ac(e,t))}}))}function Bc(e){return(Bc="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})(e)}function Hc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jc(e,t,n){return t&&qc(e.prototype,t),n&&qc(e,n),e}function $c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kc(e,t)}function Kc(e,t){return(Kc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wc(e);if(t){var i=Wc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gc(this,n)}}function Gc(e,t){return!t||"object"!==Bc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wc(e){return(Wc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zc=function(e){$c(n,e);var t=Yc(n);function n(){return Hc(this,n),t.apply(this,arguments)}return Jc(n,[{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"appRoutes",get:function(){return{"developer/options(/)":"domainOptions","developer/options/new(/)":"newDomainOption","developer/options/:id(/)":"editDomainOption"}}},{key:"appLinks",get:function(){return["deleteDomainOption"]}}]),n}(r.AppRouter),Qc=function(e){$c(n,e);var t=Yc(n);function n(){return Hc(this,n),t.apply(this,arguments)}return Jc(n,[{key:"domainOptions",value:function(){this.layout.showChildView(ae,d.createElement(_c,null))}},{key:"newDomainOption",value:function(){this.layout.showChildView(ae,d.createElement(Vc,null))}},{key:"editDomainOption",value:function(e){this.layout.showChildView(ae,d.createElement(zc,{optionId:e}))}},{key:"deleteDomainOption",value:function(e){this.layout.showChildView(oe,d.createElement(kc,Object.assign({optionId:e},this.getPopupProps())))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(ac,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Domain Options Application"}},{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Zc}}]),n}(r.Application),Xc=function(e){return e?"".concat("/api/master/v2/people","?cursor=").concat(e):"/api/master/v2/people"},el=function(e){return"/api/master/v2/objects/".concat(e)},tl=function(){return"/api/master/v2/people"},nl=function(e){return"/api/master/v2/objects/".concat(e)},rl="people",il="person",al="update:person",ol=function(e){return{key:"".concat(rl).concat(e?":".concat(e):""),url:Xc(e)}},sl=function(e){return{key:"".concat(il,":").concat(e),url:el(e)}},cl=function(e,t,n){return{key:il,url:tl(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[rl]}},ll=function(e,t,n){return{key:"".concat(al,":").concat(e),url:nl(e),data:t,type:it.PUT,always:n}},ul=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown();function pl(e){var t=Object(nn.useFormikContext)();return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this person",autoFocus:!0}),d.createElement(jn,{isNew:e.isNew}))}function fl(e){return d.createElement(an,{initialValues:e.person,validationSchema:ul,onSubmit:e.savePerson},d.createElement(pl,{isNew:!(e.person&&e.person.id)}))}function dl(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(sl(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(fl,{person:n.data,savePerson:function(n,r){return i.fetch(t,ll(e.id,n,r))}}))}function ml(){var e=Object(te.useDispatch)();return d.createElement(fl,{savePerson:function(t,n){i.fetch(e,cl(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.People.EDIT_PERSON,args:[e.id]})}),n))}})}var hl=u.PEOPLE,gl=function(e){return{application:hl,action:o.People.EDIT_PERSON,args:[e.id]}},yl=function(e){return r.AppLinkHelper.trigger(gl(e))};function vl(e){var t=i.useBasicFetch(ol(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(wa,{placeholder:"Search for a person",onSuggestionSelected:yl,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/people/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(Mo,{collection:t&&t.data,collectionAppLink:{application:hl,action:o.People.PEOPLE},newObjectAppLink:{application:hl,action:o.People.NEW_PERSON},getObjectAppLink:gl,objectName:"Person"}))}function bl(e){return(bl="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})(e)}function Sl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function El(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cl(e,t,n){return t&&El(e.prototype,t),n&&El(e,n),e}function Il(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ol(e,t)}function Ol(e,t){return(Ol=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Al(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tl(e);if(t){var i=Tl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jl(this,n)}}function jl(e,t){return!t||"object"!==bl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tl(e){return(Tl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wl=function(e){Il(n,e);var t=Al(n);function n(){return Sl(this,n),t.apply(this,arguments)}return Cl(n,[{key:"channelName",get:function(){return u.PEOPLE}},{key:"appRoutes",get:function(){return{"manage/people(/)":"people","manage/people/new(/)":"newPerson","manage/people/:id(/)":"editPerson"}}}]),n}(r.AppRouter),Ll=function(e){Il(n,e);var t=Al(n);function n(){return Sl(this,n),t.apply(this,arguments)}return Cl(n,[{key:"people",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(vl,{cursor:t}))}},{key:"newPerson",value:function(){this.layout.showChildView(ae,d.createElement(ml,null))}},{key:"editPerson",value:function(e){this.layout.showChildView(ae,d.createElement(dl,{id:e}))}},{key:"name",get:function(){return"People Application"}},{key:"channelName",get:function(){return u.PEOPLE}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return wl}}]),n}(r.Application);function kl(e){return function(e){const t=lo.getInstance(e);return d.useEffect(()=>()=>lo.releaseInstance(e)),t}(e)}function xl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nl(e,t)}(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 Nl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pl(e){var t=e.imageType,n=e.closePopup,r=d.useContext(so),i=r.getDataUrl,a=r.setImage,o=xl(d.useState(i()),1)[0],s=xl(d.useState(!1),2),c=s[0],l=s[1],u=kl(f.IMAGE_UPLOAD),p=function(e){a(e),n()},m={dataUrl:o,imageType:t,minWidth:$a[t].width,minHeight:$a[t].height,onCrop:function(e){return u.uploadBase64Image(e,t,p,n)},onCancel:n};return d.createElement(sc,{title:"Crop Image",closePopup:n,onEntered:function(){return l(!0)}},c&&d.createElement(Ro,Object.assign({},m)))}var _l=function(e){var t=e.children;return d.createElement(Oo,null,d.createElement(co,null,t))};const Dl=()=>{const e=kl(En);return{success(t){e.success(t)()},error(t){e.error(t)()},warning(t){e.createAlert({type:Ys.Warning,heading:Gs.Warning,message:t})}}};function Rl(e){var t=e.page,n=e.totalPages,r=Pn.isNumber(t)&&t>0&&t<n&&t+1,i=Pn.isNumber(t)&&t>1&&t-1,a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!dt.isEmpty(a))return a}var Fl={convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:Rl(e.pagination),limit:e.pagination.pageSize}}}},Ul=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1";return{key:"playlists:".concat(e),url:"/ajax/playlists/curators?page=".concat(e),formatData:Fl.convertLegacyPaginatedCollection}},Ml=function(e,t){var n="/api/domain/v1/search/playlists?query=".concat(e);return t&&(n+="&filter={page:".concat(t,"}")),{key:"playlists:search:".concat(e).concat(t?":".concat(t):""),url:n,formatData:Fl.convertLegacyPaginatedCollection}},Vl=function(e){return{key:"playlist:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=cover,banner")}},zl=function(e){var t=e.slice().sort();return{key:"playlists:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Bl=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(t,"/playlists"),key:"playlist",data:e,type:it.POST,invalidationKeys:"playlists",success:n,error:r,always:i}},Hl=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:playlist:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}},ql=function(e,t,n,r){return{url:"/api/master/v1/playlists/".concat(e),key:"delete:playlist:".concat(e),type:it.DELETE,invalidationKeys:"playlists",success:t,error:n,always:r}},Jl=function(e){return{key:"playlist:".concat(e,":videos"),url:"/api/master/v2/objects/".concat(e,"/videos?query={orderBy:orderindex,limit:100}")}},$l=function(e,t,n,r){return{key:"reorder:playlist",url:"/api/master/v1/objects/".concat(e,"/videos/reorder"),data:t,type:it.PUT,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r}},Kl=function(e,t,n,r,i){return{key:"remove:playlist:video",url:"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t),type:it.DELETE,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r,always:i}};function Yl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gl(e,t)}(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 Gl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wl(e){var t=Object(te.useDispatch)(),n=Dl(),a=Yl(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(Vl(e.playlistId));var p=[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,ql(e.playlistId,(function(){n.success("Successfully deleted playlist."),r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS})}),(function(){c(!1),n.error("Failed to delete playlist.")}),e.closePopup))},buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:s}],f=!!l.data;return d.createElement(sc,{title:"Delete Playlist",closePopup:e.closePopup,showLoadingSpinner:!f},f&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement("p",null,"Please ensure it is not being used in any widgets.")),d.createElement(lc,{buttons:p})))}var Zl=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:on.string().trim().max(65535,"Description is too long").default(""),cover:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown(),banner:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown()}).noUnknown(),Ql=function(e,t){var n=u.PLAYLISTS,r=o.Playlists,i=[{label:"Edit Playlist Details",appLink:{application:n,action:r.EDIT_PLAYLIST,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_PLAYLIST_VIDEOS,args:[t]}}];return Za(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_PLAYLIST_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_PLAYLIST_AUDIENCES,args:[t]}}]),i};function Xl(e){var t=Object(nn.useFormikContext)(),n=gn(t);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this playlist",autoFocus:!0}),d.createElement(hn,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this playlist here"}),d.createElement(Lo,{imageType:Ra.Covers,fieldName:"cover",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement(Lo,{imageType:Ra.Banners,fieldName:"banner",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(vn,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(Yo,{actions:e.actions})))}function eu(e){var t,n=e.playlist&&e.playlist.id;return d.createElement(an,{initialValues:e.playlist,validationSchema:Zl,onSubmit:e.savePlaylist},d.createElement(Xl,{id:n,actions:!!n&&(t=n,[{label:"Delete playlist",appLink:{application:u.PLAYLISTS,action:o.Playlists.DELETE_PLAYLIST,args:[t]},className:"text-danger"}])}))}var tu=function(e){return function(t){return t.appLink.action===e}};function nu(e){var t=e.playlistId,n=e.activeAction,r=d.useContext(Io);return d.createElement("div",{className:"py-2"},!!r&&d.createElement(es,{tabs:Ql(r,t),isItemActive:tu(n)}))}function ru(e){var t=Object(te.useDispatch)(),n=Dl(),r=i.useBasicFetch(Vl(e.playlistId));return d.createElement(d.Fragment,null,d.createElement(nu,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST}),!!r.data&&d.createElement(eu,{playlist:r.data,savePlaylist:function(r,a){i.fetch(t,Hl(e.playlistId,r,(function(){n.success("Successfully updated playlist.")}),(function(){n.error("Failed to update playlist.")}),a))}}))}const iu=e=>Array(Array.isArray(e)?e.length:0).fill(!1);function au(e,t,n=!0){const[r,i]=d.useState(iu(e));d.useEffect(()=>{i(iu(e))},[...t]),d.useEffect(()=>{if(!n)return;const t=[];return e&&e.forEach((e,n)=>{t.push(uo.fetch(e,e=>{e!==r[n]&&i(Vt.cloneAndReplaceAtIdx(r,n,e))}))}),()=>t.forEach(e=>e())},[r,n])}const ou={getSetStateByKey:(e,t,n)=>r=>e(e=>{const i=X.isFunction(n)?n:X.useIdentity();return Object.assign(Object.assign({},e),{[t]:i(r,e)})})};var su,cu,lu,uu;!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(su||(su={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(cu||(cu={})),function(e){e.Root="0"}(lu||(lu={})),function(e){e.Root="root"}(uu||(uu={}));var pu,fu=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default(""),levelIds:on.array().of(on.string()).required("A level is required").default([])}).noUnknown();!function(e){e.Subject="Subject",e.Topic="Topic"}(pu||(pu={}));var du=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentIds:on.array().of(on.string()).default([uu.Root]),subjectIds:on.array().of(on.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject").default([]),type:on.mixed().required("Type is required").default(pu.Subject),emphasize:on.boolean().default(!1),comingSoon:on.boolean().default(!0),canBePreferred:on.boolean().default(!1),cover:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown(),banner:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown()}).noUnknown(),mu=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),hu=on.object().shape({name:on.string().max(255,"Name is too long").required("Name is required"),description:on.string().max(65535,"Description is too long").required("Description is required")}),gu=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentId:on.string().default(lu.Root)}).noUnknown(),yu={singularizeMemberType:function(e){switch(e){case cu.Playlists:return"playlist";case cu.Series:return"series";case cu.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case cu.Playlists:return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:n};case cu.Series:return{application:u.SERIES,action:o.Series.EDIT_SERIES,args:n};case cu.Videos:return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{label:"Remove ".concat(yu.singularizeMemberType(n)),appLink:{application:u.SUBJECTS,action:t===su.Subject?o.Subjects.REMOVE_SUBJECT_MEMBER:o.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},vu=function(){var e=u.SUBJECTS,t=o.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.SUBJECT_CLASSIFICATIONS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},bu=function(e){var t=u.SUBJECTS,n=o.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Classifications",appLink:{application:t,action:n.SUBJECT_CLASSIFICATIONS,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},Su=function(e,t){var n=u.SUBJECTS,r=o.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]};function Eu(e){return(Eu="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})(e)}function Cu(e){return function(e){if(Array.isArray(e))return Iu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Iu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iu(e,t)}(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 Iu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ou(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Au(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ju(e,t){return(ju=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lu(e);if(t){var i=Lu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wu(this,n)}}function wu(e,t){return!t||"object"!==Eu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lu(e){return(Lu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ku=function(){return"/api/subjects/v1/subjects/tree"},xu=function(e){return"/api/subjects/v1/subjects/".concat(e)},Nu=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},Pu=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},_u=function(){return"/api/subjects/v1/subjects"},Du=function(e){return"/api/subjects/v1/subjects/".concat(e)},Ru=function(e){return"/api/subjects/v1/subjects/".concat(e)},Fu=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},Uu=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/subjects?addToClassifications=").concat(!!t)},Mu=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},Vu=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},zu=function(){return"/api/subjects/v1/presentations"},Bu=function(e){return"/api/subjects/v1/presentations/".concat(e)},Hu=function(){return"/api/subjects/v1/presentations"},qu=function(e){return"/api/subjects/v1/presentations/".concat(e)},Ju=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},$u=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=cover,banner")},Ku=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},Yu=function(){return"/api/subjects/v1/classifications"},Gu=function(e){return"/api/subjects/v1/classifications/".concat(e)},Wu=function(e){return"/api/subjects/v1/classifications/".concat(e)},Zu=function(e){return"/api/subjects/v1/objects/".concat(e,"/classifications")},Qu=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/classifications?presentationId=").concat(t)},Xu=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},ep=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},tp=function(){return"/api/subjects/v1/levels"},np=function(e){return"/api/subjects/v1/levels/".concat(e)},rp=function(){return"/api/subjects/v1/levels"},ip=function(e){return"/api/subjects/v1/levels/".concat(e)},ap=function(e){return"/api/subjects/v1/objects/".concat(e,"/levels")},op=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/levels?addToAudiences=").concat(!!t)},sp=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},cp=function(e){return"/api/subjects/v1/audiences/".concat(e)},lp=function(){return"/api/subjects/v1/audiences"},up=function(e){return"/api/subjects/v1/audiences/".concat(e)},pp=function(e){return"/api/subjects/v1/audiences/".concat(e)},fp=function(e){return"/api/subjects/v1/objects/".concat(e,"/audiences")},dp=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/audiences?presentationId=").concat(t)},mp=function(e,t,n){var r="".concat(s.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(s.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},hp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ju(e,t)}(a,e);var t,n,r,i=Tu(a);function a(){return Ou(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getPresentations",value:function(e,t){return this.get({resource:zu(),eventPrefix:s.PRESENTATIONS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:Bu(e),eventPrefix:"".concat(s.PRESENTATION,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:Hu(),data:e,callback:t,errorCallback:n,eventPrefix:s.PRESENTATION,invalidationKeys:[s.PRESENTATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:qu(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(s.PRESENTATION,":").concat(e),s.PRESENTATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getSubjectTree",value:function(e,t){return this.get({resource:ku(),formatData:function(e){return{children:e,name:lu.Root,id:null}},eventPrefix:s.SUBJECTS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:xu(e),eventPrefix:"".concat(s.SUBJECT,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:Nu(e,t),eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:Pu(e,t,n),eventPrefix:mp(e,t,n),expiryTime:qe.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:_u(),data:e,callback:t,errorCallback:n,eventPrefix:s.SUBJECT,invalidationKeys:[s.SUBJECTS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:Du(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){var r=this;return this.delete({resource:Ru(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_SUBJECT,invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject."),errorHandler:function(e){var t,n=(null===(t=e)||void 0===t?void 0:t.code)===Pt.Conflict?"Cannot delete a subject with child subjects and/or classifications.":"Failed to delete subject.";r.alertService.error(n)()}})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:Fu(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectSubjects",value:function(e,t,n,r,i,a){var o=yu.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.SUBJECTS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)),c.push.apply(c,Cu(t.map((function(e){return"".concat(s.SUBJECTS,":").concat(e,":").concat(n)})))),this.update({resource:Uu(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_SUBJECTS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," subjects.")),errorHandler:this.alertService.error("Failed to update ".concat(o," subjects."))})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,a){var o=1===t.length?yu.singularizeMemberType(n):n,c=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(Cu(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))),Cu(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)}))));return this.create({resource:Mu(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:c,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(o," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(o," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var a=1===t.length?yu.singularizeMemberType(n):n,o=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(Cu(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))));return this.delete({resource:Vu(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(s.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:o,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(a," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(a," from subject."))})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:Ju(e),formatData:function(e){return{children:e,name:uu.Root,id:null}},eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:$u(e),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:Ku(e,t),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:Yu(),data:e,callback:t,errorCallback:n,eventPrefix:s.CLASSIFICATION,invalidationKeys:[s.CLASSIFICATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:Gu(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:Wu(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_CLASSIFICATION,invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"getObjectClassifications",value:function(e,t,n,r){return this.get({resource:Zu(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectClassifications",value:function(e,t,n,r,i,a){var o=yu.singularizeMemberType(r),c=["".concat(r,":").concat(e,":").concat(s.CLASSIFICATIONS)];return c.push.apply(c,Cu(n.map((function(e){return"".concat(s.CLASSIFICATION,":").concat(e,":").concat(r)})))),this.update({resource:Qu(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_CLASSIFICATIONS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," classifications.")),errorHandler:this.alertService.error("Failed to update ".concat(o," classifications."))})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?yu.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(mp(r,i,n)),l.push.apply(l,Cu(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.create({resource:Xu(e),data:t,callback:a,errorCallback:o,eventPrefix:"".concat(s.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(c," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(c," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?yu.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(mp(r,i,n)),l.push.apply(l,Cu(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.delete({resource:ep(e,t),callback:a,errorCallback:o,eventPrefix:"".concat(s.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(c," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(c," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:tp(),eventPrefix:s.LEVELS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:np(e),eventPrefix:"".concat(s.LEVEL,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:rp(),data:e,callback:t,errorCallback:n,eventPrefix:s.LEVEL,invalidationKeys:[s.LEVELS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:ip(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(s.LEVEL,":").concat(e),s.LEVELS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getObjectLevels",value:function(e,t,n,r){return this.get({resource:ap(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectLevels",value:function(e,t,n,r,i,a){var o=yu.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.LEVELS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.AUDIENCES)),this.update({resource:op(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_LEVELS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," levels.")),errorHandler:this.alertService.error("Failed to update ".concat(o," levels."))})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:sp(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCES,":").concat(e),expiryTime:qe.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:cp(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCE,":").concat(e),expiryTime:qe.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:lp(),data:e,callback:t,errorCallback:n,eventPrefix:s.AUDIENCE,invalidationKeys:[s.AUDIENCES],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:up(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:pp(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_AUDIENCE,invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"getObjectAudiences",value:function(e,t,n,r){return this.get({resource:fp(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectAudiences",value:function(e,t,n,r,i,a){var o=yu.singularizeMemberType(r);return this.update({resource:dp(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_AUDIENCES,":").concat(e),invalidationKeys:["".concat(r,":").concat(e,":").concat(s.AUDIENCES)],successHandler:this.alertService.success("Successfully updated ".concat(o," audiences.")),errorHandler:this.alertService.error("Failed to update ".concat(o," audiences."))})}},{key:"name",get:function(){return f.SUBJECT}},{key:"channelName",get:function(){return p.SUBJECT}}])&&Au(t.prototype,n),r&&Au(t,r),a}(De),gp={dataServiceName:f.SUBJECT,dataChannelName:p.SUBJECT},yp={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},gp),{eventPrefix:s.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},gp),{eventPrefix:mp(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},gp),{eventPrefix:s.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getObjectClassificationsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),fetchData:function(n){return n.getObjectClassifications(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},gp),{eventPrefix:s.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getObjectLevelsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),fetchData:function(n){return n.getObjectLevels(e,t)},setData:n,onError:r})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(s.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})},getObjectAudiencesFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},gp),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),fetchData:function(n){return n.getObjectAudiences(e,t)},setData:n,onError:r})}},vp=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},bp=function(e,t){var n=e.levelIds;return t.filter((function(e){return n.includes(e.id)}))};function Sp(e){var t=e.showLevels;return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Audiences"),!!t&&d.createElement("th",null,"Mapped Level(s)")))}function Ep(e){var t,n=e.audience,r=e.levels;return d.createElement("tr",null,d.createElement("td",null,d.createElement(La,{appLink:(t=n,{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[t.presentationId,t.masterId]})},n.name)),d.createElement("td",null,r.map((function(e){return d.createElement(La,{key:e.id,appLink:vp(e),className:"mr-2"},e.name)}))))}function Cp(e){var t=e.audiences,n=e.levels;return d.createElement(cn.Table,{responsive:!0,bordered:!0},d.createElement(Sp,{showLevels:!!t.length}),d.createElement("tbody",null,t.length?t.map((function(e){return d.createElement(Ep,{key:e.masterId,audience:e,levels:bp(e,n)})})):d.createElement("tr",null,d.createElement("td",null,"This presentation has no audiences."))))}function Ip(e){var t=null===e.masterId||void 0===e.masterId,n=Object(nn.useFormikContext)(),r=gn(n);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this audience",autoFocus:!0}),d.createElement(hn,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(vn,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(cn.Button,{as:La,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_AUDIENCE,args:[e.presentationId,e.masterId]}},"Delete")))}function Op(e){return d.createElement(an,{initialValues:e.audience,validationSchema:fu,onSubmit:e.saveAudience},d.createElement(Ip,{masterId:e.audience&&e.audience.masterId,presentationId:e.presentationId,levels:e.levels}))}function Ap(e){var t=e.objectAudiences,n=e.presentationAudiences;return t.filter((function(e){return n.some((function(t){return t.masterId===e.masterId}))}))}function jp(e){var t,n,r,i,a,o=yu.singularizeMemberType(e.memberType),s=(n=(t=e).presentationAudiences,r=t.objectLevels,i=t.objectAudiences,a=r.map((function(e){return e.id})),n.filter((function(e){return Vt.intersection(e.levelIds,a).length||i.some((function(t){return t.masterId===e.masterId}))})));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Levels"),d.createElement("p",null,"Select which levels this ".concat(o," is mapped to.")),d.createElement("p",null,"To see how levels correspond to audiences, scroll down to the audience-level mappings table."),d.createElement(Kp,{initialValues:{levelIds:e.objectLevels.map((function(e){return e.id})),addToAudiences:!0},saveLevels:e.saveLevels,levels:e.levels,memberType:e.memberType})),d.createElement("h6",null,"Audiences"),d.createElement("p",null,"Select a presentation to view its audiences and map them to this ".concat(o,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(Wp,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),d.createElement("p",null,"Audience to level mappings for this presentation are displayed below."),d.createElement(Cp,{levels:e.levels,audiences:e.presentationAudiences}),d.createElement("p",null,"Only the audiences which are mapped to a level that this"+" ".concat(o," is mapped to are displayed below.")),!!s.length&&d.createElement(wp,{initialValues:{audienceIds:Ap(e).map((function(e){return e.masterId}))},saveAudiences:e.saveAudiences,audiences:s}))}function Tp(e){var t=Object(nn.useFormikContext)(),n=gn(t);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Audience(s)",as:"select",name:"audienceIds",id:"audience-ids",multiple:!0,size:e.audiences.length,value:t.values.audienceIds},e.audiences.map((function(e){return d.createElement("option",{key:e.masterId,value:e.masterId},e.name)}))),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(vn,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Audiences")))}function wp(e){return d.createElement(an,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.audienceIds;return e.saveAudiences(r,n)},enableReinitialize:!0},d.createElement(Tp,{audiences:e.audiences}))}function Lp(e){var t=e.item,n=e.getItemAppLink,r=e.actions,i=e.pinState;return d.createElement("tr",null,d.createElement("td",null,d.createElement(La,{appLink:n(t)},t.name)),i.isPinnable&&d.createElement("td",null,d.createElement(_a,{selected:parseInt(t.id)===parseInt(i.currentPinnedVideo),onToggle:function(e){return i.onChange(e,t.id)},id:t.id})),r&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Yo,{actions:r}))))}function kp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xp(e,t)}(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 xp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Np(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pp(e,t)}(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 Pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _p(e){var t=e.items,n=e.memberType,r=e.classification,i=e.getItemAppLink,a=e.getActions,o=e.updatePinnedVideo,s=Np(d.useState(!1),2),c=s[0],l=s[1],u=function(e,t){var n=e.pinnedVideoMasterId||null,r=kp(d.useState(n),2),i=r[0],a=r[1];return{currentPinnedVideo:i,onChange:function(e,t){a(e?t:null)},canSubmit:n!==i,isPinnable:t===cu.Videos}}(r,n);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var p="".concat(eo(yu.singularizeMemberType(n))," Name");return d.createElement(d.Fragment,null,d.createElement(cn.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,p),u.isPinnable&&d.createElement("th",null,"Pinned"),X.isFunction(a)&&d.createElement("th",null))),d.createElement("tbody",null,t.map((function(e){return d.createElement(Lp,{item:e,key:e.id,getItemAppLink:i,actions:X.isFunction(a)&&a(e),pinState:u})})))),u.isPinnable&&d.createElement(vn,{showSpinner:c,onClick:function(){l(!0),o(u.currentPinnedVideo,(function(){return l(!1)}))},disabled:!u.canSubmit||c},"Save"))}function Dp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rp(e,t)}(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 Rp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fp=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function Up(e){var t=Object(nn.useFormikContext)(),n=gn(t),r=null===e.id||void 0===e.id,i=!r||!(!t.values.parentIds||!t.values.parentIds.length),a=Dp(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,t.values.parentIds]),d.useEffect((function(){t.values.subjectIds.length&&!t.touched.subjectIds&&t.setFieldTouched("subjectIds",!0)}),[t.values.subjectIds]);var l=function(e){return t.setFieldValue("parentIds",Vt.addOrRemove(t.values.parentIds.map((function(e){return e.toString()})),e.id.toString()))},p=function(e){return t.setFieldValue("subjectIds",Vt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),e.id.toString()))},f=function(e){return"".concat(ln.getCustomFormControlClassName(t.errors,t.touched,e)," h-auto py-2")};return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this classification",autoFocus:!0}),d.createElement(hn,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},dt.getEnumKeys(pu).map((function(e){return d.createElement("option",{key:e,value:pu[e]},e)}))),d.createElement(hn,{label:"Coming Soon",name:"comingSoon",id:"comingSoon",type:"checkbox",checked:t.values.comingSoon}),d.createElement(hn,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:t.values.emphasize}),d.createElement(hn,{label:"Can Be Preferred",name:"canBePreferred",id:"canBePreferred",type:"checkbox",checked:t.values.canBePreferred}),d.createElement(hn,{name:"parentIds"},(function(){return d.createElement("div",{className:f("parentIds")},d.createElement(ds,{label:"Parent Classification(s)",tree:e.classificationTree,selectedIds:t.values.parentIds,onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root classification.",isNodeDisabled:(n=e.classificationTree,r=e.id,function(e){if(e.id===r)return!0;var t=ro.find(n,r);return!!ro.find(t,e.id)})}));var n,r})),d.createElement(hn,{name:"subjectIds"},(function(){return d.createElement("div",{className:f("subjectIds")},d.createElement(ds,{label:"Mapped Subject(s)",tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:p,collapse:!r,getSelectedItemAppLink:Fp}))})),d.createElement(Lo,{imageType:Ra.Covers,fieldName:"cover",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement(Lo,{imageType:Ra.Banners,fieldName:"banner",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(vn,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},r?"Create":"Save"),!r&&d.createElement(cn.Button,{as:La,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e.presentationId,e.id]}},"Delete")))}function Mp(e){return d.createElement(an,{initialValues:e.classification,validationSchema:du,onSubmit:e.saveClassification},d.createElement(Up,{id:e.classification&&e.classification.id,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree}))}var Vp=function(e){return function(t){if(!e)return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION;switch(e){case cu.Playlists:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case cu.Series:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_SERIES;case cu.Videos:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function zp(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?d.createElement(d.Fragment,null,d.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),d.createElement("div",{className:"py-2"},d.createElement(es,{tabs:Su(t.id,n),isItemActive:Vp(r)}))):d.createElement(d.Fragment,null)}function Bp(e){var t=Object(nn.useFormikContext)(),n=gn(t),r=function(e){return t.setFieldValue("classificationIds",Vt.addOrRemove(t.values.classificationIds.map((function(e){return e.toString()})),e.id.toString()))},i="".concat(ln.getCustomFormControlClassName(t.errors,t.touched,"classificationIds")," h-auto py-2");return d.createElement(nn.Form,null,d.createElement(hn,{name:"classificationIds"},(function(){return d.createElement("div",{className:i},d.createElement(ds,{label:"Mapped Classification(s)",tree:e.classificationTree,selectedIds:t.values.classificationIds,onSelect:r,getSelectedItemAppLink:(n=e.presentationId,function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,e]}}),isNodeDisabled:e.isClassificationDisabled}));var n})),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(vn,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Classifications")))}function Hp(e){return d.createElement(an,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.classificationIds;return e.saveClassifications(r,n)},enableReinitialize:!0},d.createElement(Bp,{presentationId:e.presentationId,classificationTree:e.classificationTree,isClassificationDisabled:e.isClassificationDisabled}))}function qp(e){var t=null===e.id||void 0===e.id,n=Object(nn.useFormikContext)(),r=gn(n);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this level",autoFocus:!0}),d.createElement(vn,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"))}function Jp(e){return d.createElement(an,{initialValues:e.level,validationSchema:mu,onSubmit:e.saveLevel},d.createElement(qp,{id:e.level&&e.level.id}))}function $p(e){var t=yu.singularizeMemberType(e.memberType),n=Object(nn.useFormikContext)(),r=gn(n);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement(hn,{label:"Automatically add to audiences*",name:"addToAudiences",id:"add-to-audiences",type:"checkbox",checked:n.values.addToAudiences}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(t," to a level, all of that level's")+" audiences across all presentations will also be added to.")),d.createElement("p",null,d.createElement("strong",null,"Note:")," When removing a ".concat(t," from a level, that level's audiences "),d.createElement("strong",null,"will not")," be automatically removed from."),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(vn,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},"Save Levels")))}function Kp(e){return d.createElement(an,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.levelIds,i=t.addToAudiences;return e.saveLevels(r,i,n)}},d.createElement($p,{levels:e.levels,memberType:e.memberType}))}function Yp(e){var t=e.values,n=t.name,r=t.description,i=e.id,a=e.isSubmitting,o=!i;return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),d.createElement(hn,{label:"Description",as:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),d.createElement(vn,{showSpinner:a,type:"submit"},o?"Create":"Save"))}function Gp(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.description,s=void 0===o?"":o,c=e.savePresentation;return d.createElement(nn.Formik,{initialValues:{name:a,description:s},validationSchema:hu,onSubmit:c},(function(e){return d.createElement(Yp,Object.assign({id:r},e))}))}function Wp(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label,a=function(e){var n,i,a=(n=e,i=t,Vt.first(i.filter((function(e){return e.id.toString()===n.toString()}))));r(a)};return d.useEffect((function(){t&&!n&&r(t[0])}),[t]),d.createElement(d.Fragment,null,!!n&&d.createElement(d.Fragment,null,d.createElement(cn.Form.Label,null,i),d.createElement(cn.Form.Control,{as:"select",value:n.id,onChange:function(e){return a(e.target.value)},className:"cursor-pointer"},t.map((function(e){return d.createElement("option",{value:e.id,key:e.id},e.name)})))))}function Zp(e){return d.createElement(d.Fragment,null,d.createElement("h4",null,"".concat(eo(e.memberType))),d.createElement(cn.Table,{responsive:!0},d.createElement("tbody",null,e.objects&&e.objects.map((function(t){return d.createElement("tr",{key:t.id},d.createElement("td",null,d.createElement(La,{appLink:yu.getMemberAppLink(e.memberType,t.id)},t.name)))})))),d.createElement(uf,{initialValues:{subjectIds:[],addToClassifications:!0},subjectTree:e.subjectTree,saveSubjects:e.onClickAddToSubject,memberType:e.memberType,saveBtnText:"Add to subject",subjectRequired:!0}))}function Qp(e){return function(e){if(Array.isArray(e))return Xp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Xp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xp(e,t)}(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 Xp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ef(e){var t=yu.singularizeMemberType(e.memberType),n=[].concat(Qp(e.objectClassifications),Qp(e.objectSubjectClassifications)).map((function(e){return e.id}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Subjects"),d.createElement("p",null,"Select which subjects this ".concat(t," is mapped to.")),d.createElement(uf,{initialValues:{subjectIds:e.objectSubjects.map((function(e){return e.id}))},subjectTree:e.subjectTree,saveSubjects:e.saveSubjects,memberType:e.memberType,saveBtnText:"Save Subjects",allowMultiple:!0})),d.createElement("h6",null,"Classifications"),d.createElement("p",null,"Select a presentation to view its classifications and map them to this ".concat(t,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(Wp,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),e.currentPresentation&&e.classificationTree&&e.classificationTree.children.length?d.createElement(d.Fragment,null,d.createElement("p",null,"Only classifications which are mapped to one of the subjects selected above can be selected."),d.createElement(Hp,{initialValues:{classificationIds:e.objectClassifications.map((function(e){return e.id}))},presentationId:e.currentPresentation.id,classificationTree:e.classificationTree,saveClassifications:e.saveClassifications,isClassificationDisabled:function(e){return!n.includes(e.id)}})):d.createElement("p",null,"This presentation has no classifications."))}function tf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nf(e,t)}(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 nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Wp.defaultProps={label:"Presentation"};function rf(e){var t=!e.id,n=Object(nn.useFormikContext)(),r=gn(n),i=!t||!!n.values.parentId,a=tf(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,n.values.parentId]);var l=function(e){var t=e.id===n.values.parentId?null:e.id;n.setFieldValue("parentId",t)},p="".concat(ln.getCustomFormControlClassName(n.errors,n.touched,"parentId")," h-auto py-2");return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this subject",autoFocus:!0}),d.createElement(hn,{name:"parentId"},(function(){return d.createElement("div",{className:p},d.createElement(ds,{label:"Parent Subject",tree:e.subjectTree,selectedIds:[n.values.parentId],onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root subject.",isNodeDisabled:(t=e.subjectTree,r=e.id,function(e){if(e.id===r)return!0;var n=ro.find(t,r);return!!ro.find(n,e.id)})}));var t,r})),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(vn,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(cn.Button,{as:La,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},"Delete")))}function af(e){return d.createElement(an,{initialValues:e.subject,validationSchema:gu,onSubmit:e.saveSubject},d.createElement(rf,{id:e.subject&&e.subject.id,subjectTree:e.subjectTree}))}var of=function(e){return function(t){return t.appLink.action===e}};function sf(e){var t=e.subjectId,n=e.activeAction;return d.createElement(d.Fragment,null,d.createElement(cn.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),d.createElement("div",{className:"py-2"},d.createElement(es,{tabs:bu(t),isItemActive:of(n)})))}var cf=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function lf(e){var t=Object(nn.useFormikContext)(),n=gn(t),r=function(n){var r=e.allowMultiple?Vt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),n.id.toString()):[n.id];t.setFieldValue("subjectIds",r)},i=yu.singularizeMemberType(e.memberType),a="".concat(ln.getCustomFormControlClassName(t.errors,t.touched,"subjectIds")," h-auto py-2");return d.createElement(nn.Form,null,d.createElement(hn,{name:"subjectIds"},(function(){return d.createElement("div",{className:a},d.createElement(ds,{label:"Mapped Subject".concat(e.allowMultiple?"(s)":""),tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:r,collapse:!!t.initialValues.subjectIds.length,getSelectedItemAppLink:cf}))})),d.createElement(hn,{label:"Automatically add to classifications*",name:"addToClassifications",id:"add-to-classifications",type:"checkbox",checked:t.values.addToClassifications}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(i," to a subject, all of that subject's")+" mapped classifications across all presentations will also be added to.")),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(vn,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.saveBtnText)))}function uf(e){var t;return d.createElement(an,{initialValues:e.initialValues,validationSchema:(t=e.subjectRequired,on.object().shape({subjectIds:t?on.array().of(on.string()).min(1,"A subject is required").required("A subject is required"):on.array().of(on.string()),addToClassifications:on.boolean().default(!0)}).noUnknown()),onSubmit:function(t,n){var r=t.subjectIds,i=t.addToClassifications;return e.saveSubjects(r,i,n)}},d.createElement(lf,{subjectTree:e.subjectTree,memberType:e.memberType,allowMultiple:e.allowMultiple,saveBtnText:e.saveBtnText}))}lf.defaultProps={saveBtnText:"Save"};var pf=function(e){return d.createElement("div",{className:"border rounded p-2 mb-3"},d.createElement("h6",{className:"border-bottom pb-1"},e.presentation.name),e.classifications&&e.classifications.length?d.createElement("ul",{className:"list-unstyled mb-0"},e.classifications.map((function(t){return d.createElement("li",{key:t.id,className:"py-1"},d.createElement(La,{appLink:(n=e.presentation.id,r=t.id,{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,r]})},t.name));var n,r}))):d.createElement("p",null,d.createElement("em",null,"There are no classifications mapped to this subject in this presentation.")))},ff=function(e){return d.createElement(d.Fragment,null,!!e.presentations&&!!e.classificationDictionary&&e.presentations.map((function(t){return d.createElement(pf,{key:t.id,presentation:t,classifications:e.classificationDictionary[t.id]})})))},df=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function mf(e){return d.createElement(d.Fragment,null,e.classifications.map((function(t){return d.createElement("th",{key:t.id},d.createElement("span",{className:"d-inline-block"},d.createElement(_a,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),d.createElement(La,{appLink:e.getClassificationAppLink(t.id)},function(e,t){return t?e.name:"Classification: ".concat(e.name)}(t,e.showClassificationSubHeader)))})))}function hf(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=df(e,["memberType","hasActions","classifications"]),a="".concat(eo(yu.singularizeMemberType(t))," Name"),o=!!r&&!!r.length,s=o&&r.length>1,c=o?2:1,l=Object.assign({classifications:r,showClassificationSubHeader:s},i);return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",{rowSpan:c},a),o&&(s?d.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):d.createElement(mf,Object.assign({},l))),n&&d.createElement("th",{rowSpan:c})),o&&s&&d.createElement("tr",null,d.createElement(mf,Object.assign({},l))))}function gf(e){var t=e.member,n=t.id,i=t.name,a=t.classifications,o=void 0===a?[]:a,s=e.getMemberAppLink,c=e.onToggleClassification,l=e.actions,u=X.isFunction(s)&&s(n);return o.length&&!X.isFunction(c)&&r.ErrorHelper.throw(new z("onToggleClassification must be passed to SubjectMemberItem")),d.createElement("tr",null,d.createElement("td",null,u?d.createElement(La,{appLink:s(n)},i):i),!!o.length&&o.map((function(e){return d.createElement("td",{key:e.id},d.createElement(_a,{selected:e.selected,onToggle:function(t){return c(e.id,t,n)}}))})),l&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Yo,{actions:l}))))}var yf=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function vf(e,t){return function(n){var r=n[e],i=hs.length(r);return!!i&&i===t.length}}function bf(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,a=e.getClassificationAppLink,o=e.onToggleClassification,s=yf(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var c=X.isFunction(r),l={memberType:n,classifications:i,getClassificationAppLink:a,getIsClassificationSelected:vf(n,t),onToggleClassification:o,hasActions:c};return d.createElement(cn.Table,{responsive:!0,bordered:!0},d.createElement(hf,Object.assign({},l)),d.createElement("tbody",null,t.map((function(e,t){return d.createElement(gf,Object.assign({key:t,member:e,actions:c&&r(e.id),onToggleClassification:o},s))}))))}function Sf(e){var t=e.navItems,n=e.currentAppLink;return d.createElement(cn.Container,null,d.createElement(cn.Navbar,{className:"justify-content-between align-items-center"},d.createElement(cn.Nav,null,!!t&&t.map((function(e,t){return d.createElement(cn.Nav.Item,{key:t},d.createElement(La,{appLink:e.appLink,className:"nav-link".concat(Ga.isItemActive(e,n)?" text-primary":"")},e.label))})))))}function Ef(e,t){d.useEffect((function(){e.presentations&&!e.currentPresentation&&ou.getSetStateByKey(t,"currentPresentation")(Vt.first(e.presentations))}),[e.presentations])}function Cf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return If(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return If(e,t)}(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 If(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Of(e){var t=i.useBasicFetch(Vl(e.playlistId)),n=Cf(d.useState({}),2),r=n[0],a=n[1],s=kl(f.SUBJECT);!function(e,t,n){var r=function(e){return ou.getSetStateByKey(n,e)};au([yp.getObjectLevelsFetchOptions(e,cu.Playlists,r("playlistLevels"))],[e]),po(yp.getObjectAudiencesFetchOptions(e,cu.Playlists,r("playlistAudiences")),[e,t.playlistLevels]),au([yp.getPresentationsFetchOptions(r("presentations")),yp.getLevelsFetchOptions(r("levels"))],[]),po(!!t.currentPresentation&&yp.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.playlistId,r,a),Ef(r,a);var c=!!(r.presentations&&r.levels&&r.presentationAudiences&&r.playlistLevels&&r.playlistAudiences);return d.createElement(d.Fragment,null,d.createElement(nu,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_AUDIENCES}),d.createElement(Go,{object:t.data}),!!c&&d.createElement(jp,{objectLevels:r.playlistLevels,objectAudiences:r.playlistAudiences,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:ou.getSetStateByKey(a,"currentPresentation"),levels:r.levels,presentationAudiences:r.presentationAudiences,memberType:cu.Playlists,saveLevels:function(t,n,r){return s.updateObjectLevels(e.playlistId,t,cu.Playlists,n,r,r)},saveAudiences:function(t,n){return s.updateObjectAudiences(e.playlistId,r.currentPresentation.id,t,cu.Playlists,n,n)}}))}function Af(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||Tf(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 jf(e){return function(e){if(Array.isArray(e))return wf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Tf(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 Tf(e,t){if(e){if("string"==typeof e)return wf(e,t);var n=Object.prototype.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)?wf(e,t):void 0}}function wf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lf(e){var t=i.useBasicFetch(Vl(e.playlistId)),n=Af(d.useState({}),2),r=n[0],a=n[1],s=kl(f.SUBJECT);!function(e,t,n){var r=function(e){return ou.getSetStateByKey(n,e)};au([yp.getSubjectTreeFetchOptions(r("subjectTree")),yp.getPresentationsFetchOptions(r("presentations"))],[]),au([yp.getObjectSubjectsFetchOptions(e,cu.Playlists,r("playlistSubjects"))],[e]),po(!!t.currentPresentation&&yp.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.playlistSubjects]);var i=function(e,t){return[].concat(jf(t.subjectClassifications||[]),jf(e))},a=t.playlistSubjects&&t.playlistSubjects.map((function(e){return yp.getSubjectClassificationFetchOptions(e.id,ou.getSetStateByKey(n,"subjectClassifications",i))}));au(a,[t.playlistSubjects],!!a),po(yp.getObjectClassificationsFetchOptions(e,cu.Playlists,r("playlistClassifications")),[e,t.playlistSubjects])}(e.playlistId,r,a),Ef(r,a);var c=!!(r.playlistSubjects&&r.subjectTree&&r.presentations&&r.classificationTree&&r.playlistClassifications&&r.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(nu,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_SUBJECTS}),d.createElement(Go,{object:t.data}),c&&d.createElement(ef,{objectSubjects:r.playlistSubjects,subjectTree:r.subjectTree,memberType:cu.Playlists,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:ou.getSetStateByKey(a,"currentPresentation"),objectClassifications:r.playlistClassifications,objectSubjectClassifications:r.subjectClassifications,classificationTree:r.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.playlistId,t,cu.Playlists,n,r,r)},saveClassifications:function(t,n){return s.updateObjectClassifications(e.playlistId,r.currentPresentation.id,t,cu.Playlists,n,n)}}))}const kf={reorder(e,t,n){if(t===n)return{reorderedItems:e,reorderRequest:null};const r=Vt.moveItem(e,t,n),i=n<e.length-1?r[n+1].id:null;return{reorderedItems:r,reorderRequest:{sourceMemberId:r[n].id,destinationMemberId:i}}},updateState(e,t,n){const r=[],i=dt.deepClone(n),a=[e];let o=n[e];const s=!!o&&!!o.data&&o.data.length;for(;o&&Array.isArray(o.data);){r.push(...o.data);const t=o.pagination&&o.pagination.cursors&&o.pagination.cursors.next,i=!!t&&`${e}:${t}`;o=t&&n[i],o&&a.push(i)}if(!r.length)return n;const c=Vt.findIndex(r,e=>e.id===t.sourceMemberId),l=[...r],u=l.splice(c,1),p=t.destinationMemberId?Vt.findIndex(l,e=>e.id===t.destinationMemberId):l.length;return l.splice(p,0,u[0]),a.forEach(e=>{const t=l.splice(0,s);i[e].data=t}),i}};function xf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nf(e,t)}(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 Nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pf=function(e){return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:[e.id]}};function _f(e){var t,n,r=Object(te.useDispatch)(),a=Dl(),s=i.useBasicFetch(Vl(e.playlistId)),c=i.useBasicFetch(Jl(e.playlistId)),l=xf(function(e){const[t,n]=Object(d.useState)();return Object(d.useEffect)(()=>{t&&(e.length!==t.length||function(e,t){let n=!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r].id!==t[r].id){n=!1;break}return n}(e,t))&&n(null)},[e]),[t,n]}(null===(t=c.data)||void 0===t?void 0:t.data),2),p=l[0],f=l[1],m=p?{data:p,pagination:null}:c.data;return d.createElement(d.Fragment,null,d.createElement(nu,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_VIDEOS}),d.createElement(Go,{object:s.data}),!!m&&d.createElement(ws,{onSortEnd:function(t,n){if(t!==n){var o=kf.reorder(c.data.data,t,n),s=o.reorderRequest,l=o.reorderedItems;f(l);i.fetch(r,$l(e.playlistId,s,null,(function(){a.error("Failed to update playlist order."),f(null)})))}},videos:m,getVideoAppLink:Pf,getVideoActions:(n=e.playlistId,function(e){return[{label:"Remove video",appLink:{application:u.PLAYLISTS,action:o.Playlists.REMOVE_VIDEO,args:[n.toString(),e.id.toString()]},className:"text-danger"}]}),emptyMessage:"There are no videos in this playlist."}))}function Df(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rf(e,t)}(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 Rf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ff(){var e=Object(te.useDispatch)(),t=Dl(),n=Df(d.useState(),2),a=n[0],s=n[1];return po($e.getCurrentUserFetchOptions(s),[]),d.createElement(d.Fragment,null,!!a&&d.createElement(eu,{savePlaylist:function(n,s){i.fetch(e,Bl(n,a.id,(function(e){t.success("Successfully created playlist."),function(e){e&&e.id&&r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]})}(e)}),(function(){t.error("Failed to create playlist.")}),s))}}))}var Uf="rating,thumbnail,glance",Mf=function(e){return{url:"/api/master/v2/objects/".concat(e,"?query=").concat(Uf),key:"videos:".concat(e)}},Vf=function(e){var t=e.slice().sort();return{key:"videos:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},zf=function(e){return{url:"/ajax/hostedlibraries/rightsline/programs/".concat(e),key:"rightsline:videos:".concat(e),normalizeOptions:{namespace:"rightsline"}}},Bf=function(e,t,n,r,i){return{key:"videos:".concat(e),url:"/api/master/v2/objects/".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}};function Hf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qf(e,t)}(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 qf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jf(e){var t=Object(te.useDispatch)(),n=Dl(),r=i.useBasicFetch(Vl(e.playlistId)),a=i.useBasicFetch(Mf(e.videoId)),o=Hf(d.useState(!1),2),s=o[0],c=o[1];var l=!!r.data&&!!a.data;return d.createElement(sc,{title:"Remove Video",closePopup:e.closePopup,showLoadingSpinner:!l},!!l&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,a.data.name)," from ",d.createElement("strong",null,r.data.name),"?")),d.createElement(lc,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,Kl(e.playlistId,e.videoId,(function(){n.success("Successfully removed video from playlist")}),(function(){n.error("Failed to remove video from playlist")}),e.closePopup))},buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:s}]})))}function $f(e){return r.AppLinkHelper.trigger(function(e){return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}}(e))}function Kf(e){var t=e?{application:u.PLAYLISTS,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e}}:{application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS};r.AppLinkHelper.trigger(t)}function Yf(e){return d.createElement("div",{className:"pb-3 w-50"},d.createElement(wa,{initialQuery:e.query,placeholder:"Search for a playlist",onSuggestionSelected:$f,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/playlists/instant/raw","?query=").concat(e)},activationLength:2,onSubmit:Kf}))}var Gf=u.PLAYLISTS,Wf=function(e){return{application:Gf,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function Zf(e){var t=i.useBasicFetch(Ul(e.cursor));return d.createElement(d.Fragment,null,d.createElement(Yf,null),d.createElement(Mo,{collection:t&&t.data,collectionAppLink:{application:Gf,action:o.Playlists.PLAYLISTS},newObjectAppLink:{application:Gf,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:Wf,objectName:"Playlist"}))}var Qf=u.PLAYLISTS,Xf=function(e){return{application:Qf,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function ed(e){var t=i.useBasicFetch(Ml(e.query,e.cursor));return d.createElement(d.Fragment,null,d.createElement(Yf,{query:e.query}),!!t.data&&(t.data.data.length?d.createElement(Mo,{collection:t.data,collectionAppLink:{application:Qf,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e.query}},newObjectAppLink:{application:Qf,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:Xf,objectName:"Playlist"}):d.createElement("p",null,"No playlists found, please try a different search query.")))}function td(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nd(e,t)}(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 nd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rd=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function id(e){var t=e.id,n=e.routeToOnDelete,i=e.closePopup,a=td(d.useState(),2),o=a[0],s=a[1],c=td(d.useState(!1),2),l=c[0],u=c[1],p=kl(f.SUBJECT);po(yp.getAudienceFetchOptions(t,s),[t]);return d.createElement(sc,{title:"Delete Audience",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(lc,{buttons:rd((function(){u(!0);p.deleteAudience(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)}),i,l)})))}function ad(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return od(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return od(e,t)}(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 od(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var sd=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function cd(e){var t=e.presentationId,n=e.audienceId,r=ad(d.useState(),2),i=r[0],a=r[1],o=ad(d.useState(),2),s=o[0],c=o[1],l=ad(d.useState(),2),u=l[0],p=l[1],m=kl(f.SUBJECT);po(yp.getAudienceFetchOptions(n,a),[n]),po(yp.getLevelsFetchOptions(c),[]),po(yp.getPresentationFetchOptions(t,p),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(ka,{appLink:sd(t),backToName:"audiences"})),!!u&&d.createElement("h6",null,"Presentation: ".concat(u.name)),!!i&&!!s&&d.createElement(Op,{audience:i,levels:s,saveAudience:function(e,r){return m.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),r,r)},presentationId:t}))}function ld(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ud(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ud(e,t)}(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 ud(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var pd=function(e){return function(t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,t.masterId]}}},fd=function(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_AUDIENCE,args:[e]}},dd={application:u.SUBJECTS,action:o.Subjects.AUDIENCES};function md(e){var t=e.presentationId,n=ld(d.useState(),2),r=n[0],i=n[1];return po(yp.getAudiencesFetchOptions(t,i),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(ka,{appLink:dd,backToName:"presentations"})),d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),d.createElement(La,{appLink:fd(t),className:"d-block"},d.createElement(Ia,{svgName:ya.Plus,size:Ca.Small}),d.createElement("span",null,"New Audience"))),d.createElement(Qo,{objects:r,getAppLink:pd(e.presentationId),emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function hd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gd(e,t)}(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 gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var yd=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function vd(e){var t=e.presentationId,n=hd(d.useState(),2),i=n[0],a=n[1],s=hd(d.useState(),2),c=s[0],l=s[1],p=kl(f.SUBJECT);po(yp.getLevelsFetchOptions(a),[]),po(yp.getPresentationFetchOptions(t,l),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2"},d.createElement(ka,{appLink:yd(t),backToName:"audiences"})),!!c&&d.createElement("h6",null,"Presentation: ".concat(c.name)),!!i&&d.createElement(Op,{levels:i,presentationId:t,saveAudience:function(e,n){return p.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,n.masterId]})}}(t,n),n)}}))}function bd(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}}function Sd(e){return[{label:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},bd(e)),{args:[e],params:{parentId:t.id}})}},{label:"Delete classification",getAppLink:function(t){return{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var Ed=n(118),Cd=n.n(Ed);function Id(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Od(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Od(e,t)}(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 Od(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ad(e){var t=e.presentationId,n=e.selectedClassificationId,r=Id(d.useState(),2),i=r[0],a=r[1],s=Id(d.useState(),2),c=s[0],l=s[1];return function(e,t,n){au([yp.getClassificationTreeFetchOptions(e,t),yp.getPresentationFetchOptions(e,n)],[e])}(t,a,l),d.createElement("div",{className:"".concat(Cd.a.navContainer," h-auto pr-2 border-right")},!!c&&d.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(c.name,")")),d.createElement(La,{appLink:bd(t),className:"d-inline-block pb-2"},d.createElement(Ia,{svgName:ya.Plus,size:Ca.Small}),d.createElement("span",null,"New Classification")),!!i&&d.createElement("div",{className:"border-top pt-1"},d.createElement(cs,{tree:i,getAppLink:function(e){return function(e,t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:Sd(t)})))}function jd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Td(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Td(e,t)}(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 Td(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wd(e){var t=e.classificationId,n=e.routeToOnDelete,i=e.closePopup,a=jd(d.useState(),2),o=a[0],s=a[1],c=jd(d.useState(!1),2),l=c[0],u=c[1];po(yp.getClassificationFetchOptions(t,s),[]);var p=kl(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteClassification(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:l}];return d.createElement(sc,{title:"Delete Classification",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(lc,{buttons:m})))}function Ld(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kd(e,t)}(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 kd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xd(e){var t=e.presentationId,n=e.classificationId,r=Ld(d.useState(),2),i=r[0],a=r[1],o=Ld(d.useState(),2),s=o[0],c=o[1],l=Ld(d.useState(),2),u=l[0],p=l[1],m=Ld(d.useState(),2),h=m[0],g=m[1],y=kl(f.SUBJECT),v=yp.getClassificationFetchOptions(n,a),b=yp.getPresentationFetchOptions(t,c),S=yp.getClassificationTreeFetchOptions(t,p);po(yp.getSubjectTreeFetchOptions(g),[]),po(v,[n]),au([b,S],[t]);return d.createElement("div",null,d.createElement(zp,{presentation:s,classificationId:n}),!!i&&!!u&&!!h&&d.createElement(Mp,{classification:i,presentationId:t,subjectTree:h,classificationTree:u,saveClassification:function(e,t){return y.updateClassification(n,e,t,t)}}))}function Nd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pd(e,t)}(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 Pd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _d(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=Nd(d.useState(),2),a=i[0],o=i[1],s=Nd(d.useState(),2),c=s[0],l=s[1],u=Nd(d.useState(),2),p=u[0],m=u[1];po(yp.getPresentationFetchOptions(t,o),[]),po(yp.getClassificationFetchOptions(n,l),[n]),po(yp.getClassificationMembersFetchOptions(n,r,m),[n,r]);var h=kl(f.SUBJECT),g={items:p&&p.data,memberType:r,classification:c,updatePinnedVideo:function(e,t){var r=Object.assign(Object.assign({},c),{pinnedVideoMasterId:e});h.updateClassification(n,r,t)},getItemAppLink:function(e){return yu.getMemberAppLink(r,e.id)},getActions:function(e){return yu.getMemberActions(n,su.Classification,r,e.id)}},y={presentation:a,classificationId:n},v=Qa(g);return d.createElement(d.Fragment,null,d.createElement(zp,Object.assign({},y,{memberType:r})),v&&d.createElement(_p,Object.assign({},g)))}function Dd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rd(e,t)}(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 Rd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fd(e){var t=e.presentationId,n=e.parentId,i=Dd(d.useState(),2),a=i[0],s=i[1],c=Dd(d.useState(),2),l=c[0],p=c[1],m=kl(f.SUBJECT),h=yp.getClassificationTreeFetchOptions(t,s);po(yp.getSubjectTreeFetchOptions(p),[]),po(h,[t]);return d.createElement("div",null,d.createElement("h4",{className:"py-2"},"Create New Classification"),!!l&&!!a&&d.createElement(Mp,{classification:n?{parentIds:[n]}:{},presentationId:t,subjectTree:l,classificationTree:a,saveClassification:function(e,n){return m.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),n&&n.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]})}}(t,n),n)}}))}var Ud=function(e){return{key:"series:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=thumbnail,tallPoster,banner,rating")}},Md=function(e){var t=e.slice().sort();return{key:"series:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Vd=function(e,t,n,r){return{url:"/api/master/v2/series",key:"series",data:e,type:it.POST,success:t,error:n,always:r}},zd=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:series:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}};function Bd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hd(e,t)}(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 Hd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qd(e){var t=Bd(d.useState(),2),n=t[0],r=t[1],a=Bd(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case cu.Playlists:return Vl(t);case cu.Series:return Ud(t);case cu.Videos:return Mf(t)}}(e.memberType,e.memberId)),l=kl(f.SUBJECT);po(yp.getClassificationFetchOptions(e.classificationId,r),[e.classificationId]);var u=!!n&&!!c.data,p="Remove ".concat(eo(yu.singularizeMemberType(e.memberType)));return d.createElement(sc,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"This will not remove it from the backbone subject.")),d.createElement(lc,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromClassification(e.classificationId,[e.memberId],e.memberType,null,null,e.closePopup,e.closePopup),n.pinnedVideoMasterId===e.memberId&&l.updateClassification(e.classificationId,Object.assign(Object.assign({},n),{pinnedVideoMasterId:null}))},buttonText:"Yes, remove this ".concat(yu.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function Jd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $d(e,t)}(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 $d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Kd(e){var t=e.id,n=Jd(d.useState(),2),r=n[0],i=n[1],a=kl(f.SUBJECT);po(yp.getLevelFetchOptions(t,i),[t]);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Level"),!!r&&d.createElement(Jp,{level:r,saveLevel:function(e,n){return a.updateLevel(t,e,n,n)}}))}function Yd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gd(e,t)}(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 Gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wd=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},Zd={application:u.SUBJECTS,action:o.Subjects.NEW_LEVEL};function Qd(){var e=Yd(d.useState(),2),t=e[0],n=e[1];return po(yp.getLevelsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),d.createElement(La,{appLink:Zd,className:"d-block"},d.createElement(Ia,{svgName:ya.Plus,size:Ca.Small}),d.createElement("span",null,"New Level"))),d.createElement(Qo,{objects:t,getAppLink:Wd}))}function Xd(){var e=kl(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Level"),d.createElement(Jp,{saveLevel:function(t,n){return e.createLevel(t,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[t.id]})}}(n),n)}}))}function em(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tm(e,t)}(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 tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nm(e){var t=e.id,n=em(d.useState(),2),r=n[0],i=n[1],a=kl(f.SUBJECT);po(yp.getPresentationFetchOptions(t,i),[t]);var o={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return a.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},s=Qa(o);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Presentation"),!!s&&d.createElement(Gp,Object.assign({},o)))}function rm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return im(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return im(e,t)}(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 im(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var am=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]}},om={application:u.SUBJECTS,action:o.Subjects.NEW_PRESENTATION};function sm(){var e=rm(d.useState(),2),t=e[0],n=e[1];return po(yp.getPresentationsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),d.createElement(La,{appLink:om,className:"d-block"},d.createElement(Ia,{svgName:ya.Plus,size:Ca.Small}),d.createElement("span",null,"New Presentation"))),d.createElement(Qo,{objects:t,getAppLink:am}))}function cm(){var e=kl(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Presentation"),d.createElement(Gp,{savePresentation:function(t,n){var i=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,i)}),(function(){return i(!1)}))}}))}function lm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return um(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return um(e,t)}(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 um(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pm(e){var t=e.objectType,n=e.getAppLink,r=lm(d.useState(),2),i=r[0],a=r[1];return po(yp.getPresentationsFetchOptions(a),[]),d.createElement("div",null,d.createElement("h5",null,d.createElement(An,{namespace:"subjects.selectPresentation",phrase:"heading",options:{objectType:t}})),d.createElement(Qo,{objects:i,getAppLink:n}))}function fm(e){const{title:t,onClickConfirm:n,confirmButtonText:r,cancelButtonText:i,closePopup:a}=e,[o,s]=d.useState(!1),c=[{variant:"link",onClick:a,buttonText:i},{variant:"primary",onClick:()=>{s(!0),n()},buttonText:r,isSpinnerButton:!0,showSpinner:o}];return d.createElement(sc,{title:t,closePopup:a},d.createElement(d.Fragment,null,e.children,d.createElement(lc,{buttons:c})))}function dm(e,t){return ou.getSetStateByKey(e,t)}function mm(e,t,n,i,a){var s=i.selectedSubject,c=function(){return dm(a,"showConfirmationPopup")(!1)};t.addObjectsToSubject(s.id,e.map((function(e){return e.id})),n.memberType,i.addToClassifications,(function(){c(),r.AppLinkHelper.trigger(function(e,t){var n={application:u.SUBJECTS,args:[e]};switch(t){case cu.Playlists:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_PLAYLISTS});case cu.Series:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_SERIES});case cu.Videos:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_VIDEOS})}}(s.id,n.memberType))}),c)}function hm(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(yu.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function gm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ym(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ym(e,t)}(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 ym(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vm(e,t){return function(n,r,i){i(),dm(t,"selectedSubject")(ro.find(e.subjectTree,Vt.first(n))),dm(t,"addToClassifications")(r),dm(t,"showConfirmationPopup")(!0)}}function bm(e){var t=gm(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(function(e,t){switch(e){case cu.Playlists:return zl(t);case cu.Series:return Md(t);case cu.Videos:return Vf(t)}}(e.memberType,e.objectIds)),o=kl(f.SUBJECT);!function(e,t){e.memberType,e.objectIds,po(yp.getSubjectTreeFetchOptions(dm(t,"subjectTree")),[])}(e,r);var s;return d.createElement(d.Fragment,null,!!a.data&&!!n.subjectTree&&d.createElement(Zp,{memberType:e.memberType,objects:a.data,subjectTree:n.subjectTree,onClickAddToSubject:vm(n,r)}),n.showConfirmationPopup&&d.createElement(fm,{title:hm(e.memberType,a.data,n.selectedSubject),onClickConfirm:function(){return mm(a.data,o,e,n,r)},closePopup:function(){return e=!1,dm(r,"showConfirmationPopup")(e);var e}},d.createElement("p",null,"The following ".concat(e.memberType," will be added to "),d.createElement("strong",null,n.selectedSubject.name),n.addToClassifications?" and its mapped classifications:":":"),d.createElement("ul",null,a.data.map((function(e){return d.createElement("li",{key:e.id},e.name)}))),!n.addToClassifications&&d.createElement("p",null,"".concat(1===a.data.length?"It":"They"," will not be added to its mapped classifications.")),d.createElement("p",null,"".concat((s=e.memberType,eo(yu.singularizeMemberType(s)))," to classification mappings can be managed from the "),d.createElement("strong",null,"Edit Subject ".concat(eo(e.memberType)," ")),"page.")))}function Sm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Em(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Em(e,t)}(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 Em(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cm(e){var t=e.subjectId,n=e.routeToOnDelete,i=e.closePopup,a=Sm(d.useState(),2),o=a[0],s=a[1],c=Sm(d.useState(!1),2),l=c[0],u=c[1];po(yp.getSubjectFetchOptions(t,s),[]);var p=kl(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteSubject(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:l}];return d.createElement(sc,{title:"Delete Subject",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?"),d.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),d.createElement(lc,{buttons:m})))}function Im(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Om(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Om(e,t)}(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 Om(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Am(e){var t=e.subjectId,n=Im(d.useState(),2),r=n[0],i=n[1],a=Im(d.useState(),2),s=a[0],c=a[1],l=kl(f.SUBJECT),u=yp.getSubjectFetchOptions(t,i);po(yp.getSubjectTreeFetchOptions(c),[]),po(u,[t]);return d.createElement(d.Fragment,null,d.createElement(sf,{subjectId:t,activeAction:o.Subjects.EDIT_SUBJECT}),!!r&&!!s&&d.createElement(af,{subject:r,subjectTree:s,saveSubject:function(e,n){return l.updateSubject(t,e,n,n)}}))}function jm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tm(e,t)}(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 Tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}fm.defaultProps={confirmButtonText:"Confirm",cancelButtonText:"Cancel"};var wm=d.createContext(void 0);function Lm(e){var t=e.children,n=jm(d.useState(),2),r=n[0],i=n[1];return d.createElement(wm.Provider,{value:[r,i]},t)}var km=function(e){var t=e.children;return d.createElement(Oo,null,d.createElement(Lm,null,d.createElement(co,null,t)))};function xm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nm(e,t)}(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 Nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pm(e,t){return ou.getSetStateByKey(e,t)}function _m(e){switch(e){case cu.Playlists:return o.Subjects.EDIT_SUBJECT_PLAYLISTS;case cu.Series:return o.Subjects.EDIT_SUBJECT_SERIES;case cu.Videos:return o.Subjects.EDIT_SUBJECT_VIDEOS}}function Dm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rm(e,t)}(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 Rm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fm(e){var t=Dm(d.useState({}),2),n=t[0],r=t[1],a=n.presentations,s=n.classifications,c=n.memberIds,l=n.membersWithClassifications,p=i.useBasicFetch(Array.isArray(c)&&function(e,t){switch(e){case cu.Playlists:return zl(t);case cu.Series:return Md(t);case cu.Videos:return Vf(t)}}(e.memberType,c)),m=Dm(d.useContext(wm),2),h=m[0],g=m[1],y=kl(f.SUBJECT);!function(e,t,n){var r=e.subjectId,i=e.memberType,a=xm(d.useContext(wm),1)[0];po(yp.getPresentationsFetchOptions(Pm(n,"presentations")),[]),po(yp.getSubjectMemberIdsFetchOptions(r,i,Pm(n,"memberIds")),[r,i]),po(!!a&&yp.getSubjectClassificationFetchOptions(r,Pm(n,"classifications"),a.id,i),[r,i,a],!!a)}(e,0,r),function(e,t,n,r){var i=n.classifications;d.useEffect((function(){Pm(r,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(t.memberType,e,i))}),[e,i])}(p.data,e,n,r);var v,b,S=!!h&&!!s;return d.createElement(d.Fragment,null,d.createElement(sf,{subjectId:e.subjectId,activeAction:_m(e.memberType)}),d.createElement(cn.Alert,{variant:"info",className:"m-0"},"Select which ".concat(e.memberType," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),d.createElement("div",{className:"w-50 py-2"},!!a&&d.createElement(Wp,{presentations:a,currentPresentation:h,setCurrentPresentation:g})),S&&d.createElement(bf,{members:l||[],memberType:e.memberType,getMemberAppLink:function(t){return yu.getMemberAppLink(e.memberType,t)},getActions:function(t){return yu.getMemberActions(e.subjectId,su.Subject,e.memberType,t)},classifications:s,getClassificationAppLink:h&&(v=e.memberType,b=h.id,function(e){var t,n=u.SUBJECTS,r=[b,e];switch(v){case cu.Playlists:t=o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case cu.Series:t=o.Subjects.EDIT_CLASSIFICATION_SERIES;break;case cu.Videos:t=o.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:n,action:t,args:r}}),onToggleClassification:function(t,n,r){return function(e,t,n,r,i,a,o){(o?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(a,n,t,r,i)}(y,e.memberType,r?[r]:c,e.subjectId,h&&h.id,t,n)}}))}function Um(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Mm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mm(e,t)}(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 Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vm(e){var t=e.parentId,n=Um(d.useState(),2),i=n[0],a=n[1],s=kl(f.SUBJECT);po(yp.getSubjectTreeFetchOptions(a),[]);var c={application:u.SUBJECTS,action:o.Subjects.PRESENTATIONS};return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2 border-bottom"},d.createElement(ka,{backToName:"Presentations",appLink:c})),d.createElement("h4",{className:"py-2"},"Create New Subject"),!!i&&d.createElement(af,{subject:{parentId:t},subjectTree:i,saveSubject:function(e,t){return s.createSubject(e,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]})}}(t),t)}}))}function zm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bm(e,t)}(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 Bm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hm(e){var t=zm(d.useState(),2),n=t[0],r=t[1],a=zm(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case cu.Playlists:return Vl(t);case cu.Series:return Ud(t);case cu.Videos:return Mf(t)}}(e.memberType,e.memberId)),l=kl(f.SUBJECT);po(yp.getSubjectFetchOptions(e.subjectId,r),[e.subjectId]);var u=!!n&&!!c.data,p="Remove ".concat(eo(yu.singularizeMemberType(e.memberType)));return d.createElement(sc,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),d.createElement(lc,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromSubject(e.subjectId,[e.memberId],e.memberType,e.closePopup,e.closePopup)},buttonText:"Yes, remove this ".concat(yu.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function qm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jm(e,t)}(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 Jm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $m(e){var t=e.subjectId,n=qm(d.useState({}),2),r=n[0];return function(e,t){var n=function(e){return ou.getSetStateByKey(t,e)};po(yp.getSubjectClassificationFetchOptions(e,n("classifications")),[e]),po(yp.getPresentationsFetchOptions(n("presentations")),[])}(t,n[1]),d.createElement(d.Fragment,null,d.createElement(sf,{subjectId:t,activeAction:o.Subjects.SUBJECT_CLASSIFICATIONS}),d.createElement(ff,{presentations:r.presentations,classificationDictionary:Vt.groupBy(r.classifications,"presentationId")}))}var Km=n(119),Ym=n.n(Km);function Gm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Wm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wm(e,t)}(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 Wm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zm(e){var t=e.selectedSubjectId,n=Gm(d.useState(),2),r=n[0],i=n[1];po(yp.getSubjectTreeFetchOptions(i),[]);var a=d.useCallback((function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),s={application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},c=[{label:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},s),{params:{parentId:e.id}})}},{label:"Delete subject",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return d.createElement("div",{className:"".concat(Ym.a.navContainer," h-auto pr-2 border-right")},d.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),d.createElement(La,{appLink:s,className:"d-inline-block pb-2"},d.createElement(Ia,{svgName:ya.Plus,size:Ca.Small}),d.createElement("span",null,"New Subject")),!!r&&d.createElement("div",{className:"border-top pt-1"},d.createElement(cs,{tree:r,getAppLink:a,selectedIds:[t],actions:c})))}function Qm(e){var t=e.currentAppLink;return d.createElement(Sf,{navItems:vu(),currentAppLink:t})}function Xm(e){return(Xm="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})(e)}function eh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function th(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nh(e,t,n){return t&&th(e.prototype,t),n&&th(e,n),e}function rh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ih(e,t)}function ih(e,t){return(ih=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ah(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sh(e);if(t){var i=sh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oh(this,n)}}function oh(e,t){return!t||"object"!==Xm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sh(e){return(sh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ch=function(e){rh(n,e);var t=ah(n);function n(){return eh(this,n),t.apply(this,arguments)}return nh(n,[{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"appRoutes",get:function(){return{"manage/playlists(/)":"index","manage/playlists/new(/)":"newPlaylist","manage/playlists/search(/)":"searchPlaylists","manage/playlists/:id(/)":"editPlaylist","manage/playlists/:id/videos(/)":"editPlaylistVideos","manage/playlists/:id/subjects(/)":"editPlaylistSubjects","manage/playlists/:id/audiences(/)":"editPlaylistAudiences"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","removeFromSubject"]}}]),n}(r.AppRouter),lh=function(e){rh(n,e);var t=ah(n);function n(){return eh(this,n),t.apply(this,arguments)}return nh(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return lo.getInstance(t,e)}))}},{key:"index",value:function(e){var t;this.layout.showChildView(ae,d.createElement(Zf,{cursor:null===(t=e)||void 0===t?void 0:t.cursor}))}},{key:"searchPlaylists",value:function(e){var t,n;this.layout.showChildView(ae,d.createElement(ed,{query:null===(t=e)||void 0===t?void 0:t.query,cursor:null===(n=e)||void 0===n?void 0:n.cursor}))}},{key:"newPlaylist",value:function(){this.layout.showChildView(ae,d.createElement(Ff,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(ae,d.createElement(ru,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(ae,d.createElement(_f,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(Lf,{key:e,playlistId:e}))}},{key:"editPlaylistAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Of,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Wl,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Jf,Object.assign({},n)))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:cu.Playlists},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Hm,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Pl,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(ac,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"navigate",value:function(e){r.LocationUtils.PageLoad(e)}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:_l}}}}],[{key:"router",get:function(){return ch}}]),n}(r.Application),uh=function(e){var t=e.children;return d.createElement(Oo,null,d.createElement(co,null,t))},ph=function(){return"/api/domain/v2/me/ratings"},fh="ratings",dh=function(){return{url:ph(),key:fh}},mh=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:on.string().trim().max(350,"Description is too long").default(""),rating:on.object().shape({id:on.string()}).default({}).noUnknown(),tallPoster:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown(),banner:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown()}).noUnknown(),hh=function(e,t){var n=u.SERIES,r=o.Series,i=[{label:"Edit Series Details",appLink:{application:n,action:r.EDIT_SERIES,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_SERIES_VIDEOS,args:[t]}}];return Za(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_SERIES_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_SERIES_AUDIENCES,args:[t]}}]),i};function gh(e){var t=Object(nn.useFormikContext)(),n=gn(t);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this series",autoFocus:!0}),d.createElement(hn,{label:"Description",as:"textarea",name:"description",id:"description",maxLength:350,value:t.values.description,placeholder:"Describe this series here",showCharacterCounter:!0}),d.createElement(Xo,{ratings:e.ratings}),d.createElement(Lo,{imageType:Ra.TallPosters,fieldName:"tallPoster",application:u.SERIES,uploadAction:o.Series.UPLOAD_IMAGE}),d.createElement(Lo,{imageType:Ra.Banners,fieldName:"banner",application:u.SERIES,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(vn,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(Yo,{actions:e.actions})))}function yh(e){return d.createElement(an,{initialValues:e.series,validationSchema:mh,onSubmit:e.saveSeries},d.createElement(gh,{id:e.series&&e.series.id,ratings:e.ratings}))}var vh=function(e){return function(t){return t.appLink.action===e}};function bh(e){var t=e.seriesId,n=e.activeAction,r=d.useContext(Io);return d.createElement("div",{className:"py-2"},!!r&&d.createElement(es,{tabs:hh(r,t),isItemActive:vh(n)}))}function Sh(e){var t,n=Object(te.useDispatch)(),r=Dl(),a=i.useBasicFetch(Ud(e.seriesId)),s=i.useBasicFetch(dh());return d.createElement(d.Fragment,null,d.createElement(bh,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES}),!!a.data&&!!s.data&&d.createElement(yh,{series:a.data,saveSeries:function(t,a){i.fetch(n,zd(e.seriesId,t,(function(){r.success("Successfully updated series.")}),(function(){r.error("Failed to update series.")}),a))},ratings:s.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit series page ",d.createElement(La,{className:"info-link",appLink:(t=e.seriesId,{application:u.SERIES,action:o.Series.LEGACY_EDIT_SERIES,args:[t]})},"here"),"."))}function Eh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ch(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ch(e,t)}(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 Ch(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ih(e){var t=Eh(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(Ud(e.seriesId)),s=kl(f.SUBJECT);!function(e,t,n){var r=function(e){return ou.getSetStateByKey(n,e)};po(yp.getObjectLevelsFetchOptions(e,cu.Series,r("seriesLevels")),[e]),po(yp.getObjectAudiencesFetchOptions(e,cu.Series,r("seriesAudiences")),[e,t.seriesLevels]),au([yp.getPresentationsFetchOptions(r("presentations")),yp.getLevelsFetchOptions(r("levels"))],[]),po(!!t.currentPresentation&&yp.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.seriesId,n,r),Ef(n,r);var c=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.seriesLevels&&n.seriesAudiences);return d.createElement(d.Fragment,null,d.createElement(bh,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_AUDIENCES}),d.createElement(Go,{object:a.data}),!!c&&d.createElement(jp,{objectLevels:n.seriesLevels,objectAudiences:n.seriesAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:ou.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:cu.Series,saveLevels:function(t,n,r){return s.updateObjectLevels(e.seriesId,t,cu.Series,n,r,r)},saveAudiences:function(t,r){return s.updateObjectAudiences(e.seriesId,n.currentPresentation.id,t,cu.Series,r,r)}}))}function Oh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||jh(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 Ah(e){return function(e){if(Array.isArray(e))return Th(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||jh(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 jh(e,t){if(e){if("string"==typeof e)return Th(e,t);var n=Object.prototype.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)?Th(e,t):void 0}}function Th(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wh(e){var t=Oh(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(Ud(e.seriesId)),s=kl(f.SUBJECT);!function(e,t,n){var r=function(e){return ou.getSetStateByKey(n,e)};au([yp.getSubjectTreeFetchOptions(r("subjectTree")),yp.getPresentationsFetchOptions(r("presentations"))],[]),po(yp.getObjectSubjectsFetchOptions(e,cu.Series,r("seriesSubjects")),[e]),po(!!t.currentPresentation&&yp.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.seriesSubjects]);var i=function(e,t){return[].concat(Ah(t.subjectClassifications||[]),Ah(e))},a=t.seriesSubjects&&t.seriesSubjects.map((function(e){return yp.getSubjectClassificationFetchOptions(e.id,ou.getSetStateByKey(n,"subjectClassifications",i))}));au(a,[t.seriesSubjects],!!a),po(yp.getObjectClassificationsFetchOptions(e,cu.Series,r("seriesClassifications")),[e,t.seriesSubjects])}(e.seriesId,n,r),Ef(n,r);var c=!!(n.seriesSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.seriesClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(bh,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_SUBJECTS}),d.createElement(Go,{object:a.data}),c&&d.createElement(ef,{objectSubjects:n.seriesSubjects,subjectTree:n.subjectTree,memberType:cu.Series,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:ou.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.seriesClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.seriesId,t,cu.Series,n,r,r)},saveClassifications:function(t,r){return s.updateObjectClassifications(e.seriesId,n.currentPresentation.id,t,cu.Series,r,r)}}))}function Lh(){var e=Object(te.useDispatch)(),t=Dl(),n=i.useBasicFetch(dh());return d.createElement(d.Fragment,null,!!n.data&&d.createElement(yh,{saveSeries:function(n,a){var s=function(){t.error("Failed to create series.")},c=function(e){t.success("Successfully created series."),function(e){r.AppLinkHelper.trigger({application:u.SERIES,action:o.Series.EDIT_SERIES,args:[e.id]})}(e)};i.fetch(e,Vd(n,(function(t){var n={permissions:Wa()};i.fetch(e,zd(t.id,n,c,s,a))}),s))},ratings:n.data}))}function kh(e){return(kh="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})(e)}function xh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ph(e,t,n){return t&&Nh(e.prototype,t),n&&Nh(e,n),e}function _h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dh(e,t)}function Dh(e,t){return(Dh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uh(e);if(t){var i=Uh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fh(this,n)}}function Fh(e,t){return!t||"object"!==kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Uh(e){return(Uh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mh=function(e){_h(n,e);var t=Rh(n);function n(){return xh(this,n),t.apply(this,arguments)}return Ph(n,[{key:"channelName",get:function(){return u.SERIES}},{key:"appRoutes",get:function(){return{"manage/series/new(/)":"newSeries","manage/series/:id(/)":"editSeries","manage/series/:id/videos(/)":"editSeriesVideos","manage/series/:id/subjects(/)":"editSeriesSubjects","manage/series/:id/audiences(/)":"editSeriesAudiences","manage/legacy/series/:id(/)":"legacyEditSeries"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),Vh=function(e){_h(n,e);var t=Rh(n);function n(){return xh(this,n),t.apply(this,arguments)}return Ph(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return lo.getInstance(t,e)}))}},{key:"newSeries",value:function(){this.layout.showChildView(ae,d.createElement(Lh,null))}},{key:"editSeries",value:function(e){this.layout.showChildView(ae,d.createElement(Sh,{seriesId:e}))}},{key:"editSeriesVideos",value:function(e){this.legacyEditSeries(e)}},{key:"editSeriesSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(wh,{seriesId:e}))}},{key:"editSeriesAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Ih,{seriesId:e}))}},{key:"legacyEditSeries",value:function(e){r.LocationUtils.Redirect("/manage/legacy/series/".concat(e),!0)}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Pl,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(ac,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Series Application"}},{key:"channelName",get:function(){return u.SERIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:uh}}}}],[{key:"router",get:function(){return Mh}}]),n}(r.Application);function zh(e){return(zh="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})(e)}function Bh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qh(e,t,n){return t&&Hh(e.prototype,t),n&&Hh(e,n),e}function Jh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$h(e,t)}function $h(e,t){return($h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Kh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gh(e);if(t){var i=Gh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yh(this,n)}}function Yh(e,t){return!t||"object"!==zh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gh(e){return(Gh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wh=function(e){Jh(n,e);var t=Kh(n);function n(){return Bh(this,n),t.apply(this,arguments)}return qh(n,[{key:"channelName",get:function(){return u.SUBJECTS}},{key:"appRoutes",get:function(){return{"manage/subjects(/)":"subjects","manage/subjects/add-objects(/)":"addSubjectMembers","manage/subjects/new(/)":"newSubject","manage/subjects/:id/edit(/)":"editSubject","manage/subjects/:id/edit/playlists(/)":"editSubjectPlaylists","manage/subjects/:id/edit/series(/)":"editSubjectSeries","manage/subjects/:id/edit/videos(/)":"editSubjectVideos","manage/subjects/:id/classifications(/)":"subjectClassifications","manage/subjects/classifications(/)":"classifications","manage/subjects/presentations/:id/classifications(/)":"presentationClassifications","manage/subjects/presentations/:id/classifications/new(/)":"newClassification","manage/subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","manage/subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","manage/subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","manage/subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","manage/subjects/levels(/)":"levels","manage/subjects/levels/new(/)":"newLevel","manage/subjects/levels/:id(/)":"editLevel","manage/subjects/audiences(/)":"audiences","manage/subjects/presentations/:id/audiences(/)":"presentationAudiences","manage/subjects/presentations/:id/audiences/new(/)":"newAudience","manage/subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","manage/subjects/presentations(/)":"presentations","manage/subjects/presentations/new":"newPresentation","manage/subjects/presentations/:id(/)":"editPresentation"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),n}(r.AppRouter),Zh=function(e){Jh(n,e);var t=Kh(n);function n(){return Bh(this,n),t.apply(this,arguments)}return qh(n,[{key:"initialize",value:function(){var e=this;this.subjectDataService=lo.getInstance(f.SUBJECT,this),dt.values(f).forEach((function(t){return lo.getInstance(t,e)}))}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(ae,d.createElement(Vm,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(ae,d.createElement(Am,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:cu.Playlists};this.layout.showChildView(ae,d.createElement(Fm,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:cu.Series};this.layout.showChildView(ae,d.createElement(Fm,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:cu.Videos};this.layout.showChildView(ae,d.createElement(Fm,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"subjectClassifications",value:function(e){this.layout.showChildView(ae,d.createElement($m,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(ae,d.createElement(bm,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Hm,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e.toString()===this.currentLeftNavId.toString()?{application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Cm,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(pm,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(ae,d.createElement(Fd,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(ae,d.createElement(xd,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:cu.Playlists};this.layout.showChildView(ae,d.createElement(_d,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:cu.Series};this.layout.showChildView(ae,d.createElement(_d,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:cu.Videos};this.layout.showChildView(ae,d.createElement(_d,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(qd,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(wd,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(ae,d.createElement(Qd,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(ae,d.createElement(Xd,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(ae,d.createElement(Kd,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(pm,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(md,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(ae,d.createElement(vd,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(ae,d.createElement(cd,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(id,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(ae,d.createElement(sm,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(ae,d.createElement(cm,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(ae,d.createElement(nm,{key:e,id:e})),this.hideLeftNav()}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Pl,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(ac,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(ie,d.createElement(Ad,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(ie,d.createElement(Zm,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return d.createElement(Qm,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return u.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:km,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return Wh}}]),n}(r.Application);class Qh extends P{onShowAlert(e){if(!this.layoutOptions.options.alertRegion)return;const{ctor:t,collection:n}=e,r=n?n.toJSON():[];this.layout.showChildView(this.layoutOptions.options.alertRegion,d.createElement(t,{alerts:r,removeAlert:e=>h.Radio.channel(y.ALERT).trigger("remove:alert",e)}))}}var Xh,eg=function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},tg=function(e){var t="/api/domain/v1/themes",n="themes";return e&&(t+="?type=".concat(e),n+=":type:".concat(e)),{url:t,key:n}},ng=function(e,t,n,r){return{url:"/api/domain/v1/themes",key:"theme",data:e,type:it.POST,invalidationKeys:"themes",success:t,error:n,always:r}},rg=function(e,t,n,r,i){return{url:"/api/domain/v1/themes/".concat(e),key:"update:theme:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}},ig=function(e,t,n,r){return{url:"/api/domain/v1/themes/".concat(e),key:"delete:theme:".concat(e),type:it.DELETE,invalidationKeys:"themes",success:t,error:n,always:r}},ag=function(e){return{application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]}};function og(){var e=i.useBasicFetch(tg());return e.data?d.createElement(Zo,{objects:e.data,getObjectAppLink:ag,newObjectAppLink:{application:u.THEMES,action:o.Themes.NEW_THEME},objectName:"Theme"}):d.createElement(d.Fragment,null)}!function(e){e.Glance="glance"}(Xh||(Xh={}));var sg=[{key:"topLeft",label:"Top Left"},{key:"topRight",label:"Top Right"},{key:"bottomLeft",label:"Bottom Left"},{key:"bottomRight",label:"Bottom Right"}];function cg(){var e=Object(nn.useFormikContext)();return d.createElement("div",{className:"form-group"},sg.map((function(t){var n="data.".concat(t.key);return d.createElement(Lo,{label:t.label,imageType:Ra.HeroBanners,fieldName:n,application:u.THEMES,uploadAction:o.Videos.UPLOAD_IMAGE,setSelectedImage:function(t){e.setFieldValue(n,{fileId:t.id,url:t.url,fileIdType:Ua.ImageAPIv2})}})})))}var lg=on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown(),ug=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default(""),type:on.mixed().required("Type is required"),data:on.mixed().when("type",{is:Xh.Glance,then:on.object().shape({topLeft:lg,topRight:lg,bottomLeft:lg,bottomRight:lg}).noUnknown(),otherwise:on.mixed().strip(!0)}).default({})}).noUnknown();function pg(e){var t=Object(nn.useFormikContext)(),n=function(e){switch(e){case Xh.Glance:return cg;default:return}}(t.values.type);return d.createElement(nn.Form,null,d.createElement(hn,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this theme",autoFocus:!0}),d.createElement(hn,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},d.createElement("option",{value:null},"Select a type..."),dt.getEnumKeys(Xh).map((function(e){return d.createElement("option",{key:e,value:Xh[e]},e)}))),!!n&&d.createElement(n,null),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(jn,{isNew:e.isNew}),!!e.actions&&d.createElement(Yo,{actions:e.actions})))}function fg(e){var t;return d.createElement(an,{initialValues:e.theme,validationSchema:ug,onSubmit:e.saveTheme},d.createElement(pg,{isNew:!(null===(t=e.theme)||void 0===t?void 0:t.id),actions:e.actions}))}function dg(){var e=Object(te.useDispatch)();return d.createElement(fg,{saveTheme:function(t,n){i.fetch(e,ng(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]})}),null,n))}})}function mg(e){var t=Object(te.useDispatch)(),n=Dl(),r=i.useBasicFetch(eg(e.id));return r.data?d.createElement(fg,{theme:r.data,saveTheme:function(r,a){i.fetch(t,rg(e.id,r,(function(){n.success("Successfully updated theme")}),(function(){n.error("Failed to update theme")}),a))},actions:[{label:"Delete theme",className:"btn btn-danger",button:!0,appLink:{application:u.THEMES,action:o.Themes.DELETE_THEME,args:[e.id]}}]}):d.createElement(d.Fragment,null)}function hg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gg(e,t)}(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 gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yg(e){var t=Object(te.useDispatch)(),n=Dl(),a=hg(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(eg(e.id));return d.createElement(sc,{title:"Delete Theme",closePopup:e.closePopup,showLoadingSpinner:!l.data},d.createElement(d.Fragment,null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement(lc,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,ig(e.id,(function(){n.success("Successfully deleted theme"),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.THEMES})}),(function(){n.error("Failed to delete theme")})))},buttonText:"Yes, delete this theme",isSpinnerButton:!0,showSpinner:s}]})))}var vg=function(e){var t=e.children;return d.createElement(Oo,null,d.createElement(co,null,t))};function bg(e){return(bg="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})(e)}function Sg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cg(e,t,n){return t&&Eg(e.prototype,t),n&&Eg(e,n),e}function Ig(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Og(e,t)}function Og(e,t){return(Og=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ag(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tg(e);if(t){var i=Tg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jg(this,n)}}function jg(e,t){return!t||"object"!==bg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tg(e){return(Tg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wg=function(e){Ig(n,e);var t=Ag(n);function n(){return Sg(this,n),t.apply(this,arguments)}return Cg(n,[{key:"channelName",get:function(){return u.THEMES}},{key:"appRoutes",get:function(){return{"manage/themes(/)":"themes","manage/themes/new(/)":"newTheme","manage/themes/:id(/)":"editTheme"}}},{key:"appLinks",get:function(){return["deleteTheme","uploadImage"]}}]),n}(r.AppRouter),Lg=function(e){Ig(n,e);var t=Ag(n);function n(){return Sg(this,n),t.apply(this,arguments)}return Cg(n,[{key:"themes",value:function(){this.layout.showChildView(ae,d.createElement(og,null))}},{key:"newTheme",value:function(){this.layout.showChildView(ae,d.createElement(dg,null))}},{key:"editTheme",value:function(e){this.layout.showChildView(ae,d.createElement(mg,{id:e}))}},{key:"deleteTheme",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(yg,{id:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(Pl,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Themes Application"}},{key:"channelName",get:function(){return u.THEMES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:vg}}}}],[{key:"router",get:function(){return wg}}]),n}(Qh),kg=function(e){var t=e.children;return d.createElement(Oo,null,d.createElement(co,null,t))},xg=function(e){var t=u.VIDEOS,n=o.Videos;return[{label:"Edit Video Details",appLink:{application:t,action:n.EDIT_VIDEO,args:[e]}},{label:"Subjects",appLink:{application:t,action:n.EDIT_VIDEO_SUBJECTS,args:[e]}},{label:"Audiences",appLink:{application:t,action:n.EDIT_VIDEO_AUDIENCES,args:[e]}},{label:"Aliases",appLink:{application:t,action:n.EDIT_VIDEO_ALIASES,args:[e]}}]},Ng=function(e){return function(t){return t.appLink.action===e}};function Pg(e){var t=e.videoId,n=e.activeAction;return d.createElement("div",{className:"py-2"},d.createElement(es,{tabs:xg(t),isItemActive:Ng(n)}))}var _g,Dg=on.object().shape({name:on.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:on.string().trim().default(""),status:on.mixed().required("Status is required"),productionYear:on.number().min(1900),rating:on.object().shape({id:on.string()}).default({}).noUnknown(),thumbnail:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown(),heroBanner:on.object().shape({fileId:on.string(),fileIdType:on.mixed(),url:on.string()}).default({}).noUnknown(),glance:on.object().shape({theme:on.string(),format:on.mixed(),content:on.string()}).default({}).noUnknown()}).noUnknown();!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Pending=3]="Pending",e[e.Rejected=4]="Rejected",e[e.Processing=5]="Processing"}(_g||(_g={}));var Rg,Fg=n(120);function Ug(e){var t,n,r,i,a,o=Object(nn.useFormikContext)();return d.createElement("div",{className:"form-group p-2 border"},d.createElement("div",{className:"border-bottom mb-2"},d.createElement("label",null,"Summary")),d.createElement(hn,{as:"select",label:"Theme",name:"glance.theme",id:"type",value:null===(t=o.values.glance)||void 0===t?void 0:t.theme},d.createElement("option",{value:null},"Select a theme..."),e.themes.map((function(e){return d.createElement("option",{key:e.id,value:e.name},e.name)}))),d.createElement(hn,{as:"select",label:"Format",name:"glance.format",id:"type",value:null===(n=o.values.glance)||void 0===n?void 0:n.format},d.createElement("option",{value:null},"Select a format..."),dt.getEnumKeys(Rg).map((function(e){return d.createElement("option",{key:e,value:Rg[e]},e)}))),d.createElement(hn,{label:"Content",as:"textarea",name:"glance.content",id:"content",value:null===(r=o.values.glance)||void 0===r?void 0:r.content}),(null===(i=o.values.glance)||void 0===i?void 0:i.format)===Rg.Markdown&&d.createElement("div",{className:"form-group"},d.createElement("label",null,"Content Preview"),d.createElement("div",{className:"border rounded py-2",dangerouslySetInnerHTML:{__html:Fg(null===(a=o.values.glance)||void 0===a?void 0:a.content)}})))}function Mg(e){switch(e){case _g.Published:return"badge-success";case _g.Archived:return"badge-danger";case _g.Draft:return"badge-warning";case _g.Pending:return"badge-info";case _g.Rejected:return"badge-dark";default:return"badge-secondary"}}function Vg(e){var t=Object(nn.useFormikContext)(),n=!!e.rightslineId;return d.createElement(nn.Form,null,n&&d.createElement(hn,{label:"Rightsline ID",name:"rightslineId",id:"rightslineId",value:e.rightslineId,disabled:!0}),d.createElement(hn,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this video",disabled:n,autoFocus:!0}),d.createElement("div",{className:"form-group"},d.createElement("label",null,"Status"),d.createElement("div",null,d.createElement("span",{className:"badge ".concat(Mg(t.values.status))},_g[t.values.status]))),d.createElement(hn,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this video here",disabled:n,showCharacterCounter:!0}),d.createElement(hn,{label:"Production Year",type:"number",name:"productionYear",id:"productionYear",value:t.values.productionYear,disabled:n}),d.createElement(Xo,{ratings:e.ratings,disabled:n}),d.createElement(Lo,{imageType:Ra.Thumbnails,fieldName:"thumbnail",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),d.createElement(Lo,{imageType:Ra.HeroBanners,fieldName:"heroBanner",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),d.createElement(Ug,{themes:e.themes}),d.createElement(jn,{isNew:!e.id}))}function zg(e,t){if(e)return t?Object.assign(Object.assign({},e),t):e}function Bg(e){return d.createElement(an,{initialValues:zg(e.video,e.rightslineVideo),validationSchema:Dg,onSubmit:e.saveVideo,allowInitialSubmit:!!e.rightslineVideo},d.createElement(Vg,{id:e.video&&e.video.id,ratings:e.ratings,themes:e.themes,rightslineId:e.rightslineId}))}function Hg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qg(e,t)}(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 qg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jg(e){var t,n=Object(te.useDispatch)(),r=Hg(d.useState(!1),2),a=r[0],s=r[1],c=i.useBasicFetch(Mf(e.videoId)),l=i.useBasicFetch(zf(e.videoId)),p=i.useBasicFetch(dh()),f=i.useBasicFetch(tg(Xh.Glance));var m,h=!!c.data&&!!p.data&&!!f.data&&l.isComplete;return d.createElement(d.Fragment,null,d.createElement(Pg,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO}),!!l.data&&d.createElement("div",{className:"pt-3 text-right"},d.createElement(cn.Button,{variant:"outline-dark",size:"sm",onClick:function(){l.isFetching||(s(!0),i.fetch(n,zf(e.videoId)))}},"Sync from Rightsline")),h&&d.createElement(Bg,{video:c.data,saveVideo:function(t,r){i.fetch(n,Bf(e.videoId,t,null,null,r))},ratings:p.data,themes:f.data,rightslineId:null===(t=l.data)||void 0===t?void 0:t.rightslineId,rightslineVideo:a&&l.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit video page ",d.createElement(La,{className:"info-link",appLink:(m=e.videoId,{application:u.VIDEOS,action:o.Videos.LEGACY_EDIT_VIDEO,args:[m]})},"here"),"."))}function $g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Kg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kg(e,t)}(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 Kg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yg(e){var t=$g(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(Mf(e.videoId)),s=kl(f.SUBJECT);!function(e,t,n){var r=function(e){return ou.getSetStateByKey(n,e)};po(yp.getObjectLevelsFetchOptions(e,cu.Videos,r("videoLevels")),[e]),po(yp.getObjectAudiencesFetchOptions(e,cu.Videos,r("videoAudiences")),[e,t.videoLevels]),au([yp.getPresentationsFetchOptions(r("presentations")),yp.getLevelsFetchOptions(r("levels"))],[]),po(!!t.currentPresentation&&yp.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.videoId,n,r),Ef(n,r);var c=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.videoLevels&&n.videoAudiences);return d.createElement(d.Fragment,null,d.createElement(Pg,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_AUDIENCES}),d.createElement(Go,{object:a.data}),!!c&&d.createElement(jp,{objectLevels:n.videoLevels,objectAudiences:n.videoAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:ou.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:cu.Videos,saveLevels:function(t,n,r){return s.updateObjectLevels(e.videoId,t,cu.Videos,n,r,r)},saveAudiences:function(t,r){return s.updateObjectAudiences(e.videoId,n.currentPresentation.id,t,cu.Videos,r,r)}}))}function Gg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||Zg(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 Wg(e){return function(e){if(Array.isArray(e))return Qg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Zg(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 Zg(e,t){if(e){if("string"==typeof e)return Qg(e,t);var n=Object.prototype.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)?Qg(e,t):void 0}}function Qg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xg(e){var t=Gg(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(Mf(e.videoId)),s=kl(f.SUBJECT);!function(e,t,n){var r=function(e){return ou.getSetStateByKey(n,e)};au([yp.getSubjectTreeFetchOptions(r("subjectTree")),yp.getPresentationsFetchOptions(r("presentations"))],[]),po(yp.getObjectSubjectsFetchOptions(e,cu.Videos,r("videoSubjects")),[e]),po(!!t.currentPresentation&&yp.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.videoSubjects]);var i=function(e,t){return[].concat(Wg(t.subjectClassifications||[]),Wg(e))},a=t.videoSubjects&&t.videoSubjects.map((function(e){return yp.getSubjectClassificationFetchOptions(e.id,ou.getSetStateByKey(n,"subjectClassifications",i))}));au(a,[t.videoSubjects],!!a),po(yp.getObjectClassificationsFetchOptions(e,cu.Videos,r("videoClassifications")),[e,t.videoSubjects])}(e.videoId,n,r),Ef(n,r);var c=!!(n.videoSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.videoClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(Pg,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_SUBJECTS}),d.createElement(Go,{object:a.data}),c&&d.createElement(ef,{objectSubjects:n.videoSubjects,subjectTree:n.subjectTree,memberType:cu.Videos,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:ou.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.videoClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.videoId,t,cu.Videos,n,r,r)},saveClassifications:function(t,r){return s.updateObjectClassifications(e.videoId,n.currentPresentation.id,t,cu.Videos,r,r)}}))}!function(e){e.Markdown="text/markdown"}(Rg||(Rg={}));var ey=function(e){return{key:"aliases:".concat(e),url:"/api/master/v2/objects/".concat(e,"/aliases")}},ty=function(e,t,n,r){return{key:"create:alias",url:"/api/master/v2/objects/".concat(e,"/aliases"),type:it.POST,invalidationKeys:"aliases:".concat(e),data:t,success:n,error:r}},ny=function(e,t,n,r){return{key:"delete:alias",url:"/api/domain/v2/objects/".concat(e,"/aliases/").concat(t),type:it.DELETE,invalidationKeys:"aliases:".concat(e),success:n,error:r}};function ry(e){var t=e.videoId,n=Object(te.useDispatch)(),r=Dl(),a=i.useBasicFetch(ey(t));return a.data?d.createElement(d.Fragment,null,d.createElement(Pg,{videoId:t,activeAction:o.Videos.EDIT_VIDEO_ALIASES}),d.createElement(_s,{aliases:a.data.data,onSave:function(e,a){i.fetch(n,ty(t,e,(function(){r.success("Successfully created alias"),a()}),(function(){r.error("Something went wrong creating your alias")})))},onDelete:function(e){i.fetch(n,ny(t,e,(function(){r.success("Successfully deleted alias")}),(function(){r.error("Something went wrong deleting your alias")})))}})):d.createElement(d.Fragment,null,"Loading...")}function iy(e){return(iy="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})(e)}function ay(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sy(e,t,n){return t&&oy(e.prototype,t),n&&oy(e,n),e}function cy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ly(e,t)}function ly(e,t){return(ly=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fy(e);if(t){var i=fy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return py(this,n)}}function py(e,t){return!t||"object"!==iy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fy(e){return(fy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dy,my,hy=function(e){cy(n,e);var t=uy(n);function n(){return ay(this,n),t.apply(this,arguments)}return sy(n,[{key:"channelName",get:function(){return u.VIDEOS}},{key:"appRoutes",get:function(){return{"manage/videos/:id(/)":"editVideo","manage/videos/:id/audiences(/)":"editVideoAudiences","manage/videos/:id/subjects(/)":"editVideoSubjects","manage/videos/:id/aliases(/)":"editVideoAliases","tools/programlookup/:id":"legacyEditVideo"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),gy=function(e){cy(n,e);var t=uy(n);function n(){return ay(this,n),t.apply(this,arguments)}return sy(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return lo.getInstance(t,e)}))}},{key:"editVideo",value:function(e){this.layout.showChildView(ae,d.createElement(Jg,{videoId:e}))}},{key:"editVideoAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Yg,{videoId:e}))}},{key:"editVideoSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(Xg,{videoId:e}))}},{key:"editVideoAliases",value:function(e){this.layout.showChildView(ae,d.createElement(ry,{videoId:e}))}},{key:"legacyEditVideo",value:function(e){r.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(Pl,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Videos Application"}},{key:"channelName",get:function(){return u.VIDEOS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:kg,alertRegion:se}}}}],[{key:"router",get:function(){return hy}}]),n}(Qh);!function(e){e.Fifo="FifoMemoryCache"}(dy||(dy={}));class yy extends G{constructor(e){super(),this.size=e.size,this.cache={},this.cachedkeys=[]}get name(){return dy.Fifo}removeCacheKey(e){this.cachedkeys=m.without(this.cachedkeys,e)}has(e){return!!this.cache[e]}get(e){return this.cache[e]}set(e,t){e&&t||N.throw(new z("Must provide a cache key and a value to cache in FifoMemoryCache.")),this.has(e)&&this.removeCacheKey(e),this.cachedkeys.push(e),this.cache[e]=t,this.cachedkeys.length>this.size&&delete this.cache[this.cachedkeys.shift()]}getOrSet(e,t){if(this.has(e))return this.get(e);const n=t();return this.set(e,n),n}remove(e){return!!this.has(e)&&(delete this.cache[e],this.removeCacheKey(e),!0)}invalidate(e,t){const n=m.object(this.cachedkeys,this.cachedkeys);let r=[];m.each(e,e=>{n[e]&&r.push(e);const t=new RegExp(e,"i"),i=m.filter(n,e=>t.test(e));r.push(...i)}),r.length&&(r=m.uniq(r),m.each(r,e=>{delete this.cache[e],m.isFunction(t)&&t(e)}),this.cachedkeys=m.without(this.cachedkeys,...r))}}!function(e){e[e.Unknown=0]="Unknown",e[e.BadRequest=1]="BadRequest",e[e.Unauthorized=2]="Unauthorized",e[e.Forbidden=3]="Forbidden",e[e.NotFound=4]="NotFound",e[e.InternalServer=5]="InternalServer"}(my||(my={}));const vy={type:my.Unknown,message:"",code:0};var by;!function(e){e.Ajax="AjaxDataProvider",e.Notifications="NotificationsSignalRDataProvider"}(by||(by={}));const Sy={parseErrorMessage(e,t,n){if(!n||!n.errorCode)return e[t];let r=""+n.errorCode;return n.errorSubCode&&(r+="."+n.errorSubCode),e[r]||e[t]}};class Ey extends j.Object{constructor(e){super(e),$.ajaxSetup({cache:!1,contentType:"application/json; charset=utf-8"}),this.successMiddleware={},this.errorMiddleware={},this.dataServiceErrorMessageMappings=e.dataServiceErrorMessageMappings,this.defaultErrorMessageKey=e.defaultErrorMessageKey}get name(){return by.Ajax}parseUrl(e){const t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t}makeHttps(e){const t=this.parseUrl(e);return"http:"===t.protocol&&(t.protocol="https:"),t.href}base(e,t,n,r={}){n||(n=it.GET);const i=m.defaults(r,{forceHttps:!1}),a={url:e,method:n,type:n};t&&(a.data=n===it.POST||n===it.PUT?JSON.stringify(t):t),i.forceHttps&&(a.url=this.makeHttps(a.url)),i.traditional&&(a.traditional=i.traditional);const o=$.ajax(a);return m.keys(this.successMiddleware).length&&o.done(m.values(this.successMiddleware)),m.keys(this.errorMiddleware).length&&o.fail(m.values(this.errorMiddleware)),o}create(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,it.POST).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}read(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,it.GET).done((e,t,i)=>{n.trigger(r,e,t,i)}).fail((e,t,r)=>{n.trigger(i,e,t,r)})}update(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,it.PUT).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}delete(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,it.DELETE).done((e,t,i)=>n.trigger(r,e,t,i)).fail((e,t,r)=>n.trigger(i,e,t,r))}useMiddleware(e,t){this.successMiddleware[e]||(this.successMiddleware[e]=t)}useErrorMiddleware(e,t){this.errorMiddleware[e]||(this.errorMiddleware[e]=t)}parseError(e,t,n){const r=e.responseJSON,i=vy;switch(i.code=e.status,i.message=Sy.parseErrorMessage(this.dataServiceErrorMessageMappings,this.defaultErrorMessageKey,r),e.status){case 400:i.type=my.BadRequest;break;case 401:i.type=my.Unauthorized;break;case 403:i.type=my.Forbidden;break;case 404:i.type=my.NotFound;break;case 500:i.type=my.InternalServer}return i}}n.d(t,"Actions",(function(){return o})),n.d(t,"DataPrefixes",(function(){return s})),n.d(t,"FileExtensions",(function(){return c})),n.d(t,"Layouts",(function(){return l})),n.d(t,"AppChannels",(function(){return u})),n.d(t,"DataChannels",(function(){return p})),n.d(t,"DataServices",(function(){return f})),n.d(t,"CuratorLayoutView",(function(){return be})),n.d(t,"LayoutComponent",(function(){return Oe})),n.d(t,"CuratorAppNavService",(function(){return _e})),n.d(t,"ImageUploadDataService",(function(){return He})),n.d(t,"UserDataServiceHelper",(function(){return $e})),n.d(t,"LanguageDataService",(function(){return tt})),n.d(t,"CompaniesApplication",(function(){return Zs})),n.d(t,"DomainOptionsApplication",(function(){return Qc})),n.d(t,"PeopleApplication",(function(){return Ll})),n.d(t,"PlaylistsApplication",(function(){return lh})),n.d(t,"SeriesApplication",(function(){return Vh})),n.d(t,"SubjectDataService",(function(){return hp})),n.d(t,"SubjectDataServiceHelper",(function(){return yp})),n.d(t,"SubjectsApplication",(function(){return Zh})),n.d(t,"ThemesApplication",(function(){return Lg})),n.d(t,"VideosApplication",(function(){return gy})),n.d(t,"DomainOptionsApplication",(function(){return Qc})),n.d(t,"Core",(function(){return r})),n.d(t,"InstanceManager",(function(){return lo})),n.d(t,"FifoMemoryCache",(function(){return yy})),n.d(t,"AjaxDataProvider",(function(){return Ey})),n.d(t,"AlertType",(function(){return Ys})),n.d(t,"BaseAlertService",(function(){return Xs})),n.d(t,"LanguageService",(function(){return In})),n.d(t,"Flight",(function(){return i})),n.d(t,"CacheDurations",(function(){return qe})),n.d(t,"UserDataService",(function(){return yo}))}])}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","_","Yup","ReactBootstrap","Backbone","ReactRedux","Marionette","FontAwesome","DOMPurify","SortableHOC","ReactDOM","ReactTransitionGroup","Polyglot","Cropper","Handlebars"],t):"object"==typeof exports?exports["@clickview/curator"]=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):e["@clickview/curator"]=t(e.React,e._,e.Yup,e.ReactBootstrap,e.Backbone,e.ReactRedux,e.Marionette,e.FontAwesome,e.DOMPurify,e.SortableHOC,e.ReactDOM,e.ReactTransitionGroup,e.Polyglot,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,a,o,s,c,l,u,p,f,d,m){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=182)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";var r=n(19),i="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||i||Function("return this")();t.a=a},function(e,t){e.exports=o},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t,n){e.exports={alertItem:"_3ppPT",alertBox:"_2gPqV",alertList:"_1_wrK",icon:"_2gpnl",alertContent:"_1akpi",heading:"_3jnJY"}},function(e,t,n){"use strict";(function(e){var r=n(19),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.a.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();t.a=s}).call(this,n(26)(e))},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,a=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var s,c,l,u=r(t),p=r(n);if(u&&p){if((c=t.length)!=n.length)return!1;for(s=c;0!=s--;)if(!e(t[s],n[s]))return!1;return!0}if(u!=p)return!1;var f=t instanceof Date,d=n instanceof Date;if(f!=d)return!1;if(f&&d)return t.getTime()==n.getTime();var m=t instanceof RegExp,h=n instanceof RegExp;if(m!=h)return!1;if(m&&h)return t.toString()==n.toString();var g=i(t);if((c=g.length)!==i(n).length)return!1;for(s=c;0!=s--;)if(!a.call(n,g[s]))return!1;if(o&&t instanceof Element&&n instanceof Element)return t===n;for(s=c;0!=s--;)if(!("_owner"===(l=g[s])&&t.$$typeof||e(t[l],n[l])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>o[e];const c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function l(e){return e.replace(c,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const p=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const d={},m=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){d[" "+e]||(m.test(e)?d[" "+e]=e+"/":d[" "+e]=v(e,"/",!0));const n=-1===(e=d[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(h,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function v(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,s)}else if(i.test(e))return e.replace(a,s);return e},unescape:l,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(l(n)).replace(p,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(n)&&(n=y(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:y,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:v,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},function(e,t,n){e.exports={input:"_3MysI",suggestionsContainerOpen:"ahMdW",sectionContainer:"xstWL",suggestionHighlighted:"_3YTCa"}},function(e,t){e.exports=s},function(e,t,n){e.exports=n(168)()},function(e,t){function n(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1},getDefaults:n,changeDefaults:function(t){e.exports.defaults=t}}},function(e,t,n){e.exports={svg:"_3OUhC",iconButton:"_3t3VL",iconWithText:"_2KLHo",iconOnly:"_2rQWb"}},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(166))},function(e,t,n){"use strict";(function(e){var r=n(6),i=n(122),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||i.a;t.a=c}).call(this,n(26)(e))},function(e,t){e.exports=c},function(e,t,n){e.exports={buttonList:"_2v9CT",dropdownToggle:"AYBvQ"}},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!0;var o={},s=void 0,c=void 0;for(s=0,c=n.length;s<c;s++)o[n[s]]=!0;for(s=0,c=i.length;s<c;s++){var l=i[s],u=e[l],p=t[l];if(u!==p){if(!o[l]||null===u||null===p||"object"!==(void 0===u?"undefined":r(u))||"object"!==(void 0===p?"undefined":r(p)))return!0;var f=Object.keys(u),d=Object.keys(p);if(f.length!==d.length)return!0;for(var m=0,h=f.length;m<h;m++){var g=f[m];if(u[g]!==p[g])return!0}}}return!1}},function(e,t,n){const{defaults:r}=n(17),{cleanUrl:i,escape:a}=n(13);e.exports=class{constructor(e){this.options=e||r}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return r?'<pre><code class="'+this.options.langPrefix+a(r,!0)+'">'+(n?e:a(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:a(e,!0))+"</code></pre>"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+a(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}},function(e,t,n){"use strict";e.exports=n(163)},function(e,t,n){"use strict";var r=n(164),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=d(n);i&&i!==m&&e(t,i,r)}var o=u(n);p&&(o=o.concat(p(n)));for(var s=c(t),h=c(n),g=0;g<o.length;++g){var y=o[g];if(!(a[y]||r&&r[y]||h&&h[y]||s&&s[y])){var v=f(n,y);try{l(t,y,v)}catch(e){}}}}return t}},function(e,t){e.exports=p},function(e,t){e.exports={prefix:"cv",iconName:"add-to-playlist",icon:["24","24",[],"","M20.1 16.4h1.8a.6.6 0 1 1 0 1.2h-1.8v1.8a.6.6 0 1 1-1.2 0v-1.8h-1.8a.6.6 0 1 1 0-1.2h1.8v-1.8a.6.6 0 0 1 1.2 0v1.8zM10.5 9a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm5.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V12a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16zm-8-2.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close",icon:["24","24",[],"","M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"]}},function(e,t){e.exports={prefix:"cv",iconName:"delete",icon:["24","24",[],"","M14.5 7h4a.5.5 0 1 1 0 1h-1.14a1 1 0 0 1-.005.09l-.909 10a1 1 0 0 1-.996.91h-6.9a1 1 0 0 1-.996-.91l-.91-10A1.013 1.013 0 0 1 6.64 8H5.5a.5.5 0 0 1 0-1h4A1.5 1.5 0 0 1 11 5.5h2A1.5 1.5 0 0 1 14.5 7zm-1 0a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5h3zm-4 3a.463.463 0 0 0-.462.499L9.462 16a.54.54 0 0 0 .574.498.463.463 0 0 0 .426-.498l-.424-5.502A.54.54 0 0 0 9.5 10zm2.5 0a.5.5 0 0 0-.5.5V16a.5.5 0 1 0 1 0v-5.5a.5.5 0 0 0-.5-.5zm2.5 0a.54.54 0 0 0-.538.499L13.538 16a.463.463 0 0 0 .462.5.54.54 0 0 0 .538-.499l.424-5.502A.463.463 0 0 0 14.5 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit",icon:["24","24",[],"","M7.636 17.834l8.746-8.745-1.414-1.414-8.8 8.8 1.468 1.36zm-2.42.973c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zm2.614-1.906l.707.707a1.5 1.5 0 0 1 0 2.121L7.45 19.435c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L16.167 5.06a1.5 1.5 0 0 1 2.122 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"expand",icon:["24","24",[],"","M14.06 21.28l-.353.354-.707-.707.354-.354 7.22-7.22.353-.353.707.707-.354.354-7.22 7.22zm4 .465l-.353.353-.707-.707.354-.353 3.684-3.684.353-.354.707.707-.353.354-3.684 3.684z"]}},function(e,t){e.exports={prefix:"cv",iconName:"minus",icon:["24","24",[],"",""]}},function(e,t){e.exports={prefix:"cv",iconName:"more",icon:["24","24",[],"","M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"new-window",icon:["24","24",[],"","M17.395 5.526h-3.244a.763.763 0 0 1 0-1.526h5.086a.76.76 0 0 1 .763.763v5.086a.763.763 0 0 1-1.526 0V6.605l-5.172 5.172a.763.763 0 1 1-1.079-1.08l5.172-5.171zM8.5 5.5a.75.75 0 0 1 0 1.5H6.75a.25.25 0 0 0-.25.25v10c0 .138.112.25.25.25h10a.25.25 0 0 0 .25-.25V15.5a.75.75 0 1 1 1.5 0v1.75A1.75 1.75 0 0 1 16.75 19h-10A1.75 1.75 0 0 1 5 17.25v-10c0-.966.784-1.75 1.75-1.75H8.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"plus",icon:["24","24",[],"","M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2H11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"preview",icon:["24","24",[],"","M17.278 17.333a3.056 3.056 0 1 0 0-6.11 3.056 3.056 0 0 0 0 6.11zm3.53-.637c.03.022.06.048.087.076l1.729 1.728a.794.794 0 1 1-1.124 1.124l-1.728-1.729a.801.801 0 0 1-.076-.088 4.278 4.278 0 1 1 1.112-1.112zM7.713 9C7.32 9 7 8.776 7 8.5s.32-.5.714-.5h8.572c.394 0 .714.224.714.5s-.32.5-.714.5H7.714zm-.357 3.5C7.16 12.5 7 12.276 7 12s.16-.5.357-.5h4.286c.197 0 .357.224.357.5s-.16.5-.357.5H7.357zM7.5 16a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm8.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V9a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"search",icon:["24","24",[],"","M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"]}},function(e,t){e.exports={prefix:"cv",iconName:"share",icon:["24","24",[],"","M15.091 15.463a2.187 2.187 0 1 1-.392.782L8.91 13.35a2.187 2.187 0 1 1-.1-2.82l5.88-2.812a2.187 2.187 0 1 1 .378.79l-5.811 2.778a2.184 2.184 0 0 1 .045 1.281l5.79 2.896z"]}},function(e,t){e.exports={prefix:"cv",iconName:"upload",icon:["24","24",[],"","M5.5 18.5h13v-2.75a.75.75 0 1 1 1.5 0V19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3.25a.75.75 0 1 1 1.5 0v2.75zm7.249-11.796v8.57c0 .401-.35.726-.781.726-.432 0-.781-.325-.781-.725V6.704L7.89 9.658a.869.869 0 0 1-1.145 0 .692.692 0 0 1-.009-1.05l4.66-4.174a.869.869 0 0 1 1.144 0l4.66 4.174a.69.69 0 0 1 0 1.042.871.871 0 0 1-1.155.008L12.75 6.704z"]}},function(e,t){e.exports={prefix:"cv",iconName:"down",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"right",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"up-down",icon:["24","24",[],"","M8 14l8 .014L12 18l-4-4zm0-4l4-4 4 3.986L8 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"no-edit",icon:["24","24",[],"","M11.321 14.15l.707.707-4.578 4.578c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L9.2 12.028l.707.707-3.739 3.74 1.468 1.36 3.685-3.685zm2.828-2.829l2.233-2.232-1.414-1.414-2.233 2.232-.707-.707 4.14-4.14a1.5 1.5 0 0 1 2.12 0l.708.708a1.5 1.5 0 0 1 0 2.121l-4.14 4.14-.707-.708zm-8.933 7.486c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zM4.646 5.355a.5.5 0 0 1 .708-.708L19.496 18.79a.5.5 0 1 1-.707.707L4.646 5.354z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit-clickview",icon:["20","20",[],"","M17.6404852,5.71727477 L18.2297408,6.30653042 C18.7178962,6.79468579 18.7178962,7.58614201 18.2297408,8.07429738 L8.60812289,17.6959153 C6.71135346,18.0295451 5.75309028,18.1864816 5.73333333,18.1667246 C5.71357639,18.1469677 5.88616537,17.2043571 6.25110029,15.3388927 L15.8727182,5.71727477 C16.3608736,5.22911941 17.1523298,5.22911941 17.6404852,5.71727477 Z M8.7636789,16.361848 L16.05144,9.07408693 L14.8729287,7.89557563 L7.54002172,15.2284826 L8.7636789,16.361848 Z M6.74626541,17.1725049 C7.12145752,17.1092038 7.58975231,17.0283895 8.15085565,16.9301078 L6.99799308,15.862313 C6.89682248,16.3819093 6.8128974,16.8187273 6.74626541,17.1725049 Z M15.4621843,7.30631998 L16.6406956,8.48483128 L17.6404852,7.48504173 C17.8032036,7.32232327 17.8032036,7.05850453 17.6404852,6.89578608 L17.0512295,6.30653042 C16.8885111,6.14381197 16.6246923,6.14381197 16.4619739,6.30653042 L15.4621843,7.30631998 Z M6.33566019,14.9908489 C6.2812423,14.9851574 6.22594201,14.9756491 6.16991424,14.9622805 C5.78045547,14.8577915 5.5109401,14.5829916 5.41684139,14.197065 L5.16924027,13.2272939 L4.21481414,13.4992408 C3.82064978,13.614606 3.44283804,13.5120571 3.186267,13.236167 C2.88681965,12.9560388 2.78427075,12.578227 2.89864522,12.187493 L3.17158282,11.2296365 L2.20423564,10.9826478 C1.82188543,10.8870603 1.55144636,10.6218219 1.4331146,10.2152085 C1.34005988,9.82437875 1.44481708,9.45772856 1.72601896,9.19546209 L2.43808286,8.49887783 L1.73450689,7.81040417 C1.44481706,7.54002697 1.34005989,7.17337687 1.439649,6.75790801 C1.55144635,6.37593371 1.82188539,6.11069542 2.20181175,6.01572028 L3.17158282,5.76811916 L2.89963593,4.81369299 C2.78427075,4.41952863 2.88681965,4.04171689 3.16270985,3.78514587 C3.442838,3.48569854 3.82064974,3.38314964 4.2113838,3.49752411 L5.16924027,3.77046171 L5.41554008,2.80590417 C5.51183431,2.41109782 5.78619407,2.13673807 6.15902913,2.0463353 C6.55319349,1.93097012 6.93100525,2.03351902 7.20467421,2.32619001 L7.89999894,3.04211696 L8.594506,2.32703389 C8.87243071,2.03952554 9.24209506,1.93918808 9.61899753,2.04044384 C10.0138038,2.13673809 10.2881636,2.41109789 10.3831565,2.80069064 L10.6307576,3.77046171 L11.5851838,3.49851482 C11.9793481,3.38314964 12.3571599,3.48569854 12.6137309,3.76158875 C12.9131782,4.04171689 13.0157271,4.41952857 12.9013527,4.8102627 L12.6284151,5.76811916 L13.5957624,6.01510789 C13.9781125,6.11069542 14.2485515,6.37593369 14.3668833,6.78254721 C14.3761095,6.82129727 14.3833912,6.85980963 14.3887491,6.89800613 L12.4311686,8.86525019 C12.2885501,8.50246788 12.3664513,8.07377489 12.6626209,7.7840438 L13.3831727,7.07934901 C13.4057811,7.05824779 13.4051218,7.06055538 13.4006115,7.03880681 C13.3874896,6.9939735 13.3872742,6.99376225 13.3508029,6.98463799 L12.3810318,6.73703687 L12.3543769,6.72983797 C11.8232342,6.57849086 11.5153491,6.0252236 11.6666962,5.49408097 L11.9406245,4.53279433 C11.9501787,4.50015106 11.9538346,4.51362027 11.9070166,4.46830299 C11.8852565,4.44504217 11.8987257,4.44869811 11.8626522,4.45924293 L10.9047957,4.73218053 L10.8781408,4.73937942 C10.3430223,4.87600541 9.79846586,4.55296343 9.66183987,4.01784495 L9.41293742,3.04286026 C9.40513226,3.0108591 9.4140425,3.01976934 9.37095513,3.00912543 C9.33213613,2.99871057 9.33745796,2.99726608 9.31267674,3.02289983 L8.61735201,3.73882678 L8.59670876,3.75947002 C8.2005256,4.14425223 7.56742808,4.13500994 7.18264587,3.73882678 L6.48086195,3.01612347 C6.45910183,2.99286265 6.4725711,2.9965186 6.4179566,3.01196417 C6.38595535,3.01976935 6.39486559,3.01085911 6.3857591,3.04807388 L6.13815798,4.01784495 L6.13095909,4.04449986 C5.97961199,4.5756425 5.42634475,4.88352762 4.89520211,4.73218053 L3.93391535,4.45825223 C3.90127212,4.44869811 3.91474139,4.44504217 3.86942412,4.49186014 C3.84616328,4.51362028 3.84981922,4.50015102 3.86036404,4.53622453 L4.13330164,5.494081 L4.14050053,5.52073591 C4.27712653,6.05585439 3.95408454,6.60041087 3.41896607,6.73703687 L2.44677117,6.98525039 C2.41272371,6.99376225 2.41250834,6.99397349 2.40592081,7.01416766 C2.3948761,7.06055542 2.39421677,7.05824776 2.42531312,7.08745955 L3.13737702,7.78404381 L3.15291688,7.79958367 C3.53912638,8.1943756 3.53216895,8.82750235 3.13737702,9.21371185 L2.41682511,9.91840678 C2.39421677,9.93950789 2.3948761,9.93720022 2.3993864,9.95894886 C2.41250834,10.0037822 2.41272371,10.0039934 2.44919499,10.0131176 L3.41896606,10.2607188 L3.44562098,10.2679177 C3.97676362,10.4192648 4.28464874,10.972532 4.13330164,11.5036746 L3.85937334,12.4649614 C3.84981922,12.4976046 3.84616328,12.4841354 3.89298124,12.5294526 C3.91474137,12.5527135 3.90127209,12.5490575 3.93734565,12.5385127 L4.89520212,12.2655751 L4.92185702,12.2583762 C5.4569755,12.1217502 6.00153199,12.4447922 6.13815798,12.9799107 L6.38706042,13.9548953 C6.3957598,13.9905628 6.39169395,13.9864172 6.41528883,13.9929559 C6.46167656,14.0040006 6.45936885,14.00466 6.48858067,13.9735636 L7.18516493,13.2614997 L7.20070477,13.2459599 C7.4952939,12.9577749 7.92258715,12.888504 8.28097421,13.0359319 L6.33566019,14.9908489 Z M6.70489207,8.77616163 L9.31429327,6.16676041 C9.44212761,6.03892605 9.65593967,6.03389908 9.78471434,6.16267377 L10.2815938,6.65955323 C10.4116803,6.78963968 10.4085388,6.9989426 10.2775071,7.12997428 L6.95925927,10.4482222 C6.89767261,10.5098088 6.81613041,10.5428917 6.73375541,10.5462414 C6.63512454,10.5601257 6.53103126,10.5287286 6.45266973,10.450367 L4.80169873,8.79939603 C4.67185163,8.66954896 4.66967053,8.4612063 4.79975698,8.33111983 L5.29663643,7.83424043 C5.42541113,7.7054657 5.63211299,7.70338256 5.76491261,7.83618216 L6.70489207,8.77616163 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"caret",icon:["24","24",[],"","M8 10 16 10.0136253 12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-up",icon:["24","24",[],"","M12.733 8.305l5.963 5.906a1.046 1.046 0 0 1 0 1.473l-.01.011a1.034 1.034 0 0 1-1.467 0L12 10.526l-5.22 5.17a1.034 1.034 0 0 1-1.465 0l-.011-.012a1.046 1.046 0 0 1 0-1.473l5.963-5.906a1.034 1.034 0 0 1 1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-down",icon:["24","24",[],"","M11.267 15.695L5.304 9.79a1.046 1.046 0 0 1 0-1.473l.01-.011a1.034 1.034 0 0 1 1.467 0L12 13.474l5.22-5.17a1.034 1.034 0 0 1 1.465 0l.011.012a1.046 1.046 0 0 1 0 1.473l-5.963 5.906a1.034 1.034 0 0 1-1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-left",icon:["24","24",[],"","M8.305 11.267l5.906-5.963a1.046 1.046 0 0 1 1.473 0l.011.01a1.034 1.034 0 0 1 0 1.467L10.526 12l5.17 5.22c.406.41.406 1.055 0 1.465l-.012.011a1.046 1.046 0 0 1-1.473 0l-5.906-5.963a1.034 1.034 0 0 1 0-1.466z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-right",icon:["24","24",[],"","M15.695 11.267c.407.41.407 1.056 0 1.466L9.79 18.696a1.046 1.046 0 0 1-1.474 0l-.01-.01a1.034 1.034 0 0 1 0-1.467L13.474 12l-5.17-5.22a1.034 1.034 0 0 1 0-1.465l.012-.011a1.046 1.046 0 0 1 1.474 0l5.905 5.963z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-left",icon:["24","24",[],"","M7.182 11h11.89c.512 0 .928.448.928 1s-.416 1-.929 1H7.181l3.781 4.22a1.11 1.11 0 0 1 0 1.465c-.36.403-.943.418-1.311.045a.952.952 0 0 1-.032-.034l-5.343-5.963a1.112 1.112 0 0 1 0-1.466l5.343-5.963a.883.883 0 0 1 1.333 0c.378.421.378 1.066.01 1.477L7.182 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-right",icon:["24","24",[],"","M16.818 11H4.928C4.417 11 4 11.448 4 12s.416 1 .929 1h11.89l-3.781 4.22a1.112 1.112 0 0 0 0 1.465c.36.403.943.418 1.311.045a.952.952 0 0 0 .032-.034l5.343-5.963a1.112 1.112 0 0 0 0-1.466l-5.343-5.963a.883.883 0 0 0-1.333 0 1.115 1.115 0 0 0-.01 1.477L16.818 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"enter",icon:["24","24",[],"","M5.613 13.959a.599.599 0 0 1-.213-.46c0-.155.058-.309.176-.426l3.75-3.75a.6.6 0 0 1 .848.848L7.446 12.9H13.5A3.9 3.9 0 0 0 17.4 9V6.747a.6.6 0 0 1 1.2 0V9a5.1 5.1 0 0 1-5.1 5.1H7.452l2.722 2.723a.6.6 0 0 1-.848.848L5.613 13.96z"]}},function(e,t){e.exports={prefix:"cv",iconName:"archive",icon:["24","24",[],"","M19.64 10.28a.55.55 0 1 1 1.1 0v6.878c0 1.582-1.386 2.842-3.07 2.842H6.33c-1.684 0-3.07-1.26-3.07-2.842V10.28a.55.55 0 1 1 1.1 0v6.877c0 .95.87 1.742 1.97 1.742h11.34c1.1 0 1.97-.793 1.97-1.742V10.28zM20.19 4c.99 0 1.81.747 1.81 1.696V7.99a.55.55 0 0 1-.55.55H2.55A.55.55 0 0 1 2 7.99V5.696C2 4.747 2.821 4 3.81 4h16.38zm.71 1.696c0-.317-.307-.596-.71-.596H3.81c-.403 0-.71.28-.71.596v1.742h17.8V5.696zm-5.83 5.73c0 .95-.821 1.697-1.81 1.697h-2.52c-.989 0-1.81-.747-1.81-1.696 0-.95.821-1.696 1.81-1.696h2.52c.989 0 1.81.747 1.81 1.696zm-1.1 0c0-.316-.307-.595-.71-.595h-2.52c-.403 0-.71.28-.71.596 0 .317.307.596.71.596h2.52c.403 0 .71-.28.71-.596z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bell",icon:["24","24",[],"","M9.588 17.995H6.152c-.636 0-1.152-.53-1.152-1.182 0-.221.06-.438.175-.626l2.128-2.92V9.722c0-2.187 1.447-4.027 3.411-4.567v-.012A1.143 1.143 0 0 1 13 5.128c2.017.502 3.515 2.369 3.515 4.594v3.545l2.303 2.92a1.2 1.2 0 0 1-.366 1.628 1.13 1.13 0 0 1-.61.18h-3.716a2.286 2.286 0 0 1-4.538 0zm1.161 0a1.143 1.143 0 0 0 2.216 0H10.75zm4.615-4.31V9.723c0-1.958-1.547-3.546-3.455-3.546-1.908 0-3.454 1.588-3.454 3.546v3.939l-.23.314-2.073 2.838H17.83l-2.467-3.127z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bookmark",icon:["24","24",[],"","M8.5 5h7A1.5 1.5 0 0 1 17 6.5v12.131a.2.2 0 0 1-.309.168L12 15.75 7.309 18.8A.2.2 0 0 1 7 18.63V6.5A1.5 1.5 0 0 1 8.5 5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"broadcast",icon:["24","24",[],"","M4.571 19C4.256 19 4 18.776 4 18.5s.256-.5.571-.5H19.43c.315 0 .571.224.571.5s-.256.5-.571.5H4.57zM4.125 5h15.75C20.496 5 21 5.537 21 6.2v9.6c0 .663-.504 1.2-1.125 1.2H4.125C3.504 17 3 16.463 3 15.8V6.2C3 5.537 3.504 5 4.125 5zM4 6v10h16V6H4zm6 2.35a.192.192 0 0 1 .295-.162l4.164 2.65a.192.192 0 0 1 0 .324l-4.164 2.65A.192.192 0 0 1 10 13.65v-5.3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"calendar",icon:["24","24",[],"","M6.2 10.2V17a.8.8 0 0 0 .8.8h10a.8.8 0 0 0 .8-.8v-6.8H6.2zM16 5.5h2a1 1 0 0 1 1 1V17a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6.5a1 1 0 0 1 1-1h2v-.875a.625.625 0 1 1 1.25 0V5.5h5.5v-.875a.625.625 0 1 1 1.25 0V5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"cog",icon:["24","24",[],"","M18.458 12c0 .944.514 1.722 1.542 2.333a10.98 10.98 0 0 1-.667 1.584c-.944-.223-1.805.055-2.583.833-.694.694-.917 1.556-.667 2.583A10.98 10.98 0 0 1 14.5 20c-.611-1.028-1.444-1.542-2.5-1.542s-1.889.514-2.5 1.542c-.5-.167-1.042-.389-1.625-.667.25-1.055.042-1.916-.625-2.583-.667-.667-1.528-.875-2.583-.625C4.389 15.542 4.167 15 4 14.5c1.028-.611 1.542-1.444 1.542-2.5 0-.944-.514-1.722-1.542-2.333a8.484 8.484 0 0 1 .667-1.584c.944.223 1.805-.055 2.583-.833.667-.667.875-1.528.625-2.583C8.458 4.389 9 4.167 9.5 4c.611 1.028 1.444 1.542 2.5 1.542S13.889 5.028 14.5 4c.5.167 1.042.389 1.625.667-.25 1.055-.042 1.916.625 2.583.778.778 1.639 1.056 2.583.833.306.611.528 1.14.667 1.584-1.028.61-1.542 1.389-1.542 2.333zM12 16.083c1.111 0 2.07-.402 2.875-1.208.806-.806 1.208-1.764 1.208-2.875s-.402-2.07-1.208-2.875c-.806-.806-1.764-1.208-2.875-1.208s-2.07.402-2.875 1.208c-.806.806-1.208 1.764-1.208 2.875s.402 2.07 1.208 2.875c.806.806 1.764 1.208 2.875 1.208z"]}},function(e,t){e.exports={prefix:"cv",iconName:"folder",icon:["24","24",[],"","M12.685 6H18.5A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18.5v-13A1.5 1.5 0 0 1 5.5 4h4.66a1.5 1.5 0 0 1 1.095.474L12.685 6zM5.5 5a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-6.248l-1.727-1.842A.5.5 0 0 0 10.161 5H5.5zM5 10V9h14v1H5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"handle",icon:["16","16",[],"","M1 0h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7.4a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1V15a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-1.2a1 1 0 0 1 1-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c4.001-4.053 1.158-11.055-4.532-11.055-3.417 0-4.985 2.511-5.596 2.98-.614-.471-2.172-2.98-5.596-2.98-5.672 0-8.55 6.984-4.531 11.055z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart-outline",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c2.491-2.523 2.491-6.63 0-9.154-1.21-1.226-2.819-1.901-4.532-1.901s-3.321.675-4.531 1.9l-1.065 1.08-1.065-1.079c-1.21-1.226-2.819-1.901-4.531-1.901-1.713 0-3.322.675-4.532 1.901-2.491 2.524-2.491 6.631 0 9.153zm-8.527-17.822c.926-.937 2.157-1.454 3.464-1.454 1.308 0 2.538.517 3.463 1.455l1.599 1.62c.281.285.786.285 1.067 0l1.599-1.621c.928-.937 2.158-1.454 3.465-1.454 1.308 0 2.538.517 3.464 1.454 1.917 1.943 1.917 5.104 0 7.048l-9.06 9.181-9.061-9.182c-1.917-1.942-1.917-5.104 0-7.047z"]}},function(e,t){e.exports={prefix:"cv",iconName:"interactive",icon:["24","24",[],"","M5.978 13.65l7.525-9.99a.2.2 0 0 1 .357.154l-1.289 7.5 5.194-1.04a.2.2 0 0 1 .198.318l-7.447 9.733a.2.2 0 0 1-.355-.16l1.268-6.566-5.277.37a.2.2 0 0 1-.174-.32z"]}},function(e,t){e.exports={prefix:"cv",iconName:"link",icon:["24","24",[],"","M17 10c2.2 0 4 1.8 4 4s-1.8 4-4 4h-5a3.99 3.99 0 0 1-3-1.367v-.028a4.447 4.447 0 0 1-.889-2.679c0-.698.162-1.356.443-1.94A4 4 0 0 1 12 10h1.872v.098c0 .573-.322 1.081-.818 1.402H12c-.722 0-1.368.316-1.824.811-.453.418-.732.976-.732 1.591v.196c0 .575.244 1.1.645 1.508.46.545 1.146.894 1.911.894h5c1.375 0 2.5-1.125 2.5-2.5s-1.125-2.5-2.5-2.5h-.686a5.22 5.22 0 0 0 .24-1.5H17zm-9.556 3.926l.002.074H7c-2.2 0-4-1.8-4-4s1.8-4 4-4h5c1.462 0 2.743.797 3.441 1.975a4.48 4.48 0 0 1-.44 4.63v.024a3.982 3.982 0 0 1-3 1.37h-1.873v-.096c0-.574.322-1.082.817-1.403H12c.722 0 1.368-.316 1.824-.811.452-.418.731-.976.731-1.591v-.195c0-.576-.244-1.101-.645-1.51A2.496 2.496 0 0 0 12 7.5H7A2.507 2.507 0 0 0 4.5 10c0 1.375 1.125 2.5 2.5 2.5h.642c-.128.452-.198.93-.198 1.426z"]}},function(e,t){e.exports={prefix:"cv",iconName:"playlist",icon:["24","24",[],"","M4,19.0049107 C4,19.5548349 4.44525903,20 4.99508929,20 L19.0049107,20 C19.5548349,20 20,19.554741 20,19.0049107 L20,4.99508929 C20,4.44516513 19.554741,4 19.0049107,4 L4.99508929,4 C4.44516513,4 4,4.44525903 4,4.99508929 L4,19.0049107 Z M4.99508929,3 L19.0049107,3 C20.1067681,3 21,3.8926228 21,4.99508929 L21,19.0049107 C21,20.1067681 20.1073772,21 19.0049107,21 L4.99508929,21 C3.8932319,21 3,20.1073772 3,19.0049107 L3,4.99508929 C3,3.8932319 3.8926228,3 4.99508929,3 Z M17.5,17.3 C17.7761424,17.3 18,17.0761424 18,16.8 C18,16.5238576 17.7761424,16.3 17.5,16.3 L9.5,16.3 C9.22385763,16.3 9,16.5238576 9,16.8 C9,17.0761424 9.22385763,17.3 9.5,17.3 L17.5,17.3 Z M17.5,12.7 C17.7761424,12.7 18,12.4761424 18,12.2 C18,11.9238576 17.7761424,11.7 17.5,11.7 L9.5,11.7 C9.22385763,11.7 9,11.9238576 9,12.2 C9,12.4761424 9.22385763,12.7 9.5,12.7 L17.5,12.7 Z M8.07195299,7.22930174 L6.86542219,6.50538326 C6.38401051,6.21653625 6,6.43413716 6,6.98678206 L6,8.51032805 C6,9.06455544 6.38746271,9.27850253 6.86542219,8.99172685 L8.07195299,8.26780837 C8.55336467,7.97896136 8.54991246,7.51607743 8.07195299,7.22930174 Z M8.07195299,11.7293017 L6.86542219,11.0053833 C6.38401051,10.7165363 6,10.9341372 6,11.4867821 L6,13.010328 C6,13.5645554 6.38746271,13.7785025 6.86542219,13.4917268 L8.07195299,12.7678084 C8.55336467,12.4789614 8.54991246,12.0160774 8.07195299,11.7293017 Z M8.07195299,16.2293017 L6.86542219,15.5053833 C6.38401051,15.2165363 6,15.4341372 6,15.9867821 L6,17.510328 C6,18.0645554 6.38746271,18.2785025 6.86542219,17.9917268 L8.07195299,17.2678084 C8.55336467,16.9789614 8.54991246,16.5160774 8.07195299,16.2293017 Z M17.5,8.3 C17.7761424,8.3 18,8.07614237 18,7.8 C18,7.52385763 17.7761424,7.3 17.5,7.3 L9.5,7.3 C9.22385763,7.3 9,7.52385763 9,7.8 C9,8.07614237 9.22385763,8.3 9.5,8.3 L17.5,8.3 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"publisher-archive",icon:["24","24",[],"","M19.6403207,10.2808023 C19.6403207,9.97696656 19.8864872,9.73065903 20.1901489,9.73065903 C20.4938106,9.73065903 20.7399771,9.97696656 20.7399771,10.2808023 L20.7399771,17.1575931 C20.7399771,18.7397289 19.3544729,20 17.6701031,20 L6.32989691,20 C4.64552709,20 3.26002291,18.7397289 3.26002291,17.1575931 L3.26002291,10.2808023 C3.26002291,9.97696656 3.50618937,9.73065903 3.80985109,9.73065903 C4.11351281,9.73065903 4.35967927,9.97696656 4.35967927,10.2808023 L4.35967927,17.1575931 C4.35967927,18.1074218 5.23070097,18.8997135 6.32989691,18.8997135 L17.6701031,18.8997135 C18.769299,18.8997135 19.6403207,18.1074218 19.6403207,17.1575931 L19.6403207,10.2808023 Z M20.1901489,4 C21.1786273,4 22,4.74713037 22,5.69627507 L22,7.98853868 C22,8.29237442 21.7538335,8.53868195 21.4501718,8.53868195 L2.54982818,8.53868195 C2.24616646,8.53868195 2,8.29237442 2,7.98853868 L2,5.69627507 C2,4.74713037 2.82137271,4 3.80985109,4 L20.1901489,4 Z M20.9003436,5.69627507 C20.9003436,5.37943754 20.5934534,5.10028653 20.1901489,5.10028653 L3.80985109,5.10028653 C3.40654659,5.10028653 3.09965636,5.37943754 3.09965636,5.69627507 L3.09965636,7.43839542 L20.9003436,7.43839542 L20.9003436,5.69627507 Z M15.069874,11.4269341 C15.069874,12.3760788 14.2485013,13.1232092 13.2600229,13.1232092 L10.7399771,13.1232092 C9.75149871,13.1232092 8.930126,12.3760788 8.930126,11.4269341 C8.930126,10.4777894 9.75149871,9.73065903 10.7399771,9.73065903 L13.2600229,9.73065903 C14.2485013,9.73065903 15.069874,10.4777894 15.069874,11.4269341 Z M13.9702176,11.4269341 C13.9702176,11.1100966 13.6633274,10.8309456 13.2600229,10.8309456 L10.7399771,10.8309456 C10.3366726,10.8309456 10.0297824,11.1100966 10.0297824,11.4269341 C10.0297824,11.7437716 10.3366726,12.0229226 10.7399771,12.0229226 L13.2600229,12.0229226 C13.6633274,12.0229226 13.9702176,11.7437716 13.9702176,11.4269341 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"resources",icon:["24","24",[],"","M4 6.83c0-.523.423-.948.948-.948H17.17c.524 0 .949.423.949.949v12.22a.947.947 0 0 1-.949.949H4.95a.947.947 0 0 1-.95-.948V6.83zm.941 12.222c0 .005 12.228.007 12.228.007.005 0 .007-12.228.007-12.228 0-.005-12.228-.007-12.228-.007-.005 0-.007 12.228-.007 12.228zm2.353-9.405a.47.47 0 1 1 0-.941h7.588a.47.47 0 1 1 0 .941H7.294zm0 2.824a.47.47 0 1 1 0-.942h7.588a.47.47 0 1 1 0 .942H7.294zm0 2.823a.47.47 0 1 1 0-.941h2.88a.47.47 0 1 1 0 .941h-2.88zM6.353 4.941a.47.47 0 1 1 0-.941h11.766C19.155 4 20 4.848 20 5.88v12.232a.47.47 0 1 1-.941 0V5.88a.945.945 0 0 0-.94-.938H6.353z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star-o",icon:["24","24",[],"","M11.64 16.055a.768.768 0 0 1 .72 0l3.767 1.998-.806-4.602 3.357-3.249-4.626-.654L12 5.35 9.948 9.548l-4.626.654 3.357 3.25-.807 4.601 3.768-1.998zm-3.75 3.148a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star",icon:["24","24",[],"","M7.89 19.203a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"tag",icon:["24","24",[],"","M9.85651379,4 C10.5597673,4 11.2342681,4.27911643 11.7318501,4.77635695 L11.7318501,4.77635695 L19.5192508,12.5634018 C20.1602555,13.2045708 20.1602555,14.2439177 19.5192159,14.8851217 L19.5192159,14.8851217 L14.8855145,19.5192848 C14.2443321,20.1602442 13.2049876,20.1602442 12.5637184,19.519198 L12.5637184,19.519198 L4.7762613,11.7314233 C4.27913559,11.2340016 4,10.5595161 4,9.85635067 L4,9.85635067 L4,5.64191268 C4,4.7351029 4.73513649,4 5.64195885,4 L5.64195885,4 L9.85651379,4 Z M9.85658948,5.26315824 L5.64195885,5.26315824 C5.4327466,5.26315824 5.26315823,5.43273884 5.26315823,5.64191268 L5.26315823,5.64191268 L5.26315823,9.85642637 C5.26315823,10.2247328 5.40935021,10.5779817 5.66959105,10.8383776 L5.66959105,10.8383776 L13.4568376,18.6259418 C13.6047616,18.7738142 13.8445582,18.7738142 13.9923822,18.6260417 L13.9923822,18.6260417 L18.6259486,13.9920135 C18.7738119,13.8441123 18.7738119,13.6043763 18.6260161,13.4565426 L18.6260161,13.4565426 L10.8388259,5.6697082 C10.5782887,5.40934993 10.2250082,5.26315824 9.85658948,5.26315824 L9.85658948,5.26315824 Z M7.78947471,6.10526373 C8.71963876,6.10526373 9.4736857,6.85931068 9.4736857,7.78947472 C9.4736857,8.71963876 8.71963876,9.4736857 7.78947471,9.4736857 C6.85931067,9.4736857 6.10526373,8.71963876 6.10526373,7.78947472 C6.10526373,6.85931068 6.85931067,6.10526373 7.78947471,6.10526373 Z M7.78947471,7.36842197 C7.5569337,7.36842197 7.36842197,7.55693371 7.36842197,7.78947472 C7.36842197,8.02201573 7.5569337,8.21052747 7.78947471,8.21052747 C8.02201572,8.21052747 8.21052746,8.02201573 8.21052746,7.78947472 C8.21052746,7.55693371 8.02201572,7.36842197 7.78947471,7.36842197 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"time",icon:["24","24",[],"","M12 4c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 1.077a6.88 6.88 0 0 0-4.896 2.027A6.877 6.877 0 0 0 5.077 12c0 1.85.72 3.588 2.027 4.896A6.877 6.877 0 0 0 12 18.923a6.88 6.88 0 0 0 4.896-2.027A6.877 6.877 0 0 0 18.923 12a6.88 6.88 0 0 0-2.027-4.896A6.877 6.877 0 0 0 12 5.077zm2.524 9.599a.6.6 0 0 1-.848.848l-2.5-2.5A.6.6 0 0 1 11 12.6V8.624a.6.6 0 0 1 1.2 0v3.727l2.324 2.325z"]}},function(e,t){e.exports={prefix:"cv",iconName:"video",icon:["24","24",[],"","M4.5 6a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm0-1h15A1.5 1.5 0 0 1 21 6.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5v-11A1.5 1.5 0 0 1 4.5 5zM10 9.26v5.48a.256.256 0 0 0 .39.218l4.482-2.74a.256.256 0 0 0 0-.436l-4.483-2.74a.256.256 0 0 0-.389.219z"]}},function(e,t){e.exports={prefix:"cv",iconName:"subject",icon:["24","24",[],"","M19.15,21.08H5.1c-1.09,0-1.98-0.89-1.98-1.98V5.06c0-1.09,0.89-1.98,1.98-1.98h14.04c1.09,0,1.98,0.89,1.98,1.98V19.1 C21.12,20.19,20.24,21.08,19.15,21.08z M20.12,19.16V5c0-0.51-0.41-0.92-0.92-0.92H7.04C6.54,4.08,6.12,4.49,6.12,5v14.16 c0,0.51,0.41,0.92,0.92,0.92h12.16C19.71,20.08,20.12,19.67,20.12,19.16z M19.12,6.95V6.81c0-0.36-0.29-0.65-0.65-0.65H8.78 c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69C18.83,7.6,19.12,7.31,19.12,6.95z M19.12,9.95V9.81 c0-0.36-0.29-0.65-0.65-0.65H8.78c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69 C18.83,10.6,19.12,10.31,19.12,9.95z"]}},function(e,t){e.exports={prefix:"cv",iconName:"series",icon:["24","24",[],"","M20.49,3.51c0.97,0,1.76,0.79,1.76,1.76v9.27c0,0.77-0.49,1.42-1.18,1.66l0.09-10.84c0-0.39-0.3-0.7-0.68-0.7l-14.27,0 C6.46,3.99,7.1,3.51,7.85,3.51H20.49z M18.38,5.56c0.97,0,1.76,0.79,1.76,1.75v9.27c0.01,0.77-0.49,1.42-1.17,1.66l0.09-10.86 c0-0.38-0.3-0.68-0.68-0.68l-14.28,0c0.25-0.67,0.89-1.14,1.64-1.14H18.38z M16.15,7.7c0.97,0,1.75,0.79,1.75,1.76v9.27 c0,0.97-0.79,1.75-1.75,1.75H3.5c-0.97,0-1.75-0.79-1.75-1.75V9.46c0-0.97,0.79-1.76,1.75-1.76H16.15z M16.14,8.85H3.51 c-0.38,0-0.68,0.3-0.68,0.68l0,0v9.13c0,0.38,0.3,0.68,0.68,0.68l0,0h12.62c0.38,0,0.68-0.3,0.68-0.68l0,0V9.53 C16.82,9.15,16.52,8.85,16.14,8.85L16.14,8.85z M8.46,12.41v3.37c0,0.18,0.21,0.28,0.35,0.18l2.31-1.69c0.12-0.09,0.12-0.27,0-0.35 L8.8,12.23C8.66,12.13,8.46,12.23,8.46,12.41"]}},function(e,t){e.exports={prefix:"cv",iconName:"white-wave",icon:["1200","244",[],"","M1104.19651,33.5198863 C1084.14716,45.4511816 1067.10689,82.9623447 1047.23647,124.40502 C1023.86518,173.149287 924.725009,160.996474 830.060105,199.668011 C735.395201,238.339548 706.121292,249.351671 618.615175,241.737466 C531.109058,234.12326 495.404437,207.34459 432.2827,199.668011 C370.933901,192.207048 283.214734,200.240922 234.995453,186.264588 C153.311618,162.588569 167.948341,80.4093241 122.421855,59.9864363 C102.62311,51.1048469 61.8158253,37.3273576 0,18.6539685 L0,0 L1200,0 C1161.79495,7.07406031 1129.86046,18.2473557 1104.19651,33.5198863 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"compass",icon:["24","24",[],"","M12,-1.71862524e-13 C13.3893905,-1.71862524e-13 14.5197317,1.12166968 14.5197317,2.50040137 C14.5197317,2.8215332 14.4594938,3.13263028 14.3442115,3.42156921 C16.2349366,3.84633285 17.9748233,4.78862459 19.3866372,6.17539419 L19.4316433,6.22680193 C21.3267651,8.11265804 22.5,10.713205 22.5,13.5805516 C22.5,19.3258216 17.7897333,24 12,24 L12,24 C6.21026669,24 1.5,19.3258216 1.5,13.5805516 L1.50006052,13.5243182 C1.50002021,13.5212739 1.5,13.5182249 1.5,13.5151711 L1.501,13.503 L1.50378159,13.2988768 C1.57785421,10.543134 2.73548466,8.05071265 4.56835673,6.22680193 L4.61336276,6.17539419 C6.02517671,4.78862459 7.76506343,3.84633285 9.65748913,3.42018903 C9.54056383,3.13263028 9.48031555,2.8215332 9.48031555,2.50040137 C9.48031555,1.12166968 10.6106095,-1.71862524e-13 12,-1.71862524e-13 Z M12,4.52624116 L11.6809164,4.53170146 C11.6454989,4.53291535 11.610132,4.53433052 11.5748169,4.53594584 L11.6816694,4.53162088 C11.5883913,4.53477816 11.4953516,4.53932139 11.4025747,4.54524062 L11.5748169,4.53594584 C11.4679256,4.54083509 11.3615084,4.54755809 11.2555967,4.55608379 L11.4025747,4.54524062 C11.3068176,4.55134999 11.2113405,4.55892518 11.1161702,4.56795525 L11.2555967,4.55608379 C11.095392,4.56897997 10.9363438,4.5860008 10.7785603,4.60703883 C10.7467123,4.6104578 10.7154515,4.61475211 10.6842289,4.61920452 L10.7785603,4.60703883 C10.6768565,4.62059949 10.5756781,4.63582921 10.4750543,4.65269924 L10.6842289,4.61920452 C10.600263,4.63117821 10.5165735,4.64429522 10.4331795,4.65854779 L10.4750543,4.65269924 C9.11485909,4.88074187 7.85598275,5.40850943 6.77005357,6.16492738 L8.00490498,7.39068924 C8.27354347,7.65726684 8.27354347,8.0894535 8.00490498,8.35612485 C7.87046765,8.48939021 7.69450873,8.55604633 7.5184081,8.55604633 C7.34230747,8.55604633 7.16634856,8.48943709 7.03200569,8.35612485 L5.70204148,7.03485023 C4.13204115,8.52299364 3.09475895,10.5601022 2.90659433,12.8322227 L4.30759576,12.8325787 C4.68743083,12.8325787 4.99546522,13.1382031 4.99546522,13.5151711 C4.99546522,13.892186 4.68747807,14.1977635 4.30764299,14.1977635 L2.89670934,14.1976473 C3.02371908,16.0609257 3.72135566,17.7714185 4.81716961,19.1579915 L4.97167812,19.3482139 C5.26113447,19.6949337 5.57609243,20.0199666 5.91367078,20.3204536 L7.03200569,19.2111609 C7.30069142,18.9445833 7.73612479,18.9445833 8.00490498,19.2111609 C8.27354347,19.4777385 8.27354347,19.9099252 8.00490498,20.1765497 L7.01386949,21.160078 C8.44796715,22.0922041 10.1613427,22.6346745 12,22.6346745 L12,22.6346745 C13.8583409,22.6346745 15.5887033,22.0805272 17.0320921,21.1300078 L16.0701299,20.1765497 C15.8014914,19.909972 15.8014914,19.4777854 16.0701299,19.2111609 C16.3388156,18.9445833 16.774249,18.9445833 17.042982,19.2111609 L18.1252566,20.2856043 C18.4481451,19.9948825 18.7500205,19.681572 19.0283219,19.3482139 L19.1828304,19.1579915 C20.2466397,17.8119151 20.9351906,16.1605635 21.0907063,14.3605101 L21.1032907,14.1976527 L21.1032907,14.1976527 L19.4302507,14.1977635 C19.0504157,14.1977635 18.7423813,13.8921391 18.7423813,13.5151711 C18.7423813,13.1381562 19.0504157,12.8325787 19.4302507,12.8325787 L21.0934057,12.8322227 C20.9067892,10.5787961 19.8849698,8.55653016 18.3366017,7.07169263 L17.0430292,8.35607798 C16.9085919,8.48943709 16.732633,8.55604633 16.5565323,8.55604633 C16.3804317,8.55604633 16.2044728,8.48943709 16.0701299,8.35612485 C15.8014914,8.08954725 15.8014914,7.65736059 16.0701299,7.39068924 L17.2742569,6.19598696 C16.1894526,5.4308071 14.9295636,4.89482891 13.5669368,4.65983993 C13.5528409,4.65615858 13.538853,4.65380129 13.5248569,4.65147595 L13.5669368,4.65983993 C13.4834378,4.64544029 13.3995531,4.63217086 13.3152992,4.62004816 L13.5248569,4.65147595 C13.4243139,4.63477151 13.3233471,4.61971567 13.2219896,4.60632197 L13.3152992,4.62004816 C13.1723723,4.59948341 13.0283832,4.58221861 12.8834131,4.56833442 C12.8374466,4.56355426 12.7909906,4.55949885 12.7444647,4.55579028 L12.8834131,4.56833442 C12.7886701,4.55926062 12.6935082,4.5516307 12.5979499,4.54546716 L12.7444647,4.55579028 C12.6381278,4.54731418 12.5314263,4.5406499 12.4243976,4.53581255 L12.5979499,4.54546716 C12.5053597,4.53949506 12.4123973,4.53489967 12.3190836,4.53170146 L12.4243976,4.53581255 C12.2834709,4.52944313 12.1419768,4.52624116 12,4.52624116 Z M12.2098775,18.4456908 C12.3524617,18.4551964 12.4902931,18.464702 12.6328773,18.4884661 C12.6851582,18.4932189 12.7421919,18.5074773 12.7944727,18.5169829 C12.8039783,18.5169829 12.813484,18.5169829 12.8229896,18.5217357 C12.8990345,18.5692638 12.984585,18.5740166 13.0701355,18.5930278 C13.0938996,18.5977806 13.1224164,18.6025334 13.1509332,18.612039 C13.1746973,18.6215447 13.1984613,18.6310503 13.2174725,18.6500615 C13.2364838,18.6690727 13.255495,18.6833311 13.2887647,18.688084 C13.3172815,18.6928368 13.3362927,18.7213536 13.3362927,18.7546232 C13.3362927,18.7831401 13.3315399,18.8116569 13.3267871,18.835421 C13.3077759,18.9304771 13.2887647,19.030286 13.2650006,19.1253422 C13.2602478,19.153859 13.2507422,19.1823759 13.2412366,19.2108927 C13.2174725,19.277432 13.2127197,19.3487241 13.1937085,19.4152634 C13.1794501,19.4532859 13.1746973,19.4960611 13.1556861,19.5340836 C13.1414276,19.5673532 13.131922,19.6006229 13.1034052,19.6386453 C13.0891468,19.6529038 13.084394,19.6766678 13.0796411,19.7004318 C13.0606299,19.7527127 13.0321131,19.7717239 12.9750794,19.7622183 L12.9750794,19.7622183 L12.960821,19.7622183 C12.8562592,19.7384543 12.7564503,19.7194431 12.6566413,19.6909262 C12.5473268,19.6624094 12.4380122,19.6529038 12.3286977,19.6576566 C12.3001808,19.6576566 12.271664,19.6671622 12.2431471,19.6766678 C12.2051247,19.6909262 12.1956191,19.7194431 12.1956191,19.7574655 C12.1956191,19.7764767 12.2003719,19.7907352 12.2193831,19.795488 C12.2811696,19.8287576 12.3382033,19.8620273 12.419001,19.8762857 C12.442765,19.8810385 12.4617762,19.8952969 12.4807875,19.9048025 C12.5045515,19.9190609 12.5235627,19.9285666 12.542574,19.9380722 C12.689911,20.0093643 12.8467536,20.0711508 12.9798322,20.1709597 C13.084394,20.2422518 13.1604389,20.3325551 13.2032141,20.4513753 L13.2032141,20.4513753 L13.3077759,20.7745662 C13.3410455,20.8933864 13.3362927,21.0217122 13.3315399,21.1452851 C13.3267871,21.2403413 13.3125287,21.3401502 13.279259,21.4304535 C13.2745062,21.4352064 13.2745062,21.4399592 13.2745062,21.4494648 C13.2840118,21.5587793 13.2507422,21.6585883 13.1889557,21.7441388 C13.084394,21.8962286 12.9513154,22.0293072 12.7897199,22.1291162 C12.6851582,22.1956555 12.5710908,22.2336779 12.4475178,22.257442 C12.3239448,22.281206 12.1956191,22.3144756 12.0672933,22.3287341 C11.9579787,22.3429925 11.8486642,22.3429925 11.7441024,22.3382397 C11.6157766,22.3239812 11.4922036,22.3002172 11.3638778,22.2764532 C11.3448666,22.2764532 11.3258554,22.2669476 11.3068442,22.2621948 C11.2165408,22.2194195 11.1262375,22.2051611 11.0311814,22.1956555 C10.9076084,22.1766442 10.7887882,22.1481274 10.6652152,22.1243634 C10.6366984,22.1196106 10.6081815,22.0958465 10.6081815,22.0625769 C10.6081815,21.9675207 10.5844175,21.8677118 10.5986759,21.7726556 C10.6129344,21.6015546 10.62244,21.4257007 10.6414512,21.2545997 C10.6509568,21.1642964 10.6747208,21.073993 10.6984849,20.9789369 C10.7127433,20.9219032 10.7507658,20.8981392 10.8125522,20.902892 C10.9028556,20.9123976 10.9931589,20.9171504 11.0787094,20.9314088 C11.188024,20.9456672 11.2925857,20.9599257 11.3971475,20.9931953 C11.4541812,21.0074537 11.5112149,21.0169593 11.5682485,21.0217122 C11.6633047,21.026465 11.753608,21.026465 11.8439113,21.026465 C11.8866866,21.026465 11.9294619,20.9836897 11.9342147,20.9456672 C11.9389675,20.9123976 11.9152034,20.8696223 11.8724282,20.8553639 C11.8391585,20.8458583 11.7963833,20.8363527 11.7583608,20.8315999 C11.7345968,20.8268471 11.7108328,20.8220943 11.6870687,20.8220943 C11.6015182,20.8173415 11.5254733,20.7935774 11.4446756,20.7650606 C11.3638778,20.7317909 11.2783273,20.7127797 11.1975296,20.6795101 C11.088215,20.6414876 10.9884061,20.5797011 10.8981028,20.508409 C10.817305,20.4466225 10.7792826,20.361072 10.7507658,20.2707687 C10.7079905,20.1234316 10.6937321,19.9713418 10.7127433,19.819252 C10.7270017,19.7051846 10.7317545,19.5911173 10.7507658,19.4818027 C10.793541,19.2441624 10.8885972,19.030286 11.0596982,18.859185 C11.2070352,18.711848 11.3876419,18.612039 11.5920126,18.5550054 C11.7060799,18.5217357 11.8249001,18.4932189 11.9437203,18.4694548 C12.0340236,18.4551964 12.124327,18.4551964 12.2098775,18.4456908 Z M14.7328664,9.61765309 C15.1590885,9.61765309 15.5675493,9.84298078 15.7988231,10.2056519 C16.0296718,10.5678544 16.0563136,11.0171504 15.8699625,11.4074308 L14.1147664,15.0838768 C13.9903906,15.3443138 13.7774449,15.5556727 13.5149472,15.6790944 L9.80998461,17.4209191 C9.63676546,17.5022939 9.45419332,17.5435907 9.2670864,17.5435907 C8.84086431,17.5435907 8.43240343,17.3182631 8.20112965,16.9555919 C7.97028099,16.5933895 7.94363916,16.1440935 8.12999028,15.753813 L9.88518638,12.077367 C10.0095622,11.81693 10.2225079,11.6055242 10.4850055,11.4821494 L14.1899681,9.74032473 C14.3631873,9.65894988 14.5457594,9.61765309 14.7328664,9.61765309 Z M14.4894526,11.1101033 L11.1110414,12.6984127 L9.51045294,16.050953 L12.8888641,14.4626436 L14.4894526,11.1101033 Z M13.0226075,6.1644377 C13.0938996,6.1691905 13.1651917,6.1691905 13.2364838,6.1691905 L13.2364838,6.1691905 L13.5121466,6.18344892 C13.5596746,6.18344892 13.5929443,6.21196577 13.5976971,6.26424664 C13.6309667,6.56842629 13.6547308,6.87260593 13.6357196,7.17678557 C13.5976971,7.72335837 13.6262139,8.27468397 13.6167083,8.82125677 C13.6167083,9.03513308 13.6214611,9.24900939 13.6452252,9.46763851 L13.6452252,9.46763851 L13.6452252,9.59121149 C13.6404724,9.6625036 13.6024499,9.69102044 13.5359106,9.68626763 C13.526405,9.68626763 13.5121466,9.69102044 13.502641,9.69102044 C13.4836297,9.69577324 13.4598657,9.70527886 13.4408545,9.70052605 C13.3695624,9.68626763 13.2935175,9.69102044 13.2222254,9.69102044 C13.1414276,9.68626763 13.0606299,9.69577324 12.9798322,9.70052605 C12.837248,9.71003166 12.689911,9.71953728 12.542574,9.72429009 C12.4997987,9.72904289 12.4760347,9.70527886 12.4570234,9.6672564 L12.4570234,9.6672564 L12.271664,9.34881834 C12.1195741,9.07315554 11.9532259,8.81175116 11.8201473,8.52658274 L11.8201473,8.52658274 L11.8011361,8.49331309 L11.8011361,8.53608835 C11.7916305,8.81650396 11.777372,9.09216676 11.7821249,9.37258237 C11.7821249,9.4628857 11.777372,9.55318904 11.7726192,9.64349237 C11.7678664,9.71478447 11.729844,9.75280693 11.6585519,9.76231254 L11.6585519,9.76231254 L11.5112149,9.77657096 C11.4066531,9.78607658 11.3068442,9.76231254 11.2070352,9.75280693 L11.2070352,9.75280693 L10.8077994,9.75280693 C10.7555186,9.75280693 10.6747208,9.78132377 10.6557096,9.72429009 C10.646204,9.70527886 10.6414512,9.69102044 10.646204,9.61972833 C10.646204,9.58170588 10.6509568,9.56269465 10.6509568,9.51991939 L10.6509568,9.51991939 L10.6604624,9.31079588 L10.6794736,8.66441414 C10.6889793,8.33171766 10.7032377,7.99902117 10.6937321,7.66632469 C10.6889793,7.45720118 10.6794736,7.24807768 10.669968,7.04370698 C10.669968,7.03420136 10.669968,7.01994294 10.6652152,7.01043733 C10.6319456,6.81081944 10.6366984,6.60644874 10.6557096,6.40207804 C10.6604624,6.39257243 10.6557096,6.37831401 10.6604624,6.36405559 C10.6604624,6.32603313 10.6984849,6.28801068 10.7365073,6.28325787 C10.769777,6.28325787 10.8077994,6.28801068 10.8410691,6.28801068 L10.8410691,6.28801068 L10.8838443,6.28801068 C11.0216757,6.26424664 11.1595071,6.24048261 11.3020914,6.24523541 L11.3020914,6.24523541 L11.458934,6.2357298 C11.5444845,6.23097699 11.630035,6.22622419 11.7155856,6.22622419 C11.729844,6.22622419 11.7488552,6.23097699 11.7631136,6.24048261 C11.7821249,6.25474103 11.8011361,6.25949384 11.8249001,6.25474103 C11.877181,6.24523541 11.9056978,6.25949384 11.9247091,6.30702191 C11.9864956,6.47812295 12.0767989,6.63971839 12.171855,6.79180821 C12.2478999,6.91538119 12.3001808,7.04370698 12.3477089,7.17678557 C12.3952369,7.29085294 12.4475178,7.4001675 12.5093043,7.50948206 L12.5093043,7.50948206 L12.5235627,7.52849329 C12.5235627,7.52849329 12.5283155,7.52849329 12.5330683,7.52374048 L12.5330683,7.52374048 L12.5330683,7.50472925 C12.5330683,7.28134733 12.5330683,7.0579654 12.5283155,6.83458347 C12.5283155,6.69199927 12.5188099,6.55416787 12.5188099,6.41633646 L12.5188099,6.41633646 L12.5188099,6.38781962 C12.5093043,6.30702191 12.5473268,6.24998822 12.6091133,6.20721296 C12.6328773,6.18344892 12.6613941,6.17394331 12.689911,6.17869612 C12.8039783,6.18344892 12.9132929,6.1644377 13.0226075,6.1644377 Z M12,1.36518483 C11.3691932,1.36518483 10.8560545,1.87443384 10.8560545,2.50035449 C10.8560545,2.7121822 10.9139202,2.91435368 11.0223297,3.09018146 C11.3472278,3.06046277 11.6746768,3.04536905 12,3.04536905 C12.3250871,3.04536905 12.6524415,3.06046277 12.977623,3.09027521 C13.0860798,2.91444743 13.1439455,2.7121822 13.1439455,2.50035449 C13.1439455,1.87438696 12.6308068,1.36518483 12,1.36518483 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"history",icon:["24","24",[],"","M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M12,2.05714286 C6.50871163,2.05714286 2.05714286,6.50871163 2.05714286,12 C2.05714286,17.4912884 6.50871163,21.9428571 12,21.9428571 C17.4912884,21.9428571 21.9428571,17.4912884 21.9428571,12 C21.9428571,6.50871163 17.4912884,2.05714286 12,2.05714286 Z M12,5.82857143 C12.5680643,5.82857143 13.0285714,6.28907854 13.0285714,6.85714286 L13.0285714,11.5739518 L17.0130241,15.5584045 C17.4147062,15.9600866 17.4147062,16.611342 17.0130241,17.0130241 C16.611342,17.4147062 15.9600866,17.4147062 15.5584045,17.0130241 L11.2726902,12.7273098 C11.0797956,12.5344153 10.9714286,12.2727941 10.9714286,12 L10.9714286,6.85714286 C10.9714286,6.28907854 11.4319357,5.82857143 12,5.82857143 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file",icon:["24","24",[],"","M6 4h7l6 5v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm6.586 1H6v14h12V9.414L12.586 5zM13 10h3.5a.5.5 0 1 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 1 1 1 0V10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-pdf",icon:["24","24",[],"","M9.833 15.006c-.328.765-.657 1.316-.997 1.619-.35.312-.762.394-1.138.15a1.345 1.345 0 0 1-.358-.322c-.298-.402-.194-.843.165-1.2.228-.227.563-.433.983-.63.226-.106.466-.204.706-.292.142-.358.286-.762.43-1.205a41.787 41.787 0 0 0 .866-3.123c-.435-.563-.75-1.057-.924-1.473-.28-.67-.211-1.242.372-1.494.56-.24 1.047-.086 1.307.391.17.312.234.736.231 1.26a7.96 7.96 0 0 1-.086 1.088c.158.195.33.398.513.606a30.903 30.903 0 0 0 1.73 1.81 14.011 14.011 0 0 0 .863.761c.464-.07.87-.106 1.213-.105.947.002 1.554.319 1.415 1.079-.107.585-.514.888-1.06.834-.365-.036-.781-.224-1.259-.532a8.753 8.753 0 0 1-.538-.38 21.15 21.15 0 0 0-.944.191c-.39.087-.798.188-1.22.3a45.345 45.345 0 0 0-2.27.667zM6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm4.43 8.39c-.07.21-.138.412-.207.606l.055-.016a46.181 46.181 0 0 1 1.608-.459 33.869 33.869 0 0 1 1.538-.37 15.994 15.994 0 0 1-.378-.35 31.732 31.732 0 0 1-1.882-1.98l-.083.32a38.471 38.471 0 0 1-.652 2.248zm-2.157 2.603c.12-.107.248-.279.382-.51a2.35 2.35 0 0 0-.553.37c-.092.092-.09.086-.083.096a.54.54 0 0 0 .138.116c.017.01.025.01.116-.072zm7.434-2.3c-.047 0-.095 0-.146.002.242.132.443.209.585.223.11.011.118.005.146-.145.005-.027-.095-.079-.585-.08zm-5.36-5.49c.065.156.16.334.283.53v-.05c.003-.393-.044-.696-.128-.85-.046-.086-.063-.091-.23-.02-.04.018-.05.092.075.39z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-img",icon:["24","24",[],"","M5 6v12h14V6H5zm0-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm2.4 10.3a.5.5 0 0 1-.8-.6l3-4a.5.5 0 0 1 .754-.054l.579.58 1.765-2.513a.5.5 0 0 1 .83.015l3.891 6a.5.5 0 0 1-.838.544l-3.49-5.379-1.682 2.394a.5.5 0 0 1-.763.067l-.592-.593L7.4 15.3zm.6-4.8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-ppt",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.07 6.96h1.22c.18 0 .353-.013.52-.04a1.21 1.21 0 0 0 .44-.155.844.844 0 0 0 .305-.325c.077-.14.115-.323.115-.55 0-.227-.038-.41-.115-.55a.844.844 0 0 0-.305-.325 1.21 1.21 0 0 0-.44-.155 3.288 3.288 0 0 0-.52-.04h-1.22v2.14zM9.5 8.6h3.22c.447 0 .827.065 1.14.195.313.13.568.302.765.515.197.213.34.457.43.73a2.715 2.715 0 0 1 0 1.695c-.09.277-.233.522-.43.735a2.133 2.133 0 0 1-.765.515c-.313.13-.693.195-1.14.195h-1.65v2.56H9.5V8.6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-word",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm8.77 10.74h-1.56L12 10.88h-.02l-1.19 4.86H9.2L7.31 8.6h1.57l1.13 4.86h.02l1.24-4.86h1.47l1.22 4.92h.02l1.17-4.92h1.54l-1.92 7.14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-zip",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5 0h1v1h-1V5zm1 1h1v1h-1V6zm-1 1h1v1h-1V7zm1 1h1v1h-1V8zm-1 1h1v1h-1V9zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-excel",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.09 7l-2.3-3.4h1.82l1.4 2.28 1.45-2.28h1.72l-2.29 3.41 2.49 3.73h-1.87l-1.56-2.47-1.59 2.47H8.6L11.09 12z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-240",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm1 4.818C4 9.644 4.94 8.8 6.261 8.8c1.272 0 2.182.777 2.182 1.81 0 .76-.45 1.334-1.285 2.178L5.58 14.347v.022h2.96v.932H4.062v-.769L6.407 12.2c.724-.737.923-1.064.923-1.54 0-.526-.473-.946-1.104-.946-.663 0-1.157.468-1.157 1.1v.017H4v-.013zm8.426 4.483v-1.206h-3.18v-.98c.553-1.043 1.264-2.178 2.646-4.187h1.62v4.235h.857v.932h-.856v1.206h-1.087zm-2.146-2.142v.03h2.164V9.773h-.018c-1.029 1.492-1.638 2.433-2.146 3.387zm7.234 2.27c-1.564 0-2.496-1.277-2.496-3.321 0-2.036.941-3.308 2.496-3.308 1.55 0 2.486 1.263 2.486 3.303s-.927 3.326-2.486 3.326zm0-.932c.843 0 1.333-.888 1.333-2.39 0-1.488-.499-2.375-1.333-2.375-.84 0-1.347.896-1.347 2.371 0 1.502.499 2.394 1.347 2.394z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-480",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm3.964 9.269v-1.2H3.8v-.976c.55-1.037 1.257-2.166 2.632-4.166h1.613v4.215h.853v.927h-.853v1.2h-1.08zm-2.136-2.132v.031h2.154V9.767h-.018c-1.024 1.485-1.63 2.421-2.136 3.37zm7.185 2.26c-1.467 0-2.47-.761-2.47-1.842 0-.822.58-1.468 1.442-1.63v-.022c-.72-.185-1.19-.743-1.19-1.433 0-.962.926-1.67 2.218-1.67 1.297 0 2.215.703 2.215 1.674 0 .681-.466 1.235-1.186 1.429v.022c.861.167 1.446.813 1.446 1.63 0 1.085-1.016 1.841-2.475 1.841zm0-.867c.76 0 1.297-.448 1.297-1.059 0-.62-.536-1.063-1.297-1.063-.76 0-1.296.448-1.296 1.063 0 .611.536 1.06 1.296 1.06zm0-2.988c.638 0 1.095-.395 1.095-.94 0-.55-.453-.945-1.095-.945-.646 0-1.098.395-1.098.945 0 .545.452.94 1.098.94zm5.709 3.854c-1.556 0-2.483-1.27-2.483-3.304 0-2.026.936-3.292 2.483-3.292 1.542 0 2.474 1.257 2.474 3.287 0 2.03-.923 3.31-2.474 3.31zm0-.927c.84 0 1.327-.883 1.327-2.377 0-1.481-.497-2.365-1.327-2.365-.835 0-1.34.892-1.34 2.36 0 1.494.496 2.382 1.34 2.382z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-hd",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm2 2.25h1.31v2.976h3.406V8.25h1.31v7.482h-1.31v-3.374H6.31v3.374H5V8.25zm7.597 0H15.7c.573 0 1.069.098 1.488.293.42.196.762.463 1.027.802.266.339.463.735.592 1.19.13.454.194.939.194 1.456a5.3 5.3 0 0 1-.194 1.457 3.43 3.43 0 0 1-.592 1.189 2.765 2.765 0 0 1-1.027.802c-.419.195-.915.293-1.488.293h-3.102V8.25zm1.31 6.413h1.29c.51 0 .927-.068 1.251-.204.325-.136.58-.325.765-.566.185-.241.311-.524.378-.849.066-.325.1-.676.1-1.053 0-.377-.034-.728-.1-1.053a2.043 2.043 0 0 0-.378-.849 1.832 1.832 0 0 0-.765-.566c-.324-.136-.742-.204-1.252-.204h-1.289v5.344z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm5.486 9.759c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C6.635 8.337 7.548 8 8.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397zm7 0c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C13.635 8.337 14.548 8 15.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397z"]}},function(e,t){e.exports={prefix:"cv",iconName:"contract",icon:["24","24",[],"","M8.5 8.5V5H10v5H5V8.5h3.5zm0 7H5V14h5v5H8.5v-3.5zm7-7H19V10h-5V5h1.5v3.5zm0 7V19H14v-5h5v1.5h-3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"full-screen",icon:["24","24",[],"","M6.5 6.5V10H5V5h5v1.5H6.5zm0 11H10V19H5v-5h1.5v3.5zm11-11H14V5h5v5h-1.5V6.5zm0 11V14H19v5h-5v-1.5h3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"mute",icon:["24","24",[],"","M16.733 12.018l-1.57-1.57a.555.555 0 1 1 .785-.785l1.57 1.57 1.57-1.57a.555.555 0 1 1 .785.785l-1.57 1.57 1.57 1.57a.555.555 0 1 1-.785.785l-1.57-1.57-1.57 1.57a.555.555 0 1 1-.785-.785l1.57-1.57zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"next",icon:["24","24",[],"","M16 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11zm-10.86.005a.5.5 0 0 1 .761-.427l9.003 5.5a.5.5 0 0 1 0 .853l-9.003 5.5a.5.5 0 0 1-.76-.426v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play",icon:["24","24",[],"","M7.5 6.505v11l9.002-5.5-9.002-5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play-circle",icon:["24","24",[],"","M0,12 C0,5.372583 5.372583,0 12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 Z M23,12 C23,5.92486775 18.0751322,1 12,1 C5.92486775,1 1,5.92486775 1,12 C1,18.0751322 5.92486775,23 12,23 C18.0751322,23 23,18.0751322 23,12 Z M9,7.49836245 C9,6.94698209 9.38671875,6.74169922 9.84669815,7.02918634 L17.1533018,11.5958137 C17.6209203,11.8880752 17.6132812,12.3666992 17.1533018,12.6541863 L9.84669815,17.2208137 C9.37907967,17.5130752 9,17.2950531 9,16.7516375 L9,7.49836245 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"pause",icon:["24","24",[],"","M8 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 8 17.5v-11zm6 0c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"previous",icon:["24","24",[],"","M5 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 5 17.5v-11zm13.602.005v11a.5.5 0 0 1-.76.426l-9.003-5.5a.5.5 0 0 1 0-.853l9.002-5.5a.5.5 0 0 1 .761.427z"]}},function(e,t){e.exports={prefix:"cv",iconName:"volume",icon:["24","24",[],"","M15.8 11.25c-.137-.815-.44-1.549-.727-2.009a.48.48 0 0 1 .167-.67.507.507 0 0 1 .687.163c.35.56.7 1.41.86 2.359.24 1.439.001 2.866-.866 4.183a.508.508 0 0 1-.691.147.48.48 0 0 1-.15-.674c.724-1.1.922-2.285.72-3.5zm1.86 5.959c1.856-3.7 1.676-7.108 0-10.416a.558.558 0 0 1 .201-.728.483.483 0 0 1 .678.215c1.828 3.61 2.028 7.398.001 11.438a.483.483 0 0 1-.677.218.557.557 0 0 1-.203-.727zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm3.186 5.646l-4.723 5.18-1.683-1.615a.772.772 0 0 0-1.06 0 .7.7 0 0 0 0 1.018l2.25 2.16a.771.771 0 0 0 1.094-.035l5.25-5.76a.7.7 0 0 0-.07-1.016.772.772 0 0 0-1.058.068z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle-o",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm0 1.212a7.737 7.737 0 0 0-5.508 2.28A7.737 7.737 0 0 0 4.212 12c0 2.081.809 4.037 2.28 5.508A7.737 7.737 0 0 0 12 19.788a7.737 7.737 0 0 0 5.508-2.28A7.737 7.737 0 0 0 19.788 12a7.737 7.737 0 0 0-2.28-5.508A7.737 7.737 0 0 0 12 4.212zm3.186 4.434a.772.772 0 0 1 1.058-.068.7.7 0 0 1 .07 1.016l-5.25 5.76a.771.771 0 0 1-1.094.035l-2.25-2.16a.7.7 0 0 1 0-1.018.772.772 0 0 1 1.06 0l1.683 1.616 4.723-5.181z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check",icon:["24","24",[],"","M16.247 7.341a1 1 0 0 1 1.506 1.318l-7 8a1 1 0 0 1-1.46.048l-3-3a1 1 0 0 1 1.414-1.414l2.244 2.244 6.296-7.196z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption-badge",icon:["24","24",[],"","M7.5 5A2.5 2.5 0 0 0 5 7.5v9A2.5 2.5 0 0 0 7.5 19h9a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16.5 5h-9zm0-1h9A3.5 3.5 0 0 1 20 7.5v9a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-9A3.5 3.5 0 0 1 7.5 4zM11 9a.5.5 0 1 1 0 1H9.5A1.5 1.5 0 0 0 8 11.5v1A1.5 1.5 0 0 0 9.5 14H11a.5.5 0 1 1 0 1H9.5A2.5 2.5 0 0 1 7 12.5v-1A2.5 2.5 0 0 1 9.5 9H11zm5 0a.5.5 0 1 1 0 1h-1.5a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 1.5 1.5H16a.5.5 0 1 1 0 1h-1.5a2.5 2.5 0 0 1-2.5-2.5v-1A2.5 2.5 0 0 1 14.5 9H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"question",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zM8.142 9.17c0 .247.103.476.309.687.206.212.46.318.76.318.508 0 .854-.303 1.036-.908.193-.579.428-1.017.707-1.314.278-.297.712-.446 1.302-.446.503 0 .914.147 1.233.442.319.294.478.656.478 1.085 0 .22-.052.423-.157.61a2.305 2.305 0 0 1-.385.51c-.153.153-.4.38-.744.68-.39.342-.701.638-.932.887-.23.25-.415.539-.554.868-.14.33-.209.72-.209 1.17 0 .358.095.629.285.81.19.183.425.274.703.274.536 0 .855-.279.956-.836a12.2 12.2 0 0 1 .133-.55c.03-.104.071-.209.125-.313.053-.105.135-.22.245-.346.11-.126.255-.272.438-.438a48.078 48.078 0 0 0 1.37-1.257c.254-.25.474-.545.658-.888.185-.343.278-.742.278-1.197a2.87 2.87 0 0 0-.486-1.608c-.325-.492-.784-.882-1.378-1.169-.595-.286-1.28-.43-2.057-.43-.836 0-1.567.172-2.194.515s-1.104.775-1.43 1.297c-.327.523-.49 1.038-.49 1.547zm3.868 9.579c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797a1.073 1.073 0 0 0-.793-.324c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"info",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zm-10-.38V15a2.5 2.5 0 0 0 2.5 2.5h.75a1 1 0 0 0 0-2h-.75a.5.5 0 0 1-.5-.5v-3.75a1.75 1.75 0 0 0-1.75-1.75h-.75a1 1 0 1 0 0 2h.5zm.636-3.25c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797A1.073 1.073 0 0 0 11.636 6c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"lock",icon:["24","24",[],"","M7.01 9.5C7.156 5.97 8.87 4 12 4s4.844 1.97 4.99 5.5h1.51a.5.5 0 0 1 .5.5v9.5a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5V10a.5.5 0 0 1 .5-.5h1.51zm2 0h5.98C14.88 7.037 13.932 6 12 6c-1.933 0-2.88 1.037-2.99 3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"verified",icon:["24","24",[],"","M10.407 12.368l-1.22-1.22a.49.49 0 0 0-.698.004l-.583.583a.494.494 0 0 0-.004.697l2.135 2.135c.107.108.25.154.388.142a.488.488 0 0 0 .352-.143l4.362-4.362a.494.494 0 0 0-.004-.698l-.582-.582a.495.495 0 0 0-.698-.004l-3.448 3.448zm7.922-.37l1.437 1.406c.208.194.277.437.208.728a.716.716 0 0 1-.541.531l-1.957.5.551 1.936a.671.671 0 0 1-.197.729.671.671 0 0 1-.73.198l-1.935-.552-.5 1.957a.716.716 0 0 1-.53.541 1.28 1.28 0 0 1-.199.021.686.686 0 0 1-.53-.229L12 18.328l-1.405 1.436c-.195.208-.437.278-.729.208a.696.696 0 0 1-.53-.541l-.5-1.957-1.937.552a.671.671 0 0 1-.728-.198.671.671 0 0 1-.198-.729l.551-1.936-1.957-.5a.716.716 0 0 1-.54-.53c-.07-.292 0-.535.207-.73l1.437-1.405-1.437-1.405c-.208-.194-.277-.437-.208-.729a.716.716 0 0 1 .541-.53l1.957-.5-.551-1.936a.671.671 0 0 1 .198-.73.671.671 0 0 1 .728-.197l1.936.552.5-1.957a.675.675 0 0 1 .531-.531.671.671 0 0 1 .729.198L12 5.68l1.405-1.447a.697.697 0 0 1 .73-.198c.284.07.46.246.53.53l.5 1.958L17.1 5.97a.671.671 0 0 1 .729.198.671.671 0 0 1 .197.729l-.551 1.936 1.957.5a.715.715 0 0 1 .541.53c.07.292 0 .535-.208.73l-1.437 1.404z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning-o",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 5L3.5 19h17L12 5zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm.75-3.677a.689.689 0 0 1-.7.677.689.689 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677.387 0 .7.303.7.677v5.646z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm.75-3.677V8.677a.689.689 0 0 0-.7-.677c-.387 0-.7.303-.7.677v5.646c0 .374.313.677.7.677.387 0 .7-.303.7-.677z"]}},function(e,t,n){const{noopTest:r,edit:i,merge:a}=n(13),o={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};o.def=i(o.def).replace("label",o._label).replace("title",o._title).getRegex(),o.bullet=/(?:[*+-]|\d{1,9}\.)/,o.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,o.item=i(o.item,"gm").replace(/bull/g,o.bullet).getRegex(),o.list=i(o.list).replace(/bull/g,o.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+o.def.source+")").getRegex(),o._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",o._comment=/<!--(?!-?>)[\s\S]*?-->/,o.html=i(o.html,"i").replace("comment",o._comment).replace("tag",o._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),o.paragraph=i(o._paragraph).replace("hr",o.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",o._tag).getRegex(),o.blockquote=i(o.blockquote).replace("paragraph",o.paragraph).getRegex(),o.normal=a({},o),o.gfm=a({},o.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),o.pedantic=a({},o.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",o._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:i(o.normal._paragraph).replace("hr",o.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",o.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const s={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~"};s.em=i(s.em).replace(/punctuation/g,s._punctuation).getRegex(),s._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,s._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,s._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,s.autolink=i(s.autolink).replace("scheme",s._scheme).replace("email",s._email).getRegex(),s._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,s.tag=i(s.tag).replace("comment",o._comment).replace("attribute",s._attribute).getRegex(),s._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,s._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,s._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,s.link=i(s.link).replace("label",s._label).replace("href",s._href).replace("title",s._title).getRegex(),s.reflink=i(s.reflink).replace("label",s._label).getRegex(),s.normal=a({},s),s.pedantic=a({},s.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",s._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",s._label).getRegex()}),s.gfm=a({},s.normal,{escape:i(s.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),s.gfm.url=i(s.gfm.url,"i").replace("email",s.gfm._extended_email).getRegex(),s.breaks=a({},s.gfm,{br:i(s.br).replace("{2,}","*").getRegex(),text:i(s.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:o,inline:s}},function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(28),{defaults:i}=n(17),{inline:a}=n(117),{findClosingBracket:o,escape:s}=n(13);e.exports=class e{constructor(e,t){if(this.options=t||i,this.links=e,this.rules=a.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=a.pedantic:this.options.gfm&&(this.options.breaks?this.rules=a.breaks:this.rules=a.gfm)}static get rules(){return a}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,i,a,c,l,u="";for(;t;)if(c=this.rules.escape.exec(t))t=t.substring(c[0].length),u+=s(c[1]);else if(c=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(c[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(c[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(c[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(c[0])&&(this.inRawBlock=!1),t=t.substring(c[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0];else if(c=this.rules.link.exec(t)){const r=o(c[2],"()");if(r>-1){const e=(0===c[0].indexOf("!")?5:4)+c[1].length+r;c[2]=c[2].substring(0,r),c[0]=c[0].substring(0,e).trim(),c[3]=""}t=t.substring(c[0].length),this.inLink=!0,i=c[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),n?(i=n[1],a=n[3]):a=""):a=c[3]?c[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(c,{href:e.escapes(i),title:e.escapes(a)}),this.inLink=!1}else if((c=this.rules.reflink.exec(t))||(c=this.rules.nolink.exec(t))){if(t=t.substring(c[0].length),n=(c[2]||c[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){u+=c[0].charAt(0),t=c[0].substring(1)+t;continue}this.inLink=!0,u+=this.outputLink(c,n),this.inLink=!1}else if(c=this.rules.strong.exec(t))t=t.substring(c[0].length),u+=this.renderer.strong(this.output(c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.em.exec(t))t=t.substring(c[0].length),u+=this.renderer.em(this.output(c[6]||c[5]||c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.code.exec(t))t=t.substring(c[0].length),u+=this.renderer.codespan(s(c[2].trim(),!0));else if(c=this.rules.br.exec(t))t=t.substring(c[0].length),u+=this.renderer.br();else if(c=this.rules.del.exec(t))t=t.substring(c[0].length),u+=this.renderer.del(this.output(c[1]));else if(c=this.rules.autolink.exec(t))t=t.substring(c[0].length),"@"===c[2]?(r=s(this.mangle(c[1])),i="mailto:"+r):(r=s(c[1]),i=r),u+=this.renderer.link(i,null,r);else if(this.inLink||!(c=this.rules.url.exec(t))){if(c=this.rules.text.exec(t))t=t.substring(c[0].length),this.inRawBlock?u+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]):u+=this.renderer.text(s(this.smartypants(c[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===c[2])r=s(c[0]),i="mailto:"+r;else{do{l=c[0],c[0]=this.rules._backpedal.exec(c[0])[0]}while(l!==c[0]);r=s(c[0]),i="www."===c[1]?"http://"+r:r}t=t.substring(c[0].length),u+=this.renderer.link(i,null,r)}return u}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",i=0;for(;i<t;i++)n=e.charCodeAt(i),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},function(e,t,n){var r=n(162);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){"use strict";(function(e){var r=n(6),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(26)(e))},function(e,t){e.exports=f},function(e,t,n){"use strict";e.exports=n(167).default},function(e,t){e.exports=d},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e,t,n){const r=n(180),i=n(181),a=n(28),o=n(120),s=n(119),c=n(118),{merge:l,checkSanitizeDeprecation:u,escape:p}=n(13),{getDefaults:f,changeDefaults:d,defaults:m}=n(17);function h(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=l({},h.defaults,t||{}),u(t);const a=t.highlight;let o,s,c=0;try{o=r.lex(e,t)}catch(e){return n(e)}s=o.length;const p=function(e){if(e)return t.highlight=a,n(e);let r;try{r=i.parse(o,t)}catch(t){e=t}return t.highlight=a,e?n(e):n(null,r)};if(!a||a.length<3)return p();if(delete t.highlight,!s)return p();for(;c<o.length;c++)!function(e){"code"!==e.type?--s||p():a(e.text,e.lang,(function(t,n){return t?p(t):null==n||n===e.text?--s||p():(e.text=n,e.escaped=!0,void(--s||p()))}))}(o[c])}else try{return t=l({},h.defaults,t||{}),u(t),i.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||h.defaults).silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}h.options=h.setOptions=function(e){return l(h.defaults,e),d(h.defaults),h},h.getDefaults=f,h.defaults=m,h.Parser=i,h.parser=i.parse,h.Renderer=a,h.TextRenderer=o,h.Lexer=r,h.lexer=r.lex,h.InlineLexer=s,h.inlineLexer=s.output,h.Slugger=c,h.parse=h,e.exports=h},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t){e.exports=m},function(e,t,n){"use strict";
|
|
2
|
+
/** @license React v0.17.0
|
|
3
|
+
* scheduler.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var r,i,a,o,s;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,l=null,u=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(u,0),e}},p=Date.now();t.unstable_now=function(){return Date.now()-p},r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(u,0))},i=function(e,t){l=setTimeout(e,t)},a=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,m=window.setTimeout,h=window.clearTimeout,g=window.requestAnimationFrame,y=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var b=!1,S=null,E=-1,C=5,O=0;o=function(){return t.unstable_now()>=O},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):C=0<e?Math.floor(1e3/e):33.33};var I=new MessageChannel,j=I.port2;I.port1.onmessage=function(){if(null!==S){var e=t.unstable_now();O=e+C;try{S(!0,e)?j.postMessage(null):(b=!1,S=null)}catch(e){throw j.postMessage(null),e}}else b=!1},r=function(e){S=e,b||(b=!0,j.postMessage(null))},i=function(e,n){E=m((function(){e(t.unstable_now())}),n)},a=function(){h(E),E=-1}}function A(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(!(void 0!==i&&0<L(i,t)))break e;e[r]=t,e[n]=i,n=r}}function T(e){return void 0===(e=e[0])?null:e}function w(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,c=e[s];if(void 0!==o&&0>L(o,n))void 0!==c&&0>L(c,o)?(e[r]=c,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==c&&0>L(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function L(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var k=[],_=[],x=1,P=null,N=3,D=!1,R=!1,F=!1;function M(e){for(var t=T(_);null!==t;){if(null===t.callback)w(_);else{if(!(t.startTime<=e))break;w(_),t.sortIndex=t.expirationTime,A(k,t)}t=T(_)}}function U(e){if(F=!1,M(e),!R)if(null!==T(k))R=!0,r(V);else{var t=T(_);null!==t&&i(U,t.startTime-e)}}function V(e,n){R=!1,F&&(F=!1,a()),D=!0;var r=N;try{for(M(n),P=T(k);null!==P&&(!(P.expirationTime>n)||e&&!o());){var s=P.callback;if(null!==s){P.callback=null,N=P.priorityLevel;var c=s(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof c?P.callback=c:P===T(k)&&w(k),M(n)}else w(k);P=T(k)}if(null!==P)var l=!0;else{var u=T(_);null!==u&&i(U,u.startTime-n),l=!1}return l}finally{P=null,N=r,D=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var c=o.delay;c="number"==typeof c&&0<c?s+c:s,o="number"==typeof o.timeout?o.timeout:B(e)}else o=B(e),c=s;return e={id:x++,callback:n,priorityLevel:e,startTime:c,expirationTime:o=c+o,sortIndex:-1},c>s?(e.sortIndex=c,A(_,e),null===T(k)&&e===T(_)&&(F?a():F=!0,i(U,c-s))):(e.sortIndex=o,A(k,e),R||D||(R=!0,r(V))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_shouldYield=function(){var e=t.unstable_now();M(e);var n=T(k);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<P.expirationTime||o()},t.unstable_requestPaint=z,t.unstable_continueExecution=function(){R||D||(R=!0,r(V))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return T(k)},t.unstable_Profiling=null},function(e,t,n){"use strict";e.exports=n(165)},function(e,t,n){"use strict";
|
|
10
|
+
/** @license React v16.13.1
|
|
11
|
+
* react-is.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,S=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case f:case o:case c:case s:case m:return e;default:switch(e=e&&e.$$typeof){case u:case d:case y:case g:case l:return e;default:return t}}case a:return t}}}function O(e){return C(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=i,t.ForwardRef=d,t.Fragment=o,t.Lazy=y,t.Memo=g,t.Portal=a,t.Profiler=c,t.StrictMode=s,t.Suspense=m,t.isAsyncMode=function(e){return O(e)||C(e)===p},t.isConcurrentMode=O,t.isContextConsumer=function(e){return C(e)===u},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return C(e)===d},t.isFragment=function(e){return C(e)===o},t.isLazy=function(e){return C(e)===y},t.isMemo=function(e){return C(e)===g},t.isPortal=function(e){return C(e)===a},t.isProfiler=function(e){return C(e)===c},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===f||e===c||e===s||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===b||e.$$typeof===S||e.$$typeof===E||e.$$typeof===v)},t.typeOf=C},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=p(a),s=p(n(16)),c=p(n(170)),l=p(n(171)),u=n(179);function p(e){return e&&e.__esModule?e:{default:e}}var f=function(){return!0},d=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return m.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,c.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,i=n.onSuggestionHighlighted,a=n.highlightFirstSuggestion;if(!(0,c.default)(r,e.suggestions)&&r.length>0&&a)this.highlightFirstSuggestion();else if(i){var o=this.getHighlightedSuggestion();o!=t.highlightedSuggestion&&i({suggestion:o})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(i){var a=i.valueBeforeUpDown;return null===t?a=null:null===a&&void 0!==n&&(a=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:a}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,i=n.multiSection,a=n.getSectionSuggestions;return i?a(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,i=r.value,a=r.onChange;t!==i&&a(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,i=n.value;return t.length>0&&r(i)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,a=t.onSuggestionsFetchRequested,s=t.renderSuggestion,c=t.inputProps,p=t.multiSection,d=t.renderSectionTitle,m=t.id,h=t.getSectionSuggestions,g=t.theme,y=t.getSuggestionValue,v=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,S=this.state,E=S.isFocused,C=S.isCollapsed,O=S.highlightedSectionIndex,I=S.highlightedSuggestionIndex,j=S.valueBeforeUpDown,A=v?f:this.props.shouldRenderSuggestions,T=c.value,w=c.onFocus,L=c.onKeyDown,k=this.willRenderSuggestions(this.props),_=v||E&&!C&&k,x=_?n:[],P=r({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=A(T);e.setState({isFocused:!0,isCollapsed:!n}),w&&w(t),n&&a({value:T,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,i=A(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},b?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!i})),i?a({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var i=t.keyCode;switch(i){case 40:case 38:if(C)A(T)&&(a({value:T,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var o=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex,c=void 0;c=null===s?null===j?T:j:e.getSuggestionValueByIndex(o,s),e.updateHighlightedSuggestion(o,s,T),e.maybeCallOnChange(t,c,40===i?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var l=e.getHighlightedSuggestion();if(_&&!v&&e.closeSuggestions(),null!=l){var u=y(l);e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:u,suggestionIndex:I,sectionIndex:O,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:_&&t.preventDefault();var p=_&&!v;if(null===j){if(!p){e.maybeCallOnChange(t,"","escape"),A("")?a({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,j,"escape");p?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}L&&L(t)}}),N={query:this.getQuery()};return o.default.createElement(l.default,{multiSection:p,items:x,renderInputComponent:i,renderItemsContainer:this.renderSuggestionsContainer,renderItem:s,renderItemData:N,renderSectionTitle:d,getSectionItems:h,highlightedSectionIndex:O,highlightedItemIndex:I,inputProps:P,itemProps:this.itemProps,theme:(0,u.mapToAutowhateverTheme)(g),id:m,ref:this.storeAutowhateverRef})}}]),t}(a.Component);d.propTypes={suggestions:s.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:s.default.func,onSuggestionHighlighted:s.default.func,renderInputComponent:s.default.func,renderSuggestionsContainer:s.default.func,getSuggestionValue:s.default.func.isRequired,renderSuggestion:s.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:s.default.func,alwaysRenderSuggestions:s.default.bool,multiSection:s.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:s.default.bool,highlightFirstSuggestion:s.default.bool,theme:s.default.object,id:s.default.string},d.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return o.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:u.defaultTheme,id:"1"};var m=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,i=n.itemIndex;e.updateHighlightedSuggestion(r,i),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,i=r.alwaysRenderSuggestions,a=r.onSuggestionSelected,o=r.onSuggestionsFetchRequested;a&&a(t,n),i?o({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,i=n.focusInputOnSuggestionClick,a=e.getSuggestionIndices(e.findSuggestionElement(t.target)),o=a.sectionIndex,s=a.suggestionIndex,c=e.getSuggestion(o,s),l=e.props.getSuggestionValue(c);e.maybeCallOnChange(t,l,"click"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:l,suggestionIndex:s,sectionIndex:o,method:"click"}),r||e.closeSuggestions(),!0===i?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,i=n.value,a=n.onBlur,o=e.getHighlightedSuggestion(),s=r(i);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),a&&a(e.blurEvent,{highlightedSuggestion:o})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=d},function(e,t,n){"use strict";var r=n(169);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";e.exports=n(172).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=d(o),c=d(n(16)),l=d(n(173)),u=d(n(174)),p=d(n(176)),f=d(n(177));function d(e){return e&&e.__esModule?e:{default:e}}var m={},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,a=t.highlightedSectionIndex,o=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var s="ArrowDown"===e.key?"next":"prev",c=n.sectionIterator[s]([a,o]),l=i(c,2),u=l[0],p=l[1];r.onKeyDown(e,{newHighlightedSectionIndex:u,newHighlightedItemIndex:p});break;default:r.onKeyDown(e,{highlightedSectionIndex:a,highlightedItemIndex:o})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,l.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,i=n.items,a=n.renderItem,o=n.renderItemData,c=n.renderSectionTitle,l=n.highlightedSectionIndex,u=n.highlightedItemIndex,d=n.itemProps;return i.map((function(n,i){var m="react-autowhatever-"+r+"-",h=m+"section-"+i+"-",g=0===i;return s.default.createElement("div",t(h+"container","sectionContainer",g&&"sectionContainerFirst"),s.default.createElement(p.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:h}),s.default.createElement(f.default,{items:e.sectionsItems[i],itemProps:d,renderItem:a,renderItemData:o,sectionIndex:i,highlightedItemIndex:l===i?u:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:m,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,i=n.renderItem,a=n.renderItemData,o=n.highlightedSectionIndex,c=n.highlightedItemIndex,l=n.itemProps;return s.default.createElement(f.default,{items:e,itemProps:l,renderItem:i,renderItemData:a,highlightedItemIndex:null===o?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,i=t.multiSection,a=t.renderInputComponent,o=t.renderItemsContainer,c=t.highlightedSectionIndex,l=t.highlightedItemIndex,u=this.state.isInputFocused,p=i?this.renderSections():this.renderItems(),f=null!==p,d=this.getItemId(c,l),m="react-autowhatever-"+n,h=r({role:"combobox","aria-haspopup":"listbox","aria-owns":m,"aria-expanded":f},e("react-autowhatever-"+n+"-container","container",f&&"containerOpen"),this.props.containerProps),g=a(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":d},e("react-autowhatever-"+n+"-input","input",f&&"inputOpen",u&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),y=o({containerProps:r({id:m,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:p});return s.default.createElement("div",h,g,y)}}]),t}(o.Component);h.propTypes={id:c.default.string,multiSection:c.default.bool,renderInputComponent:c.default.func,renderItemsContainer:c.default.func,items:c.default.array.isRequired,renderItem:c.default.func,renderItemData:c.default.object,renderSectionTitle:c.default.func,getSectionItems:c.default.func,containerProps:c.default.object,inputProps:c.default.object,itemProps:c.default.oneOfType([c.default.object,c.default.func]),highlightedSectionIndex:c.default.number,highlightedItemIndex:c.default.number,theme:c.default.oneOfType([c.default.object,c.default.array])},h.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return s.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return s.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:m,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:m,inputProps:m,itemProps:m,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=h},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var t=e.data,n=e.multiSection;function i(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||o===t[a]-1?null===(a=function(e){for(null===e?e=0:e++;e<t.length&&0===t[e];)e++;return e===t.length?null:e}(a))?[null,null]:[a,0]:[a,o+1]:0===t||o===t-1?[null,null]:null===o?[null,0]:[null,o+1]}return{next:i,prev:function(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||0===o?null===(a=function(e){for(null===e?e=t.length-1:e--;e>=0&&0===t[e];)e--;return-1===e?null:e}(a))?[null,null]:[a,t[a]-1]:[a,o-1]:0===t||0===o?[null,null]:null===o?[null,t-1]:[null,o-1]},isLast:function(e){return null===i(e)[1]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a,o=n(175),s=(a=o)&&a.__esModule?a:{default:a},c=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),a=n[0],o=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var l=n.map((function(e){return a[e]})).filter(c);return"string"==typeof l[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,i(l)):l.join(" ")}:{key:e,style:s.default.apply(void 0,[{}].concat(i(l)))}}},e.exports=t.default},function(e,t,n){"use strict";var r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function a(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter((function(t){return r.call(e,t)}))}e.exports=Object.assign||function(e,t){for(var n,r,o=i(e),s=1;s<arguments.length;s++){n=arguments[s],r=a(Object(n));for(var c=0;c<r.length;c++)o[r[c]]=n[r[c]]}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=c(i),o=c(n(16)),s=c(n(27));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,i=e.sectionKeyPrefix,o=n(t);return o?a.default.createElement("div",r(i+"title","sectionTitle"),o):null}}]),t}(i.Component);p.propTypes={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=u(a),s=u(n(16)),c=u(n(178)),l=u(n(27));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;p(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,i=t.itemProps,a=t.renderItem,s=t.renderItemData,l=t.sectionIndex,u=t.highlightedItemIndex,p=t.getItemId,f=t.theme,d=t.keyPrefix,m=null===l?d:d+"section-"+l+"-",h="function"==typeof i;return o.default.createElement("ul",r({role:"listbox"},f(m+"items-list","itemsList")),n.map((function(t,n){var d=0===n,g=n===u,y=m+"item-"+n,v=h?i({sectionIndex:l,itemIndex:n}):i,b=r({id:p(l,n),"aria-selected":g},f(y,"item",d&&"itemFirst",g&&"itemHighlighted"),v);return g&&(b.ref=e.storeHighlightedItemReference),o.default.createElement(c.default,r({},b,{sectionIndex:l,isHighlighted:g,itemIndex:n,item:t,renderItem:a,renderItemData:s}))})))}}]),t}(a.Component);d.propTypes={items:s.default.array.isRequired,itemProps:s.default.oneOfType([s.default.object,s.default.func]),renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,sectionIndex:s.default.number,highlightedItemIndex:s.default.number,onHighlightedItemChange:s.default.func.isRequired,getItemId:s.default.func.isRequired,theme:s.default.func.isRequired,keyPrefix:s.default.string.isRequired},d.defaultProps={sectionIndex:null},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=l(a),s=l(n(16)),c=l(n(27));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){var e,n,r;u(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:i})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:i})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:i})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:i})},p(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,c.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,i=e.renderItem,a=e.renderItemData,s=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete s.sectionIndex,delete s.itemIndex,"function"==typeof s.onMouseEnter&&(s.onMouseEnter=this.onMouseEnter),"function"==typeof s.onMouseLeave&&(s.onMouseLeave=this.onMouseLeave),"function"==typeof s.onMouseDown&&(s.onMouseDown=this.onMouseDown),"function"==typeof s.onClick&&(s.onClick=this.onClick),o.default.createElement("li",r({role:"option"},s,{ref:this.storeItemReference}),i(n,r({isHighlighted:t},a)))}}]),t}(a.Component);f.propTypes={sectionIndex:s.default.number,isHighlighted:s.default.bool.isRequired,itemIndex:s.default.number.isRequired,item:s.default.any.isRequired,renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,onMouseEnter:s.default.func,onMouseLeave:s.default.func,onMouseDown:s.default.func,onClick:s.default.func},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},function(e,t,n){const{defaults:r}=n(17),{block:i}=n(117),{rtrim:a,splitCells:o,escape:s}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=i.normal,this.options.pedantic?this.rules=i.pedantic:this.options.gfm&&(this.rules=i.gfm)}static get rules(){return i}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,c,l,u,p,f,d,m,h,g,y,v,b,S,E;for(e=e.replace(/^ +$/gm,"");e;)if((c=this.rules.newline.exec(e))&&(e=e.substring(c[0].length),c[0].length>1&&this.tokens.push({type:"space"})),c=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(c[0].length),t&&"paragraph"===t.type?t.text+="\n"+c[0].trimRight():(c=c[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?c:a(c,"\n")}))}else if(c=this.rules.fences.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"code",lang:c[2]?c[2].trim():c[2],text:c[3]||""});else if(c=this.rules.heading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:c[1].length,text:c[2]});else if((c=this.rules.nptable.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),g=0;g<p.align.length;g++)/^ *-+: *$/.test(p.align[g])?p.align[g]="right":/^ *:-+: *$/.test(p.align[g])?p.align[g]="center":/^ *:-+ *$/.test(p.align[g])?p.align[g]="left":p.align[g]=null;for(g=0;g<p.cells.length;g++)p.cells[g]=o(p.cells[g],p.header.length);this.tokens.push(p)}else if(c=this.rules.hr.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"hr"});else if(c=this.rules.blockquote.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"blockquote_start"}),c=c[0].replace(/^ *> ?/gm,""),this.token(c,t),this.tokens.push({type:"blockquote_end"});else if(c=this.rules.list.exec(e)){for(e=e.substring(c[0].length),l=c[2],b=l.length>1,f={type:"list_start",ordered:b,start:b?+l:"",loose:!1},this.tokens.push(f),c=c[0].match(this.rules.item),d=[],n=!1,v=c.length,g=0;g<v;g++)p=c[g],h=p.length,p=p.replace(/^ *([*+-]|\d+\.) */,""),~p.indexOf("\n ")&&(h-=p.length,p=this.options.pedantic?p.replace(/^ {1,4}/gm,""):p.replace(new RegExp("^ {1,"+h+"}","gm"),"")),g!==v-1&&(u=i.bullet.exec(c[g+1])[0],(l.length>1?1===u.length:u.length>1||this.options.smartLists&&u!==l)&&(e=c.slice(g+1).join("\n")+e,g=v-1)),r=n||/\n\n(?!\s*$)/.test(p),g!==v-1&&(n="\n"===p.charAt(p.length-1),r||(r=n)),r&&(f.loose=!0),S=/^\[[ xX]\] /.test(p),E=void 0,S&&(E=" "!==p[1],p=p.replace(/^\[[ xX]\] +/,"")),m={type:"list_item_start",task:S,checked:E,loose:r},d.push(m),this.tokens.push(m),this.token(p,!1),this.tokens.push({type:"list_item_end"});if(f.loose)for(v=d.length,g=0;g<v;g++)d[g].loose=!0;this.tokens.push({type:"list_end"})}else if(c=this.rules.html.exec(e))e=e.substring(c[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===c[1]||"script"===c[1]||"style"===c[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]});else if(t&&(c=this.rules.def.exec(e)))e=e.substring(c[0].length),c[3]&&(c[3]=c[3].substring(1,c[3].length-1)),y=c[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[y]||(this.tokens.links[y]={href:c[2],title:c[3]});else if((c=this.rules.table.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),g=0;g<p.align.length;g++)/^ *-+: *$/.test(p.align[g])?p.align[g]="right":/^ *:-+: *$/.test(p.align[g])?p.align[g]="center":/^ *:-+ *$/.test(p.align[g])?p.align[g]="left":p.align[g]=null;for(g=0;g<p.cells.length;g++)p.cells[g]=o(p.cells[g].replace(/^ *\| *| *\| *$/g,""),p.header.length);this.tokens.push(p)}else if(c=this.rules.lheading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:"="===c[2].charAt(0)?1:2,text:c[1]});else if(t&&(c=this.rules.paragraph.exec(e)))e=e.substring(c[0].length),this.tokens.push({type:"paragraph",text:"\n"===c[1].charAt(c[1].length-1)?c[1].slice(0,-1):c[1]});else if(c=this.rules.text.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"text",text:c[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens}}},function(e,t,n){const r=n(28),i=n(118),a=n(119),o=n(120),{defaults:s}=n(17),{merge:c,unescape:l}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.token=null,this.options=e||s,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new i}static parse(t,n){return new e(n).parse(t)}parse(e){this.inline=new a(e.links,this.options),this.inlineText=new a(e.links,c({},this.options,{renderer:new o})),this.tokens=e.reverse();let t="";for(;this.next();)t+=this.tok();return t}next(){return this.token=this.tokens.pop(),this.token}peek(){return this.tokens[this.tokens.length-1]||0}parseText(){let e=this.token.text;for(;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)}tok(){let e="";switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{let t,n,r,i,a="";for(r="",t=0;t<this.token.header.length;t++)r+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(a+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=this.token.cells[t],r="",i=0;i<n.length;i++)r+=this.renderer.tablecell(this.inline.output(n[i]),{header:!1,align:this.token.align[i]});e+=this.renderer.tablerow(r)}return this.renderer.table(a,e)}case"blockquote_start":for(e="";"blockquote_end"!==this.next().type;)e+=this.tok();return this.renderer.blockquote(e);case"list_start":{e="";const t=this.token.ordered,n=this.token.start;for(;"list_end"!==this.next().type;)e+=this.tok();return this.renderer.list(e,t,n)}case"list_item_start":{e="";const t=this.token.loose,n=this.token.checked,r=this.token.task;if(this.token.task)if(t)if("text"===this.peek().type){const e=this.peek();e.text=this.renderer.checkbox(n)+" "+e.text}else this.tokens.push({type:"text",text:this.renderer.checkbox(n)});else e+=this.renderer.checkbox(n);for(;"list_item_end"!==this.next().type;)e+=t||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(e,r,n)}case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:{const e='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(e);console.log(e)}}}}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"AppLinkHelper",(function(){return j})),n.d(r,"AppLinkUtility",(function(){return O})),n.d(r,"Application",(function(){return P})),n.d(r,"AppRouter",(function(){return F})),n.d(r,"Behavior",(function(){return M})),n.d(r,"Collection",(function(){return U})),n.d(r,"CollectionView",(function(){return V})),n.d(r,"ComponentCollection",(function(){return V})),n.d(r,"Error",(function(){return L})),n.d(r,"ErrorHelper",(function(){return x})),n.d(r,"SilentError",(function(){return k})),n.d(r,"LayoutView",(function(){return J})),n.d(r,"NestedModel",(function(){return Y})),n.d(r,"Service",(function(){return G})),n.d(r,"Model",(function(){return K})),n.d(r,"View",(function(){return H})),n.d(r,"Component",(function(){return q})),n.d(r,"EventNames",(function(){return g})),n.d(r,"LayoutService",(function(){return W})),n.d(r,"Middleware",(function(){return N})),n.d(r,"LocationUtils",(function(){return v})),n.d(r,"Shell",(function(){return Q}));var i={};n.r(i),n.d(i,"emptyResponse",(function(){return jt})),n.d(i,"getResponse",(function(){return At})),n.d(i,"getFetch",(function(){return Tt})),n.d(i,"fetch",(function(){return wt})),n.d(i,"useGetFetch",(function(){return Lt})),n.d(i,"useGetResponse",(function(){return kt})),n.d(i,"useBasicFetch",(function(){return _t})),n.d(i,"createMiddleware",(function(){return Rt})),n.d(i,"FlightReducer",(function(){return Ut})),n.d(i,"Simulator",(function(){return qt})),n.d(i,"Actions",(function(){return nt})),n.d(i,"RequestStatus",(function(){return rt})),n.d(i,"ajaxRequest",(function(){return st})),n.d(i,"normalize",(function(){return ft})),n.d(i,"denormalize",(function(){return ht}));n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161);var a={UPLOAD_IMAGE:"upload:image"},o={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",SUBJECT_CLASSIFICATIONS:"subject:classifications",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},a),Playlists:Object.assign({PLAYLISTS:"index",SEARCH_PLAYLISTS:"search:playlists",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",EDIT_PLAYLIST_AUDIENCES:"edit:playlist:audiences",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",REMOVE_FROM_SUBJECT:"remove:from:subject"},a),Series:Object.assign({EDIT_SERIES:"edit:series",EDIT_SERIES_VIDEOS:"edit:series:videos",EDIT_SERIES_SUBJECTS:"edit:series:subjects",EDIT_SERIES_AUDIENCES:"edit:series:audiences",LEGACY_EDIT_SERIES:"legacy:edit:series"},a),Videos:Object.assign({EDIT_VIDEO:"edit:video",EDIT_VIDEO_AUDIENCES:"edit:video:audiences",EDIT_VIDEO_SUBJECTS:"edit:video:subjects",EDIT_VIDEO_ALIASES:"edit:video:aliases",LEGACY_EDIT_VIDEO:"legacy:edit:video"},a),DomainOptions:{DOMAIN_OPTIONS:"domain:options",NEW_DOMAIN_OPTION:"new:domain:option",EDIT_DOMAIN_OPTION:"edit:domain:option",DELETE_DOMAIN_OPTION:"delete:domain:option"},People:{PEOPLE:"people",NEW_PERSON:"new:person",EDIT_PERSON:"edit:person"},Companies:{COMPANIES:"companies",NEW_COMPANY:"new:company",EDIT_COMPANY:"edit:company"},Themes:Object.assign({THEMES:"themes",NEW_THEME:"new:theme",EDIT_THEME:"edit:theme",DELETE_THEME:"delete:theme"},a)},s={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",UPDATE_OBJECT_SUBJECTS:"update:object:subjects",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",UPDATE_OBJECT_CLASSIFICATIONS:"update:object:classifications",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",ADD_TO_LEVEL:"add:to:level",REMOVE_FROM_LEVEL:"remove:from:level",UPDATE_OBJECT_LEVELS:"update:object:levels",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",UPDATE_OBJECT_AUDIENCES:"update:object:audiences",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",SERIES_BY_ID:"series:by:id",UPDATE_SERIES:"update:series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image",LOCALE:"locale",PHRASES:"PHRASES"},c={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},l={CURATOR_LAYOUT:"CuratorLayout"},u={COMPANIES:"companies:application",DOMAIN_OPTIONS:"domain:options:application",PEOPLE:"people:application",PLAYLISTS:"playlists:application",SERIES:"series:application",SUBJECTS:"subjects:application",THEMES:"themes:application",VIDEOS:"videos:application"},p={IMAGE_UPLOAD:"image:upload:data:service",SUBJECT:"subject:data:service",USER:"user:data:service",LANGUAGE:"language:data:service"},f={IMAGE_UPLOAD:"ImageUploadDataService",SUBJECT:"SubjectDataService",USER:"UserDataService",LANGUAGE:"LanguageDataService"},d=n(0),m=n(1),h=n(4);const g={SHOW_POPUP:"show:popup",ROUTE:"route",LOCK_NAV:"lock:nav",UNLOCK_NAV:"unlock:nav",NAV_IS_LOCKED:"navigation:islocked",NAV_UNLOCKED_BY_USER:"navigation:unlocked:by:user",ROUTING_START:"routing:start",ROUTING_END:"routing:end",HAS_ACTIVE_ROUTE:"has:active:route",ROUTE_LOOKUP:"route:look:up",URL_CHANGE:"url:change",ERROR:"error",CURRENT_ROUTE:"route:current"},y={SHELL:"global:shell",ALERT:"global:alert",POPUP:"global:popup"},v={GetQuery:()=>v.DeserializeQueryParams(window.location.search.substring(1)),UpdateQuery(e){if(!e)return;const t=v.GetQuery();let n=v.SerializeQueryParams(m.extend(t,e));n&&(n="?"+n),v.UpdateUrl(`${v.GetCurrentPath()}${n}`,null,{replace:!0,trigger:!1})},UpdateUrl(e,t,n){const r=j.buildRoute(e,t);h.history.navigate(r,n),h.Radio.channel(y.SHELL).trigger(g.URL_CHANGE,t,n)},SerializeQueryParams:e=>e?"string"==typeof e?e:$.param(e,!0):"",DeserializeQueryParams:e=>e?m.reduce(e.split("&"),(e,t)=>{const n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)},{}):{},StartHistory(){h.History.started&&h.history.stop(),h.history.start({pushState:!0})},PageLoad(e,t=!1){t?window.open(e,"_blank"):window.location.href=e},Redirect(e,t=!0){const n=()=>t?window.location.replace(e):window.location.href=e;O.hasActiveRoute()?h.Radio.channel(y.SHELL).once("routing:end",n):n()},Reload(e=!0){window.location.reload(e)},GetCurrentPath:()=>window.location.pathname,GetCurrentQueryString:()=>window.location.search,GetCurrentUrl:()=>window.location.href,GetCurrentReferrer:()=>document.referrer,SetPageTitle(e){document.title=e}},b=/((\(\?)?:\w+)|(\*\w+)/,S=/[\(\)]/g,E=/\(\/\)/g,C=/\/$/,O={routingStarted(){h.Radio.channel(y.SHELL).trigger(g.ROUTING_START)},routingEnded(){if(!O.hasActiveRoute())return;h.Radio.channel(y.SHELL).trigger(g.ROUTING_END)},hasActiveRoute:()=>h.Radio.channel(y.SHELL).request(g.HAS_ACTIVE_ROUTE)},I=(e,t={})=>{t.usedHelper=!0;const{application:n,action:r}=e;h.Radio.channel(n).trigger(r,e,t)},j={getHref(e){if(!e)return"";const{application:t,action:n,args:r,params:i}=e;return"/"+h.Radio.channel(y.SHELL).request(g.ROUTE_LOOKUP,`${t}:${n}`,r,i)},buildRoute(e,t){if(!t)return e;let n=t.args,r=t.params;if(m.each(n,t=>{e=e.replace(b,t||"")}),e=(e=(e=e.replace(E,"")).replace(S,"")).replace(C,""),!r)return e;const i=v.SerializeQueryParams(r);return i.length?`${e}?${i}`:e},trigger(e,t){if(!e)return;if(!O.hasActiveRoute())return void I(e,t);h.Radio.channel(y.SHELL).once("routing:end",()=>{I(e,t)})},getCurrentAppLink:()=>h.Radio.channel(y.SHELL).request(g.CURRENT_ROUTE)};var A=n(7);function T(e,t,n,r){let i=e;return"string"==typeof e&&(i=h.Radio.channel(e)),r.call(this,i,t,n)}const w=class{constructor(){this.variables={}}static get Instance(){return this.instance||(this.instance=new this)}get name(){return"EnvironmentVariables"}get isDevelopment(){return this.variables.isDevelopment}get(e){return this.variables[e]}setUpVariables(e){this.variables=e}}.Instance;class L extends Error{constructor(e){super(e)}}class k extends L{get name(){return"SilentError"}}class _ extends Error{get name(){return"CoreError"}}const x={throw(e){if(h.Radio.channel(y.SHELL).trigger(g.ERROR,e),!(e instanceof k||w.isDevelopment))throw e}};class P extends A.Application{constructor(e){super(e),this.mergeOptions(e,[...this.defaultProps,...this.props||[]]),m.result(this,"name")||x.throw(new _("BaseApplication must define a name")),m.result(this,"channelName")||x.throw(new _("BaseApplication must define a channelName")),this.listenTo(this.getGlobalRadioChannel("popup"),g.SHOW_POPUP,this.onShowPopup),this.listenTo(this.getGlobalRadioChannel("alert"),"show:alert",this.onShowAlert)}get defaultProps(){return["shell","layoutService"]}getGlobalRadioChannel(e){const t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||x.throw(new _(`Global channel ${t} does not exist`)),h.Radio.channel(t)}onLoadLayout(){if(this.layoutOptions&&this.layoutOptions.name){var e=m.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(m.extend(this.layoutOptions,{options:e})),this.layout||x.throw(new _(`Layout: ${this.layoutOptions.name} does not exist or was not registered`)),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}onShowPopup(e){this.layout.getRegion("popup")||x.throw(new _("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}onShowAlert(e){const{ctor:t,collection:n}=e,r=this.layout.getRegion("alert");r||x.throw(new _("Your application layout must define an alert region")),r.hasView()||this.layout.showChildView("alert",new t({collection:n}))}setDefaultQueryParams(e){this.defaultQueryParams&&(e=m.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}getAndClearDefaultQueryParams(){const e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class N{use(e){var t;this.go=(t=this.go,(n,r)=>t(n,()=>e(n,r)))}go(e,t){t(e)}}const D=/([A-Z])/g,R=/(^|:)(\w)/gi;class F extends A.AppRouter{constructor(e){super(e),this.bindDisposal(),this.processInternalRoutes(),this.processExternalRoutes(),this.processAppLinks()}bindDisposal(){this.listenTo(y.SHELL,g.ROUTE,e=>{e.application!==this.channelName&&this.destroyApp()})}addRouteLookup(e,t){this.options.shell.addRouteLookup(`${this.channelName}:${e}`,(n,r)=>j.buildRoute(t,{application:this.channelName,action:e,args:n,params:r}))}processInternalRoutes(){m.each(m.keys(this.appRoutes),e=>{const t=this.appRoutes[e],n=this.toEventName(t);this.addRouteLookup(n,e),this.listenTo(this.channelName,n,(t,n)=>{n&&n.usedHelper||x.throw(new _("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(t,{isAppRoute:!0},()=>{const r=m.extend({},this.controller.getAndClearDefaultQueryParams(),t.params);t.params=r,v.UpdateUrl(e,t,n)})})})}processExternalRoutes(){this.externalRoutes&&m.each(m.keys(this.externalRoutes),e=>{const t=this.externalRoutes[e],n=this.toEventName(t);this.addRouteLookup(n,e),this.listenTo(this.channelName,n,(e,t)=>{t&&t.usedHelper||x.throw(new _("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),v.PageLoad(j.getHref(e))})})}processAppLinks(){this.appLinks&&m.each(this.appLinks,e=>{const t=this.toEventName(e);this.listenTo(this.channelName,t,(e,t)=>{t&&t.usedHelper||x.throw(new _("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(e,{isAppRoute:!1})})})}executeRoute(e,t,n){this.validateAppLink(e);const r=this.toMethodName(e.action);O.routingStarted();const i=h.Radio.channel(y.SHELL);if(this.options.shell.isNavLocked())return i.trigger(g.NAV_IS_LOCKED,e),void O.routingEnded();const a=new N;m.each(this.filters,e=>a.use(e)),a.go(e,()=>{i.trigger(g.ROUTE,e,t),this.createApp();const a=this.controller;if(m.isFunction(a[r])||(O.routingEnded(),x.throw(new _(`${r} does not exist on the ${m.result(a,"name")}.`))),!1===a.triggerMethod("before:action"))return a.triggerMethod("action:cancelled"),void O.routingEnded();a.triggerMethod("load:layout"),a[r].apply(a,[...e.args||[],e.params||{}]),m.isFunction(n)&&n(),O.routingEnded()})}createApp(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}destroyApp(){if(!this.controller)return;this.controller.destroy(),delete this.controller}_addAppRoute(e,t,n){this.route(t,n,(...e)=>{const t={application:this.channelName,action:this.toEventName(n),args:e.slice(0,e.length-1),params:v.DeserializeQueryParams(e[e.length-1])};this.executeRoute(t,{isAppRoute:!0},()=>{v.UpdateQuery(m.extend(this.controller.getAndClearDefaultQueryParams(),t.params))})})}toEventName(e){return e.replace(D,":$1").toLowerCase()}toMethodName(e){const t=e.replace(R,(e,t,n)=>n.toUpperCase());return t[0].toLowerCase()+t.slice(1,t.length)}validateAppLink(e){e.application&&e.action||(O.routingEnded(),x.throw(new _("Invalid AppLink")))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class M extends A.Behavior{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class U extends h.Collection{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class V extends A.CollectionView{constructor(e){super(e),m.result(this,"name")||x.throw(new _(`Error: View with cid:${this.cid} requires a name.`))}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class B extends L{get name(){return"DevError"}}class z extends A.View{constructor(e){super(e);const t=[...this.defaultProps,...this.props||[]];this.mergeOptions(e,t),m.result(this,"name")||x.throw(new _(`Error: View with cid:${this.cid} requires a name.`))}get defaultProps(){return["shell","layoutService"]}_setOptions(e){this.options=m.extend({},m.result(this,"defaults"),e)}_setAttributes(e){w.isDevelopment&&m.extend(e,{"cv-classname":this.name}),this.$el.attr(e)}get ui(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage}set ui(e){this.uiStorage=e}get elements(){return null}static AddViewDataExtension(e){z.ViewDataExtensions.push(e)}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}resetClassName(){this.$el.attr("class",m.result(this,"className"))}serializeData(){const e=super.serializeData(),t=m.result(this,"viewOptions"),n=m.extend({},e,{options:t});return z.ViewDataExtensions.length?m.extend(n,...m.map(z.ViewDataExtensions,e=>e instanceof Function?e(this):e)):n}viewOptions(){return this.options}undelegateAppLinks(){this.$el&&this.$el.off(".appLinks"+this.cid)}renderAppLinks(){let e=this.appLinks;e&&(e=this.normalizeUIKeys(e),this.undelegateAppLinks(),m.each(m.keys(e),t=>{let n=t;const r=e[t],i=j.getHref(r);"[this]"===n&&(n=null);const a=n?this.$el.find(t):this.$el;(a.is("a")||a.is("button"))&&(i&&"/"!==i&&a.attr("href",i),this.delegate("click.appLinks"+this.cid,n,(function(e){e.preventDefault(),j.trigger(r)})))}))}hasPartialLoadingRegions(){const e=this;return void 0!==e._hasPartialLoadingRegions||(e._hasPartialLoadingRegions=m.some(e.regions,e=>m.has(e,"partialLoading"))),e._hasPartialLoadingRegions}renderPartialLoading(e){h.Radio.channel(y.SHELL).trigger("render:partial:loading",this,e)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}render(){const e=this;if(e._isDestroyed)return this;let t=this.processRequriedResources(!0);return t&&(t=e.triggerMethod("before:render",this)),!1!==t&&(t=!0),t=t&&this.processRequriedResources(!1),!1===t?(e._partialLoadingRendered||!e.hasPartialLoadingRegions()||(e._partialLoadingRendered=!0,e._reInitRegions(),e._renderTemplate(),e.renderPartialLoading()),this):((e._isRendered||e._partialLoadingRendered)&&e._reInitRegions(),this.setTitle(),e._renderTemplate(),e.bindUIElements(),this.renderAppLinks(),e._partialLoadingRendered=!1,e._isRendered=!0,e.triggerMethod("render",this),this)}processRequriedResources(e){return!0}setTitle(){}}z.ViewDataExtensions=[];class H extends z{constructor(e){super(e),this.boundListeners={},this.resourceInstances={}}processRequriedResources(e){const t=m.keys(this.requiredResources);if(!t.length)return!0;const n=this;let r=!0;return m.each(t,t=>{const i=this.requiredResources[t];if(i.beforeOnBeforeRender!==e)return;const a=i.dataServiceName;this.resourceInstances[a]||(this.resourceInstances[a]=i.getInstance(this)),this.boundListeners[`${a}:${i.eventName}`]||(this.listenTo(this.resourceInstances[a].channelName,i.eventName,this.render),this.boundListeners[`${a}:${i.eventName}`]=!0),n[t]=i.getData(this.resourceInstances[a]),r=r&&!!n[t]}),r}setTitle(){m.isString(this.title)||!1===this.title||x.throw(new B(`Must define a title for ${this.name}.`));h.Radio.channel(y.SHELL).trigger("set:page:title",this.title)}}class q extends z{}class J extends H{constructor(e){super(e)}static getCacheKey(e){x.throw(new B(`Must define getCacheKey for ${this.name}.`))}unmountRegion(e){this.trigger("unmount:"+e)}}class K extends h.Model{mixin(e){const t=this;for(let n in e){if(t.hasOwnProperty(n)){const r=t[n];return void(t[n]=m.extend({},r,e[n]))}t[n]=e[n]}}addValidation(e){this.mixin({validation:e})}validate(e,t){super.validate.call(this,e,t)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Y extends K{set(e,t,n){let r,i;if(null===e)return this;for(r in"object"==typeof e?(i=e,n=t):(i={},i[e]=t),n||(n={}),i)m.has(this.associations,r)&&(i[r]=this.setAssociation(r,i[r],n));return super.set.call(this,i,n)}get(e){var t=e.indexOf(".");if(-1===t)return super.get.call(this,e);const n=e.substr(0,t),r=this.attributes[n];if(!r||!m.isFunction(r.get))return super.get.call(this,e);const i=e.substr(t+1);return r.get(i)}setAssociation(e,t,n){const r=this.associations[e],i=this.attributes[e];if(!m.isFunction(r))return t;if(n.unset)return i&&delete i.parent,delete this[e],i;if(i)return i instanceof K&&i.set(t,n),i instanceof U&&i.set(t,n),n.silent||this.trigger("change:"+e,this,t,n),i;const a=t instanceof K?t:new r(t,{parse:!0});return a.parent=this,this[e]=a,a}toJSON(...e){const t=super.toJSON.apply(this,e);return m.each(this.associations,(e,n)=>{m.has(t,n)&&m.isFunction(t[n].toJSON)?t[n]=t[n].toJSON():t[n]=(new e).toJSON()}),t}toFlatJSON(...e){return m.omit(super.toJSON.apply(this,e),m.keys(this.associations))}}class G extends A.Object{constructor(e){super(e),this.name||x.throw(new _("Your service must be named."))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class W extends A.Object{constructor(e){super(e),this.layouts={},this.requiredRegions=e.requiredRegions}clearLayout(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}registerLayout(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}getLayout(e){const{name:t,options:n={}}=e;this.layouts[t]||x.throw(new _(t+" was not registered as a template."));const r=this.layouts[t].getCacheKey(n);return this.currentLayoutCacheKey===r&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",n),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=r,this.currentLayout=new this.layouts[t](n),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}checkRequiredRegions(e){m.each(this.requiredRegions,t=>{m.has(m.result(e.prototype,"regions"),t)||x.throw(new _(`Layout: ${e.prototype.name} must define an ${t} region.`))})}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Z{constructor(e,t){this.application=e,this.options=t||{}}get Application(){return this.application}get Options(){return this.options}}class Q extends A.Application{initialize(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}bindListeners(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}bindNavLockListeners(){this.listenTo(y.SHELL,g.LOCK_NAV,()=>this.shellState.navLock=!0),this.listenTo(y.SHELL,g.UNLOCK_NAV,()=>this.shellState.navLock=!1)}bindAppLinkListeners(){this.listenTo(y.SHELL,g.ROUTING_START,()=>this.shellState.activeRoute=!0),this.listenTo(y.SHELL,g.ROUTING_END,()=>this.shellState.activeRoute=!1),this.listenTo(y.SHELL,g.ROUTE,e=>this.shellState.currentAppLink=e);const e=h.Radio.channel(y.SHELL);e.reply(g.HAS_ACTIVE_ROUTE,m.bind(this.hasActiveRoute,this)),e.reply(g.CURRENT_ROUTE,()=>this.shellState.currentAppLink)}bindErrorHandlers(){window.addEventListener("error",()=>{O.routingEnded()})}bindErrorListener(){const e=h.Radio.channel(y.SHELL);this.listenTo(e,g.ERROR,this.handleError)}bindRouteLookup(){h.Radio.channel(y.SHELL).reply(g.ROUTE_LOOKUP,(e,t,n)=>this.routeLookup[e]?this.routeLookup[e](t,n):"",this)}addRouteLookup(e,t){this.routeLookup[e]=t}registerApplication(e,t){return this.applications.push(new Z(e,t)),this}getGlobalRadioChannels(){return y}isNavLocked(){return this.shellState.navLock}start(e){e||(e={}),this.runInitializationSteps(this,(t,n)=>{this.runStartUpSteps(this,e,(t,n,r)=>{super.start(e)})})}hasActiveRoute(){return this.shellState.activeRoute}onStart(){m.each(this.applications,e=>{const t={appConstructor:e.Application,shell:this,appOptions:Object.assign({region:"",shell:this,layoutService:this.layoutService},e.Options)};new e.Application.router(t)}),this.bindListeners(),v.StartHistory()}addInitializationStep(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,(n,r)=>t(n,()=>e(n,r))),this}runInitializationSteps(e,t){t(e)}addStartUpStep(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,(n,r,i)=>t(n,r,()=>e(n,r,i))),this}runStartUpSteps(e,t,n){n(e,t)}registerLayout(e,t){return this.layoutService.registerLayout(e,t),this}registerErrorHandler(e,t){return e||x.throw(new _("An error must have a name in order to register a handler for it.")),m.any(this.errorHandlers,t=>t.errorType===e)&&x.throw(new _(`An error handler for ${e.prototype.name} has already been defined.`)),this.errorHandlers.push({errorType:e,handler:t}),this}handleError(e){const t=m.find(this.errorHandlers,t=>e instanceof t.errorType);t&&t.handler&&t.handler(e)}registerStore(e){this.store=e}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}const X={debounce:(e,t,n)=>m.debounce(e,t,n),throttle:(e,t,n)=>m.throttle(e,t,n),isFunction:e=>m.isFunction(e),useIdentity:()=>m.identity,memoize:(e,t)=>m.memoize(e,t)};var ee=n(24),te=n(5);class ne extends J{isReactComponent(e){return d&&d.isValidElement(e)}showChildView(e,t){this.isReactComponent(t)&&this.showChildReactComponent(e,t)}showChildReactComponent(e,t){this.isAttached()?this.renderChildReactComponent(e,t):this.listenToOnce(this,"attach",()=>this.renderChildReactComponent(e,t))}renderChildReactComponent(e,t){const n=this.getRegion(e),r=this.$el.find(n.el);r&&r.length&&(n.trigger("before:show"),ee.render(t,r[0],()=>n.trigger("show")),this.listenToOnce(this,"unmount:"+e,()=>ee.unmountComponentAtNode(r[0])),this.listenToOnce(this,"before:destroy",()=>ee.unmountComponentAtNode(r[0])))}wrapWithStore(e){return d.createElement(te.Provider,{store:this.options.store},e)}}const re="top:nav",ie="left:nav",ae="content",oe="popup",se="alert";var ce=n(121),le=n.n(ce),ue=n(25),pe=n.n(ue);function fe(e){return(fe="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})(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function me(e,t,n){return(me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ve(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ve(e);if(t){var i=ve(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ye(this,n)}}function ye(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(o,e);var t,n,i,a=ge(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).childComponents={},t}return t=o,i=[{key:"getCacheKey",value:function(e){var t="".concat(this.name),n=[];return Object.keys(e).forEach((function(t){n.push("".concat(t,":").concat(e[t]))})),n.length&&(n.sort(),t+=":".concat(n.join(":"))),t}}],(n=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[re],className:pe.a.topNavRegion},leftNav:{component:this.childComponents[ie],className:"py-3 ".concat(pe.a.leftNavRegion)},content:{component:this.childComponents[ae],className:"position-relative container py-3"},popup:{component:this.childComponents[oe]},alert:{component:this.childComponents[se]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){X.isFunction(this.options.getTopNavView)&&(this.childComponents[re]=this.options.getTopNavView(r.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(ie)}},{key:"closePopup",value:function(){this.unsetRegion(oe)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());me(ve(o.prototype),"showChildView",this).call(this,"layout",this.wrapWithStore(d.createElement(Ie,Object.assign({},e))))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return le.a}},{key:"className",get:function(){return"container-fluid ".concat(pe.a.curatorLayout)}}])&&de(t.prototype,n),i&&de(t,i),o}(ne),Se=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ee=function(e){var t=e.className,n=e.children;return d.createElement("div",{className:t},n)},Ce=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},Oe=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,a=e.alert;return d.createElement(d.Fragment,null,d.createElement("div",{className:"position-relative"},!!t.component&&d.createElement(Ee,{className:Ce("top-nav-region",t.className)},t.component),!!n.component&&d.createElement(Ee,{className:Ce("left-nav-region",n.className)},n.component),!!r.component&&d.createElement("div",{className:"content-container"},d.createElement(Ee,{className:Ce("content-region",r.className)},r.component))),!!i.component&&d.createElement(Ee,{className:Ce("popup-region",i.className)},i.component),!!a.component&&d.createElement(Ee,{className:Ce("alert-region",a.className)},a.component))},Ie=function(e){var t=e.provider,n=Se(e,["provider"]);return t?d.createElement(t,null,d.createElement(Oe,Object.assign({},n))):d.createElement(Oe,Object.assign({},n))};function je(e){return(je="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})(e)}function Ae(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Te(e,t)}(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 Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ke(e,t){return(ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pe(e);if(t){var i=Pe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xe(this,n)}}function xe(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ke(e,t)}(o,e);var t,n,i,a=_e(o);function o(){return we(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"initialize",value:function(){this.listenTo(y.SHELL,r.EventNames.ROUTING_END,this.updateNav)}},{key:"updateNav",value:function(){var e=this,t=r.AppLinkHelper.getCurrentAppLink().application;if(t!==this.currentApplication){this.currentApplication=t;var n=this.options.navItemMappings[t];if(n){var i=document.querySelector(this.options.navSelector);i&&i.children&&Ae(i.children).forEach((function(t){var r=t.querySelector("a");r&&(r.classList.remove(e.options.currentItemClassName),r.text===n&&r.classList.add(e.options.currentItemClassName))}))}}}},{key:"name",get:function(){return"CuratorAppNavService"}}])&&Le(t.prototype,n),i&&Le(t,i),o}(r.Service);class De extends G{constructor(e){super(e),m.result(this,"name")||x.throw(new B("Must provide a name when extending BaseDataService")),m.result(this,"channelName")||x.throw(new B("Must provide a channelName for "+m.result(this,"name")));const t=[...this.defaultProps,...this.props||[]];this.dataRequestSignatures={},this.mergeOptions(e,t)}get defaultProps(){return["dataProvider","cache","bootstrapData","defaultErrorHandler","alertService"]}getCursors(e){const t=this.cache.get(e);return t?t.cursors:{}}clearCacheAndGet(e){const{callback:t,errorCallback:n,eventPrefix:r}=e,{syncEvent:i,errorEvent:a}=this.getEventNames(r),o=this.cache.get(r);if(o&&o.openRequest){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),a,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),i,t),m.isFunction(n)&&n()};return this.listenToOnce(this.getChannel(),i,e),void this.listenToOnce(this.getChannel(),a,r)}this.cache.remove(e.eventPrefix),this.get(e)}get(e){const{callback:t,errorCallback:n,eventPrefix:r,resource:i,formatData:a,expiryTime:o,successHandler:s,errorHandler:c,bootstrapName:l}=e,{syncEvent:u,requestEvent:p,successEvent:f,errorEvent:d}=this.getEventNames(r),h=this.getChannel(),g=this.currentTimestamp();this.bootstrapData&&this.bootstrapData[l]&&(this.cacheData(r,this.bootstrapData[l],a,{openRequest:!1,timestamp:g}),delete this.bootstrapData[l]);const y=this.cache.get(r);let v;y&&(v=y.data);const b=y&&y.openRequest,S=this.isExpired(r,o);if(b){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),d,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),u,t),m.isFunction(n)&&n()};this.listenToOnce(h,u,e),this.listenToOnce(h,d,r)}if(this.cache.has(r)&&!S||(h.trigger(p),this.listenToResponse({eventPrefix:r,formatData:a,cacheOptions:{timestamp:g},callback:t,errorCallback:n,successHandler:s,errorHandler:c}),this.cacheData(r,null,null,{openRequest:!0,timestamp:g}),this.dataProvider.read(i,{channel:this.getTransportChannel(),successEvent:f,errorEvent:d})),v&&m.isFunction(t)&&!S&&t(v),v)return v}create(e){const{eventPrefix:t,resource:n,data:r,formatData:i,callback:a,errorCallback:o,invalidationKeys:s,successHandler:c,errorHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:t,formatData:i,invalidationKeys:s,callback:a,errorCallback:o,successHandler:c,errorHandler:l}),this.dataProvider.create(n,r,{channel:m,successEvent:p,errorEvent:f})}update(e){const{data:t,callback:n,errorCallback:r,resource:i,formatData:a,eventPrefix:o,invalidationKeys:s,errorHandler:c,successHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:o,formatData:a,invalidationKeys:s,callback:n,errorCallback:r,successHandler:l,errorHandler:c}),this.dataProvider.update(i,t,{channel:m,successEvent:p,errorEvent:f})}delete(e){const{eventPrefix:t,resource:n,callback:r,errorCallback:i,invalidationKeys:a,successHandler:o,errorHandler:s}=e,{successEvent:c,errorEvent:l}=this.getEventNames(t),u=this.getTransportChannel();this.listenToResponse({eventPrefix:t,invalidationKeys:a,callback:r,errorCallback:i,cacheOptions:{noCache:!0,clearCacheKey:!0},successHandler:o,errorHandler:s}),this.dataProvider.delete(n,{channel:u,successEvent:c,errorEvent:l})}listenToResponse(e){const{eventPrefix:t,formatData:n,callback:r,errorCallback:i,successHandler:a,errorHandler:o,invalidationKeys:s,cacheOptions:c={}}=e,{syncEvent:l,requestEvent:u,successEvent:p,errorEvent:f,successAlertEvent:d,errorAlertEvent:h}=this.getEventNames(t),g=this.getChannel(),y=this.getTransportChannel(),v=this.getAlertChannel();if(m.isFunction(r)&&this.listenToOnce(g,l,r),m.isFunction(i)&&this.listenToOnce(g,f,i),this.stopListening(v,d),this.stopListening(v,h),m.isFunction(a)&&this.listenToOnce(v,d,a),m.isFunction(o)&&this.listenToOnce(v,h,o),!m.isFunction(o)&&!1!==o&&m.isFunction(this.defaultErrorHandler)&&this.listenToOnce(v,h,this.defaultErrorHandler),this.hasRequestSignature(t))return;this.setRequestSignature(t);this.listenTo(y,p,(e,...r)=>{this.stopListening(g,f,i),v.trigger(d,e,...r);const a=c.noCache?this.formatData(e,n):this.cacheData(t,e,n);c.clearCacheKey&&this.cache.remove(t),g.trigger(l,a),s&&s.length&&this.cache.invalidate(s,e=>g.trigger(e+":invalidate"))}),this.listenTo(y,f,(...e)=>{this.stopListening(g,l,r);const n=this.dataProvider.parseError(...e);v.trigger(h,n),g.trigger(f,n),c.noCache||this.cacheData(t,null,null)})}cacheData(e,t,n,r={}){let{openRequest:i=!1,timestamp:a}=r;a||(a=this.currentTimestamp());const o=this.processPagination(t),s=this.formatData(t,n);return this.cache.set(e,{data:s,timestamp:a,cursors:o,openRequest:i}),s}processPagination(e){if(!e)return;const{pagination:t}=e;return t?t.cursors?t.cursors:m.isUndefined(t.offset)||m.isUndefined(t.pageSize)?t.page?this.convertLegacyPaginationToCursors(t):void 0:this.convertOffsetPaginationToCursors(t):void 0}formatData(e,t){return m.isFunction(t)?t(e):e}chain(){const e=[],t=(e,t)=>{m.isFunction(e)&&e(t)},n=(n,i)=>(e.push(()=>{const r=n.callback;n.callback=n=>{t(r,n),t(e.shift())},this[i](n)}),r),r={func:t=>(e.push(()=>{t(e.shift()||(()=>{}))}),r),get:e=>n(e,"get"),create:e=>n(e,"create"),update:e=>n(e,"update"),delete:e=>n(e,"delete"),run(){t(e.shift())}};return r}invalidateCache(e){e&&e.length&&this.cache.invalidate(e)}currentTimestamp(){return(new Date).valueOf()}isExpired(e,t){if(!t)return!1;const n=this.cache.get(e);if(!n||!n.timestamp)return!0;const r=1e3*t;return n.timestamp<this.currentTimestamp()-r}getEventNames(e){return{syncEvent:e+":sync",requestEvent:e+":request",successEvent:e+":success",errorEvent:e+":error",successAlertEvent:e+":success:alert",errorAlertEvent:e+":error:alert"}}getTransportChannel(){return h.Radio.channel(this.channelName+":transport")}getAlertChannel(){return h.Radio.channel(this.channelName+":alert")}setRequestSignature(e){this.dataRequestSignatures[e]=e}hasRequestSignature(e){return!!this.dataRequestSignatures[e]}convertOffsetPaginationToCursors(e){const{offset:t,pageSize:n,totalItems:r}=e,i=r>0&&t<r&&t+n,a=r>0&&t>0&&Math.max(t-n,0);let o={};if(i&&i<r&&(o.next=i.toString()),m.isNumber(a)&&(o.previous=a.toString()),!m.isEmpty(o))return o}convertLegacyPaginationToCursors(e){const{page:t,totalPages:n}=e,r=m.isNumber(t)&&t>0&&t<n&&t+1,i=m.isNumber(t)&&t>1&&t-1;let a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!m.isEmpty(a))return a}}function Re(e){return(Re="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})(e)}function Fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ze(e);if(t){var i=ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Be(this,n)}}function Be(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var He=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ue(e,t)}(a,e);var t,n,r,i=Ve(a);function a(){return Fe(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:s.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return f.IMAGE_UPLOAD}},{key:"channelName",get:function(){return p.IMAGE_UPLOAD}}])&&Me(t.prototype,n),r&&Me(t,r),a}(De);const qe={SHORT:120,STANDARD:600};var Je={dataServiceName:f.USER,dataChannelName:p.USER},$e={getCurrentUserFetchOptions:function(e,t){return Object.assign(Object.assign({},Je),{eventPrefix:s.CURRENT_USER,fetchData:function(e){return e.getCurrentUser()},setData:e,onError:t})}};class Ke{constructor(e){this.value=e}increment(){this.value+=1}decrement(){this.value-=1}getValue(){return this.value}}function Ye(e){return(Ye="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})(e)}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ze(e,t){return(Ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=et(e);if(t){var i=et(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xe(this,n)}}function Xe(e,t){return!t||"object"!==Ye(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ze(e,t)}(a,e);var t,n,r,i=Qe(a);function a(){return Ge(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getLanguageConfig",value:function(e){var t={locale:"en",phrases:{}},n=new Ke(3),r=function(){n.decrement(),n.getValue()>0||e(t)};this.get({resource:"/api/locale",eventPrefix:s.LOCALE,expiryTime:qe.STANDARD,callback:function(e){t.locale=e,r()}}),this.get({resource:"/api/phrases/shared",eventPrefix:"".concat(s.PHRASES,":shared"),expiryTime:qe.STANDARD,callback:function(e){null===e.shared&&(e.shared={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}}),this.get({resource:"/api/phrases/subjects",eventPrefix:"".concat(s.PHRASES,":subjects"),expiryTime:qe.STANDARD,callback:function(e){null===e.subjects&&(e.subjects={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}})}},{key:"name",get:function(){return f.LANGUAGE}},{key:"channelName",get:function(){return p.LANGUAGE}}])&&We(t.prototype,n),r&&We(t,r),a}(De);const nt={API_REQUEST:"API_REQUEST",API_REPONSE:"API_RESPONSE",API_ERROR:"API_ERROR",INVALIDATE:"INVALIDATE",UPDATE:"UPDATE"};var rt,it;function at(e){const{getResponseHeader:t,responseJSON:n,status:r}=e;return{getResponseHeader:t,responseJSON:n,status:r}}!function(e){e.None="None",e.Fetching="Fetching",e.Success="Success",e.Error="Error"}(rt||(rt={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(it||(it={}));const ot=[it.POST,it.PUT];function st(e){const{resource:t,type:n,success:r,error:i,always:a}=e,o={url:t,method:n};ot.includes(n)&&e.data&&(o.data=JSON.stringify(e.data)),$.ajax(o).done((e,t,n)=>{r&&r(e,at(n))}).fail((e,t,n)=>{i&&i(at(e))}).always(()=>{a&&a()})}const ct="id";function lt(e,t={}){const{idAttribute:n=ct,namespace:r=""}=t;return e[n]||x.throw(new B("There was an issue during normalization. Object did not have an id attribute.")),`${r}__${e[n]}`}function ut(e,t,n={}){const{idAttribute:r=ct}=n,i=[];return e.forEach(e=>{e[r]&&i.push(lt(e,n)),pt(e,t,n)}),i}function pt(e,t,n={}){if(e)return Array.isArray(e)?ut(e,t,n):"object"==typeof e?function e(t,n,r={}){const{idAttribute:i=ct}=r,a=Object.assign({},t);if(Object.keys(t).forEach(o=>{const s=t[o];if(s)if(Array.isArray(s)){var c=ut(s,n,r);c.length&&(a[o]=c)}else if("object"==typeof s){var l=e(s,n,r);s[i]?a[o]=lt(s,r):a[o]=l}}),t[i]){const e=lt(t,r);return n[e]=a,e}return a}(e,t,n):e}function ft(e,t){const n={};return{result:pt(e,n,t),entities:n}}const dt={isEmpty:e=>m.isEmpty(e),values:e=>m.values(e),keys:e=>m.keys(e),deepClone:e=>(m.isArray(e)?m.map:m.mapObject)(e,e=>m.isObject(e)||m.isArray(e)?dt.deepClone(e):e),getEnumKeys:e=>Object.keys(e).filter(e=>!(parseInt(e)>=0)),isObject:e=>m.isObject(e),isEqual:(e,t)=>m.isEqual(e,t),omit:(e,t)=>m.omit(e,t)};function mt(e,t,n){if(e){if("string"==typeof e)return function(e,t,n){if(n[e])return n[e];n[e]={};const r=mt(t[e],t,n);return Object.assign(n[e],r),dt.isEmpty(n[e])&&delete n[e],n[e]}(e,t,n);if(Array.isArray(e))return e.map(e=>mt(e,t,n));if("object"==typeof e){const r={};return Object.keys(e).forEach(i=>{r[i]=mt(e[i],t,n)||e[i]}),r}}}function ht(e,t){return mt(e,t,{})}function gt(e,t){return e===t}function yt(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function vt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,n=null,r=null;return function(){return yt(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}function bt(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function St(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=0,o=r.pop(),s=bt(r),c=e.apply(void 0,[function(){return a++,o.apply(null,arguments)}].concat(n)),l=e((function(){for(var e=[],t=s.length,n=0;n<t;n++)e.push(s[n].apply(null,arguments));return c.apply(null,e)}));return l.resultFunc=o,l.dependencies=s,l.recomputations=function(){return a},l.resetRecomputations=function(){return a=0},l}}var Et=St(vt);const Ct={currentTimestamp:()=>(new Date).valueOf(),isExpired(e,t){if(!t)return!1;const n=1e3*t;return e<Ct.currentTimestamp()-n},currentTimeOfDay(e){e||(e=new Date);const t=e.getHours();return t>=12&&t<18?"afternoon":t>=18?"evening":"morning"}};class Ot{constructor(e){this.status=e.status,this.requestTime=e.requestTime,this.cacheDuration=e.cacheDuration,this.data=e.data,this.statusCode=e.statusCode}get shouldFetch(){return this.status===rt.None||this.isExpired}get isExpired(){return Ct.isExpired(this.requestTime,this.cacheDuration)}get isFetching(){return this.status===rt.Fetching}get hasError(){return this.status===rt.Error}get isComplete(){return this.status===rt.Success||this.status===rt.Error}}function It(e,t,n){if(!e||!t)return jt();let r=t.response;return!1!==t.request.normalize&&(r=ht(t.response,n)),new Ot({status:t.status,statusCode:t.statusCode,requestTime:t.timestamp,cacheDuration:t.request.expiryTime,data:r})}function jt(){return new Ot({status:rt.None})}function At(e,t){return It(t,e.flightData.resources[t],e.flightData.entities)}function Tt(e,t){return()=>{wt(e,t)}}function wt(e,t){e({type:nt.API_REQUEST,request:t})}function Lt(e){return Tt(Object(te.useDispatch)(),e)}function kt(e,t){const n=Object(d.useMemo)(()=>{var n;return(null===(n=t)||void 0===n?void 0:n.optimize)?function(e){return St(vt,(e,t)=>{const n=["response","request"];return dt.isEqual(dt.omit(e,n),dt.omit(t,n))})(t=>t.flightData.resources[e],t=>{var n;const r=t.flightData.resources[e];return(null===(n=r)||void 0===n?void 0:n.entityIds)?r.entityIds.reduce((e,n)=>(e[n]=t.flightData.entities[n],e),{}):{}},(t,n)=>It(e,t,n))}(e):function(e){return Et(t=>t.flightData.resources[e],e=>e.flightData.entities,(t,n)=>It(e,t,n))}(e)},[e]);return Object(te.useSelector)(e=>n(e))}function _t(e,t){const n=Object(te.useDispatch)(),r=kt(e&&e.key,t),i=Tt(n,e);return e&&r.shouldFetch&&i(),r}const xt={getMatchingKeyMap(e,t,n){const r=Array.isArray(t)?t:[t];let i=[];return r.forEach(t=>{const n=new RegExp(t,"i"),r=Object.keys(e.resources).filter(e=>n.test(e));i.push(...r)}),n&&(i=i.filter(e=>e!==n)),i.reduce((e,t)=>(e[t]=!0,e),{})}};var Pt;!function(e){e[e.Ok=200]="Ok",e[e.NoContent=204]="NoContent",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.Conflict=409]="Conflict",e[e.InternalServer=500]="InternalServer"}(Pt||(Pt={}));const Nt={isSimulated(e){const t=e;return!!(t.successResponse||t.errorResponse||t.noResponse)},simulateFetchData(e,t){const{success:n,error:r,always:i}=e,a=t;window.setTimeout(()=>{a.noResponse||(a.successResponse?n(a.successResponse(),{status:Pt.Ok,getResponseHeader:e=>""}):a.errorResponse&&r(a.errorResponse()),i())},function(e){const t=e.timeout||300;return t/2+(Math.floor(Math.random()*t/2)+1)}(t))}};var Dt=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Rt(e){const{fetchData:t,bootstrappedData:n,defaultExpiryTime:r}=e,i=Object.freeze({key:null,url:null,type:it.GET,normalize:!0,formatData:e=>e,expiryTime:r});return function(e){return r=>a=>{if(a.type!==nt.API_REQUEST)return void r(a);const o=e.getState(),s=Object.assign({},i,a.request),{success:c,error:l,always:u,formatData:p}=s,f=Dt(s,["success","error","always","formatData"]),d=o.flightData.resources[f.key];if(r(a),d&&d.status===rt.Fetching)return;if(f.bootstrapName&&n[a.request.bootstrapName])return h(n[a.request.bootstrapName]),g(),void delete n[a.request.bootstrapName];const m={resource:f.url,type:f.type,data:f.data,success:h,error:function(t){e.dispatch({type:nt.API_ERROR,errorResponse:t.responseJSON,request:a.request,timestamp:Ct.currentTimestamp(),xhr:t}),l&&l(t)},always:g};return void(Nt.isSimulated(f)?Nt.simulateFetchData(m,f):t(m));function h(t,n){const r=p(t);let i={result:r,entities:{}};if(f.normalize&&(i=ft(r,f.normalizeOptions)),e.dispatch({type:nt.API_REPONSE,result:i.result,entities:i.entities,request:f,timestamp:Ct.currentTimestamp(),xhr:n}),f.updateState){(Array.isArray(f.updateState)?f.updateState:[f.updateState]).forEach(t=>{!function(t){const n=xt.getMatchingKeyMap(o.flightData,t.keys),r=Object.assign({},Object.keys(o.flightData.resources).filter(e=>n[e]).reduce((e,t)=>{const n=o.flightData.resources[t];let r=n.response;return n.request.normalize&&(r=ht(n.response,o.flightData.entities)),e[t]=r,e},{})),i=t.updateData(r);Object.keys(i).forEach(t=>{const n=o.flightData.resources[t],r=i[t];let a={result:r,entities:{}};n.request.normalize&&(a=ft(r,n.request.normalizeOptions)),e.dispatch({type:nt.UPDATE,result:a.result,entities:a.entities,request:n.request})})}(t)})}if(!c)return;let a=i.result;f.normalize&&(a=ht(i.result,Object.assign(Object.assign({},o.flightData.entities),i.entities))),c(a)}function g(){f.invalidationKeys&&e.dispatch({type:nt.INVALIDATE,keys:f.invalidationKeys,request:f}),u&&u()}}}}function Ft(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{e[r]?n[r]=Object.assign(Object.assign({},e[r]),t[r]):n[r]=t[r]}),n}const Mt={resources:{},entities:{}};function Ut(e=Mt,t){switch(t.type){case nt.API_REQUEST:return function(e,t){const n=e.resources[t.request.key];return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Fetching,response:n?n.response:null,entityIds:n?n.entityIds:null}})}}(e,t);case nt.API_REPONSE:return function(e,t){var n;const r=t.entities?Object.keys(t.entities):[];return{entities:Ft(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Success,response:t.result,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status,entityIds:r}})}}(e,t);case nt.API_ERROR:return function(e,t){var n;return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:rt.Error,errorResponse:t.errorResponse,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status}})}}(e,t);case nt.INVALIDATE:return function(e,t){var n;const r=xt.getMatchingKeyMap(e,t.keys,null===(n=t.request)||void 0===n?void 0:n.key);return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),Object.keys(e.resources).filter(e=>r[e]).reduce((t,n)=>{const r=e.resources[n];return t[n]=Object.assign({},r,{status:rt.None}),t},{}))}}(e,t);case nt.UPDATE:return function(e=Mt,t){const n=t.entities?Object.keys(t.entities):[];return{entities:Ft(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:Object.assign(Object.assign({},e.resources[t.request.key]),{request:t.request,response:t.result,entityIds:n})})}}(e,t)}return e}const Vt={first:e=>m.first(e),firstFew:(e,t)=>m.first(e,t),last:e=>m.last(e),lastFew:(e,t)=>m.last(e,t),max:(e,t)=>m.max(e,t),cloneAndReplaceAtIdx(e,t,n,r=null){let i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[...i,...Array(t+1-i.length).fill(r)]),i.splice(t,1,n),i},moveItem(e,t,n){const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},isEmpty:e=>e&&!e.length,findIndex:(e,t)=>m.findIndex(e,t),where:(e,t)=>m.where(e,t),groupBy:(e,t)=>m.groupBy(e,t),flatten:(e,t)=>m.flatten(e,t),intersection:(...e)=>m.intersection(...e),addOrRemove(e,t){const n=e.indexOf(t);return-1===n?e.push(t):e.splice(n,1),e},addOrRemoveImmutable(e,t){const n=e.indexOf(t),r=dt.deepClone(e);return-1===n?[...r,t]:[...r.slice(0,n),...r.slice(n+1)]},sortBy:(e,t)=>m.sortBy(e,t),chunk:(e,t)=>m.chunk(e,t),uniq:e=>m.uniq(e)},Bt="id";function zt(e,t){return localStorage.setItem(e,JSON.stringify(t)),t}function Ht(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}const qt={getAll(e,t){let n=Ht(e);return n&&n.length?n:!n&&t?(t.forEach(t=>qt.create(e,t)),Ht(e)):[]},get(e,t){const n=qt.getAll(e);return n.length?n.find(e=>e[Bt]===t):null},create(e,t){const n=qt.getAll(e),r=Object.assign(Object.assign({},t),{[Bt]:t[Bt]||(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)+1).toString()});return n.push(r),zt(e,n),r},update(e,t){const n=qt.getAll(e);if(!n.length)return t;const r=n.findIndex(e=>e[Bt]===t[Bt]);return n[r]=t,zt(e,n),t},delete(e,t){const n=qt.getAll(e);n.length&&(Array.isArray(t)||(t=[t]),t.forEach(e=>{const t=n.findIndex(t=>t[Bt]===e);n.splice(t,1)}),zt(e,n))},assoc(e,t,n,r,i){const a=Array.isArray(i);let o=a?i:[i];"string"==typeof Vt.first(o)&&(o=qt.getAll(r).filter(e=>o.includes(e.id)));const s=o.map(e=>e.id?e:qt.create(r,e));let c=qt.getAll(e);if(!c.length)return;let l=c.find(e=>e.id===t);return l?(s.forEach(e=>{if(l[n])if(Array.isArray(l[n])){if(l[n].find(t=>t.id===e.id))return;l[n].push(e)}else l[n]=e;else l[n]=a?[e]:e}),c=c.map(e=>e.id!==l.id?e:l),zt(e,c),a?s:Vt.first(s)):void 0},dissoc(e,t,n,r){let i=qt.getAll(e);if(!i.length)return;let a=i.find(e=>e.id===t);if(!a)return;let o=a[n];return o?(Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]),r.forEach(e=>{const t=o.findIndex(t=>t.id===e);o.splice(t,1)}),a[n]=o,i=i.map(e=>e.id!==a.id?e:a),zt(e,i),i):void 0}};var Jt=function(e){var t="/api/master/v2/companies";return e?"".concat(t,"?cursor=").concat(e):t},$t=function(e){return"/api/master/v2/objects/".concat(e)},Kt=function(){return"/api/master/v2/companies"},Yt=function(e){return"/api/master/v2/objects/".concat(e)},Gt="companies",Wt="company",Zt="update:company",Qt=function(e){return{key:"".concat(Gt).concat(e?":".concat(e):""),url:Jt(e)}},Xt=function(e){return{key:"".concat(Wt,":").concat(e),url:$t(e)}},en=function(e,t,n){return{key:Wt,url:Kt(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[Gt]}},tn=function(e,t,n){return{key:"".concat(Zt,":").concat(e),url:Yt(e),data:t,type:it.PUT,always:n}},nn=n(12),rn=n.n(nn),an=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===on}(e)}(e)};var on="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function sn(e,t){return!1!==t.clone&&t.isMergeableObject(e)?ln((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function cn(e,t,n){return e.concat(t).map((function(e){return sn(e,n)}))}function ln(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||cn,n.isMergeableObject=n.isMergeableObject||an;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=sn(e[t],n)})),Object.keys(t).forEach((function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=ln(e[i],t[i],n):r[i]=sn(t[i],n)})),r}(e,t,n):sn(t,n)}ln.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return ln(e,n,t)}),{})};var un=ln,pn=n(6),fn=pn.a.Symbol,dn=Object.prototype,mn=dn.hasOwnProperty,hn=dn.toString,gn=fn?fn.toStringTag:void 0;var yn=function(e){var t=mn.call(e,gn),n=e[gn];try{e[gn]=void 0;var r=!0}catch(e){}var i=hn.call(e);return r&&(t?e[gn]=n:delete e[gn]),i},vn=Object.prototype.toString;var bn=function(e){return vn.call(e)},Sn=fn?fn.toStringTag:void 0;var En=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Sn&&Sn in Object(e)?yn(e):bn(e)};var Cn=function(e,t){return function(n){return e(t(n))}},On=Cn(Object.getPrototypeOf,Object);var In=function(e){return null!=e&&"object"==typeof e},jn=Function.prototype,An=Object.prototype,Tn=jn.toString,wn=An.hasOwnProperty,Ln=Tn.call(Object);var kn=function(e){if(!In(e)||"[object Object]"!=En(e))return!1;var t=On(e);if(null===t)return!0;var n=wn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Tn.call(n)==Ln};var _n=function(){this.__data__=[],this.size=0};var xn=function(e,t){return e===t||e!=e&&t!=t};var Pn=function(e,t){for(var n=e.length;n--;)if(xn(e[n][0],t))return n;return-1},Nn=Array.prototype.splice;var Dn=function(e){var t=this.__data__,n=Pn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Nn.call(t,n,1),--this.size,!0)};var Rn=function(e){var t=this.__data__,n=Pn(t,e);return n<0?void 0:t[n][1]};var Fn=function(e){return Pn(this.__data__,e)>-1};var Mn=function(e,t){var n=this.__data__,r=Pn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Un.prototype.clear=_n,Un.prototype.delete=Dn,Un.prototype.get=Rn,Un.prototype.has=Fn,Un.prototype.set=Mn;var Vn=Un;var Bn=function(){this.__data__=new Vn,this.size=0};var zn=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Hn=function(e){return this.__data__.get(e)};var qn=function(e){return this.__data__.has(e)};var Jn=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var $n,Kn=function(e){if(!Jn(e))return!1;var t=En(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Yn=pn.a["__core-js_shared__"],Gn=($n=/[^.]+$/.exec(Yn&&Yn.keys&&Yn.keys.IE_PROTO||""))?"Symbol(src)_1."+$n:"";var Wn=function(e){return!!Gn&&Gn in e},Zn=Function.prototype.toString;var Qn=function(e){if(null!=e){try{return Zn.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Xn=/^\[object .+?Constructor\]$/,er=Function.prototype,tr=Object.prototype,nr=er.toString,rr=tr.hasOwnProperty,ir=RegExp("^"+nr.call(rr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ar=function(e){return!(!Jn(e)||Wn(e))&&(Kn(e)?ir:Xn).test(Qn(e))};var or=function(e,t){return null==e?void 0:e[t]};var sr=function(e,t){var n=or(e,t);return ar(n)?n:void 0},cr=sr(pn.a,"Map"),lr=sr(Object,"create");var ur=function(){this.__data__=lr?lr(null):{},this.size=0};var pr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},fr=Object.prototype.hasOwnProperty;var dr=function(e){var t=this.__data__;if(lr){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return fr.call(t,e)?t[e]:void 0},mr=Object.prototype.hasOwnProperty;var hr=function(e){var t=this.__data__;return lr?void 0!==t[e]:mr.call(t,e)};var gr=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=lr&&void 0===t?"__lodash_hash_undefined__":t,this};function yr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yr.prototype.clear=ur,yr.prototype.delete=pr,yr.prototype.get=dr,yr.prototype.has=hr,yr.prototype.set=gr;var vr=yr;var br=function(){this.size=0,this.__data__={hash:new vr,map:new(cr||Vn),string:new vr}};var Sr=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Er=function(e,t){var n=e.__data__;return Sr(t)?n["string"==typeof t?"string":"hash"]:n.map};var Cr=function(e){var t=Er(this,e).delete(e);return this.size-=t?1:0,t};var Or=function(e){return Er(this,e).get(e)};var Ir=function(e){return Er(this,e).has(e)};var jr=function(e,t){var n=Er(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ar.prototype.clear=br,Ar.prototype.delete=Cr,Ar.prototype.get=Or,Ar.prototype.has=Ir,Ar.prototype.set=jr;var Tr=Ar;var wr=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!cr||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Tr(r)}return n.set(e,t),this.size=n.size,this};function Lr(e){var t=this.__data__=new Vn(e);this.size=t.size}Lr.prototype.clear=Bn,Lr.prototype.delete=zn,Lr.prototype.get=Hn,Lr.prototype.has=qn,Lr.prototype.set=wr;var kr=Lr;var _r=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},xr=function(){try{var e=sr(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Pr=function(e,t,n){"__proto__"==t&&xr?xr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Nr=Object.prototype.hasOwnProperty;var Dr=function(e,t,n){var r=e[t];Nr.call(e,t)&&xn(r,n)&&(void 0!==n||t in e)||Pr(e,t,n)};var Rr=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),i?Pr(n,s,c):Dr(n,s,c)}return n};var Fr=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Mr=function(e){return In(e)&&"[object Arguments]"==En(e)},Ur=Object.prototype,Vr=Ur.hasOwnProperty,Br=Ur.propertyIsEnumerable,zr=Mr(function(){return arguments}())?Mr:function(e){return In(e)&&Vr.call(e,"callee")&&!Br.call(e,"callee")},Hr=Array.isArray,qr=n(20),Jr=/^(?:0|[1-9]\d*)$/;var $r=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Jr.test(e))&&e>-1&&e%1==0&&e<t};var Kr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Yr={};Yr["[object Float32Array]"]=Yr["[object Float64Array]"]=Yr["[object Int8Array]"]=Yr["[object Int16Array]"]=Yr["[object Int32Array]"]=Yr["[object Uint8Array]"]=Yr["[object Uint8ClampedArray]"]=Yr["[object Uint16Array]"]=Yr["[object Uint32Array]"]=!0,Yr["[object Arguments]"]=Yr["[object Array]"]=Yr["[object ArrayBuffer]"]=Yr["[object Boolean]"]=Yr["[object DataView]"]=Yr["[object Date]"]=Yr["[object Error]"]=Yr["[object Function]"]=Yr["[object Map]"]=Yr["[object Number]"]=Yr["[object Object]"]=Yr["[object RegExp]"]=Yr["[object Set]"]=Yr["[object String]"]=Yr["[object WeakMap]"]=!1;var Gr=function(e){return In(e)&&Kr(e.length)&&!!Yr[En(e)]};var Wr=function(e){return function(t){return e(t)}},Zr=n(10),Qr=Zr.a&&Zr.a.isTypedArray,Xr=Qr?Wr(Qr):Gr,ei=Object.prototype.hasOwnProperty;var ti=function(e,t){var n=Hr(e),r=!n&&zr(e),i=!n&&!r&&Object(qr.a)(e),a=!n&&!r&&!i&&Xr(e),o=n||r||i||a,s=o?Fr(e.length,String):[],c=s.length;for(var l in e)!t&&!ei.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||$r(l,c))||s.push(l);return s},ni=Object.prototype;var ri=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ni)},ii=Cn(Object.keys,Object),ai=Object.prototype.hasOwnProperty;var oi=function(e){if(!ri(e))return ii(e);var t=[];for(var n in Object(e))ai.call(e,n)&&"constructor"!=n&&t.push(n);return t};var si=function(e){return null!=e&&Kr(e.length)&&!Kn(e)};var ci=function(e){return si(e)?ti(e):oi(e)};var li=function(e,t){return e&&Rr(t,ci(t),e)};var ui=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},pi=Object.prototype.hasOwnProperty;var fi=function(e){if(!Jn(e))return ui(e);var t=ri(e),n=[];for(var r in e)("constructor"!=r||!t&&pi.call(e,r))&&n.push(r);return n};var di=function(e){return si(e)?ti(e,!0):fi(e)};var mi=function(e,t){return e&&Rr(t,di(t),e)},hi=n(123);var gi=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var yi=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a};var vi=function(){return[]},bi=Object.prototype.propertyIsEnumerable,Si=Object.getOwnPropertySymbols,Ei=Si?function(e){return null==e?[]:(e=Object(e),yi(Si(e),(function(t){return bi.call(e,t)})))}:vi;var Ci=function(e,t){return Rr(e,Ei(e),t)};var Oi=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Ii=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Oi(t,Ei(e)),e=On(e);return t}:vi;var ji=function(e,t){return Rr(e,Ii(e),t)};var Ai=function(e,t,n){var r=t(e);return Hr(e)?r:Oi(r,n(e))};var Ti=function(e){return Ai(e,ci,Ei)};var wi=function(e){return Ai(e,di,Ii)},Li=sr(pn.a,"DataView"),ki=sr(pn.a,"Promise"),_i=sr(pn.a,"Set"),xi=sr(pn.a,"WeakMap"),Pi=Qn(Li),Ni=Qn(cr),Di=Qn(ki),Ri=Qn(_i),Fi=Qn(xi),Mi=En;(Li&&"[object DataView]"!=Mi(new Li(new ArrayBuffer(1)))||cr&&"[object Map]"!=Mi(new cr)||ki&&"[object Promise]"!=Mi(ki.resolve())||_i&&"[object Set]"!=Mi(new _i)||xi&&"[object WeakMap]"!=Mi(new xi))&&(Mi=function(e){var t=En(e),n="[object Object]"==t?e.constructor:void 0,r=n?Qn(n):"";if(r)switch(r){case Pi:return"[object DataView]";case Ni:return"[object Map]";case Di:return"[object Promise]";case Ri:return"[object Set]";case Fi:return"[object WeakMap]"}return t});var Ui=Mi,Vi=Object.prototype.hasOwnProperty;var Bi=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Vi.call(e,"index")&&(n.index=e.index,n.input=e.input),n},zi=pn.a.Uint8Array;var Hi=function(e){var t=new e.constructor(e.byteLength);return new zi(t).set(new zi(e)),t};var qi=function(e,t){var n=t?Hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Ji=/\w*$/;var $i=function(e){var t=new e.constructor(e.source,Ji.exec(e));return t.lastIndex=e.lastIndex,t},Ki=fn?fn.prototype:void 0,Yi=Ki?Ki.valueOf:void 0;var Gi=function(e){return Yi?Object(Yi.call(e)):{}};var Wi=function(e,t){var n=t?Hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Zi=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Hi(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return qi(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Wi(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return $i(e);case"[object Set]":return new r;case"[object Symbol]":return Gi(e)}},Qi=Object.create,Xi=function(){function e(){}return function(t){if(!Jn(t))return{};if(Qi)return Qi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var ea=function(e){return"function"!=typeof e.constructor||ri(e)?{}:Xi(On(e))};var ta=function(e){return In(e)&&"[object Map]"==Ui(e)},na=Zr.a&&Zr.a.isMap,ra=na?Wr(na):ta;var ia=function(e){return In(e)&&"[object Set]"==Ui(e)},aa=Zr.a&&Zr.a.isSet,oa=aa?Wr(aa):ia,sa={};sa["[object Arguments]"]=sa["[object Array]"]=sa["[object ArrayBuffer]"]=sa["[object DataView]"]=sa["[object Boolean]"]=sa["[object Date]"]=sa["[object Float32Array]"]=sa["[object Float64Array]"]=sa["[object Int8Array]"]=sa["[object Int16Array]"]=sa["[object Int32Array]"]=sa["[object Map]"]=sa["[object Number]"]=sa["[object Object]"]=sa["[object RegExp]"]=sa["[object Set]"]=sa["[object String]"]=sa["[object Symbol]"]=sa["[object Uint8Array]"]=sa["[object Uint8ClampedArray]"]=sa["[object Uint16Array]"]=sa["[object Uint32Array]"]=!0,sa["[object Error]"]=sa["[object Function]"]=sa["[object WeakMap]"]=!1;var ca=function e(t,n,r,i,a,o){var s,c=1&n,l=2&n,u=4&n;if(r&&(s=a?r(t,i,a,o):r(t)),void 0!==s)return s;if(!Jn(t))return t;var p=Hr(t);if(p){if(s=Bi(t),!c)return gi(t,s)}else{var f=Ui(t),d="[object Function]"==f||"[object GeneratorFunction]"==f;if(Object(qr.a)(t))return Object(hi.a)(t,c);if("[object Object]"==f||"[object Arguments]"==f||d&&!a){if(s=l||d?{}:ea(t),!c)return l?ji(t,mi(s,t)):Ci(t,li(s,t))}else{if(!sa[f])return a?t:{};s=Zi(t,f,c)}}o||(o=new kr);var m=o.get(t);if(m)return m;o.set(t,s),oa(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,o))})):ra(t)&&t.forEach((function(i,a){s.set(a,e(i,n,r,a,t,o))}));var h=u?l?wi:Ti:l?keysIn:ci,g=p?void 0:h(t);return _r(g||t,(function(i,a){g&&(i=t[a=i]),Dr(s,a,e(i,n,r,a,t,o))})),s};var la=function(e){return ca(e,4)};var ua=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var pa=function(e){return"symbol"==typeof e||In(e)&&"[object Symbol]"==En(e)};function fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(fa.Cache||Tr),n}fa.Cache=Tr;var da=fa;var ma=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ha=/\\(\\)?/g,ga=function(e){var t=da(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ma,(function(e,n,r,i){t.push(r?i.replace(ha,"$1"):n||e)})),t}));var ya=function(e){if("string"==typeof e||pa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},va=fn?fn.prototype:void 0,ba=va?va.toString:void 0;var Sa=function e(t){if("string"==typeof t)return t;if(Hr(t))return ua(t,e)+"";if(pa(t))return ba?ba.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Ea=function(e){return null==e?"":Sa(e)};var Ca=function(e){return Hr(e)?ua(e,ya):pa(e)?[e]:gi(ga(Ea(e)))};var Oa=function(e,t){},Ia=n(29),ja=n(30),Aa=n.n(ja);var Ta=function(e){return ca(e,5)};function wa(){return(wa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function La(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ka(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function _a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var xa=function(e){return"function"==typeof e},Pa=function(e){return null!==e&&"object"==typeof e},Na=function(e){return String(Math.floor(Number(e)))===e},Da=function(e){return"[object String]"===Object.prototype.toString.call(e)},Ra=function(e){return 0===d.Children.count(e)},Fa=function(e){return Pa(e)&&xa(e.then)};function Ma(e,t,n,r){void 0===r&&(r=0);for(var i=Ca(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function Ua(e,t,n){for(var r=la(e),i=r,a=0,o=Ca(t);a<o.length-1;a++){var s=o[a],c=Ma(e,o.slice(0,a+1));if(c&&(Pa(c)||Array.isArray(c)))i=i[s]=la(c);else{var l=o[a+1];i=i[s]=Na(l)&&Number(l)>=0?[]:{}}}return(0===a?e:i)[o[a]]===n?e:(void 0===n?delete i[o[a]]:i[o[a]]=n,0===a&&void 0===n&&delete r[o[a]],r)}function Va(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],s=e[o];Pa(s)?n.get(s)||(n.set(s,!0),r[o]=Array.isArray(s)?[]:{},Va(s,t,n,r[o])):r[o]=t}return r}var Ba=Object(d.createContext)(void 0),za=Ba.Provider,Ha=Ba.Consumer;function qa(){var e=Object(d.useContext)(Ba);return e||Oa(!1),e}function Ja(e,t){switch(t.type){case"SET_VALUES":return wa({},e,{values:t.payload});case"SET_TOUCHED":return wa({},e,{touched:t.payload});case"SET_ERRORS":return wa({},e,{errors:t.payload});case"SET_STATUS":return wa({},e,{status:t.payload});case"SET_ISSUBMITTING":return wa({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return wa({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return wa({},e,{values:Ua(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return wa({},e,{touched:Ua(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return wa({},e,{errors:Ua(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return wa({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return wa({},e,{touched:Va(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return wa({},e,{isSubmitting:!1});default:return e}}var $a={},Ka={};function Ya(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,a=e.validateOnMount,o=void 0!==a&&a,s=e.isInitialValid,c=e.enableReinitialize,l=void 0!==c&&c,u=e.onSubmit,p=ka(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=wa({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:u},p),m=Object(d.useRef)(f.initialValues),h=Object(d.useRef)(f.initialErrors||$a),g=Object(d.useRef)(f.initialTouched||Ka),y=Object(d.useRef)(f.initialStatus),v=Object(d.useRef)(!1),b=Object(d.useRef)({});Object(d.useEffect)((function(){0}),[]),Object(d.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var S=Object(d.useReducer)(Ja,{values:f.initialValues,errors:f.initialErrors||$a,touched:f.initialTouched||Ka,status:f.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),E=S[0],C=S[1],O=Object(d.useCallback)((function(e,t){return new Promise((function(n,r){var i=f.validate(e,t);null==i?n($a):Fa(i)?i.then((function(e){n(e||$a)}),(function(e){r(e)})):n(i)}))}),[f.validate]),I=Object(d.useCallback)((function(e,t){var n=f.validationSchema,r=xa(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r={});var i=function e(t){var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=String(r);!0===Array.isArray(t[i])?n[i]=t[i].map((function(t){return!0===Array.isArray(t)||kn(t)?e(t):""!==t?t:void 0})):kn(t[i])?n[i]=e(t[i]):n[i]=""!==t[i]?t[i]:void 0}return n}(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){i.then((function(){e($a)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return Ua(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var o=a;Ma(t,o.path)||(t=Ua(t,o.path,o.message))}}return t}(n)):t(n)}))}))}),[f.validationSchema]),j=Object(d.useCallback)((function(e,t){return new Promise((function(n){return n(b.current[e].validate(t))}))}),[]),A=Object(d.useCallback)((function(e){var t=Object.keys(b.current).filter((function(e){return xa(b.current[e].validate)})),n=t.length>0?t.map((function(t){return j(t,Ma(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Ua(e,t[r],n)),e}),{})}))}),[j]),T=Object(d.useCallback)((function(e){return Promise.all([A(e),f.validationSchema?I(e):{},f.validate?O(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return un.all([t,n,r],{arrayMerge:Wa})}))}),[f.validate,f.validationSchema,A,O,I]),w=Qa((function(e){return void 0===e&&(e=E.values),Object(Ia.unstable_runWithPriority)(Ia.LowPriority,(function(){return T(e).then((function(e){return v.current&&C({type:"SET_ERRORS",payload:e}),e}))}))})),L=Qa((function(e){return void 0===e&&(e=E.values),C({type:"SET_ISVALIDATING",payload:!0}),T(e).then((function(e){return v.current&&(C({type:"SET_ISVALIDATING",payload:!1}),rn()(E.errors,e)||C({type:"SET_ERRORS",payload:e})),e}))}));Object(d.useEffect)((function(){o&&!0===v.current&&w(f.initialValues)}),[f.initialValues,o,w]);var k=Object(d.useCallback)((function(e){var t=e&&e.values?e.values:m.current,n=e&&e.errors?e.errors:h.current?h.current:f.initialErrors||{},r=e&&e.touched?e.touched:g.current?g.current:f.initialTouched||{},i=e&&e.status?e.status:y.current?y.current:f.initialStatus;m.current=t,h.current=n,g.current=r,y.current=i,C({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})}),[f.initialErrors,f.initialStatus,f.initialTouched]);Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(m.current,f.initialValues)&&(m.current=f.initialValues,k())}),[l,f.initialValues,k]),Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(h.current,f.initialErrors)&&(h.current=f.initialErrors||$a,C({type:"SET_ERRORS",payload:f.initialErrors||$a}))}),[l,f.initialErrors]),Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(g.current,f.initialTouched)&&(g.current=f.initialTouched||Ka,C({type:"SET_TOUCHED",payload:f.initialTouched||Ka}))}),[l,f.initialTouched]),Object(d.useEffect)((function(){l&&!0===v.current&&!rn()(y.current,f.initialStatus)&&(y.current=f.initialStatus,C({type:"SET_STATUS",payload:f.initialStatus}))}),[l,f.initialStatus,f.initialTouched]);var _=Qa((function(e){if(xa(b.current[e].validate)){var t=Ma(E.values,e),n=b.current[e].validate(t);return Fa(n)?(C({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),C({type:"SET_ISVALIDATING",payload:!1})}))):(C({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return Promise.resolve()})),x=Object(d.useCallback)((function(e,t){var n=t.validate;b.current[e]={validate:n}}),[]),P=Object(d.useCallback)((function(e){delete b.current[e]}),[]),N=Qa((function(e){return C({type:"SET_TOUCHED",payload:e}),i?w(E.values):Promise.resolve()})),D=Object(d.useCallback)((function(e){C({type:"SET_ERRORS",payload:e})}),[]),R=Qa((function(e){return C({type:"SET_VALUES",payload:e}),n?w(e):Promise.resolve()})),F=Object(d.useCallback)((function(e,t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),M=Qa((function(e,t,r){return void 0===r&&(r=!0),C({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),n&&r?w(Ua(E.values,e,t)):Promise.resolve()})),U=Object(d.useCallback)((function(e,t){var n,r=t,i=e;if(!Da(e)){e.persist&&e.persist();var a=e.target,o=a.type,s=a.name,c=a.id,l=a.value,u=a.checked,p=(a.outerHTML,a.options),f=a.multiple;r=t||(s||c),i=/number|range/.test(o)?(n=parseFloat(l),isNaN(n)?"":n):/checkbox/.test(o)?function(e,t,n){if("true"==n||"false"==n)return!!t;if(t&&n)return Array.isArray(e)?e.concat(n):[n];if(!Array.isArray(e))return!e;var r=e.indexOf(n);if(r<0)return e;return e.slice(0,r).concat(e.slice(r+1))}(Ma(E.values,r),u,l):f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(p):l}r&&M(r,i)}),[M,E.values]),V=Object(d.useCallback)((function(e){if(Da(e))return function(t){return U(t,e)};U(e)}),[U]),B=Qa((function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),i&&n?w(E.values):Promise.resolve()})),z=Object(d.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,a=(n.outerHTML,t||(r||i));B(a,!0)}),[B]),H=Object(d.useCallback)((function(e){if(Da(e))return function(t){return z(t,e)};z(e)}),[z]),q=Object(d.useCallback)((function(e){xa(e)?C({type:"SET_FORMIK_STATE",payload:e}):C({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),J=Object(d.useCallback)((function(e){C({type:"SET_STATUS",payload:e})}),[]),$=Object(d.useCallback)((function(e){C({type:"SET_ISSUBMITTING",payload:e})}),[]),K={resetForm:k,validateForm:L,validateField:_,setErrors:D,setFieldError:F,setFieldTouched:B,setFieldValue:M,setStatus:J,setSubmitting:$,setTouched:N,setValues:R,setFormikState:q},Y=Qa((function(){return u(E.values,K)})),G=Qa((function(){return C({type:"SUBMIT_ATTEMPT"}),L().then((function(e){if(0===Object.keys(e).length){var t=Y();if(void 0===t)return;return Promise.resolve(t).then((function(){v.current&&C({type:"SUBMIT_SUCCESS"})})).catch((function(e){if(v.current)throw C({type:"SUBMIT_FAILURE"}),e}))}v.current&&C({type:"SUBMIT_FAILURE"})}))})),W=Qa((function(e){e&&e.preventDefault&&xa(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&xa(e.stopPropagation)&&e.stopPropagation(),G()})),Z=Qa((function(e){if(e&&e.preventDefault&&xa(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&xa(e.stopPropagation)&&e.stopPropagation(),f.onReset){var t=f.onReset(E.values,K);Fa(t)?t.then(k):k()}else k()})),Q=Object(d.useCallback)((function(e){return{value:Ma(E.values,e),error:Ma(E.errors,e),touched:!!Ma(E.touched,e),initialValue:Ma(m.current,e),initialTouched:!!Ma(g.current,e),initialError:Ma(h.current,e)}}),[E.errors,E.touched,E.values]),X=Object(d.useCallback)((function(e){var t=Pa(e),n=t?e.name:e,r=Ma(E.values,n),i={name:n,value:r,onChange:V,onBlur:H};if(t){var a=e.type,o=e.value,s=e.as,c=e.multiple;"checkbox"===a?void 0===o?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(o)),i.value=o):"radio"===a?(i.checked=r===o,i.value=o):"select"===s&&c&&(i.value=i.value||[],i.multiple=!0)}return i}),[H,V,E.values]),ee=Object(d.useMemo)((function(){return!rn()(m.current,E.values)}),[E.values]),te=Object(d.useMemo)((function(){return void 0!==s?ee?E.errors&&0===Object.keys(E.errors).length:!1!==s&&xa(s)?s(f):s:E.errors&&0===Object.keys(E.errors).length}),[s,ee,E.errors,f]);return wa({},E,{initialValues:m.current,initialErrors:h.current,initialTouched:g.current,initialStatus:y.current,handleBlur:H,handleChange:V,handleReset:Z,handleSubmit:W,resetForm:k,setErrors:D,setFormikState:q,setFieldTouched:B,setFieldValue:M,setFieldError:F,setStatus:J,setSubmitting:$,setTouched:N,setValues:R,submitForm:G,validateForm:L,validateField:_,isValid:te,dirty:ee,unregisterField:P,registerField:x,getFieldProps:X,getFieldMeta:Q,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function Ga(e){var t=Ya(e),n=e.component,r=e.children,i=e.render;return Object(d.useEffect)((function(){0}),[]),Object(d.createElement)(za,{value:t},n?Object(d.createElement)(n,t):i?i(t):r?xa(r)?r(t):Ra(r)?null:d.Children.only(r):null)}function Wa(e,t,n){var r=e.slice();return t.forEach((function(t,i){if(void 0===r[i]){var a=!1!==n.clone&&n.isMergeableObject(t);r[i]=a?un(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=un(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var Za="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d.useLayoutEffect:d.useEffect;function Qa(e){var t=Object(d.useRef)(e);return Za((function(){t.current=e})),Object(d.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}function Xa(e){var t=e.validate,n=e.name,r=e.render,i=e.children,a=e.as,o=e.component,s=ka(e,["validate","name","render","children","as","component"]),c=qa(),l=(c.validate,c.validationSchema,ka(c,["validate","validationSchema"]));Object(d.useEffect)((function(){0}),[]);var u=l.registerField,p=l.unregisterField;Object(d.useEffect)((function(){return u(n,{validate:t}),function(){p(n)}}),[u,p,n,t]);var f=l.getFieldProps(wa({name:n},s)),m=l.getFieldMeta(n),h={field:f,form:l};if(r)return r(wa({},h,{meta:m}));if(xa(i))return i(wa({},h,{meta:m}));if(o){if("string"==typeof o){var g=s.innerRef,y=ka(s,["innerRef"]);return Object(d.createElement)(o,wa({ref:g},f,y),i)}return Object(d.createElement)(o,wa({field:f,form:l},s),i)}var v=a||"input";if("string"==typeof v){var b=s.innerRef,S=ka(s,["innerRef"]);return Object(d.createElement)(v,wa({ref:b},f,S),i)}return Object(d.createElement)(v,wa({},f,s),i)}var eo=Object(d.forwardRef)((function(e,t){var n=e.action,r=ka(e,["action"]),i=n||"#",a=qa(),o=a.handleReset,s=a.handleSubmit;return Object(d.createElement)("form",Object.assign({onSubmit:s,ref:t,onReset:o,action:i},r))}));function to(e){var t=function(t){return Object(d.createElement)(Ha,null,(function(n){return n||Oa(!1),Object(d.createElement)(e,Object.assign({},t,{formik:n}))}))},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",Aa()(t,e)}eo.displayName="Form";var no=function(e,t,n){var r=ro(e);return r.splice(t,0,n),r},ro=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(wa({},e,{length:t+1}))}return[]},io=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name,o=i.validateOnChange,s=i.formik,c=s.setFormikState,l=s.validateForm;c((function(n){var i="function"==typeof r?r:e,o="function"==typeof t?t:e;return wa({},n,{values:Ua(n.values,a,e(Ma(n.values,a))),errors:r?Ua(n.errors,a,i(Ma(n.errors,a))):n.errors,touched:t?Ua(n.touched,a,o(Ma(n.touched,a))):n.touched})}),(function(){o&&l()}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(ro(t),[Ta(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=ro(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=ro(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return no(n,e,t)}),(function(t){return no(t,e,null)}),(function(t){return no(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=ro(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(_a(n)),n.pop=n.pop.bind(_a(n)),n}La(t,e);var n=t.prototype;return n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?ro(n):[];return t||(t=r[e]),xa(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=t.formik,s=(o.validate,o.validationSchema,wa({},e,{form:ka(o,["validate","validationSchema"]),name:a}));return n?Object(d.createElement)(n,s):r?r(s):i?"function"==typeof i?i(s):Ra(i)?null:d.Children.only(i):null},t}(d.Component);io.defaultProps={validateOnChange:!0};var ao=to(function(e){function t(){return e.apply(this,arguments)||this}La(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return Ma(this.props.formik.errors,this.props.name)!==Ma(e.formik.errors,this.props.name)||Ma(this.props.formik.touched,this.props.name)!==Ma(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},n.render=function(){var e=this.props,t=e.component,n=e.formik,r=e.render,i=e.children,a=e.name,o=ka(e,["component","formik","render","children","name"]),s=Ma(n.touched,a),c=Ma(n.errors,a);return s&&c?r?xa(r)?r(c):null:i?xa(i)?i(c):null:t?Object(d.createElement)(t,o,c):c:null},t}(d.Component));(function(e){function t(t){var n;n=e.call(this,t)||this;var r=t.render,i=t.children,a=t.component,o=t.as;t.name;return r&&Oa(!1),a&&r&&Oa(!1),o&&i&&xa(i)&&Oa(!1),a&&i&&xa(i)&&Oa(!1),r&&i&&!Ra(i)&&Oa(!1),n}La(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t,n){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):Ma(this.context.values,this.props.name)!==Ma(n.values,this.props.name)||Ma(this.context.errors,this.props.name)!==Ma(n.errors,this.props.name)||Ma(this.context.touched,this.props.name)!==Ma(n.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||this.context.isSubmitting!==n.isSubmitting},n.componentDidMount=function(){this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentDidUpdate=function(e){this.props.name!==e.name&&(this.context.unregisterField(e.name),this.context.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentWillUnmount=function(){this.context.unregisterField(this.props.name)},n.render=function(){var e=this.props,t=(e.validate,e.name),n=e.render,r=e.as,i=e.children,a=e.component,o=(e.shouldUpdate,ka(e,["validate","name","render","as","children","component","shouldUpdate"])),s=this.context,c=(s.validate,s.validationSchema,ka(s,["validate","validationSchema"])),l={value:"radio"===o.type||"checkbox"===o.type?o.value:Ma(s.values,t),name:t,onChange:s.handleChange,onBlur:s.handleBlur},u={field:l,meta:{value:Ma(s.values,t),error:Ma(s.errors,t),touched:!!Ma(s.touched,t),initialValue:Ma(s.initialValues,t),initialTouched:!!Ma(s.initialTouched,t),initialError:Ma(s.initialErrors,t)},form:c};if(n)return n(u);if(xa(i))return i(u);if(a){if("string"==typeof a){var p=o.innerRef,f=ka(o,["innerRef"]);return Object(d.createElement)(a,wa({ref:p},l,f),i)}return Object(d.createElement)(a,wa({field:l,form:s},o),i)}var m=r||"input";if("string"==typeof m){var h=o.innerRef,g=ka(o,["innerRef"]);return Object(d.createElement)(m,wa({ref:h},l,g),i)}return Object(d.createElement)(m,wa({},l,o),i)},t}(d.Component)).contextType=Ba;var oo=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function so(e){const{castInitialValues:t,castValuesOnSubmit:n,initialValues:r,onSubmit:i,resetOnSubmit:a}=e,o=oo(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit","resetOnSubmit"]),s=t&&e.validationSchema?e.validationSchema.cast(function e(t){const n=dt.deepClone(t);return Object.keys(n).forEach(t=>{n.hasOwnProperty(t)&&(dt.isObject(n[t])?n[t]=e(n[t]):null===n[t]&&delete n[t])}),n}(r)):r,c={allowInitialSubmit:e.allowInitialSubmit};return d.createElement(Ga,Object.assign({enableReinitialize:!0},o,{initialValues:s,onSubmit:(t,{setSubmitting:r,resetForm:o})=>{const s=n&&e.validationSchema?e.validationSchema.cast(t):t;i(s,()=>{a&&o(),r(!1)})},initialStatus:c}),X.isFunction(e.children)?t=>e.children(t):d.Children.count(e.children)?e.children:null)}so.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0};var co=n(2),lo=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),uo=n(3);const po={getCustomFormControlClassName(e,t,n,r){let i="form-control";return Ma(t,n)&&Ma(e,n)&&(i+=" is-invalid"),r&&(i+=" "+r),i}};function fo(e){const{values:t}=qa(),n=t[e.fieldName];return"string"!=typeof n?d.createElement(d.Fragment,null):d.createElement("div",{className:"float-right text-muted"},n.length,"/",e.limit)}var mo=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ho(e){const{label:t}=e,n=mo(e,["label"]);return d.createElement(uo.Form.Group,null,d.createElement("div",{className:"custom-control custom-checkbox"},d.createElement(yo,Object.assign({className:"custom-control-input"},n)),d.createElement(uo.Form.Label,{className:"custom-control-label",htmlFor:n.id},t)))}var go=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function yo(e){const{children:t}=e,n=go(e,["children"]);return d.createElement(Xa,Object.assign({},n),X.isFunction(t)?e=>t(e):d.Children.count(t)?t:null)}function vo(e){const{label:t,className:n,showCharacterCounter:r}=e,i=go(e,["label","className","showCharacterCounter"]),{errors:a,touched:o}=qa();return"checkbox"===i.type?d.createElement(ho,Object.assign({},e)):d.createElement(uo.Form.Group,null,!!t&&d.createElement(uo.Form.Label,{htmlFor:i.id},t),d.createElement(yo,Object.assign({className:po.getCustomFormControlClassName(a,o,i.name,n)},i)),!!r&&!!i.maxLength&&d.createElement(fo,{fieldName:i.name,limit:i.maxLength}),d.createElement(ao,{name:i.name},e=>d.createElement(uo.Form.Control.Feedback,{type:"invalid"},e)))}function bo(e){var t;const[n,r]=d.useState(!1);return d.useEffect(()=>{var t;e.isValid&&(e.dirty||(null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit))?r(!0):r(!1)},[e.isValid,null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit,e.dirty,e.values]),d.useEffect(()=>{e.isSubmitting&&r(!1)},[e.isSubmitting]),n}var So=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Eo(e){const{showSpinner:t,children:n}=e,r=So(e,["showSpinner","children"]),i=d.useRef(),[a,o]=d.useState({});return d.useEffect(()=>{const{width:e,height:t}=a;if(e&&t)return;const n=i.current,r=n.offsetHeight,s=n.offsetWidth;r&&s&&o({width:s,height:r})}),d.useEffect(()=>{const{width:e,height:t}=a;if(!e||!t)return;const n=i.current;n.style.width=e+1+"px",n.style.height=t+1+"px"},[a]),d.createElement(uo.Button,Object.assign({ref:i,disabled:t},r),t?d.createElement(uo.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):n)}var Co=n(124),Oo=n(21);const Io="AlertService",jo="LanguageService";const Ao=class extends G{static get Instance(){return this.instance||(this.instance=new this)}get name(){return jo}setConfig(e){this.polyglot=new Co({locale:e.locale,phrases:e.phrases.rootElement||e.phrases}),this.cache={}}getPhrase(e,t,n){const r=`${e}.${t}`;if(this.polyglot||x.throw(new B("LanguageService config must be set.")),!this.polyglot.has(r)){if(!w.isDevelopment){const e=window.trackJs;return e&&e.console.error(`No phrase set for ${r} in language config`),""}x.throw(new B(`No phrase set for ${r} in language config.`))}if(!n||m.isEmpty(n)){const e=this.cache[r];if(e)return e;const t=this.polyglot.t(r);return this.cache[r]=t,t}const i=m.omit(n,"smartCount");let a={};for(let e in i)a[e]=Oo.sanitize(i[e]);m.isNumber(n.smartCount)&&(a.smart_count=n.smartCount);const o=`${r}:${m.values(Object.assign({},a)).join(":")}`,s=this.cache[o];if(s)return s;const c=this.polyglot.t(r,a);return this.cache[o]=c,c}encloseNamespace(e){return(t,n)=>this.getPhrase(e,t,n)}}.Instance,To=d.createContext(""),wo=d.memo((function(e){const{phrase:t,namespace:n,options:r}=e,i=d.useContext(To),a=n||i,o=Ao.getPhrase(a,t,r);return d.createElement("span",{dangerouslySetInnerHTML:{__html:o}})}),(e,t)=>e.namespace===t.namespace&&e.phrase===t.phrase&&dt.isEqual(e.options,t.options));function Lo(e){const t=qa(),n=bo(t);d.useEffect(()=>{function e(e){13===e.keyCode&&n&&t.validateForm().then(e=>{Object.keys(e).length||t.submitForm()})}return window.addEventListener("keypress",e),()=>window.removeEventListener("keypress",e)},[n]);let r="save";return e.isNew&&(r="create"),e.hasNext&&(r="next"),d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},d.createElement(wo,{namespace:"shared.formButtons",phrase:r}))}function ko(e){var t=qa();return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this company",autoFocus:!0}),d.createElement(Lo,{isNew:e.isNew}))}function _o(e){return d.createElement(so,{initialValues:e.company,validationSchema:lo,onSubmit:e.saveCompany},d.createElement(ko,{isNew:!(e.company&&e.company.id)}))}function xo(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(Xt(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(_o,{company:n.data,saveCompany:function(n,r){return i.fetch(t,tn(e.id,n,r))}}))}function Po(){var e=Object(te.useDispatch)();return d.createElement(_o,{saveCompany:function(t,n){i.fetch(e,en(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.Companies.EDIT_COMPANY,args:[e.id]})}),n))}})}var No,Do=n(125);!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)"}(No||(No={}));const Ro={isNumber:e=>Ro.isType(e,"number"),isString:e=>Ro.isType(e,"string"),isType:(e,t)=>typeof e===t};var Fo,Mo=n(14),Uo=n.n(Mo);function Vo(e,t){return dt.isObject(e)&&e.hasOwnProperty(t)&&Ro.isString(e[t])}function Bo(e,t,n){return({value:r})=>{if(r.length||n(),!(r.length<e.activationLength)){if(e.local){const n=X.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(r,e.local):function(e,t,n){const r=e.trim().toLowerCase();return r.length?t.filter(e=>!(!Vo(e,n)||!Ro.isString(e[n]))&&e[n].trim().toLowerCase().includes(r)):[]}(r,e.local,e.valueKey);t(e=>Object.assign(Object.assign({},e),{[Fo.Local]:n}))}e.getRemoteUrl&&function(e,t,n){const r=X.isFunction(e)&&e(t);r&&i.ajaxRequest({resource:r,type:it.GET,success:n,error:()=>{}})}(e.getRemoteUrl,r,n=>t(t=>Object.assign(Object.assign({},t),{[Fo.Remote]:X.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n})))}}}function zo(e,t,n,r,i,a){const o=t=>e[t]||[],s=t?o(Fo.Recent):[],c=o(Fo.Local),l=o(Fo.Remote);let u=[];s.length&&u.push({title:n,data:s});const p=[...c,...l];return Number.isInteger(a)&&u.length>a&&p.slice(0,a),X.isFunction(i)?u.push(...i(p)):u.push({title:r,data:p}),u}function Ho(e){return e.data}function qo(e){if(e.title)return d.createElement("strong",null,e.title)}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote"}(Fo||(Fo={}));const Jo={container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded "+Uo.a.suggestionsContainerOpen,suggestionsList:"list-unstyled m-0",suggestion:"cursor-pointer py-1 px-2",suggestionHighlighted:Uo.a.suggestionHighlighted,sectionContainer:"border-bottom py-1 "+Uo.a.sectionContainer};function $o(e={}){return Object.assign(Jo,e)}var Ko=n(15),Yo=n(32),Go=n.n(Yo),Wo=n(33),Zo=n.n(Wo),Qo=n(34),Xo=n.n(Qo),es=n(35),ts=n.n(es),ns=(n(36),n(37),n(38)),rs=n.n(ns),is=n(39),as=n.n(is),os=n(40),ss=n.n(os),cs=n(41),ls=n.n(cs),us=n(42),ps=n.n(us),fs=n(43),ds=n.n(fs),ms=n(44),hs=n.n(ms),gs=n(45),ys=n.n(gs),vs=n(46),bs=n.n(vs),Ss=n(47),Es=n.n(Ss),Cs=n(48),Os=n.n(Cs),Is=n(49),js=n.n(Is),As=n(50),Ts=n.n(As),ws=n(51),Ls=n.n(ws),ks=n(52),_s=n.n(ks),xs=n(53),Ps=n.n(xs),Ns=n(54),Ds=n.n(Ns),Rs=n(55),Fs=n.n(Rs),Ms=n(56),Us=n.n(Ms),Vs=n(57),Bs=n.n(Vs),zs=(n(58),n(59)),Hs=n.n(zs),qs=n(60),Js=n.n(qs),$s=n(61),Ks=n.n($s),Ys=(n(62),n(63),n(64)),Gs=n.n(Ys),Ws=n(65),Zs=n.n(Ws),Qs=n(66),Xs=n.n(Qs),ec=n(67),tc=n.n(ec),nc=n(68),rc=n.n(nc),ic=n(69),ac=n.n(ic),oc=(n(70),n(71)),sc=n.n(oc),cc=n(72),lc=n.n(cc),uc=n(73),pc=n.n(uc),fc=n(74),dc=n.n(fc),mc=n(75),hc=n.n(mc),gc=n(76),yc=n.n(gc),vc=n(77),bc=n.n(vc),Sc=(n(78),n(79)),Ec=n.n(Sc),Cc=n(80),Oc=n.n(Cc),Ic=n(81),jc=n.n(Ic),Ac=n(82),Tc=n.n(Ac),wc=n(83),Lc=n.n(wc),kc=n(84),_c=n.n(kc),xc=n(85),Pc=n.n(xc),Nc=n(86),Dc=n.n(Nc),Rc=n(87),Fc=n.n(Rc),Mc=n(88),Uc=n.n(Mc),Vc=n(89),Bc=n.n(Vc),zc=n(90),Hc=n.n(zc),qc=n(91),Jc=n.n(qc),$c=(n(92),n(93),n(94),n(95)),Kc=n.n($c),Yc=(n(96),n(97),n(98),n(99),n(100)),Gc=n.n(Yc),Wc=n(101),Zc=n.n(Wc),Qc=(n(102),n(103),n(104),n(105)),Xc=n.n(Qc),el=n(106),tl=n.n(el),nl=n(107),rl=n.n(nl),il=n(108),al=n.n(il),ol=n(109),sl=n.n(ol),cl=n(110),ll=n.n(cl),ul=n(111),pl=n.n(ul),fl=(n(112),n(113),n(114),n(115)),dl=n.n(fl),ml=n(116),hl=n.n(ml);const gl=[Go.a,Xo.a,ts.a,rs.a,ls.a,ps.a,ds.a,hs.a,ss.a,Zo.a,ys.a,bs.a,Es.a,Os.a,js.a,as.a,Ts.a,Ls.a,_s.a,Bs.a,Ps.a,Ds.a,Fs.a,Us.a,Hs.a,Xs.a,Pc.a,Fc.a,Dc.a,Jc.a,Uc.a,Bc.a,Hc.a,dc.a,yc.a,hc.a,Js.a,Ks.a,lc.a,pc.a,sc.a,Gs.a,tc.a,Oc.a,jc.a,rc.a,ac.a,Tc.a,Zs.a,Ec.a,Lc.a,_c.a,bc.a,Gc.a,Zc.a,Kc.a,rl.a,tl.a,Xc.a,al.a,ll.a,sl.a,pl.a,hl.a,dl.a];var yl;!function(e){e.AddToPlaylists="add-to-playlist",e.Caret="caret",e.Delete="delete",e.Edit="edit",e.NoEdit="no-edit",e.Close="close",e.Folder="folder",e.Resources="resources",e.More="more",e.Bell="bell",e.Plus="plus",e.Search="search",e.Share="share",e.Upload="upload",e.Preview="preview",e.CircleCheck="circle-check",e.Down="down",e.Right="right",e.UpDown="up-down",e.ChevronUp="chevron-up",e.ChevronDown="chevron-down",e.ChevronLeft="chevron-left",e.ChevronRight="chevron-right",e.VisibleOff="visible-off",e.VisibleOn="visible-on",e.PublisherArchive="publisher-archive",e.Play="play",e.PlayCircle="play-circle",e.ArrowLeft="arrow-left",e.CheckCircleOutline="check-circle-o",e.CheckCircle="check-circle",e.Check="check",e.Lock="lock",e.Link="link",e.Info="info",e.Question="question",e.Star="star",e.StarOutline="star-o",e.Archive="archive",e.Warning="warning",e.WarningOutline="warning-o",e.NewWindow="new-window",e.File="file",e.FilePDF="file-pdf",e.FileExcel="file-excel",e.FilePowerpoint="file-ppt",e.FileWord="file-word",e.FileImg="file-img",e.FileZip="file-zip",e.Enter="enter",e.Calendar="calendar",e.CloseCaption="close-caption",e.CloseCaptionBadge="close-caption-badge",e.Playlist="playlist",e.Handle="handle",e.Subject="subject",e.Series="series",e.EditClickView="edit-clickview",e.Heart="heart",e.HeartOutline="heart-outline",e.WhiteWave="white-wave",e.Cog="cog",e.Video="video",e.Compass="compass",e.History="history",e.Tag="tag"}(yl||(yl={}));m.extend(Ko.config,{autoReplaceSvg:!1,autoAddCss:!1,familyPrefix:"cv",autoA11y:!0,observeMutations:!1,replacementClass:"cv-svg",keepOriginalSource:!1}),Ko.library.add(...gl);const vl="cv";const bl=class{constructor(){}static get Instance(){return this.instance||(this.instance=new this)}getSvg(e,t={}){const n=this.faIconLookup(e,t),r=this.getIcon(n,t);if(r&&(!r||r.html.length))return r.html.pop()}getIcon(e,t){return Ko.icon(e,t.iconOptions||{})}faIconLookup(e,t){let{prefix:n=vl}=t;return Ko.findIconDefinition({prefix:n,iconName:e})}}.Instance,Sl=yl,El={getRandomInt:(e=1e4)=>Math.floor(Math.random()*Math.floor(e))};function Cl(e){const{title:t,placement:n,trigger:r,children:i}=e;return d.createElement(uo.OverlayTrigger,{placement:n,overlay:d.createElement(uo.Tooltip,{id:`${t}-${El.getRandomInt()}`},t),trigger:r},d.createElement("span",null,i))}Cl.defaultProps={trigger:["hover","click","focus"],placement:"top"};const Ol="d-inline-block svg-container",Il="span";var jl;function Al(e){const{svgName:t,className:n=Ol,tagName:r=Il,size:i=jl.Standard,onClick:a,title:o,tooltipPlacement:s="right"}=e,c=r,l={dangerouslySetInnerHTML:{__html:bl.getSvg(t)},className:`${n} ${i}`,onClick:X.isFunction(a)?a:null};return o?d.createElement(Cl,{title:o,placement:s},d.createElement(c,Object.assign({},l))):d.createElement(c,Object.assign({},l))}!function(e){e.Standard="std",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xlg"}(jl||(jl={}));var Tl=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const wl=e=>{const t="d-inline-block svg-container";return X.isFunction(e)?t+" cursor-pointer":t};function Ll(e){const{onClickSearchIcon:t,searchIconPlacement:n,className:r}=e,i=Tl(e,["onClickSearchIcon","searchIconPlacement","className"]);let a="form-control "+Uo.a.input,o="input-group-text bg-white";"right"===n&&(a+=" border-right-0",o+=" pl-0"),"left"===n&&(a+=" border-left-0",o+=" pr-0"),r&&(a+=" "+r);const s=()=>d.createElement("div",{className:o},d.createElement(Al,{svgName:Sl.Search,size:jl.Small,onClick:t,className:wl(t)}));return d.createElement("div",{className:"input-group"},"left"===n&&d.createElement("div",{className:"input-group-prepend"},d.createElement(s,null)),d.createElement("input",Object.assign({className:a},i)),"right"===n&&d.createElement("div",{className:"input-group-append"},d.createElement(s,null)))}const kl=X.isFunction;function _l(e){const t=(n=e.initialSuggestions,r=e.recentSearches,{[Fo.Recent]:r,[Fo.Local]:n,[Fo.Remote]:[]});var n,r;const[i,a]=d.useState(e.initialQuery||""),[o,s]=d.useState(t),c=function(e){const[t,n]=Object(d.useState)(window.matchMedia(e).matches);return Object(d.useEffect)(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const i=()=>n(r.matches);return r.addListener(i),()=>r.removeListener(i)},[e]),t}(No.XS),l=()=>{s(t)},u=t=>{t.preventDefault(),kl(e.onSubmit)&&e.onSubmit(i)};return d.createElement("form",{onSubmit:u},d.createElement(Do,{suggestions:zo(o,!i,e.recentSearchHeading||Ao.getPhrase("shared.searchBar","recentSearchHeading"),e.suggestionsHeading,e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:Bo(e,s,l),onSuggestionsClearRequested:()=>{e.alwaysRenderSuggestions||l()},onSuggestionSelected:(t,{suggestion:n})=>{e.clearQueryOnSelect&&a(""),e.onSuggestionSelected(n)},getSuggestionValue:t=>e.updateQueryOnSelection?function(e,t){return Vo(t,e)?t[e]:""}(e.valueKey,t):i,renderSuggestion:t=>kl(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return Vo(t,e)?d.createElement(d.Fragment,null,t[e]):d.createElement(d.Fragment,null)}(e.valueKey,t),alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!c,inputProps:{placeholder:e.placeholder||Ao.getPhrase("shared.searchBar","placeholder"),value:i,onChange:(t,{newValue:n})=>{a(n),kl(e.onQueryChange)&&e.onQueryChange(n)},onKeyDown:t=>{8===t.keyCode&&e.onBackspace&&!i&&e.onBackspace()},autoFocus:!!e.autoFocusInput,onClickSearchIcon:!!e.submitOnClickSearchIcon&&u,searchIconPlacement:e.searchIconPlacement},renderInputComponent:Ll,theme:$o(e.theme),multiSection:!0,renderSectionTitle:qo,getSectionSuggestions:Ho}))}function xl(e){const{appLink:t,className:n,children:i,tag:a="a"}=e;if(!t)return d.createElement("span",{className:n||""},i);let o=e.onClick;o||(o=e=>{e.preventDefault(),r.AppLinkHelper.trigger(t)});const s={onClick:o,href:r.AppLinkHelper.getHref(t),className:n};return d.createElement(a,Object.assign({},s),i)}function Pl(e){var t=e.backToName,n=e.appLink;return d.createElement(xl,{appLink:n,className:"d-inline-flex align-items-center"},d.createElement(Al,{svgName:Sl.ArrowLeft,size:jl.Small}),d.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}function Nl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dl(e,t)}(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 Dl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}_l.defaultProps={updateQueryOnSelection:!0,valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialSuggestions:[],searchIconPlacement:"right"};var Rl=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Fl(e){var t=e.selected,n=e.onToggle,r=Rl(e,["selected","onToggle"]),i=Nl(d.useState(t),2),a=i[0],o=i[1];d.useEffect((function(){return o(t)}),[t]);return d.createElement(uo.Form.Check,Object.assign({type:"checkbox",id:"checkbox-".concat(El.getRandomInt()),checked:a,onChange:function(){o(!a),n(!a)}},r))}var Ml,Ul,Vl,Bl,zl=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Hl(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,a=e.error,o=e.touched,s=zl(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),c="custom-file-input cursor-pointer";a&&o&&(c+=" is-invalid");var l=Object.assign({type:"file",className:c,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&X.isFunction(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"custom-file"},d.createElement(Xa,Object.assign({},l,s),e.children),d.createElement(uo.Form.Label,{className:"custom-file-label",htmlFor:s.id},i)))}!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(Ml||(Ml={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners"}(Ul||(Ul={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(Vl||(Vl={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(Bl||(Bl={}));const ql={urlBuilder(e,t){const n=m.map(t,(e,t)=>{if(t&&Array.isArray(e)){return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&")}return t&&void 0!==e?`${t}=${encodeURIComponent(e)}`:""}),r=m.reduce(n,(e,t)=>t?e?`${e}&${t}`:t:e);return r?`${e}?${r}`:e},buildFilter(e){let t=[];if(e.limit&&t.push("limit:"+e.limit),e.cursor&&t.push("page:"+e.cursor),e.before&&t.push("dateCreated:..."+e.before),t.length)return t.join(",")},makeHttps:e=>m.isString(e)?-1===e.indexOf("http://")?e:e=e.replace("http://","https://"):e,safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith("/")||(n+="/"),t?(n+=t.startsWith("/")?t.slice(1):t,n):n}};var Jl;!function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(Jl||(Jl={}));const $l={[Ul.Banners]:Jl.Banner,[Ul.Thumbnails]:Jl.Thumbnail},Kl=e=>"/v1/category-map/"+e,Yl={createUrl:(e,t)=>Yl._createUrl(e,t),createBannerUrl:(e,t,n)=>e&&e.url?Yl._createUrl(e.url,n):Yl._createCategoryMappedUrl(t,n),Rfc3986EncodeURIComponent:e=>encodeURIComponent(e).replace(/[!'()*]/g,escape),_createCategoryMappedUrl(e,t){const{fallbackBaseUrl:n,fallbackCategoryName:r,type:i}=e,a=ql.safeUrlConcat(n,""+Kl($l[i])),o=Object.assign({name:Yl.Rfc3986EncodeURIComponent(r)},t);return Yl._createUrl(a,o)},_createUrl(e,t){if(!e)return;if(dt.isEmpty(t))return e;const n=$.param(t),r=-1===e.indexOf("?")?"?":"&";return ql.safeUrlConcat(e,`${r}${n}`)},legacyCreateThumbnailUrl(e,t){if(!e)return"";let n;if(!e)return;if(n=e instanceof r.Model?e.get("url"):"string"==typeof e?e:e.url,!n)return;const i=Object.assign({size:Ml.Small,bgColor:"000"},t);return Yl._createUrl(n,i)}},Gl={[Ul.Thumbnails]:{width:1280,height:720},[Ul.Banners]:{width:3600,height:666},[Ul.Covers]:{width:1080,height:1080},[Ul.Posters]:{width:1e3,height:1500},[Ul.TallPosters]:{width:1080,height:1920},[Ul.HeroBanners]:{width:1920,height:640}};var Wl,Zl={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return Zl.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=Gl[t].width,a=Gl[t].height;r.addEventListener("load",(function(){Zl.isImageValid(t,r)&&X.isFunction(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(a))}))},isImageValid:function(e,t){var n=Gl[e].width,r=Gl[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}},Ql={isItemActive:function(e,t){return t||(t=r.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)}};!function(e){e.Developer="Curator Devs",e.Content="Content",e.Curator="Curators",e.Support="Support",e.SalesSupport="Sales Support"}(Wl||(Wl={}));var Xl=function(){return[{value:"protected",access:"r"}]},eu=function(e){return[Wl.Developer,Wl.Content].some((function(t){return su.getGroupNames(e).includes(t)}))},tu=function(e){return Object.values(e).every((function(e){return!!e}))},nu=function(e,t){return!!e&&!!t&&e.toString()===t.toString()},ru=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function iu(e){return function(e){if(Array.isArray(e))return au(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return au(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return au(e,t)}(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 au(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ou={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(nu(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var a=e(r[i]);if(a)return a}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var a=ou.find(e,i);a&&(n=[a].concat(iu(n))),i=a?r(a):null}return n}},su={getGroupNames:function(e){return e&&e.groups?e.groups.map((function(e){return e.name})):[]}};function cu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return lu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lu(e,t)}(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 lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uu=d.createContext(void 0),pu=function(e){var t=e.children,n=cu(d.useState(),2),r=n[0],i=n[1],a=cu(d.useState(!1),2),o=a[0],s=a[1],c=cu(d.useState(),2),l=c[0],u=c[1],p={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:o,getImage:function(){var e=l;return u(null),s(!1),e},setImage:function(e){u(e),s(!0)}};return d.createElement(uu.Provider,{value:p},t)};const fu=class extends G{constructor(){super(),this.constructors={},this.destructors={},this.instances={},this.singletonInstances={},this.referenceCounts={}}get name(){return"InstanceManager"}static get Instance(){return this.instance||(this.instance=new this)}registerDataService(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e({dataProvider:this.getInstance(t.dataProvider),cache:this.getInstance(t.cache),bootstrapData:t.bootstrapData,defaultErrorHandler:t.defaultErrorHandler,alertService:t.alertService}),this.destructors[n]=()=>{this.instances[n]?this.instances[n].destroy():x.throw(new B(`Trying to destroy a ${n} instance that has already been destroyed`)),this.releaseInstance(t.dataProvider),this.releaseInstance(t.cache)},this}registerInstance(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e(t),this.destructors[n]=()=>m.isFunction(this.instances[n].destroy)&&this.instances[n].destroy(),this}registerSingleton(e){const t=e.name;return this.singletonInstances[t]=e,this}getInstance(e,t){return this.singletonInstances[e]?this.singletonInstances[e]:(this.constructors[e]||x.throw(new B(`${e} was not registered with ${this.name}`)),this.referenceCounts[e]++,t&&this.listenTo(t,"destroy",()=>this.releaseInstance(e)),this.instances[e]||(this.instances[e]=this.constructors[e]()),this.instances[e])}releaseInstance(e){if(this.instances[e])return window.setTimeout(()=>{this.referenceCounts[e]--,this.referenceCounts[e]<1&&(this.destructors[e](),delete this.instances[e])},0),this}validateConstructor(e){const t=e.prototype.name;t||x.throw(new B(`Classes registered with ${this.name} must have a unique name property.`)),this.constructors[t]&&x.throw(new B(`A class with the name: ${t} has already been registered with ${this.name}`))}}.Instance,du={fetch(e,t){const{dataServiceName:n,eventPrefix:r,fetchData:i,setData:a,onError:o,deleteEventPrefix:s}=e;if(!X.isFunction(i))return void x.throw(new B("A fetchData function must be passed to fetch"));if(!X.isFunction(a))return void x.throw(new B("A setData function must be passed to fetch"));const c=o&&X.isFunction(o),l=fu.getInstance(n),u=h.Radio.channel(l.channelName),p=r+":request",f=r+":sync",d=r+":error",m=r+":invalidate",g=s&&s+":sync",y=()=>t(!1),v=()=>t(!0),b=()=>t(!1),S=()=>u.off(m,b);u.once(p,y),u.once(f,v),u.once(m,b),c&&u.once(d,o),g&&u.once(g,S);const E=i(l);return E&&(t(!0),e.setData(E)),()=>{fu.releaseInstance(n),u.off(p,y),u.off(f,v),u.off(m,b),c&&u.off(d,o),g&&u.off(g,S)}}};function mu(e,t,n=!0){const[r,i]=d.useState(!1);d.useEffect(()=>{i(!1)},[...t]),d.useEffect(()=>{if(n)return du.fetch(e,i)},[r,n])}const hu="UserDataService",gu="user:data:service",yu="current:user",vu="workspace";class bu extends De{get name(){return hu}get channelName(){return gu}getCurrentUser(e,t){return this.get({resource:"/api/currentuser",eventPrefix:yu,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}getWorkspace(e,t){return this.get({resource:"/api/domain/v2/me/workspace?query=categorytree",eventPrefix:vu,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}}const Su={dataServiceName:hu,dataChannelName:gu},Eu={getCurrentUserFetchOptions:(e,t)=>Object.assign(Object.assign({},Su),{eventPrefix:yu,fetchData:e=>e.getCurrentUser(),setData:e,onError:t}),currentUser:{dataServiceName:hu,eventName:yu+":sync",getData:e=>e.getCurrentUser(),getInstance:e=>fu.getInstance(hu,e),beforeOnBeforeRender:!0}};function Cu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ou(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ou(e,t)}(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 Ou(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Iu,ju=d.createContext(void 0);function Au(e){var t=e.children,n=Cu(d.useState(),2),r=n[0],i=n[1];return mu(Eu.getCurrentUserFetchOptions(i),[]),d.createElement(ju.Provider,{value:r},t)}function Tu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(e,t)}(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 wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ku=(Lu(Iu={},Ul.Thumbnails,"Thumbnail"),Lu(Iu,Ul.Banners,"Banner"),Lu(Iu,Ul.Avatars,"Avatar"),Lu(Iu,Ul.Logos,"Logo"),Lu(Iu,Ul.Covers,"Cover"),Lu(Iu,Ul.Posters,"Poster"),Lu(Iu,Ul.TallPosters,"Tall Poster"),Lu(Iu,Ul.HeroBanners,"Hero Banner"),Iu);function _u(e){var t,n=qa(),i=Ma(null===(t=n)||void 0===t?void 0:t.values,e.fieldName),a=d.useContext(uu),o=a.setDataUrl,s=a.getImage,l=a.imageUploaded,u=Tu(d.useState(!1),2),p=u[0],f=u[1],m=Tu(d.useState(i),2),h=m[0],g=m[1],y=Tu(d.useState(!1),2),v=y[0],b=y[1];function S(t){f(!0),o(t.src),r.AppLinkHelper.trigger({application:e.application,action:e.uploadAction,args:[e.imageType]})}d.useEffect((function(){if(p){var t,r=s();if(r)f(!1),g(r),t=r,X.isFunction(e.setSelectedImage)?e.setSelectedImage(t):n&&n.setFieldValue(e.fieldName,{fileId:t.id,fileIdType:Bl.ImageAPIv2})}}),[l]);var E=e.label||ku[e.imageType]||"Image";return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"form-control h-auto py-2"},d.createElement("label",null,E),d.createElement("em",{className:"ml-1 text-muted"},"(Minimum dimensions are ".concat(Gl[e.imageType].width,"px")+" x ".concat(Gl[e.imageType].height,"px)")),d.createElement(Hl,{label:"Choose a ".concat(E.toLowerCase()),name:"image",mimeType:c.IMAGES,onFileSelect:function(t){return Zl.onFileSelect(e.imageType,t,S)}}),!!h&&!!h.url&&d.createElement(d.Fragment,null,!v&&d.createElement("div",{className:"pb-2 ".concat(e.imageType===Ul.Banners?"w-100":"w-50")},d.createElement("img",{src:Yl.createUrl(h.url),className:"img img-fluid"})),d.createElement("div",{className:"d-flex justify-content-center"},d.createElement(Al,{svgName:v?Sl.ChevronDown:Sl.ChevronUp,size:jl.Large,className:"svg-container cursor-pointer",onClick:function(){return b(!v)},title:v?"Show image":"Hide image",tooltipPlacement:"top"})))))}var xu,Pu=n(126),Nu=n.n(Pu);function Du(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ru(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ru(e,t)}(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 Ru(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(xu||(xu={}));var Fu,Mu,Uu,Vu,Bu,zu,Hu,qu,Ju,$u,Ku,Yu,Gu,Wu,Zu,Qu,Xu,ep,tp,np,rp,ip=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function ap(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,a=e.onCancel,o=d.useRef(),s=d.useRef(),c=Du(d.useState(!1),2),l=c[0],u=c[1],p=Du(d.useState(!1),2),f=p[0],m=p[1];return d.useEffect((function(){var e=new Image;e.src=t;var i=o.current.offsetWidth/e.width;return s.current=new Nu.a(o.current,{viewMode:xu.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return u(!0)}}),function(){return s.current.destroy()}}),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement("img",{ref:o,src:t,className:"img img-fluid mw-100"})),d.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},d.createElement(uo.Button,{variant:"link",onClick:a},"Cancel"),d.createElement(Eo,{onClick:function(){if(l){m(!0);var e=s.current.getCroppedCanvas().toDataURL(function(e){var t=e.match(ip);if(t)return t[1]}(t));X.isFunction(i)&&i(e)}},disabled:!l,showSpinner:f},"Crop")))}!function(e){e.Stream="cv_product_stream",e.WebPlayerStream="cv_product_webplayer_stream",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(Fu||(Fu={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.PDF="pdf",e.CustomerSetting="customer_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="target_user"}(Mu||(Mu={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.TeacherManager="teacher_manager",e.TeacherManagerListItem="teacher_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.PlayPage="play_page",e.FloatingPlayer="floating_player",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads"}(Uu||(Uu={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(Vu||(Vu={})),function(e){e.PageLoad="page_load"}(Bu||(Bu={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(zu||(zu={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(Hu||(Hu={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(qu||(qu={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(Ju||(Ju={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}($u||($u={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Thumbnail="thumbnail",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open"}(Ku||(Ku={})),function(e){e.LibraryReview="library_review"}(Yu||(Yu={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(Gu||(Gu={})),function(e){e.Edit="edit"}(Wu||(Wu={})),function(e){e.Image="image",e.User="user"}(Zu||(Zu={})),function(e){e.On="on",e.Off="off"}(Qu||(Qu={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(Xu||(Xu={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(ep||(ep={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags"}(tp||(tp={})),function(e){e[e.V1=1]="V1"}(np||(np={})),function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(rp||(rp={}));class op extends r.Service{constructor(){super(...arguments),this.contextHistory=[]}get name(){return rp.Context}static get Instance(){return this.instance||(this.instance=new this)}initialize(){this.listenTo(y.SHELL,r.EventNames.ROUTE,this.setContext)}setContext(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}getCurrentContext(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}fromPageLoad(){return 1===this.contextHistory.length}}const sp=new op;var cp;!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(cp||(cp={}));const lp="global:analytics",up=np.V1;class pp{constructor(e,t,n,r){this.type=e,this.data=t,this.actionContext=n,this.eventVersion=r||up}isType(e){return e===this.type}enrich(e,t){this.validateKey(e),this[e]=t}get(e){if(e&&this[e])return this[e]}validateKey(e){"type"!==e&&"data"!==e||r.ErrorHelper.throw(new B(e+" is not a valid key")),this[e]&&r.ErrorHelper.throw(new B("Event already contains an enrichment named "+e))}}const fp={log(e,t,n,r){h.Radio.channel(lp).trigger(cp.Inlet,new pp(e,t,n,r))}};function dp(){const{appLink:e}=sp.getCurrentContext();return m.isObject(e)||r.ErrorHelper.throw(new B("Applink does not exist. Check current context.")),e.application.replace(":","-")}function mp(e={}){const{location:t,entity:n,workflowPhase:i=null,descriptor:a=null}=e;return t||r.ErrorHelper.throw(new B("location must be set.")),n||r.ErrorHelper.throw(new B("entity must be set.")),{productArea:dp(),location:t,entity:n,descriptor:a,workflowPhase:i}}function hp(){return r.LocationUtils.GetCurrentPath()+r.LocationUtils.GetCurrentQueryString()}const gp={logUserAction(e,t){if(!function(e){return!(!m.isArray(e)||!m.every(e,e=>m.isObject(e)))||!!m.isObject(e)}(e)||!m.isObject(t))return;const{userAction:n,action:r,eventVersion:i}=gp.buildUserActionEvent(t);fp.log(n,e,r,i)},logNavigate(e,t){const n=Object.assign({currentLocation:hp(),appLink:e},t);fp.log(Fu.Navigate,n)},mergeOptions:(e,t)=>m.extend({},e,t),buildActionContext:(e={})=>mp(e),buildUserActionEvent(e={}){const{actionType:t,eventVersion:n}=e;return{userAction:t,action:mp(e),eventVersion:n}},buildCurrentLocation:()=>hp(),buildSearchEvent:(e,t)=>({data:{query:e},action:mp({entity:Mu.Video,location:Uu.SearchBar,descriptor:t})}),buildInstantSearchEvent(e,t,n){let r;n===tp.Series&&(r=Mu.Series),n===tp.Folder&&(r=Mu.Folder),n===tp.Tags&&(r=Mu.Tag),n===tp.Video&&(r=Mu.Video);const i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:mp({entity:r,location:Uu.SearchBar})}},mapInteractionType(e){switch(e){case ep.DragDrop:return Gu.DragDrop;case ep.FileSelect:return Gu.FileSelect;default:return}}};function yp(e,t){return t?{application:e.application,action:e.action,args:e.args,params:Object.assign({},e.params,{cursor:t})}:null}function vp({appLink:e,cursors:t,className:n}){function r(e){gp.logUserAction({page:e},{location:Uu.Pagination,entity:Mu.Pagination,actionType:Fu.Navigate,workflowPhase:Vu.Complete})}return d.createElement(To.Provider,{value:"shared.pagination"},d.createElement("div",{className:n},d.createElement(xl,{appLink:yp(e,t.previous),className:"btn btn-secondary mr-1 "+(t.previous?"":"disabled"),onClick:()=>r("previous")},d.createElement(wo,{phrase:"previous"})),d.createElement(xl,{appLink:yp(e,t.next),className:"btn btn-secondary "+(t.next?"":"disabled"),onClick:()=>r("next")},d.createElement(wo,{phrase:"next"}))))}function bp(e){if(!e.collection)return d.createElement(d.Fragment,null);var t=e.collection,n=t.data,r=t.pagination;return d.createElement(d.Fragment,null,!!n&&d.createElement(_p,{objects:n,getObjectAppLink:e.getObjectAppLink,newObjectAppLink:e.newObjectAppLink,objectName:e.objectName}),!!r&&!!r.cursors&&d.createElement(vp,{cursors:r.cursors,appLink:e.collectionAppLink}))}vp.defaultProps={className:"py-2"};var Sp=n(22),Ep=n.n(Sp);function Cp(e){let t="dropdown-item";return e&&(t+=" "+e),t}function Op(e){if(!e.actions||!e.actions.length)return d.createElement(d.Fragment,null);const t="actions-dropdown-"+El.getRandomInt();let n="px-0 "+Ep.a.dropdownToggle;return e.dropdownToggleClassName&&(n+=" "+e.dropdownToggleClassName),d.createElement(uo.Dropdown,{className:e.className?e.className:"",alignRight:!0},d.createElement(uo.Dropdown.Toggle,{as:"button",type:"button",id:t,className:n},d.createElement(Al,{svgName:Sl.More,size:jl.Small})),d.createElement(uo.Dropdown.Menu,null,e.actions.map((e,t)=>d.createElement(xl,{key:t,appLink:e.appLink,className:Cp(e.className)},e.label))))}Op.defaultProps={dropdownToggleClassName:"btn btn-light"};var Ip=n(18),jp=n.n(Ip);function Ap(e){const{svgName:t,children:n,appLink:r,className:i,onClick:a}=e;let o=`${i} ${jp.a.iconButton}`;o+=n?" "+jp.a.iconWithText:" "+jp.a.iconOnly;const s=d.createElement(Al,{svgName:t,className:jp.a.svg});return r?d.createElement(xl,{appLink:r,className:o,onClick:a},s,n):d.createElement("button",{className:o,onClick:a},s,n)}function Tp(e){const{onClick:t,appLink:n,svgName:r,tooltip:i}=e.actionOptions;let a="ml-2";return e.actionOptions.className&&(a+=" "+e.actionOptions.className),i?d.createElement(Cl,{title:i},d.createElement(Ap,{appLink:n,svgName:r,onClick:t,className:a},e.children)):r?d.createElement(Ap,{onClick:t,appLink:n,svgName:r,className:a},e.children):n?d.createElement(xl,{onClick:t,appLink:n,className:a},e.children):d.createElement("button",{onClick:t,className:a},e.children)}function wp(e){const t=[],n=[];e.actions.forEach(e=>{e.button?t.push(e):n.push(e)});let r="d-flex";return e.className&&(r+=" "+e.className),d.createElement("div",{className:r},d.createElement(d.Fragment,null,!!t.length&&d.createElement("span",{className:Ep.a.buttonList},t.map((e,t)=>d.createElement(Tp,{key:t,actionOptions:e},e.label))),e.sortComponent?e.sortComponent:"",!!n.length&&d.createElement(Op,{actions:n,className:!!t.length&&"ml-2",dropdownToggleClassName:e.actionsDropdownClassName})))}function Lp(e){var t=e.object,n=e.actions;return d.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&d.createElement("h5",null,t.name),!!n&&d.createElement("span",null,d.createElement(wp,{actions:n})))}function kp(e){return d.createElement("tr",null,d.createElement("td",null,d.createElement(xl,{appLink:e.appLink},e.object.name)),d.createElement("td",null))}function _p(e){return d.createElement(uo.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Name"),d.createElement("th",null,d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(xl,{appLink:e.newObjectAppLink},d.createElement(Al,{svgName:Sl.Plus,size:jl.Small}),d.createElement("span",null,"New ".concat(e.objectName))))))),d.createElement("tbody",null,e.objects.map((function(t){return d.createElement(kp,{key:t.id,object:t,appLink:e.getObjectAppLink(t)})}))))}function xp(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?d.createElement("ul",{className:"list-unstyled"},t.map((function(e,t){return d.createElement("li",{key:t,className:"border rounded mb-3"},d.createElement(xl,{appLink:n(e),className:"d-block p-3"},e.name))}))):d.createElement("div",{className:"py-3"},d.createElement("p",null,r)):d.createElement(d.Fragment,null)}xp.defaultProps={emptyMessage:"There is nothing here."};function Pp(e){var t=qa();return d.createElement(vo,{as:"select",label:"Rating",name:"rating",id:"rating",value:t.values.rating&&t.values.rating.id,onChange:function(e){return t.setFieldValue("rating",e.target.value?{id:e.target.value}:{})},disabled:e.disabled},d.createElement(d.Fragment,null,d.createElement("option",{value:""},"Please select a rating"),e.ratings.map((function(e,t){return d.createElement("option",{key:t,value:e.id},function(e){return"".concat(e.name).concat(e.code?" (".concat(e.code,")"):"")}(e))}))))}function Np(e){var t=e.tabs,n=e.isItemActive;return d.createElement(uo.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return d.createElement(uo.Nav.Item,{key:t},d.createElement(xl,{appLink:e.appLink,className:(r=n(e),r?"nav-link active":"nav-link")},e.label));var r})))}Np.defaultProps={isItemActive:Ql.isItemActive};var Dp=n(8),Rp=n.n(Dp);function Fp(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,a=e.className,o=e.actions,s=Rp.a.text;return a&&(s+=" ".concat(a)),i?d.createElement("a",{className:"".concat(s," text-muted ").concat(Rp.a.disabled)},t):d.createElement(d.Fragment,null,n?d.createElement(xl,{appLink:n,className:s},t):d.createElement("a",{onClick:r,className:s},t),!!o&&d.createElement(wp,{className:Rp.a.actions,actions:o}))}function Mp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Up(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Up(e,t)}(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 Up(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vp(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,a=e.isDisabled,o=e.actions,s=Array.isArray(n)&&n.some((function(e){return nu(t.id,e)})),c=d.useMemo((function(){return Array.isArray(n)&&n.some((function(e){return ou.find(t,e)}))}),[t,n]),l=Mp(d.useState(c),2),u=l[0],p=l[1],f=!!t.children&&!!t.children.length,m={name:t.name,appLink:X.isFunction(r)?r(t):null,onSelect:X.isFunction(i)?function(){return i(t)}:null,isDisabled:!!X.isFunction(a)&&a(t),className:s&&Rp.a.selected||c&&Rp.a.parentOfSelected,actions:!!o&&o.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return d.createElement("li",{className:"position-relative".concat(u?"":" ".concat(Rp.a.collapsed))},d.createElement("div",{className:"position-relative"},d.createElement("span",{className:Rp.a.node},f&&d.createElement(Al,{svgName:Sl.ChevronDown,size:jl.Small,className:"svg-container ".concat(Rp.a.chevron),onClick:function(){return p(!u)}}),d.createElement(Fp,Object.assign({},m))),u&&d.createElement(zp,Object.assign({},e))))}var Bp=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function zp(e){var t=e.tree,n=Bp(e,["tree"]);return t&&t.children?d.createElement("ul",{className:"m-0 p-0 ".concat(Rp.a.tree)},t.children.map((function(e){return d.createElement(Vp,Object.assign({key:e.id,tree:e},n))}))):d.createElement(d.Fragment,null)}var Hp={getChord:function(e,t){return ou.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,a,o=ou.find(t,e);o&&(n=Object.assign((r={},i=e,a=Hp.getChord(t,o),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),n))})),n}};function qp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jp(e,t)}(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 Jp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $p=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Kp(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,a=e.noSelectionMessage,o=e.isNodeDisabled,s=e.getSelectedItemAppLink,c=$p(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","isNodeDisabled","getSelectedItemAppLink"]),l=c.tree,u=c.selectedIds,p=qp(d.useState(Hp.getState(u,l)),2),f=p[0],m=p[1];d.useEffect((function(){return m(Hp.getState(u,l))}),[u,l]);var h=qp(d.useState(!!i),2),g=h[0],y=h[1];d.useEffect((function(){return y(!!i)}),[i]);var v=!r||!!n;return d.createElement(d.Fragment,null,v&&d.createElement("div",{className:"pb-2"},!!n&&d.createElement("label",{className:"m-0"},n),!r&&d.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return y(!g)}},g?"Expand":"Collapse")),!g&&d.createElement("div",{className:"py-2 border-top"},d.createElement(zp,Object.assign({onSelect:function(e){return X.isFunction(t)&&t(e)},isDisabled:o},c))),(!dt.isEmpty(f)||!!a)&&d.createElement("div",{className:"py-2 border-top"},d.createElement("label",null,"Selected:"),d.createElement("ul",{className:"m-0"},dt.isEmpty(f)?d.createElement("li",null,a):Object.keys(f).map((function(e,t){return d.createElement("li",{key:t},X.isFunction(s)?d.createElement(xl,{appLink:s(e)},f[e]):f[e])})))))}var Yp=n(23);const Gp={isEmpty:e=>e&&!(e.data&&e.data.length),length:e=>e&&e.data&&e.data.length,at(e,t){if(e&&e.data&&e.data.length&&!(t>e.data.length))return e.data[t]},get(e,t){if(e&&e.data&&e.data.length)return e.data.find(e=>e.id&&e.id.toString()===t)},flattenCollections(e){if(!e||!e.length)return;let t=[];return e.forEach(e=>{t=[...t,...e.data]}),t},getNextCursor:e=>e.pagination&&e.pagination.cursors&&e.pagination.cursors.next};var Wp=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function Zp(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,a=void 0===i?"":i,o=e.itemNumber,s=X.isFunction(n)&&n(t);return d.createElement("tr",{className:Wp(a)},!!o&&d.createElement("td",null,d.createElement("span",null,o)),d.createElement("td",null,s?d.createElement(xl,{appLink:s},t.name):t.name),X.isFunction(r)&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(wp,{actions:r(t)}))))}var Qp=Object(Yp.SortableElement)((function(e){return d.createElement(Zp,Object.assign({sortable:!0},e))})),Xp=n(11),ef=n.n(Xp),tf=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},nf=function(e){var t=e.sortable,n=e.getVideoActions;return d.createElement("thead",null,d.createElement("tr",null,!!t&&d.createElement("th",null,"#"),d.createElement("th",null,"Name"),!!n&&d.createElement("th",null)))},rf=d.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=tf(e,["videos","sortable"]);return d.createElement("tbody",{ref:t},!Gp.isEmpty(n)&&n.data.map((function(e,t){return r?d.createElement(Qp,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:ef.a.draggableVideoItem},i)):d.createElement(Zp,Object.assign({video:e},i))})))}));var af=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},of=Object(Yp.SortableContainer)((function(e){var t=e.forwardedRef,n=af(e,["forwardedRef"]);return d.createElement(rf,Object.assign({sortable:!0,ref:t},n))})),sf=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(ef.a.sortingContainer);var i=r.querySelector(".".concat(ef.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},cf=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(ef.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function lf(e){var t=e.onSortEnd,n=e.emptyMessage,r=af(e,["onSortEnd","emptyMessage"]),i=d.useRef();return Gp.isEmpty(e.videos)?d.createElement("div",null,n):d.createElement(uo.Table,{responsive:!0},d.createElement(nf,Object.assign({sortable:!0},e)),d.createElement(of,Object.assign({forwardedRef:i,onSortStart:sf(i),onSortEnd:cf(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:ef.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}function uf(e){var t=e.alias,n=e.onDelete;return d.createElement("li",{className:"list-group-item d-flex justify-content-between"},t.name,d.createElement(Al,{svgName:Sl.Delete,onClick:function(){return n(t.id)}}))}function pf(e){var t=e.aliases,n=e.onDelete;return d.createElement("ul",{className:"list-group mb-3"},t?t.map((function(e){return d.createElement(uf,{key:e.id,alias:e,onDelete:n})})):d.createElement("span",null,"Currently there are no aliases for this object."))}lf.defaultProps={emptyMessage:"There are no videos in this list."};var ff=Object(co.object)().shape({name:Object(co.string)().trim().max(255,"Name is too long").required("Name is required").default("")});function df(){var e=qa(),t=bo(e);return d.createElement(eo,null,d.createElement(vo,{label:"Create an alias",name:"name",id:"name",value:e.values.name,placeholder:"Add an alias"}),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:e.isSubmitting,type:"submit",disabled:!t},"Add")))}function mf(e){var t=e.onSave;return d.createElement(so,{initialValues:{name:""},validationSchema:ff,onSubmit:function(e,n){t(e,n)},resetOnSubmit:!0},d.createElement(df,null))}function hf(e){var t=e.onSave,n=e.aliases,r=e.onDelete;return d.createElement("div",{className:"w-50"},d.createElement("h1",null,"Aliases"),d.createElement(pf,{aliases:n,onDelete:r}),d.createElement(mf,{onSave:t}))}var gf=u.COMPANIES,yf=function(e){return{application:gf,action:o.Companies.EDIT_COMPANY,args:[e.id]}},vf=function(e){return r.AppLinkHelper.trigger(yf(e))};function bf(e){var t=i.useBasicFetch(Qt(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(_l,{placeholder:"Search for a company",onSuggestionSelected:vf,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/companies/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(bp,{collection:t&&t.data,collectionAppLink:{application:gf,action:o.Companies.COMPANIES},newObjectAppLink:{application:gf,action:o.Companies.NEW_COMPANY},getObjectAppLink:yf,objectName:"Company"}))}function Sf(e){return(Sf="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})(e)}function Ef(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Of(e,t,n){return t&&Cf(e.prototype,t),n&&Cf(e,n),e}function If(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jf(e,t)}function jf(e,t){return(jf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Af(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wf(e);if(t){var i=wf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tf(this,n)}}function Tf(e,t){return!t||"object"!==Sf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wf(e){return(wf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lf,kf,_f=function(e){If(n,e);var t=Af(n);function n(){return Ef(this,n),t.apply(this,arguments)}return Of(n,[{key:"channelName",get:function(){return u.COMPANIES}},{key:"appRoutes",get:function(){return{"manage/companies(/)":"companies","manage/companies/new(/)":"newCompany","manage/companies/:id(/)":"editCompany"}}}]),n}(r.AppRouter),xf=function(e){If(n,e);var t=Af(n);function n(){return Ef(this,n),t.apply(this,arguments)}return Of(n,[{key:"companies",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(bf,{cursor:t}))}},{key:"newCompany",value:function(){this.layout.showChildView(ae,d.createElement(Po,null))}},{key:"editCompany",value:function(e){this.layout.showChildView(ae,d.createElement(xo,{id:e}))}},{key:"name",get:function(){return"Companies Application"}},{key:"channelName",get:function(){return u.COMPANIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return _f}}]),n}(r.Application),Pf=n(31);!function(e){e.Success="success",e.Warning="warning",e.Fail="danger",e.Info="info"}(Lf||(Lf={})),function(e){e.Success="Success! 🙌",e.Warning="Whoops...",e.Fail="Oops...",e.Info="FYI"}(kf||(kf={}));class Nf extends G{constructor(e){super(e)}initialize(){this.alertCollection=new U,this.listenTo(y.ALERT,"remove:alert",this.removeAlert),this.showAlerts()}get name(){return Io}get defaults(){return{maxAlerts:3}}showAlerts(){const e=h.Radio.channel(y.ALERT);let t={collection:this.alertCollection};this.options.alertViewCtor&&(t=m.extend({},t,{ctor:this.options.alertViewCtor})),e.trigger("show:alert",t)}removeAlert(e){this.alertCollection.remove(e),this.showAlerts()}createAlert(e){this.alertCollection.length===this.options.maxAlerts&&this.alertCollection.shift(),e.id||(e=m.extend({},e,{id:this.generateUniqueAlertId()})),this.alertCollection.push(new K(e)),this.showAlerts()}clearAllAlerts(){this.alertCollection.reset(null)}success(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:e})),this):e.useXHR?m.bind((e,t)=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:t})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,e)),this)}error(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e})),this):e.useXHR?m.bind(e=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e.message})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlertIL_DEFAULT,e)),this)}generateUniqueAlertId(){return m.uniqueId("alert_")}}var Df=n(9),Rf=n.n(Df);function Ff(e){const{alert:t,svgName:n,svgClassName:r,closeAlert:i}=e,{message:a,heading:o,appLink:s,appLinkText:c,appLinkClassName:l=""}=t,u=Object(Oo.sanitize)(a);return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-inline-block "+Rf.a.icon},d.createElement(Al,{svgName:n,className:"svg-container "+r})),d.createElement("div",{className:"pl-2 d-inline-block "+Rf.a.alertContent},d.createElement("p",{className:"p-0 m-0 pb-1 "+Rf.a.heading},o),d.createElement("p",{className:"p-0 m-0 "+Rf.a.message,dangerouslySetInnerHTML:{__html:u}}),!!s&&d.createElement(xl,{className:l,appLink:s},c)),d.createElement("div",{className:"close d-inline-block cursor-pointer",role:"button","aria-hidden":"true",onClick:i},"×"))}const Mf=e=>{switch(e.type){case Lf.Success:return Sl.CheckCircleOutline;case Lf.Fail:case Lf.Warning:return Sl.Warning;case Lf.Info:default:return Sl.Info}};function Uf({alert:e,closeAlert:t}){const[n,r]=d.useState(!0),i=d.useRef();d.useEffect(()=>{n?i.current=window.setTimeout(t,3e3):clearTimeout(i.current)},[n]);const a="text-"+e.type.toLowerCase();return d.createElement("li",{className:"bg-white mt-2 p-2 show clearfix "+Rf.a.alertItem,onMouseEnter:()=>r(!1),onMouseLeave:()=>r(!0)},d.createElement(Ff,{alert:e,svgName:Mf(e),svgClassName:a,closeAlert:t}))}function Vf({alerts:e,removeAlert:t}){return d.createElement("div",{className:Rf.a.alertBox},d.createElement(Pf.TransitionGroup,{component:"ul",className:Rf.a.alertList+" list-unstyled"},e&&e.map((e,n)=>d.createElement(Pf.CSSTransition,{key:n,timeout:200,classNames:"alert"},d.createElement(Uf,{alert:e,closeAlert:()=>t(e.id)})))))}function Bf(){return d.createElement("div",{className:"text-center p-5"},d.createElement(uo.Spinner,{as:"div",animation:"border",role:"status"}))}function zf(e){const{title:t,closeButton:n=!0,closePopup:r,onEntered:i,showLoadingSpinner:a}=e,o=Object.assign({show:!0,onHide:r},X.isFunction(i)?{onEntered:i}:{});return d.createElement(uo.Modal,Object.assign({},o),!!t&&d.createElement(uo.Modal.Header,{closeButton:n},d.createElement(uo.Modal.Title,null,t)),a?d.createElement(Bf,null):d.createElement(uo.Modal.Body,null,e.children))}var Hf=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function qf({buttons:e}){return d.createElement("div",{className:"d-flex justify-content-end border-top pt-3 px-3 mx-n3"},e.map((e,t)=>((e,t)=>{const{buttonText:n,type:r="button",isSpinnerButton:i,showSpinner:a=!1,className:o}=e,s=Hf(e,["buttonText","type","isSpinnerButton","showSpinner","className"]),c=Object.assign({key:t,type:r,className:"ml-2"+(o?" "+o:"")},s);return i?d.createElement(Eo,Object.assign({showSpinner:a},c),n):d.createElement(uo.Button,Object.assign({},c),n)})(e,t)))}var Jf,$f;!function(e){e.Boolean="System.Boolean",e.String="System.String",e.StaffRequest="ClickView.DomainApi.Models.Options.Enums.StaffRequestOption, ClickView.DomainApi.Models, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null",e.Long="System.Int64"}(Jf||(Jf={})),function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}($f||($f={}));var Kf={namespace:"domain_options"},Yf=function(){return"/api/domain/v3/settings/types"},Gf=function(e){return"/api/domain/v3/settings/types/".concat(e)},Wf=function(){return"/api/domain/v3/settings/types"},Zf=function(e){return"/api/domain/v3/settings/types/".concat(e)},Qf=function(e){return"/api/domain/v3/settings/types/".concat(e)},Xf="domain:options",ed="domain:option",td="update:domain:option",nd="delete:domain:option",rd=function(){return{key:Xf,url:Yf(),normalizeOptions:Kf}},id=function(e){return{key:"".concat(ed,":").concat(e),url:Gf(e),normalizeOptions:Kf}},ad=function(e,t,n){return e.type===Jf.String&&(e=cd(e)),{key:ed,url:Wf(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[Xf],normalizeOptions:Kf}},od=function(e,t){return e.type===Jf.String&&(e=cd(e)),{key:"".concat(td,":").concat(e.id),url:Zf(e.id),data:e,type:it.PUT,always:t,formatData:function(){return e},normalizeOptions:Kf}},sd=function(e,t){return{key:"".concat(nd,":").concat(e),url:Qf(e),type:it.DELETE,invalidationKeys:[Xf],normalizeOptions:Kf,success:t}};function cd(e){var t=e.defaultValue;if('"'===t)return Object.assign(Object.assign({},e),{defaultValue:'"'.concat(t,'"')});var n=t.charAt(0),r=t.charAt(t.length-1);return'"'!==n&&(t='"'.concat(t)),'"'!==r&&(t="".concat(t,'"')),Object.assign(Object.assign({},e),{defaultValue:t})}function ld(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ud(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ud(e,t)}(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 ud(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pd(e){var t=ld(d.useState(!1),2),n=t[0],a=t[1],s=i.useBasicFetch(id(e.optionId)),c=Object(te.useDispatch)(),l=function(){e.closePopup(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DOMAIN_OPTIONS})};return d.createElement(zf,{title:"Delete Domain Option",closePopup:e.closePopup,showLoadingSpinner:!s.data},s.data&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,s.data.name),"?")),d.createElement(qf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){a(!0),i.fetch(c,sd(e.optionId,l))},buttonText:"Yes, delete this domain option",isSpinnerButton:!0,showSpinner:n}]})))}var fd,dd=function(e){return{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]}},md={application:u.DOMAIN_OPTIONS,action:o.DomainOptions.NEW_DOMAIN_OPTION};function hd(){var e=i.useBasicFetch(rd());if(!e.data)return d.createElement(d.Fragment,null);var t=e.data.map((function(e){return e.displayName&&(e.name=e.displayName),e}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a domain option type to edit:"),d.createElement(xl,{appLink:md,className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:jl.Small}),d.createElement("span",null,"New Domain Option"))),d.createElement(xp,{objects:t,getAppLink:dd}))}!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"}(fd||(fd={}));var gd=co.object().shape({id:co.string(),name:co.string().trim().max(64,"Name is too long").required("Name is required").default(""),displayName:co.string().trim().max(255,"Display name is too long").required("Display name is required").default(""),type:co.mixed().required("Type is required").default(Jf.Boolean),entityType:co.mixed().required("Entity type is required").default(fd.Customer),kind:co.mixed().required("Kind is required").default($f.Temporary),defaultValue:co.mixed().required("Default value is required").default("false")}).noUnknown();function yd(e){var t=e.type,n=e.defaultValue;if(!t)return d.createElement(d.Fragment,null);var r={label:"Default Value",name:"defaultValue",id:"defaultValue",value:n};return t===Jf.Boolean?d.createElement(vo,Object.assign({as:"select"},r),d.createElement("option",{value:"true"},"True"),d.createElement("option",{value:"false"},"False")):t===Jf.Long||t===Jf.StaffRequest?d.createElement(vo,Object.assign({as:"input",type:"number"},r)):t===Jf.String?d.createElement(vo,Object.assign({as:"input"},r)):void 0}var vd=[fd.Customer,fd.User];function bd(e){var t=null===e.id||void 0===e.id,n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Name (snake_case)",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this domain option",autoFocus:!0}),d.createElement(vo,{label:"Display Name",type:"text",name:"displayName",id:"displayName",value:n.values.displayName,placeholder:"Enter a display name for this domain option"}),d.createElement(vo,{as:"select",label:"Kind",name:"kind",id:"kind",value:n.values.kind},dt.getEnumKeys($f).map((function(e){return d.createElement("option",{key:e,value:$f[e]},e)}))),d.createElement(vo,{as:"select",label:"Entity",name:"entityType",id:"entityType",value:n.values.entityType},dt.getEnumKeys(fd).filter((function(e){return vd.includes(fd[e])})).map((function(e){return d.createElement("option",{key:e,value:fd[e]},e)}))),d.createElement(vo,{as:"select",label:"Type",name:"type",id:"type",value:n.values.type},dt.getEnumKeys(Jf).map((function(e){return d.createElement("option",{key:e,value:Jf[e]},e)}))),d.createElement(yd,{type:n.values.type,defaultValue:n.values.defaultValue}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(uo.Button,{as:xl,variant:"danger",appLink:{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DELETE_DOMAIN_OPTION,args:[e.id]}},"Delete")))}function Sd(e){return d.createElement(so,{initialValues:e.domainOption,validationSchema:gd,onSubmit:e.saveDomainOption},d.createElement(bd,{id:e.domainOption&&e.domainOption.id}))}function Ed(){var e=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Domain Option"),d.createElement(Sd,{saveDomainOption:function(t,n){i.fetch(e,ad(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]})}),n))}}))}function Cd(e){var t=e.optionId,n=i.useBasicFetch(id(t)),r=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Domain Option"),n.data&&d.createElement(Sd,{domainOption:n.data,saveDomainOption:function(e,t){return i.fetch(r,od(e,t))}}))}function Od(e){return(Od="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})(e)}function Id(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ad(e,t,n){return t&&jd(e.prototype,t),n&&jd(e,n),e}function Td(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wd(e,t)}function wd(e,t){return(wd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ld(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_d(e);if(t){var i=_d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kd(this,n)}}function kd(e,t){return!t||"object"!==Od(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _d(e){return(_d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xd=function(e){Td(n,e);var t=Ld(n);function n(){return Id(this,n),t.apply(this,arguments)}return Ad(n,[{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"appRoutes",get:function(){return{"developer/options(/)":"domainOptions","developer/options/new(/)":"newDomainOption","developer/options/:id(/)":"editDomainOption"}}},{key:"appLinks",get:function(){return["deleteDomainOption"]}}]),n}(r.AppRouter),Pd=function(e){Td(n,e);var t=Ld(n);function n(){return Id(this,n),t.apply(this,arguments)}return Ad(n,[{key:"domainOptions",value:function(){this.layout.showChildView(ae,d.createElement(hd,null))}},{key:"newDomainOption",value:function(){this.layout.showChildView(ae,d.createElement(Ed,null))}},{key:"editDomainOption",value:function(e){this.layout.showChildView(ae,d.createElement(Cd,{optionId:e}))}},{key:"deleteDomainOption",value:function(e){this.layout.showChildView(oe,d.createElement(pd,Object.assign({optionId:e},this.getPopupProps())))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Vf,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Domain Options Application"}},{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return xd}}]),n}(r.Application),Nd=function(e){return e?"".concat("/api/master/v2/people","?cursor=").concat(e):"/api/master/v2/people"},Dd=function(e){return"/api/master/v2/objects/".concat(e)},Rd=function(){return"/api/master/v2/people"},Fd=function(e){return"/api/master/v2/objects/".concat(e)},Md="people",Ud="person",Vd="update:person",Bd=function(e){return{key:"".concat(Md).concat(e?":".concat(e):""),url:Nd(e)}},zd=function(e){return{key:"".concat(Ud,":").concat(e),url:Dd(e)}},Hd=function(e,t,n){return{key:Ud,url:Rd(),data:e,type:it.POST,success:t,error:n,invalidationKeys:[Md]}},qd=function(e,t,n){return{key:"".concat(Vd,":").concat(e),url:Fd(e),data:t,type:it.PUT,always:n}},Jd=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown();function $d(e){var t=qa();return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this person",autoFocus:!0}),d.createElement(Lo,{isNew:e.isNew}))}function Kd(e){return d.createElement(so,{initialValues:e.person,validationSchema:Jd,onSubmit:e.savePerson},d.createElement($d,{isNew:!(e.person&&e.person.id)}))}function Yd(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(zd(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Kd,{person:n.data,savePerson:function(n,r){return i.fetch(t,qd(e.id,n,r))}}))}function Gd(){var e=Object(te.useDispatch)();return d.createElement(Kd,{savePerson:function(t,n){i.fetch(e,Hd(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.People.EDIT_PERSON,args:[e.id]})}),n))}})}var Wd=u.PEOPLE,Zd=function(e){return{application:Wd,action:o.People.EDIT_PERSON,args:[e.id]}},Qd=function(e){return r.AppLinkHelper.trigger(Zd(e))};function Xd(e){var t=i.useBasicFetch(Bd(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(_l,{placeholder:"Search for a person",onSuggestionSelected:Qd,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/people/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(bp,{collection:t&&t.data,collectionAppLink:{application:Wd,action:o.People.PEOPLE},newObjectAppLink:{application:Wd,action:o.People.NEW_PERSON},getObjectAppLink:Zd,objectName:"Person"}))}function em(e){return(em="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})(e)}function tm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rm(e,t,n){return t&&nm(e.prototype,t),n&&nm(e,n),e}function im(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&am(e,t)}function am(e,t){return(am=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function om(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cm(e);if(t){var i=cm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sm(this,n)}}function sm(e,t){return!t||"object"!==em(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cm(e){return(cm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lm=function(e){im(n,e);var t=om(n);function n(){return tm(this,n),t.apply(this,arguments)}return rm(n,[{key:"channelName",get:function(){return u.PEOPLE}},{key:"appRoutes",get:function(){return{"manage/people(/)":"people","manage/people/new(/)":"newPerson","manage/people/:id(/)":"editPerson"}}}]),n}(r.AppRouter),um=function(e){im(n,e);var t=om(n);function n(){return tm(this,n),t.apply(this,arguments)}return rm(n,[{key:"people",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(Xd,{cursor:t}))}},{key:"newPerson",value:function(){this.layout.showChildView(ae,d.createElement(Gd,null))}},{key:"editPerson",value:function(e){this.layout.showChildView(ae,d.createElement(Yd,{id:e}))}},{key:"name",get:function(){return"People Application"}},{key:"channelName",get:function(){return u.PEOPLE}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return lm}}]),n}(r.Application);function pm(e){return function(e){const t=fu.getInstance(e);return d.useEffect(()=>()=>fu.releaseInstance(e)),t}(e)}function fm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dm(e,t)}(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 dm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mm(e){var t=e.imageType,n=e.closePopup,r=d.useContext(uu),i=r.getDataUrl,a=r.setImage,o=fm(d.useState(i()),1)[0],s=fm(d.useState(!1),2),c=s[0],l=s[1],u=pm(f.IMAGE_UPLOAD),p=function(e){a(e),n()},m={dataUrl:o,imageType:t,minWidth:Gl[t].width,minHeight:Gl[t].height,onCrop:function(e){return u.uploadBase64Image(e,t,p,n)},onCancel:n};return d.createElement(zf,{title:"Crop Image",closePopup:n,onEntered:function(){return l(!0)}},c&&d.createElement(ap,Object.assign({},m)))}var hm=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))};const gm=()=>{const e=pm(Io);return{success(t){e.success(t)()},error(t){e.error(t)()},warning(t){e.createAlert({type:Lf.Warning,heading:kf.Warning,message:t})}}};function ym(e){var t=e.page,n=e.totalPages,r=Ro.isNumber(t)&&t>0&&t<n&&t+1,i=Ro.isNumber(t)&&t>1&&t-1,a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!dt.isEmpty(a))return a}var vm={convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:ym(e.pagination),limit:e.pagination.pageSize}}}},bm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1";return{key:"playlists:".concat(e),url:"/ajax/playlists/curators?page=".concat(e),formatData:vm.convertLegacyPaginatedCollection}},Sm=function(e,t){var n="/api/domain/v1/search/playlists?query=".concat(e);return t&&(n+="&filter={page:".concat(t,"}")),{key:"playlists:search:".concat(e).concat(t?":".concat(t):""),url:n,formatData:vm.convertLegacyPaginatedCollection}},Em=function(e){return{key:"playlist:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=cover,banner")}},Cm=function(e){var t=e.slice().sort();return{key:"playlists:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Om=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(t,"/playlists"),key:"playlist",data:e,type:it.POST,invalidationKeys:"playlists",success:n,error:r,always:i}},Im=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:playlist:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}},jm=function(e,t,n,r){return{url:"/api/master/v1/playlists/".concat(e),key:"delete:playlist:".concat(e),type:it.DELETE,invalidationKeys:"playlists",success:t,error:n,always:r}},Am=function(e){return{key:"playlist:".concat(e,":videos"),url:"/api/master/v2/objects/".concat(e,"/videos?query={orderBy:orderindex,limit:100}")}},Tm=function(e,t,n,r){return{key:"reorder:playlist",url:"/api/master/v1/objects/".concat(e,"/videos/reorder"),data:t,type:it.PUT,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r}},wm=function(e,t,n,r,i){return{key:"remove:playlist:video",url:"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t),type:it.DELETE,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r,always:i}};function Lm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return km(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return km(e,t)}(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 km(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _m(e){var t=Object(te.useDispatch)(),n=gm(),a=Lm(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(Em(e.playlistId));var p=[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,jm(e.playlistId,(function(){n.success("Successfully deleted playlist."),r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS})}),(function(){c(!1),n.error("Failed to delete playlist.")}),e.closePopup))},buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:s}],f=!!l.data;return d.createElement(zf,{title:"Delete Playlist",closePopup:e.closePopup,showLoadingSpinner:!f},f&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement("p",null,"Please ensure it is not being used in any widgets.")),d.createElement(qf,{buttons:p})))}var xm=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:co.string().trim().max(65535,"Description is too long").default(""),cover:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),banner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown()}).noUnknown(),Pm=function(e,t){var n=u.PLAYLISTS,r=o.Playlists,i=[{label:"Edit Playlist Details",appLink:{application:n,action:r.EDIT_PLAYLIST,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_PLAYLIST_VIDEOS,args:[t]}}];return eu(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_PLAYLIST_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_PLAYLIST_AUDIENCES,args:[t]}}]),i};function Nm(e){var t=qa(),n=bo(t);return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this playlist",autoFocus:!0}),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this playlist here"}),d.createElement(_u,{imageType:Ul.Covers,fieldName:"cover",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement(_u,{imageType:Ul.Banners,fieldName:"banner",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(wp,{actions:e.actions})))}function Dm(e){var t,n=e.playlist&&e.playlist.id;return d.createElement(so,{initialValues:e.playlist,validationSchema:xm,onSubmit:e.savePlaylist},d.createElement(Nm,{id:n,actions:!!n&&(t=n,[{label:"Delete playlist",appLink:{application:u.PLAYLISTS,action:o.Playlists.DELETE_PLAYLIST,args:[t]},className:"text-danger"}])}))}var Rm=function(e){return function(t){return t.appLink.action===e}};function Fm(e){var t=e.playlistId,n=e.activeAction,r=d.useContext(ju);return d.createElement("div",{className:"py-2"},!!r&&d.createElement(Np,{tabs:Pm(r,t),isItemActive:Rm(n)}))}function Mm(e){var t=Object(te.useDispatch)(),n=gm(),r=i.useBasicFetch(Em(e.playlistId));return d.createElement(d.Fragment,null,d.createElement(Fm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST}),!!r.data&&d.createElement(Dm,{playlist:r.data,savePlaylist:function(r,a){i.fetch(t,Im(e.playlistId,r,(function(){n.success("Successfully updated playlist.")}),(function(){n.error("Failed to update playlist.")}),a))}}))}const Um=e=>Array(Array.isArray(e)?e.length:0).fill(!1);function Vm(e,t,n=!0){const[r,i]=d.useState(Um(e));d.useEffect(()=>{i(Um(e))},[...t]),d.useEffect(()=>{if(!n)return;const t=[];return e&&e.forEach((e,n)=>{t.push(du.fetch(e,e=>{e!==r[n]&&i(Vt.cloneAndReplaceAtIdx(r,n,e))}))}),()=>t.forEach(e=>e())},[r,n])}const Bm={getSetStateByKey:(e,t,n)=>r=>e(e=>{const i=X.isFunction(n)?n:X.useIdentity();return Object.assign(Object.assign({},e),{[t]:i(r,e)})})};var zm,Hm,qm,Jm;!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(zm||(zm={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(Hm||(Hm={})),function(e){e.Root="0"}(qm||(qm={})),function(e){e.Root="root"}(Jm||(Jm={}));var $m,Km=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),levelIds:co.array().of(co.string()).required("A level is required").default([])}).noUnknown();!function(e){e.Subject="Subject",e.Topic="Topic"}($m||($m={}));var Ym=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentIds:co.array().of(co.string()).default([Jm.Root]),subjectIds:co.array().of(co.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject").default([]),type:co.mixed().required("Type is required").default($m.Subject),emphasize:co.boolean().default(!1),comingSoon:co.boolean().default(!0),canBePreferred:co.boolean().default(!1),cover:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),banner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown()}).noUnknown(),Gm=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),Wm=co.object().shape({name:co.string().max(255,"Name is too long").required("Name is required"),description:co.string().max(65535,"Description is too long").required("Description is required")}),Zm=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentId:co.string().default(qm.Root)}).noUnknown(),Qm={singularizeMemberType:function(e){switch(e){case Hm.Playlists:return"playlist";case Hm.Series:return"series";case Hm.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case Hm.Playlists:return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:n};case Hm.Series:return{application:u.SERIES,action:o.Series.EDIT_SERIES,args:n};case Hm.Videos:return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{label:"Remove ".concat(Qm.singularizeMemberType(n)),appLink:{application:u.SUBJECTS,action:t===zm.Subject?o.Subjects.REMOVE_SUBJECT_MEMBER:o.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},Xm=function(){var e=u.SUBJECTS,t=o.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.SUBJECT_CLASSIFICATIONS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},eh=function(e){var t=u.SUBJECTS,n=o.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Classifications",appLink:{application:t,action:n.SUBJECT_CLASSIFICATIONS,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},th=function(e,t){var n=u.SUBJECTS,r=o.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]};function nh(e){return(nh="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})(e)}function rh(e){return function(e){if(Array.isArray(e))return ih(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ih(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ih(e,t)}(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 ih(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ah(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sh(e,t){return(sh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ch(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uh(e);if(t){var i=uh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lh(this,n)}}function lh(e,t){return!t||"object"!==nh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function uh(e){return(uh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ph=function(){return"/api/subjects/v1/subjects/tree"},fh=function(e){return"/api/subjects/v1/subjects/".concat(e)},dh=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},mh=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},hh=function(){return"/api/subjects/v1/subjects"},gh=function(e){return"/api/subjects/v1/subjects/".concat(e)},yh=function(e){return"/api/subjects/v1/subjects/".concat(e)},vh=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},bh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/subjects?addToClassifications=").concat(!!t)},Sh=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},Eh=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},Ch=function(){return"/api/subjects/v1/presentations"},Oh=function(e){return"/api/subjects/v1/presentations/".concat(e)},Ih=function(){return"/api/subjects/v1/presentations"},jh=function(e){return"/api/subjects/v1/presentations/".concat(e)},Ah=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},Th=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=cover,banner")},wh=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},Lh=function(){return"/api/subjects/v1/classifications"},kh=function(e){return"/api/subjects/v1/classifications/".concat(e)},_h=function(e){return"/api/subjects/v1/classifications/".concat(e)},xh=function(e){return"/api/subjects/v1/objects/".concat(e,"/classifications")},Ph=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/classifications?presentationId=").concat(t)},Nh=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},Dh=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},Rh=function(){return"/api/subjects/v1/levels"},Fh=function(e){return"/api/subjects/v1/levels/".concat(e)},Mh=function(){return"/api/subjects/v1/levels"},Uh=function(e){return"/api/subjects/v1/levels/".concat(e)},Vh=function(e){return"/api/subjects/v1/objects/".concat(e,"/levels")},Bh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/levels?addToAudiences=").concat(!!t)},zh=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},Hh=function(e){return"/api/subjects/v1/audiences/".concat(e)},qh=function(){return"/api/subjects/v1/audiences"},Jh=function(e){return"/api/subjects/v1/audiences/".concat(e)},$h=function(e){return"/api/subjects/v1/audiences/".concat(e)},Kh=function(e){return"/api/subjects/v1/objects/".concat(e,"/audiences")},Yh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/audiences?presentationId=").concat(t)},Gh=function(e,t,n){var r="".concat(s.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(s.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},Wh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sh(e,t)}(a,e);var t,n,r,i=ch(a);function a(){return ah(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getPresentations",value:function(e,t){return this.get({resource:Ch(),eventPrefix:s.PRESENTATIONS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:Oh(e),eventPrefix:"".concat(s.PRESENTATION,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:Ih(),data:e,callback:t,errorCallback:n,eventPrefix:s.PRESENTATION,invalidationKeys:[s.PRESENTATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:jh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(s.PRESENTATION,":").concat(e),s.PRESENTATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getSubjectTree",value:function(e,t){return this.get({resource:ph(),formatData:function(e){return{children:e,name:qm.Root,id:null}},eventPrefix:s.SUBJECTS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:fh(e),eventPrefix:"".concat(s.SUBJECT,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:dh(e,t),eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:mh(e,t,n),eventPrefix:Gh(e,t,n),expiryTime:qe.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:hh(),data:e,callback:t,errorCallback:n,eventPrefix:s.SUBJECT,invalidationKeys:[s.SUBJECTS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:gh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){var r=this;return this.delete({resource:yh(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_SUBJECT,invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject."),errorHandler:function(e){var t,n=(null===(t=e)||void 0===t?void 0:t.code)===Pt.Conflict?"Cannot delete a subject with child subjects and/or classifications.":"Failed to delete subject.";r.alertService.error(n)()}})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:vh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectSubjects",value:function(e,t,n,r,i,a){var o=Qm.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.SUBJECTS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)),c.push.apply(c,rh(t.map((function(e){return"".concat(s.SUBJECTS,":").concat(e,":").concat(n)})))),this.update({resource:bh(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_SUBJECTS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," subjects.")),errorHandler:this.alertService.error("Failed to update ".concat(o," subjects."))})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,a){var o=1===t.length?Qm.singularizeMemberType(n):n,c=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(rh(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))),rh(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)}))));return this.create({resource:Sh(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:c,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(o," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(o," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var a=1===t.length?Qm.singularizeMemberType(n):n,o=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(rh(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))));return this.delete({resource:Eh(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(s.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:o,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(a," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(a," from subject."))})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:Ah(e),formatData:function(e){return{children:e,name:Jm.Root,id:null}},eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:Th(e),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:wh(e,t),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:Lh(),data:e,callback:t,errorCallback:n,eventPrefix:s.CLASSIFICATION,invalidationKeys:[s.CLASSIFICATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:kh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:_h(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_CLASSIFICATION,invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"getObjectClassifications",value:function(e,t,n,r){return this.get({resource:xh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectClassifications",value:function(e,t,n,r,i,a){var o=Qm.singularizeMemberType(r),c=["".concat(r,":").concat(e,":").concat(s.CLASSIFICATIONS)];return c.push.apply(c,rh(n.map((function(e){return"".concat(s.CLASSIFICATION,":").concat(e,":").concat(r)})))),this.update({resource:Ph(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_CLASSIFICATIONS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," classifications.")),errorHandler:this.alertService.error("Failed to update ".concat(o," classifications."))})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?Qm.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(Gh(r,i,n)),l.push.apply(l,rh(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.create({resource:Nh(e),data:t,callback:a,errorCallback:o,eventPrefix:"".concat(s.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(c," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(c," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?Qm.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(Gh(r,i,n)),l.push.apply(l,rh(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.delete({resource:Dh(e,t),callback:a,errorCallback:o,eventPrefix:"".concat(s.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(c," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(c," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:Rh(),eventPrefix:s.LEVELS,expiryTime:qe.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:Fh(e),eventPrefix:"".concat(s.LEVEL,":").concat(e),expiryTime:qe.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:Mh(),data:e,callback:t,errorCallback:n,eventPrefix:s.LEVEL,invalidationKeys:[s.LEVELS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:Uh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(s.LEVEL,":").concat(e),s.LEVELS],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getObjectLevels",value:function(e,t,n,r){return this.get({resource:Vh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectLevels",value:function(e,t,n,r,i,a){var o=Qm.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.LEVELS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.AUDIENCES)),this.update({resource:Bh(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_LEVELS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," levels.")),errorHandler:this.alertService.error("Failed to update ".concat(o," levels."))})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:zh(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCES,":").concat(e),expiryTime:qe.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:Hh(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCE,":").concat(e),expiryTime:qe.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:qh(),data:e,callback:t,errorCallback:n,eventPrefix:s.AUDIENCE,invalidationKeys:[s.AUDIENCES],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:Jh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],expiryTime:qe.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:$h(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_AUDIENCE,invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"getObjectAudiences",value:function(e,t,n,r){return this.get({resource:Kh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),expiryTime:qe.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectAudiences",value:function(e,t,n,r,i,a){var o=Qm.singularizeMemberType(r);return this.update({resource:Yh(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_AUDIENCES,":").concat(e),invalidationKeys:["".concat(r,":").concat(e,":").concat(s.AUDIENCES)],successHandler:this.alertService.success("Successfully updated ".concat(o," audiences.")),errorHandler:this.alertService.error("Failed to update ".concat(o," audiences."))})}},{key:"name",get:function(){return f.SUBJECT}},{key:"channelName",get:function(){return p.SUBJECT}}])&&oh(t.prototype,n),r&&oh(t,r),a}(De),Zh={dataServiceName:f.SUBJECT,dataChannelName:p.SUBJECT},Qh={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},Zh),{eventPrefix:s.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},Zh),{eventPrefix:Gh(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},Zh),{eventPrefix:s.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getObjectClassificationsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),fetchData:function(n){return n.getObjectClassifications(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},Zh),{eventPrefix:s.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getObjectLevelsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),fetchData:function(n){return n.getObjectLevels(e,t)},setData:n,onError:r})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(s.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})},getObjectAudiencesFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Zh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),fetchData:function(n){return n.getObjectAudiences(e,t)},setData:n,onError:r})}},Xh=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},eg=function(e,t){var n=e.levelIds;return t.filter((function(e){return n.includes(e.id)}))};function tg(e){var t=e.showLevels;return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Audiences"),!!t&&d.createElement("th",null,"Mapped Level(s)")))}function ng(e){var t,n=e.audience,r=e.levels;return d.createElement("tr",null,d.createElement("td",null,d.createElement(xl,{appLink:(t=n,{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[t.presentationId,t.masterId]})},n.name)),d.createElement("td",null,r.map((function(e){return d.createElement(xl,{key:e.id,appLink:Xh(e),className:"mr-2"},e.name)}))))}function rg(e){var t=e.audiences,n=e.levels;return d.createElement(uo.Table,{responsive:!0,bordered:!0},d.createElement(tg,{showLevels:!!t.length}),d.createElement("tbody",null,t.length?t.map((function(e){return d.createElement(ng,{key:e.masterId,audience:e,levels:eg(e,n)})})):d.createElement("tr",null,d.createElement("td",null,"This presentation has no audiences."))))}function ig(e){var t=null===e.masterId||void 0===e.masterId,n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this audience",autoFocus:!0}),d.createElement(vo,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(uo.Button,{as:xl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_AUDIENCE,args:[e.presentationId,e.masterId]}},"Delete")))}function ag(e){return d.createElement(so,{initialValues:e.audience,validationSchema:Km,onSubmit:e.saveAudience},d.createElement(ig,{masterId:e.audience&&e.audience.masterId,presentationId:e.presentationId,levels:e.levels}))}function og(e){var t=e.objectAudiences,n=e.presentationAudiences;return t.filter((function(e){return n.some((function(t){return t.masterId===e.masterId}))}))}function sg(e){var t,n,r,i,a,o=Qm.singularizeMemberType(e.memberType),s=(n=(t=e).presentationAudiences,r=t.objectLevels,i=t.objectAudiences,a=r.map((function(e){return e.id})),n.filter((function(e){return Vt.intersection(e.levelIds,a).length||i.some((function(t){return t.masterId===e.masterId}))})));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Levels"),d.createElement("p",null,"Select which levels this ".concat(o," is mapped to.")),d.createElement("p",null,"To see how levels correspond to audiences, scroll down to the audience-level mappings table."),d.createElement(wg,{initialValues:{levelIds:e.objectLevels.map((function(e){return e.id})),addToAudiences:!0},saveLevels:e.saveLevels,levels:e.levels,memberType:e.memberType})),d.createElement("h6",null,"Audiences"),d.createElement("p",null,"Select a presentation to view its audiences and map them to this ".concat(o,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(_g,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),d.createElement("p",null,"Audience to level mappings for this presentation are displayed below."),d.createElement(rg,{levels:e.levels,audiences:e.presentationAudiences}),d.createElement("p",null,"Only the audiences which are mapped to a level that this"+" ".concat(o," is mapped to are displayed below.")),!!s.length&&d.createElement(lg,{initialValues:{audienceIds:og(e).map((function(e){return e.masterId}))},saveAudiences:e.saveAudiences,audiences:s}))}function cg(e){var t=qa(),n=bo(t);return d.createElement(eo,null,d.createElement(vo,{label:"Audience(s)",as:"select",name:"audienceIds",id:"audience-ids",multiple:!0,size:e.audiences.length,value:t.values.audienceIds},e.audiences.map((function(e){return d.createElement("option",{key:e.masterId,value:e.masterId},e.name)}))),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Audiences")))}function lg(e){return d.createElement(so,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.audienceIds;return e.saveAudiences(r,n)},enableReinitialize:!0},d.createElement(cg,{audiences:e.audiences}))}function ug(e){var t=e.item,n=e.getItemAppLink,r=e.actions,i=e.pinState;return d.createElement("tr",null,d.createElement("td",null,d.createElement(xl,{appLink:n(t)},t.name)),i.isPinnable&&d.createElement("td",null,d.createElement(Fl,{selected:parseInt(t.id)===parseInt(i.currentPinnedVideo),onToggle:function(e){return i.onChange(e,t.id)},id:t.id})),r&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(wp,{actions:r}))))}function pg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fg(e,t)}(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 fg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mg(e,t)}(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 mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hg(e){var t=e.items,n=e.memberType,r=e.classification,i=e.getItemAppLink,a=e.getActions,o=e.updatePinnedVideo,s=dg(d.useState(!1),2),c=s[0],l=s[1],u=function(e,t){var n=e.pinnedVideoMasterId||null,r=pg(d.useState(n),2),i=r[0],a=r[1];return{currentPinnedVideo:i,onChange:function(e,t){a(e?t:null)},canSubmit:n!==i,isPinnable:t===Hm.Videos}}(r,n);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var p="".concat(ru(Qm.singularizeMemberType(n))," Name");return d.createElement(d.Fragment,null,d.createElement(uo.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,p),u.isPinnable&&d.createElement("th",null,"Pinned"),X.isFunction(a)&&d.createElement("th",null))),d.createElement("tbody",null,t.map((function(e){return d.createElement(ug,{item:e,key:e.id,getItemAppLink:i,actions:X.isFunction(a)&&a(e),pinState:u})})))),u.isPinnable&&d.createElement(Eo,{showSpinner:c,onClick:function(){l(!0),o(u.currentPinnedVideo,(function(){return l(!1)}))},disabled:!u.canSubmit||c},"Save"))}function gg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yg(e,t)}(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 yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vg=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function bg(e){var t=qa(),n=bo(t),r=null===e.id||void 0===e.id,i=!r||!(!t.values.parentIds||!t.values.parentIds.length),a=gg(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,t.values.parentIds]),d.useEffect((function(){t.values.subjectIds.length&&!t.touched.subjectIds&&t.setFieldTouched("subjectIds",!0)}),[t.values.subjectIds]);var l=function(e){return t.setFieldValue("parentIds",Vt.addOrRemove(t.values.parentIds.map((function(e){return e.toString()})),e.id.toString()))},p=function(e){return t.setFieldValue("subjectIds",Vt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),e.id.toString()))},f=function(e){return"".concat(po.getCustomFormControlClassName(t.errors,t.touched,e)," h-auto py-2")};return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this classification",autoFocus:!0}),d.createElement(vo,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},dt.getEnumKeys($m).map((function(e){return d.createElement("option",{key:e,value:$m[e]},e)}))),d.createElement(vo,{label:"Coming Soon",name:"comingSoon",id:"comingSoon",type:"checkbox",checked:t.values.comingSoon}),d.createElement(vo,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:t.values.emphasize}),d.createElement(vo,{label:"Can Be Preferred",name:"canBePreferred",id:"canBePreferred",type:"checkbox",checked:t.values.canBePreferred}),d.createElement(vo,{name:"parentIds"},(function(){return d.createElement("div",{className:f("parentIds")},d.createElement(Kp,{label:"Parent Classification(s)",tree:e.classificationTree,selectedIds:t.values.parentIds,onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root classification.",isNodeDisabled:(n=e.classificationTree,r=e.id,function(e){if(e.id===r)return!0;var t=ou.find(n,r);return!!ou.find(t,e.id)})}));var n,r})),d.createElement(vo,{name:"subjectIds"},(function(){return d.createElement("div",{className:f("subjectIds")},d.createElement(Kp,{label:"Mapped Subject(s)",tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:p,collapse:!r,getSelectedItemAppLink:vg}))})),d.createElement(_u,{imageType:Ul.Covers,fieldName:"cover",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement(_u,{imageType:Ul.Banners,fieldName:"banner",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},r?"Create":"Save"),!r&&d.createElement(uo.Button,{as:xl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e.presentationId,e.id]}},"Delete")))}function Sg(e){return d.createElement(so,{initialValues:e.classification,validationSchema:Ym,onSubmit:e.saveClassification},d.createElement(bg,{id:e.classification&&e.classification.id,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree}))}var Eg=function(e){return function(t){if(!e)return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION;switch(e){case Hm.Playlists:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case Hm.Series:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_SERIES;case Hm.Videos:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function Cg(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?d.createElement(d.Fragment,null,d.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),d.createElement("div",{className:"py-2"},d.createElement(Np,{tabs:th(t.id,n),isItemActive:Eg(r)}))):d.createElement(d.Fragment,null)}function Og(e){var t=qa(),n=bo(t),r=function(e){return t.setFieldValue("classificationIds",Vt.addOrRemove(t.values.classificationIds.map((function(e){return e.toString()})),e.id.toString()))},i="".concat(po.getCustomFormControlClassName(t.errors,t.touched,"classificationIds")," h-auto py-2");return d.createElement(eo,null,d.createElement(vo,{name:"classificationIds"},(function(){return d.createElement("div",{className:i},d.createElement(Kp,{label:"Mapped Classification(s)",tree:e.classificationTree,selectedIds:t.values.classificationIds,onSelect:r,getSelectedItemAppLink:(n=e.presentationId,function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,e]}}),isNodeDisabled:e.isClassificationDisabled}));var n})),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Classifications")))}function Ig(e){return d.createElement(so,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.classificationIds;return e.saveClassifications(r,n)},enableReinitialize:!0},d.createElement(Og,{presentationId:e.presentationId,classificationTree:e.classificationTree,isClassificationDisabled:e.isClassificationDisabled}))}function jg(e){var t=null===e.id||void 0===e.id,n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this level",autoFocus:!0}),d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"))}function Ag(e){return d.createElement(so,{initialValues:e.level,validationSchema:Gm,onSubmit:e.saveLevel},d.createElement(jg,{id:e.level&&e.level.id}))}function Tg(e){var t=Qm.singularizeMemberType(e.memberType),n=qa(),r=bo(n);return d.createElement(eo,null,d.createElement(vo,{label:"Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement(vo,{label:"Automatically add to audiences*",name:"addToAudiences",id:"add-to-audiences",type:"checkbox",checked:n.values.addToAudiences}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(t," to a level, all of that level's")+" audiences across all presentations will also be added to.")),d.createElement("p",null,d.createElement("strong",null,"Note:")," When removing a ".concat(t," from a level, that level's audiences "),d.createElement("strong",null,"will not")," be automatically removed from."),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},"Save Levels")))}function wg(e){return d.createElement(so,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.levelIds,i=t.addToAudiences;return e.saveLevels(r,i,n)}},d.createElement(Tg,{levels:e.levels,memberType:e.memberType}))}function Lg(e){var t=e.values,n=t.name,r=t.description,i=e.id,a=e.isSubmitting,o=!i;return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),d.createElement(Eo,{showSpinner:a,type:"submit"},o?"Create":"Save"))}function kg(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.description,s=void 0===o?"":o,c=e.savePresentation;return d.createElement(Ga,{initialValues:{name:a,description:s},validationSchema:Wm,onSubmit:c},(function(e){return d.createElement(Lg,Object.assign({id:r},e))}))}function _g(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label,a=function(e){var n,i,a=(n=e,i=t,Vt.first(i.filter((function(e){return e.id.toString()===n.toString()}))));r(a)};return d.useEffect((function(){t&&!n&&r(t[0])}),[t]),d.createElement(d.Fragment,null,!!n&&d.createElement(d.Fragment,null,d.createElement(uo.Form.Label,null,i),d.createElement(uo.Form.Control,{as:"select",value:n.id,onChange:function(e){return a(e.target.value)},className:"cursor-pointer"},t.map((function(e){return d.createElement("option",{value:e.id,key:e.id},e.name)})))))}function xg(e){return d.createElement(d.Fragment,null,d.createElement("h4",null,"".concat(ru(e.memberType))),d.createElement(uo.Table,{responsive:!0},d.createElement("tbody",null,e.objects&&e.objects.map((function(t){return d.createElement("tr",{key:t.id},d.createElement("td",null,d.createElement(xl,{appLink:Qm.getMemberAppLink(e.memberType,t.id)},t.name)))})))),d.createElement(qg,{initialValues:{subjectIds:[],addToClassifications:!0},subjectTree:e.subjectTree,saveSubjects:e.onClickAddToSubject,memberType:e.memberType,saveBtnText:"Add to subject",subjectRequired:!0}))}function Pg(e){return function(e){if(Array.isArray(e))return Ng(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ng(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ng(e,t)}(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 Ng(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dg(e){var t=Qm.singularizeMemberType(e.memberType),n=[].concat(Pg(e.objectClassifications),Pg(e.objectSubjectClassifications)).map((function(e){return e.id}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Subjects"),d.createElement("p",null,"Select which subjects this ".concat(t," is mapped to.")),d.createElement(qg,{initialValues:{subjectIds:e.objectSubjects.map((function(e){return e.id}))},subjectTree:e.subjectTree,saveSubjects:e.saveSubjects,memberType:e.memberType,saveBtnText:"Save Subjects",allowMultiple:!0})),d.createElement("h6",null,"Classifications"),d.createElement("p",null,"Select a presentation to view its classifications and map them to this ".concat(t,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(_g,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),e.currentPresentation&&e.classificationTree&&e.classificationTree.children.length?d.createElement(d.Fragment,null,d.createElement("p",null,"Only classifications which are mapped to one of the subjects selected above can be selected."),d.createElement(Ig,{initialValues:{classificationIds:e.objectClassifications.map((function(e){return e.id}))},presentationId:e.currentPresentation.id,classificationTree:e.classificationTree,saveClassifications:e.saveClassifications,isClassificationDisabled:function(e){return!n.includes(e.id)}})):d.createElement("p",null,"This presentation has no classifications."))}function Rg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fg(e,t)}(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 Fg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}_g.defaultProps={label:"Presentation"};function Mg(e){var t=!e.id,n=qa(),r=bo(n),i=!t||!!n.values.parentId,a=Rg(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,n.values.parentId]);var l=function(e){var t=e.id===n.values.parentId?null:e.id;n.setFieldValue("parentId",t)},p="".concat(po.getCustomFormControlClassName(n.errors,n.touched,"parentId")," h-auto py-2");return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this subject",autoFocus:!0}),d.createElement(vo,{name:"parentId"},(function(){return d.createElement("div",{className:p},d.createElement(Kp,{label:"Parent Subject",tree:e.subjectTree,selectedIds:[n.values.parentId],onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root subject.",isNodeDisabled:(t=e.subjectTree,r=e.id,function(e){if(e.id===r)return!0;var n=ou.find(t,r);return!!ou.find(n,e.id)})}));var t,r})),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Eo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(uo.Button,{as:xl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},"Delete")))}function Ug(e){return d.createElement(so,{initialValues:e.subject,validationSchema:Zm,onSubmit:e.saveSubject},d.createElement(Mg,{id:e.subject&&e.subject.id,subjectTree:e.subjectTree}))}var Vg=function(e){return function(t){return t.appLink.action===e}};function Bg(e){var t=e.subjectId,n=e.activeAction;return d.createElement(d.Fragment,null,d.createElement(uo.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),d.createElement("div",{className:"py-2"},d.createElement(Np,{tabs:eh(t),isItemActive:Vg(n)})))}var zg=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function Hg(e){var t=qa(),n=bo(t),r=function(n){var r=e.allowMultiple?Vt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),n.id.toString()):[n.id];t.setFieldValue("subjectIds",r)},i=Qm.singularizeMemberType(e.memberType),a="".concat(po.getCustomFormControlClassName(t.errors,t.touched,"subjectIds")," h-auto py-2");return d.createElement(eo,null,d.createElement(vo,{name:"subjectIds"},(function(){return d.createElement("div",{className:a},d.createElement(Kp,{label:"Mapped Subject".concat(e.allowMultiple?"(s)":""),tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:r,collapse:!!t.initialValues.subjectIds.length,getSelectedItemAppLink:zg}))})),d.createElement(vo,{label:"Automatically add to classifications*",name:"addToClassifications",id:"add-to-classifications",type:"checkbox",checked:t.values.addToClassifications}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(i," to a subject, all of that subject's")+" mapped classifications across all presentations will also be added to.")),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.saveBtnText)))}function qg(e){var t;return d.createElement(so,{initialValues:e.initialValues,validationSchema:(t=e.subjectRequired,co.object().shape({subjectIds:t?co.array().of(co.string()).min(1,"A subject is required").required("A subject is required"):co.array().of(co.string()),addToClassifications:co.boolean().default(!0)}).noUnknown()),onSubmit:function(t,n){var r=t.subjectIds,i=t.addToClassifications;return e.saveSubjects(r,i,n)}},d.createElement(Hg,{subjectTree:e.subjectTree,memberType:e.memberType,allowMultiple:e.allowMultiple,saveBtnText:e.saveBtnText}))}Hg.defaultProps={saveBtnText:"Save"};var Jg=function(e){return d.createElement("div",{className:"border rounded p-2 mb-3"},d.createElement("h6",{className:"border-bottom pb-1"},e.presentation.name),e.classifications&&e.classifications.length?d.createElement("ul",{className:"list-unstyled mb-0"},e.classifications.map((function(t){return d.createElement("li",{key:t.id,className:"py-1"},d.createElement(xl,{appLink:(n=e.presentation.id,r=t.id,{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,r]})},t.name));var n,r}))):d.createElement("p",null,d.createElement("em",null,"There are no classifications mapped to this subject in this presentation.")))},$g=function(e){return d.createElement(d.Fragment,null,!!e.presentations&&!!e.classificationDictionary&&e.presentations.map((function(t){return d.createElement(Jg,{key:t.id,presentation:t,classifications:e.classificationDictionary[t.id]})})))},Kg=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Yg(e){return d.createElement(d.Fragment,null,e.classifications.map((function(t){return d.createElement("th",{key:t.id},d.createElement("span",{className:"d-inline-block"},d.createElement(Fl,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),d.createElement(xl,{appLink:e.getClassificationAppLink(t.id)},function(e,t){return t?e.name:"Classification: ".concat(e.name)}(t,e.showClassificationSubHeader)))})))}function Gg(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=Kg(e,["memberType","hasActions","classifications"]),a="".concat(ru(Qm.singularizeMemberType(t))," Name"),o=!!r&&!!r.length,s=o&&r.length>1,c=o?2:1,l=Object.assign({classifications:r,showClassificationSubHeader:s},i);return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",{rowSpan:c},a),o&&(s?d.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):d.createElement(Yg,Object.assign({},l))),n&&d.createElement("th",{rowSpan:c})),o&&s&&d.createElement("tr",null,d.createElement(Yg,Object.assign({},l))))}function Wg(e){var t=e.member,n=t.id,i=t.name,a=t.classifications,o=void 0===a?[]:a,s=e.getMemberAppLink,c=e.onToggleClassification,l=e.actions,u=X.isFunction(s)&&s(n);return o.length&&!X.isFunction(c)&&r.ErrorHelper.throw(new B("onToggleClassification must be passed to SubjectMemberItem")),d.createElement("tr",null,d.createElement("td",null,u?d.createElement(xl,{appLink:s(n)},i):i),!!o.length&&o.map((function(e){return d.createElement("td",{key:e.id},d.createElement(Fl,{selected:e.selected,onToggle:function(t){return c(e.id,t,n)}}))})),l&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(wp,{actions:l}))))}var Zg=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Qg(e,t){return function(n){var r=n[e],i=Gp.length(r);return!!i&&i===t.length}}function Xg(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,a=e.getClassificationAppLink,o=e.onToggleClassification,s=Zg(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var c=X.isFunction(r),l={memberType:n,classifications:i,getClassificationAppLink:a,getIsClassificationSelected:Qg(n,t),onToggleClassification:o,hasActions:c};return d.createElement(uo.Table,{responsive:!0,bordered:!0},d.createElement(Gg,Object.assign({},l)),d.createElement("tbody",null,t.map((function(e,t){return d.createElement(Wg,Object.assign({key:t,member:e,actions:c&&r(e.id),onToggleClassification:o},s))}))))}function ey(e){var t=e.navItems,n=e.currentAppLink;return d.createElement(uo.Container,null,d.createElement(uo.Navbar,{className:"justify-content-between align-items-center"},d.createElement(uo.Nav,null,!!t&&t.map((function(e,t){return d.createElement(uo.Nav.Item,{key:t},d.createElement(xl,{appLink:e.appLink,className:"nav-link".concat(Ql.isItemActive(e,n)?" text-primary":"")},e.label))})))))}function ty(e,t){d.useEffect((function(){e.presentations&&!e.currentPresentation&&Bm.getSetStateByKey(t,"currentPresentation")(Vt.first(e.presentations))}),[e.presentations])}function ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ry(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ry(e,t)}(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 ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iy(e){var t=i.useBasicFetch(Em(e.playlistId)),n=ny(d.useState({}),2),r=n[0],a=n[1],s=pm(f.SUBJECT);!function(e,t,n){var r=function(e){return Bm.getSetStateByKey(n,e)};Vm([Qh.getObjectLevelsFetchOptions(e,Hm.Playlists,r("playlistLevels"))],[e]),mu(Qh.getObjectAudiencesFetchOptions(e,Hm.Playlists,r("playlistAudiences")),[e,t.playlistLevels]),Vm([Qh.getPresentationsFetchOptions(r("presentations")),Qh.getLevelsFetchOptions(r("levels"))],[]),mu(!!t.currentPresentation&&Qh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.playlistId,r,a),ty(r,a);var c=!!(r.presentations&&r.levels&&r.presentationAudiences&&r.playlistLevels&&r.playlistAudiences);return d.createElement(d.Fragment,null,d.createElement(Fm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_AUDIENCES}),d.createElement(Lp,{object:t.data}),!!c&&d.createElement(sg,{objectLevels:r.playlistLevels,objectAudiences:r.playlistAudiences,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:Bm.getSetStateByKey(a,"currentPresentation"),levels:r.levels,presentationAudiences:r.presentationAudiences,memberType:Hm.Playlists,saveLevels:function(t,n,r){return s.updateObjectLevels(e.playlistId,t,Hm.Playlists,n,r,r)},saveAudiences:function(t,n){return s.updateObjectAudiences(e.playlistId,r.currentPresentation.id,t,Hm.Playlists,n,n)}}))}function ay(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||sy(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 oy(e){return function(e){if(Array.isArray(e))return cy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||sy(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 sy(e,t){if(e){if("string"==typeof e)return cy(e,t);var n=Object.prototype.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)?cy(e,t):void 0}}function cy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ly(e){var t=i.useBasicFetch(Em(e.playlistId)),n=ay(d.useState({}),2),r=n[0],a=n[1],s=pm(f.SUBJECT);!function(e,t,n){var r=function(e){return Bm.getSetStateByKey(n,e)};Vm([Qh.getSubjectTreeFetchOptions(r("subjectTree")),Qh.getPresentationsFetchOptions(r("presentations"))],[]),Vm([Qh.getObjectSubjectsFetchOptions(e,Hm.Playlists,r("playlistSubjects"))],[e]),mu(!!t.currentPresentation&&Qh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.playlistSubjects]);var i=function(e,t){return[].concat(oy(t.subjectClassifications||[]),oy(e))},a=t.playlistSubjects&&t.playlistSubjects.map((function(e){return Qh.getSubjectClassificationFetchOptions(e.id,Bm.getSetStateByKey(n,"subjectClassifications",i))}));Vm(a,[t.playlistSubjects],!!a),mu(Qh.getObjectClassificationsFetchOptions(e,Hm.Playlists,r("playlistClassifications")),[e,t.playlistSubjects])}(e.playlistId,r,a),ty(r,a);var c=!!(r.playlistSubjects&&r.subjectTree&&r.presentations&&r.classificationTree&&r.playlistClassifications&&r.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(Fm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_SUBJECTS}),d.createElement(Lp,{object:t.data}),c&&d.createElement(Dg,{objectSubjects:r.playlistSubjects,subjectTree:r.subjectTree,memberType:Hm.Playlists,presentations:r.presentations,currentPresentation:r.currentPresentation,setCurrentPresentation:Bm.getSetStateByKey(a,"currentPresentation"),objectClassifications:r.playlistClassifications,objectSubjectClassifications:r.subjectClassifications,classificationTree:r.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.playlistId,t,Hm.Playlists,n,r,r)},saveClassifications:function(t,n){return s.updateObjectClassifications(e.playlistId,r.currentPresentation.id,t,Hm.Playlists,n,n)}}))}const uy={reorder(e,t,n){if(t===n)return{reorderedItems:e,reorderRequest:null};const r=Vt.moveItem(e,t,n),i=n<e.length-1?r[n+1].id:null;return{reorderedItems:r,reorderRequest:{sourceMemberId:r[n].id,destinationMemberId:i}}},updateState(e,t,n){const r=[],i=dt.deepClone(n),a=[e];let o=n[e];const s=!!o&&!!o.data&&o.data.length;for(;o&&Array.isArray(o.data);){r.push(...o.data);const t=o.pagination&&o.pagination.cursors&&o.pagination.cursors.next,i=!!t&&`${e}:${t}`;o=t&&n[i],o&&a.push(i)}if(!r.length)return n;const c=Vt.findIndex(r,e=>e.id===t.sourceMemberId),l=[...r],u=l.splice(c,1),p=t.destinationMemberId?Vt.findIndex(l,e=>e.id===t.destinationMemberId):l.length;return l.splice(p,0,u[0]),a.forEach(e=>{const t=l.splice(0,s);i[e].data=t}),i}};function py(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fy(e,t)}(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 fy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dy=function(e){return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:[e.id]}};function my(e){var t,n,r=Object(te.useDispatch)(),a=gm(),s=i.useBasicFetch(Em(e.playlistId)),c=i.useBasicFetch(Am(e.playlistId)),l=py(function(e){const[t,n]=Object(d.useState)();return Object(d.useEffect)(()=>{t&&(e.length!==t.length||function(e,t){let n=!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r].id!==t[r].id){n=!1;break}return n}(e,t))&&n(null)},[e]),[t,n]}(null===(t=c.data)||void 0===t?void 0:t.data),2),p=l[0],f=l[1],m=p?{data:p,pagination:null}:c.data;return d.createElement(d.Fragment,null,d.createElement(Fm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_VIDEOS}),d.createElement(Lp,{object:s.data}),!!m&&d.createElement(lf,{onSortEnd:function(t,n){if(t!==n){var o=uy.reorder(c.data.data,t,n),s=o.reorderRequest,l=o.reorderedItems;f(l);i.fetch(r,Tm(e.playlistId,s,null,(function(){a.error("Failed to update playlist order."),f(null)})))}},videos:m,getVideoAppLink:dy,getVideoActions:(n=e.playlistId,function(e){return[{label:"Remove video",appLink:{application:u.PLAYLISTS,action:o.Playlists.REMOVE_VIDEO,args:[n.toString(),e.id.toString()]},className:"text-danger"}]}),emptyMessage:"There are no videos in this playlist."}))}function hy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gy(e,t)}(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 gy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yy(){var e=Object(te.useDispatch)(),t=gm(),n=hy(d.useState(),2),a=n[0],s=n[1];return mu($e.getCurrentUserFetchOptions(s),[]),d.createElement(d.Fragment,null,!!a&&d.createElement(Dm,{savePlaylist:function(n,s){i.fetch(e,Om(n,a.id,(function(e){t.success("Successfully created playlist."),function(e){e&&e.id&&r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]})}(e)}),(function(){t.error("Failed to create playlist.")}),s))}}))}var vy="rating,thumbnail,glance",by=function(e){return{url:"/api/master/v2/objects/".concat(e,"?query=").concat(vy),key:"videos:".concat(e)}},Sy=function(e){var t=e.slice().sort();return{key:"videos:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Ey=function(e){return{url:"/ajax/hostedlibraries/rightsline/programs/".concat(e),key:"rightsline:videos:".concat(e),normalizeOptions:{namespace:"rightsline"}}},Cy=function(e,t,n,r,i){return{key:"videos:".concat(e),url:"/api/master/v2/objects/".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}};function Oy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Iy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iy(e,t)}(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 Iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jy(e){var t=Object(te.useDispatch)(),n=gm(),r=i.useBasicFetch(Em(e.playlistId)),a=i.useBasicFetch(by(e.videoId)),o=Oy(d.useState(!1),2),s=o[0],c=o[1];var l=!!r.data&&!!a.data;return d.createElement(zf,{title:"Remove Video",closePopup:e.closePopup,showLoadingSpinner:!l},!!l&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,a.data.name)," from ",d.createElement("strong",null,r.data.name),"?")),d.createElement(qf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,wm(e.playlistId,e.videoId,(function(){n.success("Successfully removed video from playlist")}),(function(){n.error("Failed to remove video from playlist")}),e.closePopup))},buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:s}]})))}function Ay(e){return r.AppLinkHelper.trigger(function(e){return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}}(e))}function Ty(e){var t=e?{application:u.PLAYLISTS,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e}}:{application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS};r.AppLinkHelper.trigger(t)}function wy(e){return d.createElement("div",{className:"pb-3 w-50"},d.createElement(_l,{initialQuery:e.query,placeholder:"Search for a playlist",onSuggestionSelected:Ay,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/playlists/instant/raw","?query=").concat(e)},activationLength:2,onSubmit:Ty}))}var Ly=u.PLAYLISTS,ky=function(e){return{application:Ly,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function _y(e){var t=i.useBasicFetch(bm(e.cursor));return d.createElement(d.Fragment,null,d.createElement(wy,null),d.createElement(bp,{collection:t&&t.data,collectionAppLink:{application:Ly,action:o.Playlists.PLAYLISTS},newObjectAppLink:{application:Ly,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:ky,objectName:"Playlist"}))}var xy=u.PLAYLISTS,Py=function(e){return{application:xy,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function Ny(e){var t=i.useBasicFetch(Sm(e.query,e.cursor));return d.createElement(d.Fragment,null,d.createElement(wy,{query:e.query}),!!t.data&&(t.data.data.length?d.createElement(bp,{collection:t.data,collectionAppLink:{application:xy,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e.query}},newObjectAppLink:{application:xy,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:Py,objectName:"Playlist"}):d.createElement("p",null,"No playlists found, please try a different search query.")))}function Dy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ry(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ry(e,t)}(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 Ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Fy=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function My(e){var t=e.id,n=e.routeToOnDelete,i=e.closePopup,a=Dy(d.useState(),2),o=a[0],s=a[1],c=Dy(d.useState(!1),2),l=c[0],u=c[1],p=pm(f.SUBJECT);mu(Qh.getAudienceFetchOptions(t,s),[t]);return d.createElement(zf,{title:"Delete Audience",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(qf,{buttons:Fy((function(){u(!0);p.deleteAudience(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)}),i,l)})))}function Uy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vy(e,t)}(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 Vy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var By=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function zy(e){var t=e.presentationId,n=e.audienceId,r=Uy(d.useState(),2),i=r[0],a=r[1],o=Uy(d.useState(),2),s=o[0],c=o[1],l=Uy(d.useState(),2),u=l[0],p=l[1],m=pm(f.SUBJECT);mu(Qh.getAudienceFetchOptions(n,a),[n]),mu(Qh.getLevelsFetchOptions(c),[]),mu(Qh.getPresentationFetchOptions(t,p),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(Pl,{appLink:By(t),backToName:"audiences"})),!!u&&d.createElement("h6",null,"Presentation: ".concat(u.name)),!!i&&!!s&&d.createElement(ag,{audience:i,levels:s,saveAudience:function(e,r){return m.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),r,r)},presentationId:t}))}function Hy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qy(e,t)}(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 qy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Jy=function(e){return function(t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,t.masterId]}}},$y=function(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_AUDIENCE,args:[e]}},Ky={application:u.SUBJECTS,action:o.Subjects.AUDIENCES};function Yy(e){var t=e.presentationId,n=Hy(d.useState(),2),r=n[0],i=n[1];return mu(Qh.getAudiencesFetchOptions(t,i),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(Pl,{appLink:Ky,backToName:"presentations"})),d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),d.createElement(xl,{appLink:$y(t),className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:jl.Small}),d.createElement("span",null,"New Audience"))),d.createElement(xp,{objects:r,getAppLink:Jy(e.presentationId),emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function Gy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Wy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wy(e,t)}(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 Wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Zy=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function Qy(e){var t=e.presentationId,n=Gy(d.useState(),2),i=n[0],a=n[1],s=Gy(d.useState(),2),c=s[0],l=s[1],p=pm(f.SUBJECT);mu(Qh.getLevelsFetchOptions(a),[]),mu(Qh.getPresentationFetchOptions(t,l),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2"},d.createElement(Pl,{appLink:Zy(t),backToName:"audiences"})),!!c&&d.createElement("h6",null,"Presentation: ".concat(c.name)),!!i&&d.createElement(ag,{levels:i,presentationId:t,saveAudience:function(e,n){return p.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,n.masterId]})}}(t,n),n)}}))}function Xy(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}}function ev(e){return[{label:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},Xy(e)),{args:[e],params:{parentId:t.id}})}},{label:"Delete classification",getAppLink:function(t){return{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var tv=n(127),nv=n.n(tv);function rv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iv(e,t)}(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 iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function av(e){var t=e.presentationId,n=e.selectedClassificationId,r=rv(d.useState(),2),i=r[0],a=r[1],s=rv(d.useState(),2),c=s[0],l=s[1];return function(e,t,n){Vm([Qh.getClassificationTreeFetchOptions(e,t),Qh.getPresentationFetchOptions(e,n)],[e])}(t,a,l),d.createElement("div",{className:"".concat(nv.a.navContainer," h-auto pr-2 border-right")},!!c&&d.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(c.name,")")),d.createElement(xl,{appLink:Xy(t),className:"d-inline-block pb-2"},d.createElement(Al,{svgName:Sl.Plus,size:jl.Small}),d.createElement("span",null,"New Classification")),!!i&&d.createElement("div",{className:"border-top pt-1"},d.createElement(zp,{tree:i,getAppLink:function(e){return function(e,t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:ev(t)})))}function ov(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sv(e,t)}(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 sv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cv(e){var t=e.classificationId,n=e.routeToOnDelete,i=e.closePopup,a=ov(d.useState(),2),o=a[0],s=a[1],c=ov(d.useState(!1),2),l=c[0],u=c[1];mu(Qh.getClassificationFetchOptions(t,s),[]);var p=pm(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteClassification(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:l}];return d.createElement(zf,{title:"Delete Classification",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(qf,{buttons:m})))}function lv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return uv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uv(e,t)}(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 uv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pv(e){var t=e.presentationId,n=e.classificationId,r=lv(d.useState(),2),i=r[0],a=r[1],o=lv(d.useState(),2),s=o[0],c=o[1],l=lv(d.useState(),2),u=l[0],p=l[1],m=lv(d.useState(),2),h=m[0],g=m[1],y=pm(f.SUBJECT),v=Qh.getClassificationFetchOptions(n,a),b=Qh.getPresentationFetchOptions(t,c),S=Qh.getClassificationTreeFetchOptions(t,p);mu(Qh.getSubjectTreeFetchOptions(g),[]),mu(v,[n]),Vm([b,S],[t]);return d.createElement("div",null,d.createElement(Cg,{presentation:s,classificationId:n}),!!i&&!!u&&!!h&&d.createElement(Sg,{classification:i,presentationId:t,subjectTree:h,classificationTree:u,saveClassification:function(e,t){return y.updateClassification(n,e,t,t)}}))}function fv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dv(e,t)}(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 dv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mv(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=fv(d.useState(),2),a=i[0],o=i[1],s=fv(d.useState(),2),c=s[0],l=s[1],u=fv(d.useState(),2),p=u[0],m=u[1];mu(Qh.getPresentationFetchOptions(t,o),[]),mu(Qh.getClassificationFetchOptions(n,l),[n]),mu(Qh.getClassificationMembersFetchOptions(n,r,m),[n,r]);var h=pm(f.SUBJECT),g={items:p&&p.data,memberType:r,classification:c,updatePinnedVideo:function(e,t){var r=Object.assign(Object.assign({},c),{pinnedVideoMasterId:e});h.updateClassification(n,r,t)},getItemAppLink:function(e){return Qm.getMemberAppLink(r,e.id)},getActions:function(e){return Qm.getMemberActions(n,zm.Classification,r,e.id)}},y={presentation:a,classificationId:n},v=tu(g);return d.createElement(d.Fragment,null,d.createElement(Cg,Object.assign({},y,{memberType:r})),v&&d.createElement(hg,Object.assign({},g)))}function hv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gv(e,t)}(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 gv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yv(e){var t=e.presentationId,n=e.parentId,i=hv(d.useState(),2),a=i[0],s=i[1],c=hv(d.useState(),2),l=c[0],p=c[1],m=pm(f.SUBJECT),h=Qh.getClassificationTreeFetchOptions(t,s);mu(Qh.getSubjectTreeFetchOptions(p),[]),mu(h,[t]);return d.createElement("div",null,d.createElement("h4",{className:"py-2"},"Create New Classification"),!!l&&!!a&&d.createElement(Sg,{classification:n?{parentIds:[n]}:{},presentationId:t,subjectTree:l,classificationTree:a,saveClassification:function(e,n){return m.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),n&&n.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]})}}(t,n),n)}}))}var vv=function(e){return{key:"series:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=thumbnail,tallPoster,banner,rating")}},bv=function(e){var t=e.slice().sort();return{key:"series:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Sv=function(e,t,n,r){return{url:"/api/master/v2/series",key:"series",data:e,type:it.POST,success:t,error:n,always:r}},Ev=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:series:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}};function Cv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ov(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ov(e,t)}(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 Ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Iv(e){var t=Cv(d.useState(),2),n=t[0],r=t[1],a=Cv(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case Hm.Playlists:return Em(t);case Hm.Series:return vv(t);case Hm.Videos:return by(t)}}(e.memberType,e.memberId)),l=pm(f.SUBJECT);mu(Qh.getClassificationFetchOptions(e.classificationId,r),[e.classificationId]);var u=!!n&&!!c.data,p="Remove ".concat(ru(Qm.singularizeMemberType(e.memberType)));return d.createElement(zf,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"This will not remove it from the backbone subject.")),d.createElement(qf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromClassification(e.classificationId,[e.memberId],e.memberType,null,null,e.closePopup,e.closePopup),n.pinnedVideoMasterId===e.memberId&&l.updateClassification(e.classificationId,Object.assign(Object.assign({},n),{pinnedVideoMasterId:null}))},buttonText:"Yes, remove this ".concat(Qm.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function jv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Av(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Av(e,t)}(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 Av(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tv(e){var t=e.id,n=jv(d.useState(),2),r=n[0],i=n[1],a=pm(f.SUBJECT);mu(Qh.getLevelFetchOptions(t,i),[t]);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Level"),!!r&&d.createElement(Ag,{level:r,saveLevel:function(e,n){return a.updateLevel(t,e,n,n)}}))}function wv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Lv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lv(e,t)}(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 Lv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kv=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},_v={application:u.SUBJECTS,action:o.Subjects.NEW_LEVEL};function xv(){var e=wv(d.useState(),2),t=e[0],n=e[1];return mu(Qh.getLevelsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),d.createElement(xl,{appLink:_v,className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:jl.Small}),d.createElement("span",null,"New Level"))),d.createElement(xp,{objects:t,getAppLink:kv}))}function Pv(){var e=pm(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Level"),d.createElement(Ag,{saveLevel:function(t,n){return e.createLevel(t,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[t.id]})}}(n),n)}}))}function Nv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dv(e,t)}(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 Dv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rv(e){var t=e.id,n=Nv(d.useState(),2),r=n[0],i=n[1],a=pm(f.SUBJECT);mu(Qh.getPresentationFetchOptions(t,i),[t]);var o={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return a.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},s=tu(o);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Presentation"),!!s&&d.createElement(kg,Object.assign({},o)))}function Fv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Mv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mv(e,t)}(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 Mv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Uv=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]}},Vv={application:u.SUBJECTS,action:o.Subjects.NEW_PRESENTATION};function Bv(){var e=Fv(d.useState(),2),t=e[0],n=e[1];return mu(Qh.getPresentationsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),d.createElement(xl,{appLink:Vv,className:"d-block"},d.createElement(Al,{svgName:Sl.Plus,size:jl.Small}),d.createElement("span",null,"New Presentation"))),d.createElement(xp,{objects:t,getAppLink:Uv}))}function zv(){var e=pm(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Presentation"),d.createElement(kg,{savePresentation:function(t,n){var i=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,i)}),(function(){return i(!1)}))}}))}function Hv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qv(e,t)}(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 qv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jv(e){var t=e.objectType,n=e.getAppLink,r=Hv(d.useState(),2),i=r[0],a=r[1];return mu(Qh.getPresentationsFetchOptions(a),[]),d.createElement("div",null,d.createElement("h5",null,d.createElement(wo,{namespace:"subjects.selectPresentation",phrase:"heading",options:{objectType:t}})),d.createElement(xp,{objects:i,getAppLink:n}))}function $v(e){const{title:t,onClickConfirm:n,confirmButtonText:r,cancelButtonText:i,closePopup:a}=e,[o,s]=d.useState(!1),c=[{variant:"link",onClick:a,buttonText:i},{variant:"primary",onClick:()=>{s(!0),n()},buttonText:r,isSpinnerButton:!0,showSpinner:o}];return d.createElement(zf,{title:t,closePopup:a},d.createElement(d.Fragment,null,e.children,d.createElement(qf,{buttons:c})))}function Kv(e,t){return Bm.getSetStateByKey(e,t)}function Yv(e,t,n,i,a){var s=i.selectedSubject,c=function(){return Kv(a,"showConfirmationPopup")(!1)};t.addObjectsToSubject(s.id,e.map((function(e){return e.id})),n.memberType,i.addToClassifications,(function(){c(),r.AppLinkHelper.trigger(function(e,t){var n={application:u.SUBJECTS,args:[e]};switch(t){case Hm.Playlists:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_PLAYLISTS});case Hm.Series:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_SERIES});case Hm.Videos:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_VIDEOS})}}(s.id,n.memberType))}),c)}function Gv(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(Qm.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function Wv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zv(e,t)}(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 Zv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qv(e,t){return function(n,r,i){i(),Kv(t,"selectedSubject")(ou.find(e.subjectTree,Vt.first(n))),Kv(t,"addToClassifications")(r),Kv(t,"showConfirmationPopup")(!0)}}function Xv(e){var t=Wv(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(function(e,t){switch(e){case Hm.Playlists:return Cm(t);case Hm.Series:return bv(t);case Hm.Videos:return Sy(t)}}(e.memberType,e.objectIds)),o=pm(f.SUBJECT);!function(e,t){e.memberType,e.objectIds,mu(Qh.getSubjectTreeFetchOptions(Kv(t,"subjectTree")),[])}(e,r);var s;return d.createElement(d.Fragment,null,!!a.data&&!!n.subjectTree&&d.createElement(xg,{memberType:e.memberType,objects:a.data,subjectTree:n.subjectTree,onClickAddToSubject:Qv(n,r)}),n.showConfirmationPopup&&d.createElement($v,{title:Gv(e.memberType,a.data,n.selectedSubject),onClickConfirm:function(){return Yv(a.data,o,e,n,r)},closePopup:function(){return e=!1,Kv(r,"showConfirmationPopup")(e);var e}},d.createElement("p",null,"The following ".concat(e.memberType," will be added to "),d.createElement("strong",null,n.selectedSubject.name),n.addToClassifications?" and its mapped classifications:":":"),d.createElement("ul",null,a.data.map((function(e){return d.createElement("li",{key:e.id},e.name)}))),!n.addToClassifications&&d.createElement("p",null,"".concat(1===a.data.length?"It":"They"," will not be added to its mapped classifications.")),d.createElement("p",null,"".concat((s=e.memberType,ru(Qm.singularizeMemberType(s)))," to classification mappings can be managed from the "),d.createElement("strong",null,"Edit Subject ".concat(ru(e.memberType)," ")),"page.")))}function eb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tb(e,t)}(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 tb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nb(e){var t=e.subjectId,n=e.routeToOnDelete,i=e.closePopup,a=eb(d.useState(),2),o=a[0],s=a[1],c=eb(d.useState(!1),2),l=c[0],u=c[1];mu(Qh.getSubjectFetchOptions(t,s),[]);var p=pm(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteSubject(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:l}];return d.createElement(zf,{title:"Delete Subject",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?"),d.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),d.createElement(qf,{buttons:m})))}function rb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ib(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ib(e,t)}(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 ib(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ab(e){var t=e.subjectId,n=rb(d.useState(),2),r=n[0],i=n[1],a=rb(d.useState(),2),s=a[0],c=a[1],l=pm(f.SUBJECT),u=Qh.getSubjectFetchOptions(t,i);mu(Qh.getSubjectTreeFetchOptions(c),[]),mu(u,[t]);return d.createElement(d.Fragment,null,d.createElement(Bg,{subjectId:t,activeAction:o.Subjects.EDIT_SUBJECT}),!!r&&!!s&&d.createElement(Ug,{subject:r,subjectTree:s,saveSubject:function(e,n){return l.updateSubject(t,e,n,n)}}))}function ob(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sb(e,t)}(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 sb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}$v.defaultProps={confirmButtonText:"Confirm",cancelButtonText:"Cancel"};var cb=d.createContext(void 0);function lb(e){var t=e.children,n=ob(d.useState(),2),r=n[0],i=n[1];return d.createElement(cb.Provider,{value:[r,i]},t)}var ub=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(lb,null,d.createElement(pu,null,t)))};function pb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fb(e,t)}(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 fb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function db(e,t){return Bm.getSetStateByKey(e,t)}function mb(e){switch(e){case Hm.Playlists:return o.Subjects.EDIT_SUBJECT_PLAYLISTS;case Hm.Series:return o.Subjects.EDIT_SUBJECT_SERIES;case Hm.Videos:return o.Subjects.EDIT_SUBJECT_VIDEOS}}function hb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gb(e,t)}(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 gb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yb(e){var t=hb(d.useState({}),2),n=t[0],r=t[1],a=n.presentations,s=n.classifications,c=n.memberIds,l=n.membersWithClassifications,p=i.useBasicFetch(Array.isArray(c)&&function(e,t){switch(e){case Hm.Playlists:return Cm(t);case Hm.Series:return bv(t);case Hm.Videos:return Sy(t)}}(e.memberType,c)),m=hb(d.useContext(cb),2),h=m[0],g=m[1],y=pm(f.SUBJECT);!function(e,t,n){var r=e.subjectId,i=e.memberType,a=pb(d.useContext(cb),1)[0];mu(Qh.getPresentationsFetchOptions(db(n,"presentations")),[]),mu(Qh.getSubjectMemberIdsFetchOptions(r,i,db(n,"memberIds")),[r,i]),mu(!!a&&Qh.getSubjectClassificationFetchOptions(r,db(n,"classifications"),a.id,i),[r,i,a],!!a)}(e,0,r),function(e,t,n,r){var i=n.classifications;d.useEffect((function(){db(r,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(t.memberType,e,i))}),[e,i])}(p.data,e,n,r);var v,b,S=!!h&&!!s;return d.createElement(d.Fragment,null,d.createElement(Bg,{subjectId:e.subjectId,activeAction:mb(e.memberType)}),d.createElement(uo.Alert,{variant:"info",className:"m-0"},"Select which ".concat(e.memberType," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),d.createElement("div",{className:"w-50 py-2"},!!a&&d.createElement(_g,{presentations:a,currentPresentation:h,setCurrentPresentation:g})),S&&d.createElement(Xg,{members:l||[],memberType:e.memberType,getMemberAppLink:function(t){return Qm.getMemberAppLink(e.memberType,t)},getActions:function(t){return Qm.getMemberActions(e.subjectId,zm.Subject,e.memberType,t)},classifications:s,getClassificationAppLink:h&&(v=e.memberType,b=h.id,function(e){var t,n=u.SUBJECTS,r=[b,e];switch(v){case Hm.Playlists:t=o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case Hm.Series:t=o.Subjects.EDIT_CLASSIFICATION_SERIES;break;case Hm.Videos:t=o.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:n,action:t,args:r}}),onToggleClassification:function(t,n,r){return function(e,t,n,r,i,a,o){(o?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(a,n,t,r,i)}(y,e.memberType,r?[r]:c,e.subjectId,h&&h.id,t,n)}}))}function vb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bb(e,t)}(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 bb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sb(e){var t=e.parentId,n=vb(d.useState(),2),i=n[0],a=n[1],s=pm(f.SUBJECT);mu(Qh.getSubjectTreeFetchOptions(a),[]);var c={application:u.SUBJECTS,action:o.Subjects.PRESENTATIONS};return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2 border-bottom"},d.createElement(Pl,{backToName:"Presentations",appLink:c})),d.createElement("h4",{className:"py-2"},"Create New Subject"),!!i&&d.createElement(Ug,{subject:{parentId:t},subjectTree:i,saveSubject:function(e,t){return s.createSubject(e,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]})}}(t),t)}}))}function Eb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Cb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cb(e,t)}(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 Cb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ob(e){var t=Eb(d.useState(),2),n=t[0],r=t[1],a=Eb(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case Hm.Playlists:return Em(t);case Hm.Series:return vv(t);case Hm.Videos:return by(t)}}(e.memberType,e.memberId)),l=pm(f.SUBJECT);mu(Qh.getSubjectFetchOptions(e.subjectId,r),[e.subjectId]);var u=!!n&&!!c.data,p="Remove ".concat(ru(Qm.singularizeMemberType(e.memberType)));return d.createElement(zf,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),d.createElement(qf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromSubject(e.subjectId,[e.memberId],e.memberType,e.closePopup,e.closePopup)},buttonText:"Yes, remove this ".concat(Qm.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function Ib(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jb(e,t)}(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 jb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ab(e){var t=e.subjectId,n=Ib(d.useState({}),2),r=n[0];return function(e,t){var n=function(e){return Bm.getSetStateByKey(t,e)};mu(Qh.getSubjectClassificationFetchOptions(e,n("classifications")),[e]),mu(Qh.getPresentationsFetchOptions(n("presentations")),[])}(t,n[1]),d.createElement(d.Fragment,null,d.createElement(Bg,{subjectId:t,activeAction:o.Subjects.SUBJECT_CLASSIFICATIONS}),d.createElement($g,{presentations:r.presentations,classificationDictionary:Vt.groupBy(r.classifications,"presentationId")}))}var Tb=n(128),wb=n.n(Tb);function Lb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kb(e,t)}(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 kb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _b(e){var t=e.selectedSubjectId,n=Lb(d.useState(),2),r=n[0],i=n[1];mu(Qh.getSubjectTreeFetchOptions(i),[]);var a=d.useCallback((function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),s={application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},c=[{label:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},s),{params:{parentId:e.id}})}},{label:"Delete subject",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return d.createElement("div",{className:"".concat(wb.a.navContainer," h-auto pr-2 border-right")},d.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),d.createElement(xl,{appLink:s,className:"d-inline-block pb-2"},d.createElement(Al,{svgName:Sl.Plus,size:jl.Small}),d.createElement("span",null,"New Subject")),!!r&&d.createElement("div",{className:"border-top pt-1"},d.createElement(zp,{tree:r,getAppLink:a,selectedIds:[t],actions:c})))}function xb(e){var t=e.currentAppLink;return d.createElement(ey,{navItems:Xm(),currentAppLink:t})}function Pb(e){return(Pb="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})(e)}function Nb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Db(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rb(e,t,n){return t&&Db(e.prototype,t),n&&Db(e,n),e}function Fb(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mb(e,t)}function Mb(e,t){return(Mb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ub(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bb(e);if(t){var i=Bb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vb(this,n)}}function Vb(e,t){return!t||"object"!==Pb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bb(e){return(Bb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zb=function(e){Fb(n,e);var t=Ub(n);function n(){return Nb(this,n),t.apply(this,arguments)}return Rb(n,[{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"appRoutes",get:function(){return{"manage/playlists(/)":"index","manage/playlists/new(/)":"newPlaylist","manage/playlists/search(/)":"searchPlaylists","manage/playlists/:id(/)":"editPlaylist","manage/playlists/:id/videos(/)":"editPlaylistVideos","manage/playlists/:id/subjects(/)":"editPlaylistSubjects","manage/playlists/:id/audiences(/)":"editPlaylistAudiences"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","removeFromSubject"]}}]),n}(r.AppRouter),Hb=function(e){Fb(n,e);var t=Ub(n);function n(){return Nb(this,n),t.apply(this,arguments)}return Rb(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"index",value:function(e){var t;this.layout.showChildView(ae,d.createElement(_y,{cursor:null===(t=e)||void 0===t?void 0:t.cursor}))}},{key:"searchPlaylists",value:function(e){var t,n;this.layout.showChildView(ae,d.createElement(Ny,{query:null===(t=e)||void 0===t?void 0:t.query,cursor:null===(n=e)||void 0===n?void 0:n.cursor}))}},{key:"newPlaylist",value:function(){this.layout.showChildView(ae,d.createElement(yy,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(ae,d.createElement(Mm,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(ae,d.createElement(my,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(ly,{key:e,playlistId:e}))}},{key:"editPlaylistAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(iy,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(_m,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(oe,d.createElement(jy,Object.assign({},n)))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:Hm.Playlists},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Ob,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(mm,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Vf,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:hm}}}}],[{key:"router",get:function(){return zb}}]),n}(r.Application),qb=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))},Jb=function(){return"/api/domain/v2/me/ratings"},$b="ratings",Kb=function(){return{url:Jb(),key:$b}},Yb=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:co.string().trim().max(350,"Description is too long").default(""),rating:co.object().shape({id:co.string()}).default({}).noUnknown(),tallPoster:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),banner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown()}).noUnknown(),Gb=function(e,t){var n=u.SERIES,r=o.Series,i=[{label:"Edit Series Details",appLink:{application:n,action:r.EDIT_SERIES,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_SERIES_VIDEOS,args:[t]}}];return eu(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_SERIES_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_SERIES_AUDIENCES,args:[t]}}]),i};function Wb(e){var t=qa(),n=bo(t);return d.createElement(eo,null,d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this series",autoFocus:!0}),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",maxLength:350,value:t.values.description,placeholder:"Describe this series here",showCharacterCounter:!0}),d.createElement(Pp,{ratings:e.ratings}),d.createElement(_u,{imageType:Ul.TallPosters,fieldName:"tallPoster",application:u.SERIES,uploadAction:o.Series.UPLOAD_IMAGE}),d.createElement(_u,{imageType:Ul.Banners,fieldName:"banner",application:u.SERIES,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Eo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(wp,{actions:e.actions})))}function Zb(e){return d.createElement(so,{initialValues:e.series,validationSchema:Yb,onSubmit:e.saveSeries},d.createElement(Wb,{id:e.series&&e.series.id,ratings:e.ratings}))}var Qb=function(e){return function(t){return t.appLink.action===e}};function Xb(e){var t=e.seriesId,n=e.activeAction,r=d.useContext(ju);return d.createElement("div",{className:"py-2"},!!r&&d.createElement(Np,{tabs:Gb(r,t),isItemActive:Qb(n)}))}function eS(e){var t,n=Object(te.useDispatch)(),r=gm(),a=i.useBasicFetch(vv(e.seriesId)),s=i.useBasicFetch(Kb());return d.createElement(d.Fragment,null,d.createElement(Xb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES}),!!a.data&&!!s.data&&d.createElement(Zb,{series:a.data,saveSeries:function(t,a){i.fetch(n,Ev(e.seriesId,t,(function(){r.success("Successfully updated series.")}),(function(){r.error("Failed to update series.")}),a))},ratings:s.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit series page ",d.createElement(xl,{className:"info-link",appLink:(t=e.seriesId,{application:u.SERIES,action:o.Series.LEGACY_EDIT_SERIES,args:[t]})},"here"),"."))}function tS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nS(e,t)}(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 nS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rS(e){var t=tS(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(vv(e.seriesId)),s=pm(f.SUBJECT);!function(e,t,n){var r=function(e){return Bm.getSetStateByKey(n,e)};mu(Qh.getObjectLevelsFetchOptions(e,Hm.Series,r("seriesLevels")),[e]),mu(Qh.getObjectAudiencesFetchOptions(e,Hm.Series,r("seriesAudiences")),[e,t.seriesLevels]),Vm([Qh.getPresentationsFetchOptions(r("presentations")),Qh.getLevelsFetchOptions(r("levels"))],[]),mu(!!t.currentPresentation&&Qh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.seriesId,n,r),ty(n,r);var c=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.seriesLevels&&n.seriesAudiences);return d.createElement(d.Fragment,null,d.createElement(Xb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_AUDIENCES}),d.createElement(Lp,{object:a.data}),!!c&&d.createElement(sg,{objectLevels:n.seriesLevels,objectAudiences:n.seriesAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Bm.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:Hm.Series,saveLevels:function(t,n,r){return s.updateObjectLevels(e.seriesId,t,Hm.Series,n,r,r)},saveAudiences:function(t,r){return s.updateObjectAudiences(e.seriesId,n.currentPresentation.id,t,Hm.Series,r,r)}}))}function iS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||oS(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 aS(e){return function(e){if(Array.isArray(e))return sS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||oS(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 oS(e,t){if(e){if("string"==typeof e)return sS(e,t);var n=Object.prototype.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)?sS(e,t):void 0}}function sS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cS(e){var t=iS(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(vv(e.seriesId)),s=pm(f.SUBJECT);!function(e,t,n){var r=function(e){return Bm.getSetStateByKey(n,e)};Vm([Qh.getSubjectTreeFetchOptions(r("subjectTree")),Qh.getPresentationsFetchOptions(r("presentations"))],[]),mu(Qh.getObjectSubjectsFetchOptions(e,Hm.Series,r("seriesSubjects")),[e]),mu(!!t.currentPresentation&&Qh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.seriesSubjects]);var i=function(e,t){return[].concat(aS(t.subjectClassifications||[]),aS(e))},a=t.seriesSubjects&&t.seriesSubjects.map((function(e){return Qh.getSubjectClassificationFetchOptions(e.id,Bm.getSetStateByKey(n,"subjectClassifications",i))}));Vm(a,[t.seriesSubjects],!!a),mu(Qh.getObjectClassificationsFetchOptions(e,Hm.Series,r("seriesClassifications")),[e,t.seriesSubjects])}(e.seriesId,n,r),ty(n,r);var c=!!(n.seriesSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.seriesClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(Xb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_SUBJECTS}),d.createElement(Lp,{object:a.data}),c&&d.createElement(Dg,{objectSubjects:n.seriesSubjects,subjectTree:n.subjectTree,memberType:Hm.Series,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Bm.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.seriesClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.seriesId,t,Hm.Series,n,r,r)},saveClassifications:function(t,r){return s.updateObjectClassifications(e.seriesId,n.currentPresentation.id,t,Hm.Series,r,r)}}))}function lS(){var e=Object(te.useDispatch)(),t=gm(),n=i.useBasicFetch(Kb());return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Zb,{saveSeries:function(n,a){var s=function(){t.error("Failed to create series.")},c=function(e){t.success("Successfully created series."),function(e){r.AppLinkHelper.trigger({application:u.SERIES,action:o.Series.EDIT_SERIES,args:[e.id]})}(e)};i.fetch(e,Sv(n,(function(t){var n={permissions:Xl()};i.fetch(e,Ev(t.id,n,c,s,a))}),s))},ratings:n.data}))}function uS(e){return(uS="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})(e)}function pS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dS(e,t,n){return t&&fS(e.prototype,t),n&&fS(e,n),e}function mS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hS(e,t)}function hS(e,t){return(hS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vS(e);if(t){var i=vS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yS(this,n)}}function yS(e,t){return!t||"object"!==uS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vS(e){return(vS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bS=function(e){mS(n,e);var t=gS(n);function n(){return pS(this,n),t.apply(this,arguments)}return dS(n,[{key:"channelName",get:function(){return u.SERIES}},{key:"appRoutes",get:function(){return{"manage/series/new(/)":"newSeries","manage/series/:id(/)":"editSeries","manage/series/:id/videos(/)":"editSeriesVideos","manage/series/:id/subjects(/)":"editSeriesSubjects","manage/series/:id/audiences(/)":"editSeriesAudiences","manage/legacy/series/:id(/)":"legacyEditSeries"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),SS=function(e){mS(n,e);var t=gS(n);function n(){return pS(this,n),t.apply(this,arguments)}return dS(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"newSeries",value:function(){this.layout.showChildView(ae,d.createElement(lS,null))}},{key:"editSeries",value:function(e){this.layout.showChildView(ae,d.createElement(eS,{seriesId:e}))}},{key:"editSeriesVideos",value:function(e){this.legacyEditSeries(e)}},{key:"editSeriesSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(cS,{seriesId:e}))}},{key:"editSeriesAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(rS,{seriesId:e}))}},{key:"legacyEditSeries",value:function(e){r.LocationUtils.Redirect("/manage/legacy/series/".concat(e),!0)}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(mm,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Vf,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Series Application"}},{key:"channelName",get:function(){return u.SERIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:qb}}}}],[{key:"router",get:function(){return bS}}]),n}(r.Application);function ES(e){return(ES="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})(e)}function CS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function IS(e,t,n){return t&&OS(e.prototype,t),n&&OS(e,n),e}function jS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&AS(e,t)}function AS(e,t){return(AS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=LS(e);if(t){var i=LS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wS(this,n)}}function wS(e,t){return!t||"object"!==ES(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LS(e){return(LS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kS=function(e){jS(n,e);var t=TS(n);function n(){return CS(this,n),t.apply(this,arguments)}return IS(n,[{key:"channelName",get:function(){return u.SUBJECTS}},{key:"appRoutes",get:function(){return{"manage/subjects(/)":"subjects","manage/subjects/add-objects(/)":"addSubjectMembers","manage/subjects/new(/)":"newSubject","manage/subjects/:id/edit(/)":"editSubject","manage/subjects/:id/edit/playlists(/)":"editSubjectPlaylists","manage/subjects/:id/edit/series(/)":"editSubjectSeries","manage/subjects/:id/edit/videos(/)":"editSubjectVideos","manage/subjects/:id/classifications(/)":"subjectClassifications","manage/subjects/classifications(/)":"classifications","manage/subjects/presentations/:id/classifications(/)":"presentationClassifications","manage/subjects/presentations/:id/classifications/new(/)":"newClassification","manage/subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","manage/subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","manage/subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","manage/subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","manage/subjects/levels(/)":"levels","manage/subjects/levels/new(/)":"newLevel","manage/subjects/levels/:id(/)":"editLevel","manage/subjects/audiences(/)":"audiences","manage/subjects/presentations/:id/audiences(/)":"presentationAudiences","manage/subjects/presentations/:id/audiences/new(/)":"newAudience","manage/subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","manage/subjects/presentations(/)":"presentations","manage/subjects/presentations/new":"newPresentation","manage/subjects/presentations/:id(/)":"editPresentation"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),n}(r.AppRouter),_S=function(e){jS(n,e);var t=TS(n);function n(){return CS(this,n),t.apply(this,arguments)}return IS(n,[{key:"initialize",value:function(){var e=this;this.subjectDataService=fu.getInstance(f.SUBJECT,this),dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(ae,d.createElement(Sb,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(ae,d.createElement(ab,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:Hm.Playlists};this.layout.showChildView(ae,d.createElement(yb,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:Hm.Series};this.layout.showChildView(ae,d.createElement(yb,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:Hm.Videos};this.layout.showChildView(ae,d.createElement(yb,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"subjectClassifications",value:function(e){this.layout.showChildView(ae,d.createElement(Ab,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(ae,d.createElement(Xv,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Ob,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e.toString()===this.currentLeftNavId.toString()?{application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(nb,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(Jv,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(ae,d.createElement(yv,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(ae,d.createElement(pv,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:Hm.Playlists};this.layout.showChildView(ae,d.createElement(mv,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:Hm.Series};this.layout.showChildView(ae,d.createElement(mv,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:Hm.Videos};this.layout.showChildView(ae,d.createElement(mv,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Iv,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(cv,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(ae,d.createElement(xv,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(ae,d.createElement(Pv,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(ae,d.createElement(Tv,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(Jv,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Yy,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(ae,d.createElement(Qy,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(ae,d.createElement(zy,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(My,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(ae,d.createElement(Bv,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(ae,d.createElement(zv,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(ae,d.createElement(Rv,{key:e,id:e})),this.hideLeftNav()}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(mm,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Vf,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(ie,d.createElement(av,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(ie,d.createElement(_b,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return d.createElement(xb,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return u.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:ub,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return kS}}]),n}(r.Application);class xS extends P{onShowAlert(e){if(!this.layoutOptions.options.alertRegion)return;const{ctor:t,collection:n}=e,r=n?n.toJSON():[];this.layout.showChildView(this.layoutOptions.options.alertRegion,d.createElement(t,{alerts:r,removeAlert:e=>h.Radio.channel(y.ALERT).trigger("remove:alert",e)}))}}var PS,NS=function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},DS=function(e){var t="/api/domain/v1/themes",n="themes";return e&&(t+="?type=".concat(e),n+=":type:".concat(e)),{url:t,key:n}},RS=function(e,t,n,r){return{url:"/api/domain/v1/themes",key:"theme",data:e,type:it.POST,invalidationKeys:"themes",success:t,error:n,always:r}},FS=function(e,t,n,r,i){return{url:"/api/domain/v1/themes/".concat(e),key:"update:theme:".concat(e),data:t,type:it.PUT,success:n,error:r,always:i}},MS=function(e,t,n,r){return{url:"/api/domain/v1/themes/".concat(e),key:"delete:theme:".concat(e),type:it.DELETE,invalidationKeys:"themes",success:t,error:n,always:r}},US=function(e){return{application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]}};function VS(){var e=i.useBasicFetch(DS());return e.data?d.createElement(_p,{objects:e.data,getObjectAppLink:US,newObjectAppLink:{application:u.THEMES,action:o.Themes.NEW_THEME},objectName:"Theme"}):d.createElement(d.Fragment,null)}!function(e){e.Glance="glance"}(PS||(PS={}));var BS=[{key:"topLeft",label:"Top Left"},{key:"topRight",label:"Top Right"},{key:"bottomLeft",label:"Bottom Left"},{key:"bottomRight",label:"Bottom Right"}];function zS(){var e=qa();return d.createElement("div",{className:"form-group"},BS.map((function(t){var n="data.".concat(t.key);return d.createElement(_u,{label:t.label,imageType:Ul.HeroBanners,fieldName:n,application:u.THEMES,uploadAction:o.Videos.UPLOAD_IMAGE,setSelectedImage:function(t){e.setFieldValue(n,{fileId:t.id,url:t.url,fileIdType:Bl.ImageAPIv2})}})})))}var HS=co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),qS=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),type:co.mixed().required("Type is required"),data:co.mixed().when("type",{is:PS.Glance,then:co.object().shape({topLeft:HS,topRight:HS,bottomLeft:HS,bottomRight:HS}).noUnknown(),otherwise:co.mixed().strip(!0)}).default({})}).noUnknown();function JS(e){var t=qa(),n=function(e){switch(e){case PS.Glance:return zS;default:return}}(t.values.type);return d.createElement(eo,null,d.createElement(vo,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this theme",autoFocus:!0}),d.createElement(vo,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},d.createElement("option",{value:null},"Select a type..."),dt.getEnumKeys(PS).map((function(e){return d.createElement("option",{key:e,value:PS[e]},e)}))),!!n&&d.createElement(n,null),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Lo,{isNew:e.isNew}),!!e.actions&&d.createElement(wp,{actions:e.actions})))}function $S(e){var t;return d.createElement(so,{initialValues:e.theme,validationSchema:qS,onSubmit:e.saveTheme},d.createElement(JS,{isNew:!(null===(t=e.theme)||void 0===t?void 0:t.id),actions:e.actions}))}function KS(){var e=Object(te.useDispatch)();return d.createElement($S,{saveTheme:function(t,n){i.fetch(e,RS(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]})}),null,n))}})}function YS(e){var t=Object(te.useDispatch)(),n=gm(),r=i.useBasicFetch(NS(e.id));return r.data?d.createElement($S,{theme:r.data,saveTheme:function(r,a){i.fetch(t,FS(e.id,r,(function(){n.success("Successfully updated theme")}),(function(){n.error("Failed to update theme")}),a))},actions:[{label:"Delete theme",className:"btn btn-danger",button:!0,appLink:{application:u.THEMES,action:o.Themes.DELETE_THEME,args:[e.id]}}]}):d.createElement(d.Fragment,null)}function GS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return WS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WS(e,t)}(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 WS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZS(e){var t=Object(te.useDispatch)(),n=gm(),a=GS(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(NS(e.id));return d.createElement(zf,{title:"Delete Theme",closePopup:e.closePopup,showLoadingSpinner:!l.data},d.createElement(d.Fragment,null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement(qf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,MS(e.id,(function(){n.success("Successfully deleted theme"),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.THEMES})}),(function(){n.error("Failed to delete theme")})))},buttonText:"Yes, delete this theme",isSpinnerButton:!0,showSpinner:s}]})))}var QS=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))};function XS(e){return(XS="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})(e)}function eE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nE(e,t,n){return t&&tE(e.prototype,t),n&&tE(e,n),e}function rE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&iE(e,t)}function iE(e,t){return(iE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function aE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sE(e);if(t){var i=sE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oE(this,n)}}function oE(e,t){return!t||"object"!==XS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sE(e){return(sE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cE=function(e){rE(n,e);var t=aE(n);function n(){return eE(this,n),t.apply(this,arguments)}return nE(n,[{key:"channelName",get:function(){return u.THEMES}},{key:"appRoutes",get:function(){return{"manage/themes(/)":"themes","manage/themes/new(/)":"newTheme","manage/themes/:id(/)":"editTheme"}}},{key:"appLinks",get:function(){return["deleteTheme","uploadImage"]}}]),n}(r.AppRouter),lE=function(e){rE(n,e);var t=aE(n);function n(){return eE(this,n),t.apply(this,arguments)}return nE(n,[{key:"themes",value:function(){this.layout.showChildView(ae,d.createElement(VS,null))}},{key:"newTheme",value:function(){this.layout.showChildView(ae,d.createElement(KS,null))}},{key:"editTheme",value:function(e){this.layout.showChildView(ae,d.createElement(YS,{id:e}))}},{key:"deleteTheme",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(ZS,{id:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(mm,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Themes Application"}},{key:"channelName",get:function(){return u.THEMES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:QS}}}}],[{key:"router",get:function(){return cE}}]),n}(xS),uE=function(e){var t=e.children;return d.createElement(Au,null,d.createElement(pu,null,t))},pE=function(e){var t=u.VIDEOS,n=o.Videos;return[{label:"Edit Video Details",appLink:{application:t,action:n.EDIT_VIDEO,args:[e]}},{label:"Subjects",appLink:{application:t,action:n.EDIT_VIDEO_SUBJECTS,args:[e]}},{label:"Audiences",appLink:{application:t,action:n.EDIT_VIDEO_AUDIENCES,args:[e]}},{label:"Aliases",appLink:{application:t,action:n.EDIT_VIDEO_ALIASES,args:[e]}}]},fE=function(e){return function(t){return t.appLink.action===e}};function dE(e){var t=e.videoId,n=e.activeAction;return d.createElement("div",{className:"py-2"},d.createElement(Np,{tabs:pE(t),isItemActive:fE(n)}))}var mE,hE=co.object().shape({name:co.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:co.string().trim().default(""),status:co.mixed().required("Status is required"),productionYear:co.number().min(1900),rating:co.object().shape({id:co.string()}).default({}).noUnknown(),thumbnail:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),heroBanner:co.object().shape({fileId:co.string(),fileIdType:co.mixed(),url:co.string()}).default({}).noUnknown(),glance:co.object().shape({theme:co.string(),format:co.mixed(),content:co.string()}).default({}).noUnknown()}).noUnknown();!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Pending=3]="Pending",e[e.Rejected=4]="Rejected",e[e.Processing=5]="Processing"}(mE||(mE={}));var gE,yE=n(129);function vE(e){var t,n,r,i,a,o=qa();return d.createElement("div",{className:"form-group p-2 border"},d.createElement("div",{className:"border-bottom mb-2"},d.createElement("label",null,"Summary")),d.createElement(vo,{as:"select",label:"Theme",name:"glance.theme",id:"type",value:null===(t=o.values.glance)||void 0===t?void 0:t.theme},d.createElement("option",{value:null},"Select a theme..."),e.themes.map((function(e){return d.createElement("option",{key:e.id,value:e.name},e.name)}))),d.createElement(vo,{as:"select",label:"Format",name:"glance.format",id:"type",value:null===(n=o.values.glance)||void 0===n?void 0:n.format},d.createElement("option",{value:null},"Select a format..."),dt.getEnumKeys(gE).map((function(e){return d.createElement("option",{key:e,value:gE[e]},e)}))),d.createElement(vo,{label:"Content",as:"textarea",name:"glance.content",id:"content",value:null===(r=o.values.glance)||void 0===r?void 0:r.content}),(null===(i=o.values.glance)||void 0===i?void 0:i.format)===gE.Markdown&&d.createElement("div",{className:"form-group"},d.createElement("label",null,"Content Preview"),d.createElement("div",{className:"border rounded py-2",dangerouslySetInnerHTML:{__html:yE(null===(a=o.values.glance)||void 0===a?void 0:a.content)}})))}function bE(e){switch(e){case mE.Published:return"badge-success";case mE.Archived:return"badge-danger";case mE.Draft:return"badge-warning";case mE.Pending:return"badge-info";case mE.Rejected:return"badge-dark";default:return"badge-secondary"}}function SE(e){var t=qa(),n=!!e.rightslineId;return d.createElement(eo,null,n&&d.createElement(vo,{label:"Rightsline ID",name:"rightslineId",id:"rightslineId",value:e.rightslineId,disabled:!0}),d.createElement(vo,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this video",disabled:n,autoFocus:!0}),d.createElement("div",{className:"form-group"},d.createElement("label",null,"Status"),d.createElement("div",null,d.createElement("span",{className:"badge ".concat(bE(t.values.status))},mE[t.values.status]))),d.createElement(vo,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this video here",disabled:n,showCharacterCounter:!0}),d.createElement(vo,{label:"Production Year",type:"number",name:"productionYear",id:"productionYear",value:t.values.productionYear,disabled:n}),d.createElement(Pp,{ratings:e.ratings,disabled:n}),d.createElement(_u,{imageType:Ul.Thumbnails,fieldName:"thumbnail",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),d.createElement(_u,{imageType:Ul.HeroBanners,fieldName:"heroBanner",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),d.createElement(vE,{themes:e.themes}),d.createElement(Lo,{isNew:!e.id}))}function EE(e,t){if(e)return t?Object.assign(Object.assign({},e),t):e}function CE(e){return d.createElement(so,{initialValues:EE(e.video,e.rightslineVideo),validationSchema:hE,onSubmit:e.saveVideo,allowInitialSubmit:!!e.rightslineVideo},d.createElement(SE,{id:e.video&&e.video.id,ratings:e.ratings,themes:e.themes,rightslineId:e.rightslineId}))}function OE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IE(e,t)}(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 IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jE(e){var t,n=Object(te.useDispatch)(),r=OE(d.useState(!1),2),a=r[0],s=r[1],c=i.useBasicFetch(by(e.videoId)),l=i.useBasicFetch(Ey(e.videoId)),p=i.useBasicFetch(Kb()),f=i.useBasicFetch(DS(PS.Glance));var m,h=!!c.data&&!!p.data&&!!f.data&&l.isComplete;return d.createElement(d.Fragment,null,d.createElement(dE,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO}),!!l.data&&d.createElement("div",{className:"pt-3 text-right"},d.createElement(uo.Button,{variant:"outline-dark",size:"sm",onClick:function(){l.isFetching||(s(!0),i.fetch(n,Ey(e.videoId)))}},"Sync from Rightsline")),h&&d.createElement(CE,{video:c.data,saveVideo:function(t,r){i.fetch(n,Cy(e.videoId,t,null,null,r))},ratings:p.data,themes:f.data,rightslineId:null===(t=l.data)||void 0===t?void 0:t.rightslineId,rightslineVideo:a&&l.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit video page ",d.createElement(xl,{className:"info-link",appLink:(m=e.videoId,{application:u.VIDEOS,action:o.Videos.LEGACY_EDIT_VIDEO,args:[m]})},"here"),"."))}function AE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return TE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TE(e,t)}(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 TE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wE(e){var t=AE(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(by(e.videoId)),s=pm(f.SUBJECT);!function(e,t,n){var r=function(e){return Bm.getSetStateByKey(n,e)};mu(Qh.getObjectLevelsFetchOptions(e,Hm.Videos,r("videoLevels")),[e]),mu(Qh.getObjectAudiencesFetchOptions(e,Hm.Videos,r("videoAudiences")),[e,t.videoLevels]),Vm([Qh.getPresentationsFetchOptions(r("presentations")),Qh.getLevelsFetchOptions(r("levels"))],[]),mu(!!t.currentPresentation&&Qh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.videoId,n,r),ty(n,r);var c=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.videoLevels&&n.videoAudiences);return d.createElement(d.Fragment,null,d.createElement(dE,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_AUDIENCES}),d.createElement(Lp,{object:a.data}),!!c&&d.createElement(sg,{objectLevels:n.videoLevels,objectAudiences:n.videoAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Bm.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:Hm.Videos,saveLevels:function(t,n,r){return s.updateObjectLevels(e.videoId,t,Hm.Videos,n,r,r)},saveAudiences:function(t,r){return s.updateObjectAudiences(e.videoId,n.currentPresentation.id,t,Hm.Videos,r,r)}}))}function LE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||_E(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 kE(e){return function(e){if(Array.isArray(e))return xE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||_E(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 _E(e,t){if(e){if("string"==typeof e)return xE(e,t);var n=Object.prototype.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)?xE(e,t):void 0}}function xE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PE(e){var t=LE(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(by(e.videoId)),s=pm(f.SUBJECT);!function(e,t,n){var r=function(e){return Bm.getSetStateByKey(n,e)};Vm([Qh.getSubjectTreeFetchOptions(r("subjectTree")),Qh.getPresentationsFetchOptions(r("presentations"))],[]),mu(Qh.getObjectSubjectsFetchOptions(e,Hm.Videos,r("videoSubjects")),[e]),mu(!!t.currentPresentation&&Qh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.videoSubjects]);var i=function(e,t){return[].concat(kE(t.subjectClassifications||[]),kE(e))},a=t.videoSubjects&&t.videoSubjects.map((function(e){return Qh.getSubjectClassificationFetchOptions(e.id,Bm.getSetStateByKey(n,"subjectClassifications",i))}));Vm(a,[t.videoSubjects],!!a),mu(Qh.getObjectClassificationsFetchOptions(e,Hm.Videos,r("videoClassifications")),[e,t.videoSubjects])}(e.videoId,n,r),ty(n,r);var c=!!(n.videoSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.videoClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,d.createElement(dE,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_SUBJECTS}),d.createElement(Lp,{object:a.data}),c&&d.createElement(Dg,{objectSubjects:n.videoSubjects,subjectTree:n.subjectTree,memberType:Hm.Videos,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Bm.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.videoClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return s.updateObjectSubjects(e.videoId,t,Hm.Videos,n,r,r)},saveClassifications:function(t,r){return s.updateObjectClassifications(e.videoId,n.currentPresentation.id,t,Hm.Videos,r,r)}}))}!function(e){e.Markdown="text/markdown"}(gE||(gE={}));var NE=function(e){return{key:"aliases:".concat(e),url:"/api/master/v2/objects/".concat(e,"/aliases")}},DE=function(e,t,n,r){return{key:"create:alias",url:"/api/master/v2/objects/".concat(e,"/aliases"),type:it.POST,invalidationKeys:"aliases:".concat(e),data:t,success:n,error:r}},RE=function(e,t,n,r){return{key:"delete:alias",url:"/api/domain/v2/objects/".concat(e,"/aliases/").concat(t),type:it.DELETE,invalidationKeys:"aliases:".concat(e),success:n,error:r}};function FE(e){var t=e.videoId,n=Object(te.useDispatch)(),r=gm(),a=i.useBasicFetch(NE(t));return a.data?d.createElement(d.Fragment,null,d.createElement(dE,{videoId:t,activeAction:o.Videos.EDIT_VIDEO_ALIASES}),d.createElement(hf,{aliases:a.data.data,onSave:function(e,a){i.fetch(n,DE(t,e,(function(){r.success("Successfully created alias"),a()}),(function(){r.error("Something went wrong creating your alias")})))},onDelete:function(e){i.fetch(n,RE(t,e,(function(){r.success("Successfully deleted alias")}),(function(){r.error("Something went wrong deleting your alias")})))}})):d.createElement(d.Fragment,null,"Loading...")}function ME(e){return(ME="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})(e)}function UE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function BE(e,t,n){return t&&VE(e.prototype,t),n&&VE(e,n),e}function zE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&HE(e,t)}function HE(e,t){return(HE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$E(e);if(t){var i=$E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return JE(this,n)}}function JE(e,t){return!t||"object"!==ME(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $E(e){return($E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var KE,YE,GE=function(e){zE(n,e);var t=qE(n);function n(){return UE(this,n),t.apply(this,arguments)}return BE(n,[{key:"channelName",get:function(){return u.VIDEOS}},{key:"appRoutes",get:function(){return{"manage/videos/:id(/)":"editVideo","manage/videos/:id/audiences(/)":"editVideoAudiences","manage/videos/:id/subjects(/)":"editVideoSubjects","manage/videos/:id/aliases(/)":"editVideoAliases","tools/programlookup/:id":"legacyEditVideo"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),WE=function(e){zE(n,e);var t=qE(n);function n(){return UE(this,n),t.apply(this,arguments)}return BE(n,[{key:"initialize",value:function(){var e=this;dt.values(f).forEach((function(t){return fu.getInstance(t,e)}))}},{key:"editVideo",value:function(e){this.layout.showChildView(ae,d.createElement(jE,{videoId:e}))}},{key:"editVideoAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(wE,{videoId:e}))}},{key:"editVideoSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(PE,{videoId:e}))}},{key:"editVideoAliases",value:function(e){this.layout.showChildView(ae,d.createElement(FE,{videoId:e}))}},{key:"legacyEditVideo",value:function(e){r.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(mm,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Videos Application"}},{key:"channelName",get:function(){return u.VIDEOS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:uE,alertRegion:se}}}}],[{key:"router",get:function(){return GE}}]),n}(xS);!function(e){e.Fifo="FifoMemoryCache"}(KE||(KE={}));class ZE extends G{constructor(e){super(),this.size=e.size,this.cache={},this.cachedkeys=[]}get name(){return KE.Fifo}removeCacheKey(e){this.cachedkeys=m.without(this.cachedkeys,e)}has(e){return!!this.cache[e]}get(e){return this.cache[e]}set(e,t){e&&t||x.throw(new B("Must provide a cache key and a value to cache in FifoMemoryCache.")),this.has(e)&&this.removeCacheKey(e),this.cachedkeys.push(e),this.cache[e]=t,this.cachedkeys.length>this.size&&delete this.cache[this.cachedkeys.shift()]}getOrSet(e,t){if(this.has(e))return this.get(e);const n=t();return this.set(e,n),n}remove(e){return!!this.has(e)&&(delete this.cache[e],this.removeCacheKey(e),!0)}invalidate(e,t){const n=m.object(this.cachedkeys,this.cachedkeys);let r=[];m.each(e,e=>{n[e]&&r.push(e);const t=new RegExp(e,"i"),i=m.filter(n,e=>t.test(e));r.push(...i)}),r.length&&(r=m.uniq(r),m.each(r,e=>{delete this.cache[e],m.isFunction(t)&&t(e)}),this.cachedkeys=m.without(this.cachedkeys,...r))}}!function(e){e[e.Unknown=0]="Unknown",e[e.BadRequest=1]="BadRequest",e[e.Unauthorized=2]="Unauthorized",e[e.Forbidden=3]="Forbidden",e[e.NotFound=4]="NotFound",e[e.InternalServer=5]="InternalServer"}(YE||(YE={}));const QE={type:YE.Unknown,message:"",code:0};var XE;!function(e){e.Ajax="AjaxDataProvider",e.Notifications="NotificationsSignalRDataProvider"}(XE||(XE={}));const eC={parseErrorMessage(e,t,n){if(!n||!n.errorCode)return e[t];let r=""+n.errorCode;return n.errorSubCode&&(r+="."+n.errorSubCode),e[r]||e[t]}};class tC extends A.Object{constructor(e){super(e),$.ajaxSetup({cache:!1,contentType:"application/json; charset=utf-8"}),this.successMiddleware={},this.errorMiddleware={},this.dataServiceErrorMessageMappings=e.dataServiceErrorMessageMappings,this.defaultErrorMessageKey=e.defaultErrorMessageKey}get name(){return XE.Ajax}parseUrl(e){const t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t}makeHttps(e){const t=this.parseUrl(e);return"http:"===t.protocol&&(t.protocol="https:"),t.href}base(e,t,n,r={}){n||(n=it.GET);const i=m.defaults(r,{forceHttps:!1}),a={url:e,method:n,type:n};t&&(a.data=n===it.POST||n===it.PUT?JSON.stringify(t):t),i.forceHttps&&(a.url=this.makeHttps(a.url)),i.traditional&&(a.traditional=i.traditional);const o=$.ajax(a);return m.keys(this.successMiddleware).length&&o.done(m.values(this.successMiddleware)),m.keys(this.errorMiddleware).length&&o.fail(m.values(this.errorMiddleware)),o}create(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,it.POST).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}read(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,it.GET).done((e,t,i)=>{n.trigger(r,e,t,i)}).fail((e,t,r)=>{n.trigger(i,e,t,r)})}update(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,it.PUT).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}delete(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,it.DELETE).done((e,t,i)=>n.trigger(r,e,t,i)).fail((e,t,r)=>n.trigger(i,e,t,r))}useMiddleware(e,t){this.successMiddleware[e]||(this.successMiddleware[e]=t)}useErrorMiddleware(e,t){this.errorMiddleware[e]||(this.errorMiddleware[e]=t)}parseError(e,t,n){const r=e.responseJSON,i=QE;switch(i.code=e.status,i.message=eC.parseErrorMessage(this.dataServiceErrorMessageMappings,this.defaultErrorMessageKey,r),e.status){case 400:i.type=YE.BadRequest;break;case 401:i.type=YE.Unauthorized;break;case 403:i.type=YE.Forbidden;break;case 404:i.type=YE.NotFound;break;case 500:i.type=YE.InternalServer}return i}}n.d(t,"Actions",(function(){return o})),n.d(t,"DataPrefixes",(function(){return s})),n.d(t,"FileExtensions",(function(){return c})),n.d(t,"Layouts",(function(){return l})),n.d(t,"AppChannels",(function(){return u})),n.d(t,"DataChannels",(function(){return p})),n.d(t,"DataServices",(function(){return f})),n.d(t,"CuratorLayoutView",(function(){return be})),n.d(t,"LayoutComponent",(function(){return Ie})),n.d(t,"CuratorAppNavService",(function(){return Ne})),n.d(t,"ImageUploadDataService",(function(){return He})),n.d(t,"UserDataServiceHelper",(function(){return $e})),n.d(t,"LanguageDataService",(function(){return tt})),n.d(t,"CompaniesApplication",(function(){return xf})),n.d(t,"DomainOptionsApplication",(function(){return Pd})),n.d(t,"PeopleApplication",(function(){return um})),n.d(t,"PlaylistsApplication",(function(){return Hb})),n.d(t,"SeriesApplication",(function(){return SS})),n.d(t,"SubjectDataService",(function(){return Wh})),n.d(t,"SubjectDataServiceHelper",(function(){return Qh})),n.d(t,"SubjectsApplication",(function(){return _S})),n.d(t,"ThemesApplication",(function(){return lE})),n.d(t,"VideosApplication",(function(){return WE})),n.d(t,"DomainOptionsApplication",(function(){return Pd})),n.d(t,"Core",(function(){return r})),n.d(t,"InstanceManager",(function(){return fu})),n.d(t,"FifoMemoryCache",(function(){return ZE})),n.d(t,"AjaxDataProvider",(function(){return tC})),n.d(t,"AlertType",(function(){return Lf})),n.d(t,"BaseAlertService",(function(){return Nf})),n.d(t,"LanguageService",(function(){return Ao})),n.d(t,"Flight",(function(){return i})),n.d(t,"CacheDurations",(function(){return qe})),n.d(t,"UserDataService",(function(){return bu}))}])}));
|