PageSourceSearch

https://www.opensesame.com/828.c7bbfdf67c40e9a0.js

js opensesame.com collected 2026-09-24 22:25:42 UTC 90,147 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkangular=self.webpackChunkangular||[]).push([[828],{998:(V,M,u)=>{u.d(M,{Q:()=>r});var r,w,d=u(2437);(w=r||(r={})).validateGuid=function S(p){const C=/^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$/i.test(p);return!(null===p||0===p.length||!C)},w.validateEmail=function O(p){if(d.m.isEmpty(p))return!1;const C=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(p);return!(null===p||0===p.length||!C)}},2828:(V,M,u)=>{u.r(M),u.d(M,{CustomCatalogsModule:()=>_e});var d=u(6895),r=u(4006),w=u(4482),S=u(8954),O=u(811),p=u(7873),h=u(3144),C=u(7753),I=u(2868);const A="Language-grouped courses are added when Course GUIDs are submitted for this custom catalog. In this tool, that happens each time you save. If that language grouping changes later, this custom catalog will not update automatically. To include those changes, update this catalog manually.";var x=u(5254),_=u(1086),P=u(1221),U=u(4850),f=u(7221),b=u(810);const T="/os_ajax/angular/custom_catalog",j=`${T}/integrations`;var t=u(4650);let K=(()=>{const n=class{constructor(e){this.api=e,this.endpoint=T}loadCourseGuidsForUpdate(e){const l=(0,x.D)(this.api.get(`${this.endpoint}/${e}`)).pipe((0,U.U)(i=>({loading:!1,courseGuids:i.courses.map(c=>c.courseGuid),error:null})),(0,f.K)(()=>(0,_.of)({loading:!1,courseGuids:[],error:"Custom Catalog course GUIDs could not be loaded. Try again later."})));return(0,P.z)((0,_.of)({loading:!0,courseGuids:[],error:null}),l)}};let o=n;return n.\u0275fac=function(s){return new(s||n)(t.LFG(b.z))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),o})(),q=(()=>{const n=class{constructor(e){this.api=e,this.endpoint=j}listIntegrations(){return(0,x.D)(this.api.get(this.endpoint)).pipe((0,U.U)(e=>this.sortIntegrationOptions(e.integrations)),(0,f.K)(()=>(0,_.of)([])))}sortIntegrationOptions(e){return[...e].sort((s,l)=>s.title.localeCompare(l.title))}};let o=n;return n.\u0275fac=function(s){return new(s||n)(t.LFG(b.z))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),o})(),y=(()=>{const n=class{constructor(e){this.api=e,this.endpoint=T,this.updatedAtFormatter=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"})}listCustomCatalogs(){const s=(0,x.D)(this.api.get(this.endpoint)).pipe((0,U.U)(l=>this.mapResponseToState(l)),(0,f.K)(()=>(0,_.of)({loading:!1,rows:[],error:"Custom Catalogs could not be loaded. Try again later."})));return(0,P.z)((0,_.of)({loading:!0,rows:[],error:null}),s)}mapResponseToState(e){return{loading:!1,rows:e.customCatalogs.map(s=>this.mapResponseRow(s)),error:null}}mapResponseRow(e){return{id:e.id,title:e.title,integrations:e.integrations,mappedIntegrations:e.integrations.map(s=>s.title),integrationIds:e.integrations.map(s=>s.id),updatedAt:this.formatUpdatedAt(e.updatedAtTimestamp),updatedAtTimestamp:e.updatedAtTimestamp}}formatUpdatedAt(e){if(null===e||!Number.isFinite(e))return"Unknown";const s=new Date(e);return Number.isFinite(s.getTime())?this.updatedAtFormatter.format(s):"Unknown"}};let o=n;return n.\u0275fac=function(s){return new(s||n)(t.LFG(b.z))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),o})(),H=(()=>{const n=class{constructor(e){this.api=e,this.endpoint=T}updateCustomCatalog(e){const{customCatalogId:l,...i}=e,c=(0,x.D)(this.api.put(`${this.endpoint}/${l}`,i)).pipe((0,U.U)(g=>{const m={customCatalogId:g.id,title:g.title,courseGuids:g.courseGuids,integrationIds:g.integrationIds};return g.failedCourseGuids&&(m.failedCourseGuids=g.failedCourseGuids),g.failedIntegrationIds&&(m.failedIntegrationIds=g.failedIntegrationIds),{loading:!1,result:m,error:null}}),(0,f.K)(g=>(0,_.of)({loading:!1,result:null,error:{type:this.isValidationErrorStatus(g?.status)?"validation":"general",message:this.errorMessageForStatus(g)}})));return(0,P.z)((0,_.of)({loading:!0,result:null,error:null}),c)}isValidationErrorStatus(e){return 400===e||422===e}errorMessageForStatus(e){return this.isValidationErrorStatus(e?.status)?e?.error?.message??"An unexpected error occurred.":"An unexpected error occurred."}};let o=n;
1return n.\u0275fac=function(s){return new(s||n)(t.LFG(b.z))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),o})();function F(o,n){const a=o.value||"";return n||o.touched?0===a.trim().length?"Title is required.":a.trim().length>255?"Title must be 255 characters or fewer.":"":""}function G(o){return!o.isLoading&&!1!==o.hasSelectedCatalog&&o.title.trim().length>0&&o.title.trim().length<=255&&o.hasCourseGuids&&!o.hasInvalidCourseGuids}function k(o,n,a){return a||o.touched?n.courseGuids.length||n.hasInvalidCourseGuids?"":"At least one Course GUID is required.":""}function R(o,n){return{title:(o.get("title").value||"").trim(),courseGuids:n.courseGuids,integrationIds:v(o.get("integrationIds").value||[])}}function v(o){return o.map(n=>Number(n))}function N(o,n){if(!o||!n.length)return[];const a=new Set(v(n));return o.filter(e=>a.has(e.id)).sort((e,s)=>e.title.localeCompare(s.title))}function z(o,n){const a=Array.from(new Set(v(n)));if(!a.length)return[];const e=new Map;return(o||[]).forEach(s=>{e.set(s.id,s.title)}),a.map(s=>({id:s,title:e.get(s)||`Integration ${s}`,href:`/node/${s}/edit`})).sort((s,l)=>s.title.localeCompare(l.title))}function J(o,n){return v(o).filter(a=>a!==n)}var B=u(998);function Z(o){const n=(o||"").split(/[,\s]+/).map(i=>i.trim()).filter(i=>i.length>0),a=new Set,e=[],s=[],l=[];return n.forEach(i=>{if(!B.Q.validateGuid(i))return void s.push(i);const c=i.toLowerCase();a.has(c)?l.push(i):(a.add(c),e.push(i))}),{courseGuids:e,invalidCourseGuids:s,duplicateCourseGuids:l,hasInvalidCourseGuids:s.length>0,hasDuplicates:l.length>0}}function E(o,n,a){if(!Y(o))return null;const e=o.currentTarget instanceof HTMLOptionElement?o.currentTarget:null,s=e&&e.parentElement instanceof HTMLSelectElement?e.parentElement:null;if(!e||!s)return null;const l=a.map(c=>Number(c)),i=l.includes(n);return o.preventDefault(),e.selected=!i,{selectedIntegrationIds:i?l.filter(c=>c!==n):[...l,n],viewportState:{optionIndex:e.index,scrollTop:s.scrollTop}}}function Q(o){Y(o)&&(o.preventDefault(),o.stopPropagation())}function D(o,n){if(!o||!n)return;const a=o.options.item(n.optionIndex);a&&"function"==typeof a.scrollIntoView&&a.scrollIntoView({block:"nearest"}),o.scrollTop=n.scrollTop}function Y(o){return!(0!==o.button||o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)}var L=u(757);const W=["updateIntegrationsSelect"];function X(o,n){1&o&&(t.TgZ(0,"div",14),t._uU(1,"\n      "),t._UZ(2,"app-loading-indicator",15),t._uU(3,"\n    "),t.qZA())}function tt(o,n){if(1&o&&(t.TgZ(0,"section",16),t._uU(1,"\n      "),t.TgZ(2,"h2",17),t._uU(3,"Custom Catalog unavailable"),t.qZA(),t._uU(4,"\n      "),t.TgZ(5,"p"),t._uU(6),t.qZA(),t._uU(7,"\n      "),t.TgZ(8,"a",5),t._uU(9,"Back to Custom Catalogs"),t.qZA(),t._uU(10,"\n    "),t.qZA()),2&o){const a=t.oxw();t.xp6(6),t.Oqu(a.loadError)}}function et(o,n){if(1&o&&(t.TgZ(0,"li"),t._uU(1,"\n                  "),t.TgZ(2,"a",43),t._uU(3),t.qZA(),t._uU(4,"\n                "),t.qZA()),2&o){const a=n.$implicit;t.xp6(2),t.Q6J("href",a.href,t.LSH),t.xp6(1),t.Oqu(a.title)}}function ot(o,n){if(1&o&&(t.TgZ(0,"div",41),t._uU(1,"\n              "),t.TgZ(2,"p"),t._uU(3,"Finish setup for mapped integrations:"),t.qZA(),t._uU(4,"\n              "),t.TgZ(5,"ul"),t._uU(6,"\n                "),t.YNc(7,et,5,2,"li",42),t._uU(8,"\n              "),t.qZA(),t._uU(9,"\n            "),t.qZA()),2&o){const a=t.oxw().ngIf;t.xp6(7),t.Q6J("ngForOf",a)}}function at(o,n){if(1&o&&(t.ynx(0),t._uU(1,"\n            "),t.YNc(2,ot,10,1,"div",40),t._uU(3,"\n          "),t.BQk()),2&o){const a=n.ngIf;t.xp6(2),t.Q6J("ngIf",a.length)}}function nt(o,n){if(1&o&&(t.TgZ(0,"div",38),t._uU(1,"\n          "),t.TgZ(2,"h3"),t._uU(3,"Custom Catalog updated"),t.qZA(),t._uU(4,"\n          "),t.TgZ(5,"dl",39),t._uU(6,"\n            "),t.TgZ(7,"div"),t._uU(8,"\n              "),t.TgZ(9,"dt"),t._uU(10,"Custom Catalog ID"),t.qZA(),t._uU(11,"\n              "),t.TgZ(12,"dd"),t._uU(13),t.qZA(),t._uU(14,"\n            "),t.qZA(),t._uU(15,"\n            "),t.TgZ(16,"div"),t._uU(17,"\n              "),t.TgZ(18,"dt"),t._uU(19,"Title"),t.qZA(),t._uU(20,"\n              "),t.TgZ(21,"dd"),t._uU(22),t.qZA(),t._uU(23,"\n            "),t.qZA(),t._uU(24,"\n          "),t.qZA(),t._uU(25,"\n          "),t.YNc(26,at,4,1,"ng-container",34),t._uU(27,"\n        "),t.qZA()),2&o){const a=t.oxw(2);t.xp6(13),t.Oqu(null==a.updateCatalogState.result?null:a.updateCatalogState.result.customCatalogId),t.xp6(9),t.Oqu(a.updatedCatalogTitle),t.xp6(4),t.Q6J("ngIf",a.getUpdateIntegrationSetupLinks())}}function st(o,n){if(1&o&&(t.TgZ(0,"div",44),t._uU(1),t.qZA()),2&o){const a=t.oxw(2);t.xp6(1),t.hij("\n          ",null==a.updateCatalogState.error?null:a.updateCatalogState.error.message,"\n        ")}}function lt(o,n){if(1&o&&(t.TgZ(0,"span",45),t._uU(1),t.qZA()),2&o){const a=t.oxw(2);t.xp6(1),t.hij("\n              ",a.getUpdateTitleErrorMessage(),"\n            ")}}function it(o,n){if(1&o&&(t.TgZ(0,"span",45),t._uU(1),t.qZA()),2&o){const a=t.oxw(2);t.xp6(1),t.hij("\n              ",a.getUpdateCourseGuidsErrorMessage(),"\n            ")}}function rt(o,n){1&o&&(t.TgZ(0,"p",46),t._uU(1,"\n            Duplicate GUIDs will be submitted once.\n          "),t.qZA())}function ct(o,n){if(1&o&&(t.TgZ(0,"li"),t._uU(1),t.qZA()),2&o){const a=n.$implicit;
1t.xp6(1),t.Oqu(a)}}function ut(o,n){if(1&o&&(t.TgZ(0,"div",47),t._uU(1,"\n            "),t.TgZ(2,"p"),t._uU(3,"Invalid GUID format:"),t.qZA(),t._uU(4,"\n            "),t.TgZ(5,"ul",48),t._uU(6,"\n              "),t.YNc(7,ct,2,1,"li",42),t._uU(8,"\n            "),t.qZA(),t._uU(9,"\n          "),t.qZA()),2&o){const a=t.oxw(2);t.xp6(7),t.Q6J("ngForOf",a.parsedUpdateCourseGuids.invalidCourseGuids)}}function gt(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"option",57),t.NdJ("mousedown",function(s){const i=t.CHM(a).$implicit,c=t.oxw(3);return t.KtG(c.toggleUpdateIntegrationSelection(s,i.id))})("click",function(s){t.CHM(a);const l=t.oxw(3);return t.KtG(l.suppressNativeUpdateIntegrationClick(s))}),t._uU(1),t.qZA()}if(2&o){const a=n.$implicit;t.Q6J("ngValue",a.id),t.xp6(1),t.hij("\n                  ",a.title,"\n                ")}}function dt(o,n){1&o&&(t.TgZ(0,"p",58),t._uU(1,"\n                No integrations selected.\n              "),t.qZA())}function pt(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"li"),t._uU(1,"\n                  "),t.TgZ(2,"span"),t._uU(3),t.qZA(),t._uU(4,"\n                  "),t.TgZ(5,"button",60),t.NdJ("click",function(){const l=t.CHM(a).$implicit,i=t.oxw(4);return t.KtG(i.removeUpdateIntegration(l.id))}),t._uU(6,"\n                    \xd7\n                  "),t.qZA(),t._uU(7,"\n                "),t.qZA()}if(2&o){const a=n.$implicit;t.xp6(3),t.Oqu(a.title),t.xp6(2),t.uIk("aria-label","Remove "+a.title)}}function _t(o,n){if(1&o&&(t.TgZ(0,"ul",59),t._uU(1,"\n                "),t.YNc(2,pt,8,2,"li",42),t._uU(3,"\n              "),t.qZA()),2&o){const a=t.oxw().ngIf,e=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",e.getSelectedUpdateIntegrations(a))}}function mt(o,n){if(1&o&&(t.ynx(0),t._uU(1,"\n            "),t.TgZ(2,"label",30),t._uU(3,"\n              "),t.TgZ(4,"span"),t._uU(5,"Integrations"),t.qZA(),t._uU(6,"\n              "),t.TgZ(7,"select",49,50),t._uU(9,"\n                "),t.YNc(10,gt,2,2,"option",51),t._uU(11,"\n              "),t.qZA(),t._uU(12,"\n              "),t.TgZ(13,"span",52),t._uU(14,'\n                After saving, enable "Integration includes Custom Course Catalog" on each mapped integration.\n              '),t.qZA(),t._uU(15,"\n            "),t.qZA(),t._uU(16,"\n\n            "),t.TgZ(17,"div",53),t._uU(18,"\n              "),t.TgZ(19,"p",54),t._uU(20,"Selected integrations"),t.qZA(),t._uU(21,"\n              "),t.YNc(22,dt,2,0,"p",55),t._uU(23,"\n              "),t.YNc(24,_t,4,1,"ul",56),t._uU(25,"\n            "),t.qZA(),t._uU(26,"\n          "),t.BQk()),2&o){const a=n.ngIf,e=t.oxw(2);t.xp6(10),t.Q6J("ngForOf",a),t.xp6(12),t.Q6J("ngIf",!e.getSelectedUpdateIntegrations(a).length),t.xp6(2),t.Q6J("ngIf",e.getSelectedUpdateIntegrations(a).length)}}function Ct(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"section",18),t._uU(1,"\n      "),t.TgZ(2,"form",19),t.NdJ("ngSubmit",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.submitUpdateAttempt())}),t._uU(3,"\n        "),t.TgZ(4,"div",20),t._uU(5,"\n          "),t.TgZ(6,"p",21),t._uU(7,"Update workflow"),t.qZA(),t._uU(8,"\n          "),t.TgZ(9,"h2",22),t._uU(10),t.qZA(),t._uU(11,"\n        "),t.qZA(),t._uU(12,"\n\n        "),t.YNc(13,nt,28,3,"div",23),t._uU(14,"\n\n        "),t.YNc(15,st,2,1,"div",24),t._uU(16,"\n\n        "),t._UZ(17,"app-warning-banner",25),t._uU(18,"\n\n        "),t.TgZ(19,"div",26),t._uU(20,"\n          "),t.TgZ(21,"label",27),t._uU(22,"\n            "),t.TgZ(23,"span"),t._uU(24,"Title"),t.qZA(),t._uU(25,"\n            "),t._UZ(26,"input",28),t._uU(27,"\n            "),t.YNc(28,lt,2,1,"span",29),t._uU(29,"\n          "),t.qZA(),t._uU(30,"\n\n          "),t.TgZ(31,"label",30),t._uU(32,"\n            "),t.TgZ(33,"span"),t._uU(34,"Course GUIDs"),t.qZA(),t._uU(35,"\n            "),t._UZ(36,"textarea",31),t._uU(37,"\n            "),t.YNc(38,it,2,1,"span",29),t._uU(39,"\n          "),t.qZA(),t._uU(40,"\n\n          "),t.YNc(41,rt,2,0,"p",32),t._uU(42,"\n\n          "),t.YNc(43,ut,10,1,"div",33),t._uU(44,"\n\n          "),t.YNc(45,mt,27,3,"ng-container",34),t.ALo(46,"async"),t._uU(47,"\n        "),t.qZA(),t._uU(48,"\n\n        "),t.TgZ(49,"div",35),t._uU(50,"\n          "),t.TgZ(51,"og-button",36),t._uU(52),t.qZA(),t._uU(53,"\n          "),t.TgZ(54,"a",37),t._uU(55,"\n            Back to Custom Catalogs\n          "),t.qZA(),t._uU(56,"\n        "),t.qZA(),t._uU(57,"\n      "),t.qZA(),t._uU(58,"\n    "),t.qZA()}if(2&o){const a=t.oxw();
1t.xp6(2),t.Q6J("formGroup",a.updateCatalogForm),t.xp6(8),t.Oqu(a.selectedUpdateCatalog.title),t.xp6(3),t.Q6J("ngIf",a.updateCatalogState.result),t.xp6(2),t.Q6J("ngIf",a.updateCatalogState.error),t.xp6(2),t.Q6J("text",a.languageGroupingWarningMessage),t.xp6(11),t.Q6J("ngIf",a.getUpdateTitleErrorMessage()),t.xp6(10),t.Q6J("ngIf",a.getUpdateCourseGuidsErrorMessage()),t.xp6(3),t.Q6J("ngIf",a.parsedUpdateCourseGuids.hasDuplicates),t.xp6(2),t.Q6J("ngIf",a.parsedUpdateCourseGuids.hasInvalidCourseGuids),t.xp6(2),t.Q6J("ngIf",t.lcZ(46,12,a.customCatalogIntegrationOptions$)),t.xp6(6),t.Q6J("disabled",!a.canAttemptUpdate()),t.xp6(1),t.hij("\n            ",a.isUpdateSubmitting()?"Updating...":"Update Custom Catalog","\n          ")}}let ht=(()=>{const n=class{constructor(e,s,l,i,c){this.route=e,this.customCatalogListService=s,this.customCatalogDetailService=l,this.customCatalogIntegrationsService=i,this.customCatalogUpdateService=c,this.languageGroupingWarningMessage=A,this.selectedUpdateCatalog=null,this.hasUpdateSubmitAttempt=!1,this.parsedUpdateCourseGuids=Z(""),this.validationReadyUpdateRequest=null,this.updateCatalogState=this.getIdleUpdateState(),this.updatedCatalogTitle="",this.customCatalogIntegrationOptions=[],this.successfulUpdateIntegrationIds=[],this.loadError="",this.isLoading=!0,this.pendingUpdateIntegrationViewportState=null,this.suppressUpdateFeedbackClear=!1,this.subscriptions=[],this.customCatalogIntegrationOptions$=this.customCatalogIntegrationsService.listIntegrations().pipe((0,I.b)(g=>this.customCatalogIntegrationOptions=g)),this.updateCatalogForm=new r.nJ({title:new r.p4(""),courseGuidText:new r.p4(""),integrationIds:new r.p4([])}),this.subscriptions.push(this.updateCatalogForm.get("title").valueChanges.subscribe(()=>{this.validationReadyUpdateRequest=null,this.clearStaleUpdateFeedback()}),this.updateCatalogForm.get("courseGuidText").valueChanges.subscribe(()=>{this.updateParsedUpdateCourseGuids(),this.clearStaleUpdateFeedback()}),this.updateCatalogForm.get("integrationIds").valueChanges.subscribe(()=>{this.validationReadyUpdateRequest=null,this.clearStaleUpdateFeedback()}))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}ngOnInit(){const e=this.parseCustomCatalogId(this.route.snapshot.queryParamMap.get("id"));if(!e)return this.loadError="Custom Catalog could not be found.",void(this.isLoading=!1);this.customCatalogListService.listCustomCatalogs().subscribe(s=>{if(s.error)return this.loadError=s.error,void(this.isLoading=!1);if(s.loading)return;const l=s.rows.find(i=>i.id===e);if(!l)return this.loadError="Custom Catalog could not be found.",void(this.isLoading=!1);this.loadCourseGuidsForUpdate(l)},()=>{this.loadError="Custom Catalog could not be loaded. Try again later.",this.isLoading=!1})}submitUpdateAttempt(){if(this.updateCatalogState.loading)return;this.resetUpdateFeedback(),this.hasUpdateSubmitAttempt=!0,this.updateCatalogForm.markAllAsTouched(),this.updateParsedUpdateCourseGuids();const e=this.buildUpdateRequest();if(this.validationReadyUpdateRequest=e,!e)return;const s=e.title,l=e.integrationIds;this.updateCatalogState={loading:!0,result:null,error:null},this.customCatalogUpdateService.updateCustomCatalog(e).subscribe(i=>this.handleUpdateState(i,s,l),()=>this.handleUpdateState(this.getUpdateGeneralErrorState("Custom Catalog could not be updated. Try again later."),s,l))}canAttemptUpdate(){return G({title:this.updateCatalogForm.get("title").value||"",isLoading:this.updateCatalogState.loading,hasCourseGuids:this.parsedUpdateCourseGuids.courseGuids.length>0,hasInvalidCourseGuids:this.parsedUpdateCourseGuids.hasInvalidCourseGuids,hasSelectedCatalog:Boolean(this.selectedUpdateCatalog)})}getUpdateTitleErrorMessage(){return F(this.updateCatalogForm.get("title"),this.hasUpdateSubmitAttempt)}getUpdateCourseGuidsErrorMessage(){return k(this.updateCatalogForm.get("courseGuidText"),this.parsedUpdateCourseGuids,this.hasUpdateSubmitAttempt)}isUpdateSubmitting(){return this.updateCatalogState.loading}updateParsedUpdateCourseGuids(){this.parsedUpdateCourseGuids=Z(this.updateCatalogForm.get("courseGuidText").value||""),this.validationReadyUpdateRequest=null}buildUpdateRequest(){return this.canAttemptUpdate()&&this.selectedUpdateCatalog?{...R(this.updateCatalogForm,this.parsedUpdateCourseGuids),customCatalogId:this.selectedUpdateCatalog.id}:null}getSelectedUpdateIntegrations(e){return N(e,this.updateCatalogForm.get("integrationIds").value||[])}getUpdateIntegrationSetupLinks(){return z(this.customCatalogIntegrationOptions,this.successfulUpdateIntegrationIds)}toggleUpdateIntegrationSelection(e,s){const l=this.updateCatalogForm.get("integrationIds"),i=E(e,s,l.value||[]);i&&(l.markAsTouched(),l.markAsDirty(),l.setValue(i.selectedIntegrationIds),this.pendingUpdateIntegrationViewportState=i.viewportState,this.restoreUpdateIntegrationViewport())}suppressNativeUpdateIntegrationClick(e){Q(e)}removeUpdateIntegration(e){const s=this.updateCatalogForm.get("integrationIds");s.setValue(J(s.value||[],e))}parseCustomCatalogId(e){return e&&/^\d+$/.test(e)?Number(e):null}loadCourseGuidsForUpdate(e){this.customCatalogDetailService.loadCourseGuidsForUpdate(e.id).subscribe(s=>{if(s.error)return this.loadError=s.error,void(this.isLoading=!1);s.loading||this.loadCatalogForUpdate(e,s.courseGuids)},()=>{this.loadError="Custom Catalog course GUIDs could not be loaded. Try again later.",this.isLoading=!1})}loadCatalogForUpdate(e,s){this.selectedUpdateCatalog=e,this.hasUpdateSubmitAttempt=!1,this.validationReadyUpdateRequest=null,this.updateCatalogState=this.getIdleUpdateState(),this.suppressUpdateFeedbackClear=!0,this.updateCatalogForm.reset({t
1itle:e.title,courseGuidText:s.join("\n"),integrationIds:e.integrationIds}),this.suppressUpdateFeedbackClear=!1,this.updateParsedUpdateCourseGuids(),this.isLoading=!1}handleUpdateState(e,s,l){this.updateCatalogState=e,e.result&&(this.updatedCatalogTitle=e.result.title||s,this.successfulUpdateIntegrationIds=l,this.validationReadyUpdateRequest=null,this.hasUpdateSubmitAttempt=!1)}restoreUpdateIntegrationViewport(){this.applyPendingUpdateIntegrationViewportState(),"function"==typeof requestAnimationFrame&&requestAnimationFrame(()=>{this.applyPendingUpdateIntegrationViewportState(),requestAnimationFrame(()=>this.applyPendingUpdateIntegrationViewportState())})}applyPendingUpdateIntegrationViewportState(){D(this.updateIntegrationsSelectRef&&this.updateIntegrationsSelectRef.nativeElement,this.pendingUpdateIntegrationViewportState)}clearStaleUpdateFeedback(){this.suppressUpdateFeedbackClear||this.resetUpdateFeedback()}resetUpdateFeedback(){this.updateCatalogState=this.getIdleUpdateState(),this.updatedCatalogTitle="",this.successfulUpdateIntegrationIds=[]}getIdleUpdateState(){return{loading:!1,result:null,error:null}}getUpdateGeneralErrorState(e){return{loading:!1,result:null,error:{type:"general",message:e}}}};let o=n;return n.\u0275fac=function(s){return new(s||n)(t.Y36(C.gz),t.Y36(y),t.Y36(K),t.Y36(q),t.Y36(H))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-custom-catalog-update-page"]],viewQuery:function(s,l){if(1&s&&t.Gf(W,5),2&s){let i;t.iGM(i=t.CRH())&&(l.updateIntegrationsSelectRef=i.first)}},decls:51,vars:3,consts:[["aria-labelledby","custom-catalog-update-page-heading",1,"custom-catalog-update-page"],[1,"custom-catalog-update-page__header"],["aria-label","Breadcrumb",1,"custom-catalog-update-page__breadcrumb"],["routerLink","/internal-tools"],["aria-hidden","true"],["routerLink","/internal-tools/product-support/custom-catalogs"],["id","custom-catalog-update-page-heading"],[1,"custom-catalog-update-page__route-note"],[1,"custom-catalog-update-page__content"],["class","custom-catalog-update-page__loading",4,"ngIf"],["class","custom-catalog-update-page__not-found","role","alert","aria-labelledby","custom-catalog-update-not-found",4,"ngIf"],["class","custom-catalog-update-page__form","aria-labelledby","custom-catalogs-update-heading",4,"ngIf"],[1,"custom-catalog-update-page__footer"],["href","https://opensesame.slack.com/archives/C06C714NFCJ","target","_blank","rel","noopener noreferrer"],[1,"custom-catalog-update-page__loading"],["id","custom-catalog-update-loading-indicator","size","large"],["role","alert","aria-labelledby","custom-catalog-update-not-found",1,"custom-catalog-update-page__not-found"],["id","custom-catalog-update-not-found"],["aria-labelledby","custom-catalogs-update-heading",1,"custom-catalog-update-page__form"],[3,"formGroup","ngSubmit"],[1,"custom-catalog-update-page__form-header"],[1,"custom-catalog-update-page__label"],["id","custom-catalogs-update-heading"],["class","custom-catalog-update-page__status","role","status","aria-live","polite",4,"ngIf"],["class","custom-catalog-update-page__error","role","alert",4,"ngIf"],[3,"text"],[1,"custom-catalog-update-page__field-grid"],[1,"custom-catalog-update-page__field"],["formControlName","title","id","custom-catalog-update-title","maxlength","255","type","text"],["class","custom-catalog-update-page__field-error","role","alert",4,"ngIf"],[1,"custom-catalog-update-page__field","custom-catalog-update-page__field--full"],["formControlName","courseGuidText","id","custom-catalog-update-course-guids","placeholder","Paste course GUIDs separated by commas, spaces, or new lines","rows","5"],["class","custom-catalog-update-page__duplicate-note",4,"ngIf"],["class","custom-catalog-update-page__invalid-guids","aria-live","polite","role","alert",4,"ngIf"],[4,"ngIf"],[1,"custom-catalog-update-page__actions"],["buttonType","submit","color","primary","variant","contained",3,"disabled"],["routerLink","/internal-tools/product-support/custom-catalogs",1,"custom-catalog-update-page__back-link"],["role","status","aria-live","polite",1,"custom-catalog-update-page__status"],[1,"custom-catalog-update-page__status-metadata"],["class","custom-catalog-update-page__integration-setup","aria-label","Finish setup for mapped integrations",4,"ngIf"],["aria-label","Finish setup for mapped integrations",1,"custom-catalog-update-page__integration-setup"],[4,"ngFor","ngForOf"],[3,"href"],["role","alert",1,"custom-catalog-update-page__error"],["role","alert",1,"custom-catalog-update-page__field-error"],[1,"custom-catalog-update-page__duplicate-note"],["aria-live","polite","role","alert",1,"custom-catalog-update-page__invalid-guids"],[1,"custom-catalog-update-page__invalid-guid-list"],["formControlName","integrationIds","id","custom-catalog-update-integrations","multiple",""],["updateIntegrationsSelect",""],[3,"ngValue","mousedown","click",4,"ngFor","ngForOf"],[1,"custom-catalog-update-page__integration-setup-note"],["aria-live","polite",1,"custom-catalog-update-page__selected-integrations"],[1,"custom-catalog-update-page__selected-integrations-label"],["class","custom-catalog-update-page__selected-integrations-empty",4,"ngIf"],["class","custom-catalog-update-page__selected-integrations-list",4,"ngIf"],[3,"ngValue","mousedown","click"],[1,"custom-catalog-update-page__selected-integrations-empty"],[1,"custom-catalog-update-page__selected-integrations-list"],["type","button",3,"click"]],template:function(s,l){1&s&&(t.TgZ(0,"section",0),t._uU(1,"\n  "),t.TgZ(2,"header",1),t._uU(3,"\n    "),t.TgZ(4,"nav",2),t._uU(5,"\n      "),t.TgZ(6,"a",3),t._uU(7,"Internal Tools"),t.qZA(),t._uU(8,"\n      "),t.TgZ(9,"span",4),t._uU(10,">"),t.qZA(),t._uU(11,"\n      "),t.TgZ(12,"span"),t._uU(13,"Product Support"),t.qZA(),t._uU(14,"\n      "),t.TgZ(15,"span",4),t._uU(16,">"),t.qZA(),t._uU(17,"\n      "),t.TgZ(18,"a",5),t._uU(19,"Custom Catalogs"),t.qZA(),t._uU(20,"\n      "),t.TgZ(21,"span",4),t._uU(22,">"),t.qZA(),t._uU(23,"\n      "),t.TgZ(24,"span"),t._uU(25,"Update"),t.qZA(),t._uU(26,"\n    "),t.qZA(),t._uU(27,"\n    "),t.TgZ(28,"h1",6),t._uU(29,"Update Custom Catalog"),t.qZA(),t._uU(30,"\n    "),t.TgZ(31,"p",7),t._uU(32,"Direct URL access for CSR users"),t.qZA(),t._uU(33,"\n  "),t.qZA(),t._uU(34,"\n\n  "),t.TgZ(35,"div",8),t._uU(36,"\n    "),t.YNc(37,X,4,0,"div",9),t._uU(38,"\n\n    "),t.YNc(39,tt,11,1,"section",10),t._uU(40,"\n\n    "),t.YNc(41,Ct,59,14,"section",11),t._uU(42,"\n\n    "),t.TgZ(43,"footer",12),t._uU(44,"\n      Bugs or Feedback? Message the\n      "),t.TgZ(45,"a",13),t._uU(46,"\n        #ask-marketplace-engineering-team\n      "),t.qZA(),t._uU(47,"\n      channel.\n    "),t.qZA(),t._uU(48,"\n  "),t.qZA(),t._uU(49,"\n"),t.qZA(),t._uU(50,"\n")),2&s&&(t.xp6(37),t.Q6J("ngIf",l.isLoading),t.xp6(2),t.Q6J("ngIf",l.loadError),t.xp6(2),t.Q6J("ngIf",!l.isLoading&&!l.loadError&&l.selectedUpdateCatalog))},dependencies:[L.r0,d.sg,d.O5,C.rH,p.Q,r._Y,r.YN,r.Kr,r.Fj,r.K7,r.JJ,r.JL,r.nD,r.sg,r.u,O.$,d.Ov],styles:["[_ngcontent-%COMP%]:root{--mobile-nav-break: 981px}.custom-catalog-update-page[_ngcontent-%COMP%]{background:#ffffff;color:#333;display:flex;flex-direction:column;font-family:Open Sans,Helvetica,Arial,sans-serif;gap:24px;letter-spacing:0;margin:0 auto;max-width:1320px;padding:32px 24px 48px}@media (max-width: 767px){.custom-catalog-update-page[_ngcontent-%COMP%]{padding:32px 16px 48px}}.custom-catalog-update-page__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.custom-catalog-update-page__header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:#2d2d35;font-size:24px;font-weight:600;line-height:1.3;margin:0}.custom-catalog-update-page__breadcrumb[_ngcontent-%COMP%], .custom-catalog-update-page__label[_ngcontent-%COMP%]{color:#59596c;font-size:12px;font-weight:600;line-height:1.3;margin:0}.custom-catalog-update-page__breadcrumb[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:6px}.custom-catalog-update-page__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#59596c;text-decoration:underline;text-underline-offset:2px;transition:color .25s ease}.custom-catalog-update-page__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalog-update-page__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#005472}.custom-catalog-update-page__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalog-update-page__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#333}.custom-catalog-update-page__route-note[_ngcontent-%COMP%], .custom-catalog-update-page__footer[_ngcontent-%COMP%], .custom-catalog-update-page__not-found[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#4d4d4d;font-size:14px;font-weight:400;line-height:1.5;margin:0}.custom-catalog-update-page__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.custom-catalog-update-page__loading[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;min-height:180px}.custom-catalog-update-page__form[_ngcontent-%COMP%], .custom-catalog-update-page__not-found[_ngcontent-%COMP%]{background:#f5f5f5;border:1px solid #d8d8d8;border-radius:8px;display:flex;flex-direction:column;gap:24px;padding:24px}.custom-catalog-update-page__form[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.custom-catalog-update-page__form-header[_ngcontent-%COMP%], .custom-catalog-update-page__not-found[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.custom-catalog-update-page__form-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .custom-catalog-update-page__not-found[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#2d2d35;font-size:20px;font-weight:600;line-height:1.35;margin:0}.custom-catalog-update-page__not-found[_ngcontent-%COMP%]   a[_ngcontent-%COMP%], .custom-catalog-update-page__back-link[_ngcontent-%COMP%]{color:#005e9e;text-decoration:underline;text-underline-offset:2px;transition:color .25s ease;font-size:14px;font-weight:600;line-height:1.5}.custom-catalog-update-page__not-found[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalog-update-page__not-found[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus, .custom-catalog-update-page__back-link[_ngcontent-%COMP%]:hover, .custom-catalog-update-page__back-link[_ngcontent-%COMP%]:focus{color:#005472}.custom-catalog-update-page__status[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#e4f6ec;border:1px solid #50a54d;color:#156041;
1display:flex;flex-direction:column;gap:8px}.custom-catalog-update-page__status[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .custom-catalog-update-page__status[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}.custom-catalog-update-page__status[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:1.5}.custom-catalog-update-page__error[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#fff4f4;border:1px solid #c34747;color:#7d1f1f}.custom-catalog-update-page__status-metadata[_ngcontent-%COMP%]{display:grid;gap:8px 16px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}.custom-catalog-update-page__status-metadata[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;min-width:0}.custom-catalog-update-page__status-metadata[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:12px;font-weight:600;line-height:1.3}.custom-catalog-update-page__status-metadata[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:0;overflow-wrap:anywhere}@media (max-width: 767px){.custom-catalog-update-page__status-metadata[_ngcontent-%COMP%]{grid-template-columns:1fr}}.custom-catalog-update-page__field-grid[_ngcontent-%COMP%]{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}.custom-catalog-update-page__field[_ngcontent-%COMP%]{color:#333;display:flex;flex-direction:column;font-size:14px;font-weight:400;gap:8px;line-height:1.5}.custom-catalog-update-page__field[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#59596c;font-size:12px;font-weight:600;line-height:1.3;margin:0}.custom-catalog-update-page__field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .custom-catalog-update-page__field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%], .custom-catalog-update-page__field[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{background:#ffffff;border:1px solid #d8d8d8;border-radius:4px;box-sizing:border-box;color:#333;font:inherit;letter-spacing:0;min-height:44px;padding:8px 12px;width:100%}.custom-catalog-update-page__field[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{min-height:132px;resize:vertical}.custom-catalog-update-page__field[_ngcontent-%COMP%]   select[multiple][_ngcontent-%COMP%]{min-height:116px}.custom-catalog-update-page__field-error[_ngcontent-%COMP%], .custom-catalog-update-page__field-error-list[_ngcontent-%COMP%]{color:#7d1f1f;font-size:14px;font-weight:400;line-height:1.5}.custom-catalog-update-page__field-error-list[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:24px}.custom-catalog-update-page__selected-integrations[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.custom-catalog-update-page__selected-integrations-label[_ngcontent-%COMP%]{color:#59596c;font-size:12px;font-weight:600;line-height:1.3;margin:0}.custom-catalog-update-page__selected-integrations-empty[_ngcontent-%COMP%]{color:#4d4d4d;font-size:14px;font-weight:400;line-height:1.5;margin:0}.custom-catalog-update-page__selected-integrations-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0}.custom-catalog-update-page__selected-integrations-list[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{align-items:center;background:#ffffff;border:1px solid #d8d8d8;border-radius:999px;color:#333;display:inline-flex;font-size:13px;gap:6px;line-height:1.4;max-width:100%;min-height:30px;padding:4px 8px 4px 12px}.custom-catalog-update-page__selected-integrations-list[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{overflow-wrap:anywhere}.custom-catalog-update-page__selected-integrations-list[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{align-items:center;background:transparent;border:0;border-radius:999px;color:#59596c;cursor:pointer;display:inline-flex;font-size:18px;font-weight:600;height:22px;justify-content:center;line-height:1;padding:0;width:22px;transition:all .25s ease}.custom-catalog-update-page__selected-integrations-list[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .custom-catalog-update-page__selected-integrations-list[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus{background:#f58220;color:#fff;outline:none}.custom-catalog-update-page__integration-setup-note[_ngcontent-%COMP%]{color:#59596c;font-size:14px;line-height:1.5;margin-top:8px}.custom-catalog-update-page__integration-setup[_ngcontent-%COMP%]{margin-top:16px}.custom-catalog-update-page__integration-setup[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:600;margin:0 0 8px}.custom-catalog-update-page__integration-setup[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0}.custom-catalog-update-page__integration-setup[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#005e9e;text-decoration:underline;text-underline-offset:2px;transition:color .25s ease;font-weight:600}.custom-catalog-update-page__integration-setup[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalog-update-page__integration-setup[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#005472}.custom-catalog-update-page__duplicate-note[_ngcontent-%COMP%], .custom-catalog-update-page__invalid-guids[_ngcontent-%COMP%]{font-size:14px;line-height:1.5;margin:0}.custom-catalog-update-page__duplicate-note[_ngcontent-%COMP%]{color:#59596c}.custom-catalog-update-page__invalid-guids[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#fff4f4;border:1px solid #c34747;color:#7d1f1f}.custom-catalog-update-page__invalid-guids[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:600;margin:0 0 8px}.custom-catalog-update-page__invalid-guids[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:24px}.custom-catalog-update-page__actions[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:12px}.custom-catalog-update-page__footer[_ngcontent-%COMP%]{color:#4d4d4d;font-size:14px;font-weight:400;line-height:1.5;margin:0;border-top:1px solid #d8d8d8;padding-top:16px}.custom-catalog-update-page__footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#005e9e;text-decoration:underline;text-underline-offset:2px;transition:color .25s ease;font-weight:600}.custom-catalog-update-page__footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalog-update-page__footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#005472}"]}),o})();var ft=u(2198),xt=u(2986);let Ut=(()=>{const n=class{constructor(e){this.api=e,this.endpoint=T}listCustomCatalogCourses(e){const l=(0,x.D)(this.api.get(`${this.endpoint}/${e.customCatalogId}/courses`,{params:{page:e.page.toString(),pageSize:e.pageSize.toString(),sortField:e.sortField,sortDirection:e.sortDirection}})).pipe((0,U.U)(i=>this.mapResponseToState(i)),(0,f.K)(()=>(0,_.of)({loading:!1,rows:[],totalRecords:0,error:"Custom Catalog courses could not be loaded. Try again later."})));return(0,P.z)((0,_.of)({loading:!0,rows:[],totalRecords:0,error:null}),l)}mapResponseToState(e){return{loading:!1,rows:e.courses,totalRecords:e.totalRecords,error:null}}};let o=n;
1return n.\u0275fac=function(s){return new(s||n)(t.LFG(b.z))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),o})(),bt=(()=>{const n=class{constructor(e){this.api=e,this.endpoint=T}createCustomCatalog(e){const l=(0,x.D)(this.api.post(this.endpoint,e)).pipe((0,U.U)(i=>({loading:!1,result:{customCatalogId:i.id,title:i.title,courseGuids:i.courseGuids},error:null})),(0,f.K)(i=>(0,_.of)({loading:!1,result:null,error:{type:this.isValidationErrorStatus(i?.status)?"validation":"general",message:this.errorMessageForStatus(i)}})));return(0,P.z)((0,_.of)({loading:!0,result:null,error:null}),l)}isValidationErrorStatus(e){return 400===e||422===e}errorMessageForStatus(e){return this.isValidationErrorStatus(e?.status)?e?.error?.message??"An unexpected error occurred.":"An unexpected error occurred."}};let o=n;return n.\u0275fac=function(s){return new(s||n)(t.LFG(b.z))},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),o})(),Tt=(()=>{const n=class{downloadCsv(e){const s=this.buildCsv(e.headers,e.rows),l=document.createElement("a");l.setAttribute("href",`data:text/csv;charset=utf-8,${encodeURIComponent(s)}`),l.setAttribute("download",e.filename),l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l)}
1buildCsv(e,s){return[e,...s].map(l=>l.map(i=>this.escapeValue(i)).join(",")).join("\n")}escapeValue(e){return`"${String(e).replace(/"/g,'""')}"`}};let o=n;return n.\u0275fac=function(s){return new(s||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),o})();var $=u(805);function Zt(o,n){1&o&&(t.ynx(0),t._uU(1,"\n    "),t.TgZ(2,"div",4),t._uU(3,"\n      "),t._UZ(4,"app-loading-indicator",5),t._uU(5,"\n    "),t.qZA(),t._uU(6,"\n  "),t.BQk())}function Ot(o,n){if(1&o&&(t.TgZ(0,"div",7),t._uU(1),t.qZA()),2&o){const a=t.oxw(2);t.xp6(1),t.hij("\n      ",a.state.error,"\n    ")}}function Pt(o,n){if(1&o&&(t._uU(0,"\n    "),t.YNc(1,Ot,2,1,"div",6),t._uU(2,"\n  ")),2&o){const a=t.oxw(),e=t.MAs(8);t.xp6(1),t.Q6J("ngIf",null==a.state?null:a.state.error)("ngIfElse",e)}}function Mt(o,n){if(1&o&&(t._uU(0,"\n          "),t.TgZ(1,"tr",15),t._uU(2,"\n            "),t.TgZ(3,"td"),t._uU(4,"\n              "),t.TgZ(5,"span"),t._uU(6,"No Custom Catalogs found"),t.qZA(),t._uU(7,"\n            "),t.qZA(),t._uU(8,"\n          "),t.qZA(),t._uU(9,"\n        ")),2&o){const a=t.oxw(2);t.xp6(3),t.uIk("colspan",a.columns.length+1)}}function wt(o,n){if(1&o&&t._UZ(0,"p-sortIcon",21),2&o){const a=t.oxw().$implicit;t.Q6J("field",a.sortField)}}function It(o,n){if(1&o&&(t.TgZ(0,"th",18),t._uU(1,"\n              "),t.TgZ(2,"span",19),t._uU(3),t.qZA(),t._uU(4,"\n              "),t.YNc(5,wt,1,1,"p-sortIcon",20),t._uU(6,"\n            "),t.qZA()),2&o){const a=n.$implicit;t.Tol(a.className),t.Q6J("pSortableColumn",a.sortField)("pSortableColumnDisabled",!a.sortable),t.xp6(3),t.Oqu(a.label),t.xp6(2),t.Q6J("ngIf",a.sortable)}}function vt(o,n){if(1&o&&(t._uU(0,"\n          "),t.TgZ(1,"tr"),t._uU(2,"\n            "),t._UZ(3,"th",16),t._uU(4,"\n            "),t.YNc(5,It,7,6,"th",17),t._uU(6,"\n          "),t.qZA(),t._uU(7,"\n        ")),2&o){const a=t.oxw(2);t.xp6(5),t.Q6J("ngForOf",a.columns)}}function St(o,n){if(1&o){const a=t.EpF();t._uU(0,"\n          "),t.TgZ(1,"tr",22),t._uU(2,"\n            "),t.TgZ(3,"td",16),t._uU(4,"\n              "),t.TgZ(5,"div",23),t._uU(6,"\n                "),t.TgZ(7,"button",24),t.NdJ("click",function(){const l=t.CHM(a).$implicit,i=t.oxw(2);return t.KtG(i.requestUpdate(l))}),t._uU(8,"Update"),t.qZA(),t._uU(9,"\n                "),t.TgZ(10,"button",25),t.NdJ("click",function(){const l=t.CHM(a).$implicit,i=t.oxw(2);return t.KtG(i.requestCourses(l))}),t._uU(11,"Show courses"),t.qZA(),t._uU(12,"\n              "),t.qZA(),t._uU(13,"\n            "),t.qZA(),t._uU(14,"\n            "),t.TgZ(15,"td",26),t._uU(16,"\n              "),t.TgZ(17,"span",19),t._uU(18,"Custom Catalog ID"),t.qZA(),t._uU(19),t.qZA(),t._uU(20,"\n            "),t.TgZ(21,"td",27),t._uU(22,"\n              "),t.TgZ(23,"span",19),t._uU(24,"Title"),t.qZA(),t._uU(25),t.qZA(),t._uU(26,"\n            "),t.TgZ(27,"td",28),t._uU(28,"\n              "),t.TgZ(29,"span",19),t._uU(30,"Mapped Integrations"),t.qZA(),t._uU(31),t.qZA(),t._uU(32,"\n            "),t.TgZ(33,"td",29),t._uU(34,"\n              "),t.TgZ(35,"span",19),t._uU(36,"Updated At"),t.qZA(),t._uU(37),t.qZA(),t._uU(38,"\n          "),t.qZA(),t._uU(39,"\n        ")}if(2&o){const a=n.$implicit,e=n.rowIndex,s=t.oxw(2);t.xp6(1),t.Q6J("ngClass",e%2?"odd":"even"),t.xp6(18),t.hij("\n              ",a.id,"\n            "),t.xp6(6),t.hij("\n              ",a.title,"\n            "),t.xp6(6),t.hij("\n              ",s.getSortedMappedIntegrations(a).join(", "),"\n            "),t.xp6(6),t.hij("\n              ",a.updatedAt,"\n            ")}}const At=function(){return[]};function qt(o,n){if(1&o){const a=t.EpF();t._uU(0,"\n    "),t.TgZ(1,"div",8),t._uU(2,"\n      "),t.TgZ(3,"button",9),t.NdJ("click",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.requestDownload())}),t._uU(4,"Download CSV"),t.qZA(),t._uU(5,"\n    "),t.qZA(),t._uU(6,"\n\n    "),t.TgZ(7,"div",10),t._uU(8,"\n      "),t.TgZ(9,"p-table",11),t.NdJ("onSort",function(s){t.CHM(a);const l=t.oxw();return t.KtG(l.handleSort(s))}),t._uU(10,"\n        "),t.YNc(11,Mt,10,1,"ng-template",12),t._uU(12,"\n\n        "),t.YNc(13,vt,8,1,"ng-template",13),t._uU(14,"\n\n        "),t.YNc(15,St,40,5,"ng-template",14),t._uU(16,"\n      "),t.qZA(),t._uU(17,"\n    "),t.qZA(),t._uU(18,"\n  ")}if(2&o){const a=t.oxw();
1t.xp6(9),t.Q6J("value",(null==a.state?null:a.state.rows)||t.DdM(7,At))("paginator",!0)("alwaysShowPaginator",!1)("rows",10)("rowsPerPageOptions",a.rowsPerPageOptions)("responsive",!0)("rowHover",!1)}}let yt=(()=>{const n=class{constructor(){this.state=null,this.updateRequested=new t.vpe,this.coursesRequested=new t.vpe,this.downloadRequested=new t.vpe,this.sortChanged=new t.vpe,this.rowsPerPageOptions=[10,25],this.columns=[{field:"id",sortField:"id",label:"Custom Catalog ID",className:"custom-catalogs-table__id",sortable:!0},{field:"title",sortField:"title",label:"Title",className:"custom-catalogs-table__title",sortable:!0},{field:"mappedIntegrations",sortField:"mappedIntegrations",label:"Mapped Integrations",className:"custom-catalogs-table__integrations",sortable:!1},{field:"updatedAt",sortField:"updatedAtTimestamp",label:"Updated At",className:"custom-catalogs-table__updated-at",sortable:!0}]}requestUpdate(e){this.updateRequested.emit(e)}requestCourses(e){this.coursesRequested.emit(e)}requestDownload(){this.downloadRequested.emit()}handleSort(e){this.sortChanged.emit({sortField:e.field,sortDirection:-1===e.order?"desc":"asc"})}getSortedMappedIntegrations(e){return[...e.mappedIntegrations].sort((s,l)=>s.localeCompare(l))}};let o=n;return n.\u0275fac=function(s){return new(s||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-custom-catalogs-table"]],inputs:{state:"state"},outputs:{updateRequested:"updateRequested",coursesRequested:"coursesRequested",downloadRequested:"downloadRequested",sortChanged:"sortChanged"},decls:11,vars:2,consts:[["aria-label","Custom Catalogs table",1,"custom-catalogs-table"],[4,"ngIf","ngIfElse"],["resolvedState",""],["tableState",""],[1,"custom-catalogs-table__loading"],["id","custom-catalogs-table-loading-indicator","size","large"],["class","custom-catalogs-table__error","role","alert",4,"ngIf","ngIfElse"],["role","alert",1,"custom-catalogs-table__error"],[1,"custom-catalogs-table__toolbar"],["type","button",1,"custom-catalogs-table__download-button",3,"click"],[1,"custom-catalogs-table__frame"],["dataKey","id",1,"table-default",3,"value","paginator","alwaysShowPaginator","rows","rowsPerPageOptions","responsive","rowHover","onSort"],["pTemplate","emptymessage"],["pTemplate","header"],["pTemplate","body"],[1,"empty-set"],[1,"custom-catalogs-table__row-actions"],[3,"class","pSortableColumn","pSortableColumnDisabled",4,"ngFor","ngForOf"],[3,"pSortableColumn","pSortableColumnDisabled"],[1,"ui-column-title"],[3,"field",4,"ngIf"],[3,"field"],[3,"ngClass"],[1,"custom-catalogs-table__row-actions-content"],["type","button",1,"custom-catalogs-table__update-button",3,"click"],["type","button",1,"custom-catalogs-table__courses-button",3,"click"],[1,"custom-catalogs-table__id"],[1,"custom-catalogs-table__title"],[1,"custom-catalogs-table__integrations"],[1,"custom-catalogs-table__updated-at"]],template:function(s,l){if(1&s&&(t.TgZ(0,"section",0),t._uU(1,"\n  "),t.YNc(2,Zt,7,0,"ng-container",1),t._uU(3,"\n\n  "),t.YNc(4,Pt,3,2,"ng-template",null,2,t.W1O),t._uU(6,"\n\n  "),t.YNc(7,qt,19,8,"ng-template",null,3,t.W1O),t._uU(9,"\n"),t.qZA(),t._uU(10,"\n")),2&s){const i=t.MAs(5);t.xp6(2),t.Q6J("ngIf",null==l.state?null:l.state.loading)("ngIfElse",i)}},dependencies:[d.mk,d.sg,d.O5,p.Q,h.iA,$.jx,h.lQ,h.fz],styles:["[_ngcontent-%COMP%]:root{--mobile-nav-break: 981px}.custom-catalogs-table[_ngcontent-%COMP%]{color:#333;width:100%}.custom-catalogs-table__loading[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;min-height:180px}.custom-catalogs-table__error[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#fff4f4;border:1px solid #d94f4f;color:#7d1f1f;margin:0}.custom-catalogs-table__frame[_ngcontent-%COMP%]{overflow-x:auto;width:100%}.custom-catalogs-table__toolbar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:8px}.custom-catalogs-table__id[_ngcontent-%COMP%], .custom-catalogs-table__course-count[_ngcontent-%COMP%], .custom-catalogs-table__updated-at[_ngcontent-%COMP%]{white-space:nowrap}.custom-catalogs-table__row-actions[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.custom-catalogs-table__row-actions-content[_ngcontent-%COMP%]{display:flex;gap:8px}.custom-catalogs-table__update-button[_ngcontent-%COMP%], .custom-catalogs-table__courses-button[_ngcontent-%COMP%], .custom-catalogs-table__download-button[_ngcontent-%COMP%]{background:#f28132;border:1px solid #f28132;border-radius:999px;color:#fff;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;line-height:1.5;min-height:36px;padding:6px 16px;transition:all .25s ease}.custom-catalogs-table__update-button[_ngcontent-%COMP%]:hover, .custom-catalogs-table__update-button[_ngcontent-%COMP%]:focus, .custom-catalogs-table__courses-button[_ngcontent-%COMP%]:hover, .custom-catalogs-table__courses-button[_ngcontent-%COMP%]:focus, .custom-catalogs-table__download-button[_ngcontent-%COMP%]:hover, .custom-catalogs-table__download-button[_ngcontent-%COMP%]:focus{background:#e3660e;border-color:#e3660e}.custom-catalogs-table__download-button[_ngcontent-%COMP%]{background:#f28132;border:1px solid #f28132;border-radius:999px;color:#fff;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;line-height:1.5;min-height:30px;padding:4px 12px;transition:all .25s ease}.custom-catalogs-table__download-button[_ngcontent-%COMP%]:hover, .custom-catalogs-table__download-button[_ngcontent-%COMP%]:focus{background:#e3660e;border-color:#e3660e}.custom-catalogs-table__title[_ngcontent-%COMP%]{min-width:240px}.custom-catalogs-table__integrations[_ngcontent-%COMP%]{min-width:280px}"]}),o})();function Ft(o,n){1&o&&(t.ynx(0),t._uU(1,"\n    "),t.TgZ(2,"div",10),t._uU(3,"\n      "),t._UZ(4,"app-loading-indicator",11),t._uU(5,"\n    "),t.qZA(),t._uU(6,"\n  "),t.BQk())}function Gt(o,n){if(1&o&&(t.TgZ(0,"div",13),t._uU(1),t.qZA()),2&o){const a=t.oxw(3);t.xp6(1),t.hij("\n      ",a.state.error,"\n    ")}}function kt(o,n){if(1&o&&(t._uU(0,"\n    "),t.YNc(1,Gt,2,1,"div",12),t._uU(2,"\n  ")),2&o){t.oxw();const a=t.MAs(23),e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",null==e.state?null:e.state.error)("ngIfElse",a)}}function Rt(o,n){if(1&o&&(t._uU(0,"\n          "),t.TgZ(1,"tr",19),t._uU(2,"\n            "),t.TgZ(3,"td"),t._uU(4,"\n              "),t.TgZ(5,"span"),t._uU(6,"No courses found"),t.qZA(),t._uU(7,"\n            "),t.qZA(),t._uU(8,"\n          "),t.qZA(),t._uU(9,"\n        ")),2&o){const a=t.oxw(3);t.xp6(3),t.uIk("colspan",a.columns.length)}}function Nt(o,n){if(1&o&&t._UZ(0,"p-sortIcon",24),2&o){const a=t.oxw().$implicit;t.Q6J("field",a.field)}}function zt(o,n){if(1&o&&(t.TgZ(0,"th",21),t._uU(1,"\n              "),t.TgZ(2,"span",22),t._uU(3),t.qZA(),t._uU(4,"\n              "),t.YNc(5,Nt,1,1,"p-sortIcon",23),t._uU(6,"\n            "),t.qZA()),2&o){const a=n.$implicit;t.Tol(a.className),t.Q6J("pSortableColumn",a.field)("pSortableColumnDisabled",!a.sortable),t.xp6(3),t.Oqu(a.label),t.xp6(2),t.Q6J("ngIf",a.sortable)}}function Jt(o,n){if(1&o&&(t._uU(0,"\n          "),t.TgZ(1,"tr"),t._uU(2,"\n            "),t.YNc(3,zt,7,6,"th",20),t._uU(4,"\n          "),t.qZA(),t._uU(5,"\n        ")),2&o){const a=t.oxw(3);t.xp6(3),t.Q6J("ngForOf",a.columns)}}function Et(o,n){if(1&o&&(t._uU(0,"\n          "),t.TgZ(1,"tr",25),t._uU(2,"\n            "),t.TgZ(3,"td",26),t._uU(4,"\n              "),t.TgZ(5,"span",22),t._uU(6,"Course GUID"),t.qZA(),t._uU(7),t.qZA(),t._uU(8,"\n            "),t.TgZ(9,"td",27),t._uU(10,"\n              "),t.TgZ(11,"span",22),t._uU(12,"Course Title"),t.qZA(),t._uU(13),t.qZA(),t._uU(14,"\n          "),t.qZA(),t._uU(15,"\n        ")),2&o){const a=n.$implicit,e=n.rowIndex;t.xp6(1),t.Q6J("ngClass",e%2?"odd":"even"),t.xp6(6),t.hij("\n              ",a.courseGuid,"\n            "),t.xp6(6),t.hij("\n              ",a.title,"\n            ")}}const Qt=function(){return[]};function Dt(o,n){if(1&o){const a=t.EpF();t._uU(0,"\n    "),t.TgZ(1,"div",14),t._uU(2,"\n      "),t.TgZ(3,"p-table",15),t.NdJ("onPage",function(s){t.CHM(a);const l=t.oxw(2);return t.KtG(l.handlePage(s))})("onSort",function(s){t.CHM(a);const l=t.oxw(2);return t.KtG(l.handleSort(s))}),t._uU(4,"\n        "),t.YNc(5,Rt,10,1,"ng-template",16),t._uU(6,"\n\n        "),t.YNc(7,Jt,6,1,"ng-template",17),t._uU(8,"\n\n        "),t.YNc(9,Et,16,3,"ng-template",18),t._uU(10,"\n      "),t.qZA(),t._uU(11,"\n    "),t.qZA(),t._uU(12,"\n  ")}if(2&o){const a=t.oxw(2);t.xp6(3),t.Q6J("value",(null==a.state?null:a.state.rows)||t.DdM(13,Qt))("paginator",!0)("alwaysShowPaginator",!0)("lazy",!0)("totalRecords",(null==a.state?null:a.state.totalRecords)||0)("first",a.getFirstRowOffset())("rows",(null==a.request?null:a.request.pageSize)||25)("rowsPerPageOptions",a.rowsPerPageOptions)("paginatorDropdownAppendTo","body")("sortField",null==a.request?null:a.request.sortField)("sortOrder","desc"===(null==a.request?null:a.request.sortDirection)?-1:1)("responsive",!0)("rowHover",!1)}}function Yt(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"section",1),t._uU(1,"\n  "),t.TgZ(2,"div",2),t._uU(3,"\n    "),t.TgZ(4,"p",3),t._uU(5,"Selected catalog"),t.qZA(),t._uU(6,"\n    "),t.TgZ(7,"h2",4),t._uU(8),t.qZA(),t._uU(9,"\n  "),t.qZA(),t._uU(10,"\n\n  "),t.TgZ(11,"div",5),t._uU(12,"\n    "),t.TgZ(13,"button",6),t.NdJ("click",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.requestDownload())}),t._uU(14,"Download CSV"),t.qZA(),t._uU(15,"\n  "),t.qZA(),t._uU(16,"\n\n  "),t.YNc(17,Ft,7,0,"ng-container",7),t._uU(18,"\n\n  "),t.YNc(19,kt,3,2,"ng-template",null,8,t.W1O),t._uU(21,"\n\n  "),t.YNc(22,Dt,13,14,"ng-template",null,9,t.W1O),t._uU(24,"\n"),t.qZA()}if(2&o){const a=t.MAs(20),e=t.oxw();
1t.xp6(8),t.hij("Courses in ",e.selectedCatalog.title,""),t.xp6(9),t.Q6J("ngIf",null==e.state?null:e.state.loading)("ngIfElse",a)}}let Lt=(()=>{const n=class{constructor(){this.selectedCatalog=null,this.state=null,this.request=null,this.pageChanged=new t.vpe,this.sortChanged=new t.vpe,this.downloadRequested=new t.vpe,this.rowsPerPageOptions=[25,50,100],this.columns=[{field:"courseGuid",label:"Course GUID",className:"custom-catalog-courses-table__guid",sortable:!0},{field:"title",label:"Course Title",className:"custom-catalog-courses-table__title",sortable:!0}]}getFirstRowOffset(){return this.request?Math.max(this.request.page-1,0)*this.request.pageSize:0}handlePage(e){this.pageChanged.emit({page:Math.floor(e.first/e.rows)+1,pageSize:e.rows})}requestDownload(){this.downloadRequested.emit()}handleSort(e){this.columns.some(s=>s.field===e.field&&s.sortable)&&this.sortChanged.emit({sortField:e.field,sortDirection:-1===e.order?"desc":"asc"})}};let o=n;return n.\u0275fac=function(s){return new(s||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-custom-catalog-courses-table"]],inputs:{selectedCatalog:"selectedCatalog",state:"state",request:"request"},outputs:{pageChanged:"pageChanged",sortChanged:"sortChanged",downloadRequested:"downloadRequested"},decls:2,vars:1,consts:[["class","custom-catalog-courses-table","aria-labelledby","custom-catalog-courses-heading",4,"ngIf"],["aria-labelledby","custom-catalog-courses-heading",1,"custom-catalog-courses-table"],[1,"custom-catalog-courses-table__header"],[1,"custom-catalog-courses-table__label"],["id","custom-catalog-courses-heading"],[1,"custom-catalog-courses-table__toolbar"],["type","button",1,"custom-catalog-courses-table__download-button",3,"click"],[4,"ngIf","ngIfElse"],["resolvedState",""],["tableState",""],[1,"custom-catalog-courses-table__loading"],["id","custom-catalog-courses-table-loading-indicator","size","large"],["class","custom-catalog-courses-table__error","role","alert",4,"ngIf","ngIfElse"],["role","alert",1,"custom-catalog-courses-table__error"],[1,"custom-catalog-courses-table__frame"],["dataKey","courseGuid",1,"table-default",3,"value","paginator","alwaysShowPaginator","lazy","totalRecords","first","rows","rowsPerPageOptions","paginatorDropdownAppendTo","sortField","sortOrder","responsive","rowHover","onPage","onSort"],["pTemplate","emptymessage"],["pTemplate","header"],["pTemplate","body"],[1,"empty-set"],[3,"class","pSortableColumn","pSortableColumnDisabled",4,"ngFor","ngForOf"],[3,"pSortableColumn","pSortableColumnDisabled"],[1,"ui-column-title"],[3,"field",4,"ngIf"],[3,"field"],[3,"ngClass"],[1,"custom-catalog-courses-table__guid"],[1,"custom-catalog-courses-table__title"]],template:function(s,l){1&s&&(t.YNc(0,Yt,25,3,"section",0),t._uU(1,"\n")),2&s&&t.Q6J("ngIf",l.selectedCatalog)},dependencies:[d.mk,d.sg,d.O5,p.Q,h.iA,$.jx,h.lQ,h.fz],styles:["[_ngcontent-%COMP%]:root{--mobile-nav-break: 981px}.custom-catalog-courses-table[_ngcontent-%COMP%]{background:#ffffff;border-top:1px solid #d8d8d8;color:#333;margin-top:24px;padding-top:24px;width:100%}.custom-catalog-courses-table__header[_ngcontent-%COMP%]{margin-bottom:16px}.custom-catalog-courses-table__header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#2d2d35;font-size:22px;font-weight:700;line-height:1.25;margin:0}.custom-catalog-courses-table__label[_ngcontent-%COMP%]{color:#59596c;font-size:12px;font-weight:600;line-height:1.3;font-weight:700;margin:0 0 6px;text-transform:uppercase}.custom-catalog-courses-table__loading[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;min-height:180px}.custom-catalog-courses-table__toolbar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-bottom:8px}.custom-catalog-courses-table__download-button[_ngcontent-%COMP%]{background:#f28132;border:1px solid #f28132;border-radius:999px;color:#fff;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;line-height:1.5;min-height:30px;padding:4px 12px;transition:all .25s ease}.custom-catalog-courses-table__download-button[_ngcontent-%COMP%]:hover, .custom-catalog-courses-table__download-button[_ngcontent-%COMP%]:focus{background:#e3660e;border-color:#e3660e}.custom-catalog-courses-table__error[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#fff4f4;border:1px solid #d94f4f;color:#7d1f1f;margin:0}.custom-catalog-courses-table__frame[_ngcontent-%COMP%]{overflow-x:auto;width:100%}.custom-catalog-courses-table__guid[_ngcontent-%COMP%], .custom-catalog-courses-table__updated-at[_ngcontent-%COMP%]{white-space:nowrap}.custom-catalog-courses-table__title[_ngcontent-%COMP%]{min-width:260px}"]}),o})();const $t=["createIntegrationsSelect"];function Vt(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"div",15),t._uU(1,"\n      "),t.TgZ(2,"og-button",16),t.NdJ("click",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.openCreateForm())}),t._uU(3,"Create Custom Catalog"),t.qZA(),t._uU(4,"\n    "),t.qZA()}}function jt(o,n){if(1&o&&(t.TgZ(0,"li"),t._uU(1,"\n                  "),t.TgZ(2,"a",42),t._uU(3),t.qZA(),t._uU(4,"\n                "),t.qZA()),2&o){const a=n.$implicit;
1t.xp6(2),t.Q6J("href",a.href,t.LSH),t.xp6(1),t.Oqu(a.title)}}function Kt(o,n){if(1&o&&(t.TgZ(0,"div",40),t._uU(1,"\n              "),t.TgZ(2,"p"),t._uU(3,"Finish setup for mapped integrations:"),t.qZA(),t._uU(4,"\n              "),t.TgZ(5,"ul"),t._uU(6,"\n                "),t.YNc(7,jt,5,2,"li",41),t._uU(8,"\n              "),t.qZA(),t._uU(9,"\n            "),t.qZA()),2&o){const a=t.oxw().ngIf;t.xp6(7),t.Q6J("ngForOf",a)}}function Ht(o,n){if(1&o&&(t.ynx(0),t._uU(1,"\n            "),t.YNc(2,Kt,10,1,"div",39),t._uU(3,"\n          "),t.BQk()),2&o){const a=n.ngIf;t.xp6(2),t.Q6J("ngIf",a.length)}}function Bt(o,n){if(1&o&&(t.TgZ(0,"div",37),t._uU(1,"\n          "),t.TgZ(2,"h3"),t._uU(3,"Custom Catalog created"),t.qZA(),t._uU(4,"\n          "),t.TgZ(5,"dl",38),t._uU(6,"\n            "),t.TgZ(7,"div"),t._uU(8,"\n              "),t.TgZ(9,"dt"),t._uU(10,"Custom Catalog ID"),t.qZA(),t._uU(11,"\n              "),t.TgZ(12,"dd"),t._uU(13),t.qZA(),t._uU(14,"\n            "),t.qZA(),t._uU(15,"\n            "),t.TgZ(16,"div"),t._uU(17,"\n              "),t.TgZ(18,"dt"),t._uU(19,"Title"),t.qZA(),t._uU(20,"\n              "),t.TgZ(21,"dd"),t._uU(22),t.qZA(),t._uU(23,"\n            "),t.qZA(),t._uU(24,"\n          "),t.qZA(),t._uU(25,"\n          "),t.YNc(26,Ht,4,1,"ng-container",33),t._uU(27,"\n        "),t.qZA()),2&o){const a=t.oxw(2);t.xp6(13),t.Oqu(null==a.createCatalogState.result?null:a.createCatalogState.result.customCatalogId),t.xp6(9),t.Oqu(null==a.createCatalogState.result?null:a.createCatalogState.result.title),t.xp6(4),t.Q6J("ngIf",a.getCreateIntegrationSetupLinks())}}function Wt(o,n){if(1&o&&(t.TgZ(0,"div",43),t._uU(1),t.qZA()),2&o){const a=t.oxw(2);t.xp6(1),t.hij("\n          ",null==a.createCatalogState.error?null:a.createCatalogState.error.message,"\n        ")}}function Xt(o,n){if(1&o&&(t.TgZ(0,"span",44),t._uU(1),t.qZA()),2&o){const a=t.oxw(2);t.xp6(1),t.hij("\n              ",a.getTitleErrorMessage(),"\n            ")}}function te(o,n){if(1&o&&(t.TgZ(0,"span",44),t._uU(1),t.qZA()),2&o){const a=t.oxw(2);t.xp6(1),t.hij("\n              ",a.getCourseGuidsErrorMessage(),"\n            ")}}function ee(o,n){1&o&&(t.TgZ(0,"p",45),t._uU(1,"\n            Duplicate GUIDs will be submitted once.\n          "),t.qZA())}function oe(o,n){if(1&o&&(t.TgZ(0,"li"),t._uU(1),t.qZA()),2&o){const a=n.$implicit;t.xp6(1),t.Oqu(a)}}function ae(o,n){if(1&o&&(t.TgZ(0,"div",46),t._uU(1,"\n            "),t.TgZ(2,"p"),t._uU(3,"Invalid GUID format:"),t.qZA(),t._uU(4,"\n            "),t.TgZ(5,"ul",47),t._uU(6,"\n              "),t.YNc(7,oe,2,1,"li",41),t._uU(8,"\n            "),t.qZA(),t._uU(9,"\n          "),t.qZA()),2&o){const a=t.oxw(2);t.xp6(7),t.Q6J("ngForOf",a.parsedCourseGuids.invalidCourseGuids)}}function ne(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"option",56),t.NdJ("mousedown",function(s){const i=t.CHM(a).$implicit,c=t.oxw(3);return t.KtG(c.toggleCreateIntegrationSelection(s,i.id))})("click",function(s){t.CHM(a);const l=t.oxw(3);return t.KtG(l.suppressNativeCreateIntegrationClick(s))}),t._uU(1),t.qZA()}if(2&o){const a=n.$implicit;t.Q6J("ngValue",a.id),t.xp6(1),t.hij("\n                  ",a.title,"\n                ")}}function se(o,n){1&o&&(t.TgZ(0,"p",57),t._uU(1,"\n                No integrations selected.\n              "),t.qZA())}function le(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"li"),t._uU(1,"\n                  "),t.TgZ(2,"span"),t._uU(3),t.qZA(),t._uU(4,"\n                  "),t.TgZ(5,"button",59),t.NdJ("click",function(){const l=t.CHM(a).$implicit,i=t.oxw(4);return t.KtG(i.removeCreateIntegration(l.id))}),t._uU(6,"\n                    \xd7\n                  "),t.qZA(),t._uU(7,"\n                "),t.qZA()}if(2&o){const a=n.$implicit;t.xp6(3),t.Oqu(a.title),t.xp6(2),t.uIk("aria-label","Remove "+a.title)}}function ie(o,n){if(1&o&&(t.TgZ(0,"ul",58),t._uU(1,"\n                "),t.YNc(2,le,8,2,"li",41),t._uU(3,"\n              "),t.qZA()),2&o){const a=t.oxw().ngIf,e=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",e.getSelectedCreateIntegrations(a))}}function re(o,n){if(1&o&&(t.ynx(0),t._uU(1,"\n            "),t.TgZ(2,"label",29),t._uU(3,"\n              "),t.TgZ(4,"span"),t._uU(5,"Integrations"),t.qZA(),t._uU(6,"\n              "),t.TgZ(7,"select",48,49),t._uU(9,"\n                "),t.YNc(10,ne,2,2,"option",50),t._uU(11,"\n              "),t.qZA(),t._uU(12,"\n              "),t.TgZ(13,"span",51),t._uU(14,'\n                After saving, enable "Integration includes Custom Course Catalog" on each mapped integration.\n              '),t.qZA(),t._uU(15,"\n            "),t.qZA(),t._uU(16,"\n\n            "),t.TgZ(17,"div",52),t._uU(18,"\n              "),t.TgZ(19,"p",53),t._uU(20,"Selected integrations"),t.qZA(),t._uU(21,"\n              "),t.YNc(22,se,2,0,"p",54),t._uU(23,"\n              "),t.YNc(24,ie,4,1,"ul",55),t._uU(25,"\n            "),t.qZA(),t._uU(26,"\n          "),t.BQk()),2&o){const a=n.ngIf,e=t.oxw(2);t.xp6(10),t.Q6J("ngForOf",a),t.xp6(12),t.Q6J("ngIf",!e.getSelectedCreateIntegrations(a).length),t.xp6(2),t.Q6J("ngIf",e.getSelectedCreateIntegrations(a).length)}}function ce(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"section",17),t._uU(1,"\n      "),t.TgZ(2,"form",18),t.NdJ("ngSubmit",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.submitCreateAttempt())}),t._uU(3,"\n        "),t.TgZ(4,"div",19),t._uU(5,"\n          "),t.TgZ(6,"p",20),t._uU(7,"Create workflow"),t.qZA(),t._uU(8,"\n          "),t.TgZ(9,"h2",21),t._uU(10,"Create Custom Catalog"),t.qZA(),t._uU(11,"\n        "),t.qZA(),t._uU(12,"\n\n        "),t.YNc(13,Bt,28,3,"div",22),t._uU(14,"\n\n        "),t.YNc(15,Wt,2,1,"div",23),t._uU(16,"\n\n        "),t._UZ(17,"app-warning-banner",24),t._uU(18,"\n\n        "),t.TgZ(19,"div",25),t._uU(20,"\n          "),t.TgZ(21,"label",26),t._uU(22,"\n            "),t.TgZ(23,"span"),t._uU(24,"Title"),t.qZA(),t._uU(25,"\n            "),t._UZ(26,"input",27),t._uU(27,"\n            "),t.YNc(28,Xt,2,1,"span",28),t._uU(29,"\n          "),t.qZA(),t._uU(30,"\n\n          "),t.TgZ(31,"label",29),t._uU(32,"\n            "),t.TgZ(33,"span"),t._uU(34,"Course GUIDs"),t.qZA(),t._uU(35,"\n            "),t._UZ(36,"textarea",30),t._uU(37,"\n            "),t.YNc(38,te,2,1,"span",28),t._uU(39,"\n          "),t.qZA(),t._uU(40,"\n\n          "),t.YNc(41,ee,2,0,"p",31),t._uU(42,"\n\n          "),t.YNc(43,ae,10,1,"div",32),t._uU(44,"\n\n          "),t.YNc(45,re,27,3,"ng-container",33),t.ALo(46,"async"),t._uU(47,"\n        "),t.qZA(),t._uU(48,"\n\n        "),t.TgZ(49,"div",34),t._uU(50,"\n          "),t.TgZ(51,"og-button",35),t._uU(52),t.qZA(),t._uU(53,"\n          "),t.TgZ(54,"og-button",36),t.NdJ("click",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.closeCreateForm())}),t._uU(55,"\n            Close Create Form\n          "),t.qZA(),t._uU(56,"\n        "),t.qZA(),t._uU(57,"\n      "),t.qZA(),t._uU(58,"\n    "),t.qZA()}if(2&o){const a=t.oxw();
1t.xp6(2),t.Q6J("formGroup",a.createCatalogForm),t.xp6(11),t.Q6J("ngIf",a.createCatalogState.result),t.xp6(2),t.Q6J("ngIf",a.createCatalogState.error),t.xp6(2),t.Q6J("text",a.languageGroupingWarningMessage),t.xp6(11),t.Q6J("ngIf",a.getTitleErrorMessage()),t.xp6(10),t.Q6J("ngIf",a.getCourseGuidsErrorMessage()),t.xp6(3),t.Q6J("ngIf",a.parsedCourseGuids.hasDuplicates),t.xp6(2),t.Q6J("ngIf",a.parsedCourseGuids.hasInvalidCourseGuids),t.xp6(2),t.Q6J("ngIf",t.lcZ(46,11,a.customCatalogIntegrationOptions$)),t.xp6(6),t.Q6J("disabled",!a.canAttemptCreate()),t.xp6(1),t.hij("\n            ",a.isCreateSubmitting()?"Creating...":"Create Custom Catalog","\n          ")}}function ue(o,n){if(1&o&&(t.TgZ(0,"div",60),t._uU(1),t.qZA()),2&o){const a=t.oxw();t.xp6(1),t.hij("\n      ",a.refreshListError,"\n    ")}}function ge(o,n){if(1&o){const a=t.EpF();t.TgZ(0,"app-custom-catalog-courses-table",61),t.NdJ("pageChanged",function(s){t.CHM(a);const l=t.oxw();return t.KtG(l.handleCoursePageChange(s))})("sortChanged",function(s){t.CHM(a);const l=t.oxw();return t.KtG(l.handleCourseSortChange(s))})("downloadRequested",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.downloadSelectedCatalogCoursesCsv())}),t.ALo(1,"async"),t.qZA()}if(2&o){const a=t.oxw();t.Q6J("selectedCatalog",a.selectedCourseCatalog)("state",t.lcZ(1,3,a.customCatalogCoursesState$))("request",a.selectedCourseRequest)}}const de=[{path:"update",component:ht},{path:"",component:(()=>{const n=class{constructor(e,s,l,i,c,g){this.customCatalogListService=e,this.customCatalogCsvDownloadService=s,this.customCatalogCoursesService=l,this.customCatalogCreateService=i,this.customCatalogIntegrationsService=c,this.router=g,this.languageGroupingWarningMessage=A,this.customCatalogCoursesState$=null,this.isCreateFormOpen=!1,this.hasCreateSubmitAttempt=!1,this.parsedCourseGuids=Z(""),this.validationReadyCreateRequest=null,this.createCatalogState=this.getIdleCreateState(),this.selectedCourseCatalog=null,this.selectedCourseRequest=null,this.customCatalogIntegrationOptions=[],this.successfulCreateIntegrationIds=[],this.customCatalogRows=[],this.customCatalogSort=null,this.refreshListError="",this.pendingCreateIntegrationViewportState=null,this.suppressCreateFeedbackClear=!1,this.subscriptions=[],this.customCatalogListState$=this.customCatalogListService.listCustomCatalogs().pipe((0,I.b)(m=>this.captureCustomCatalogRows(m))),this.customCatalogIntegrationOptions$=this.customCatalogIntegrationsService.listIntegrations().pipe((0,I.b)(m=>this.customCatalogIntegrationOptions=m)),this.createCatalogForm=new r.nJ({title:new r.p4(""),courseGuidText:new r.p4(""),integrationIds:new r.p4([])}),this.subscriptions.push(this.createCatalogForm.get("title").valueChanges.subscribe(()=>{this.validationReadyCreateRequest=null,this.clearStaleCreateFeedback()}),this.createCatalogForm.get("courseGuidText").valueChanges.subscribe(()=>{this.updateParsedCourseGuids(),this.clearStaleCreateFeedback()}),this.createCatalogForm.get("integrationIds").valueChanges.subscribe(()=>{this.validationReadyCreateRequest=null,this.clearStaleCreateFeedback()}))}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}openCreateForm(){this.isCreateFormOpen=!0}closeCreateForm(){this.isCreateFormOpen=!1,this.hasCreateSubmitAttempt=!1,this.parsedCourseGuids=Z(""),this.validationReadyCreateRequest=null,this.resetCreateFeedback(),this.createCatalogForm.reset({title:"",courseGuidText:"",integrationIds:[]})}navigateToUpdate(e){this.router.navigate(["/internal-tools/product-support/custom-catalogs/update"],{queryParams:{id:e.id}})}showCourses(e){this.selectedCourseCatalog=e,this.selectedCourseRequest={customCatalogId:e.id,page:1,pageSize:25,sortField:"title",sortDirection:"asc"},this.loadSelectedCatalogCourses()}handleCoursePageChange(e){this.selectedCourseRequest&&(this.selectedCourseRequest={...this.selectedCourseRequest,page:e.page,pageSize:e.pageSize},this.loadSelectedCatalogCourses())}handleCourseSortChange(e){this.selectedCourseRequest&&(this.selectedCourseRequest={...this.selectedCourseRequest,page:1,sortField:e.sortField,sortDirection:e.sortDirection},this.loadSelectedCatalogCourses())}handleCustomCatalogSortChange(e){this.customCatalogSort=e}downloadCustomCatalogCsv(){const e=this.getSortedCustomCatalogRows();this.customCatalogCsvDownloadService.downloadCsv({filename:"custom-catalogs.csv",headers:["Custom Catalog ID","Title","Mapped Integrations","Integration IDs","Updated At"],rows:e.map(s=>[s.id,s.title,[...s.mappedIntegrations].sort((l,i)=>l.localeCompare(i)).join(", "),s.integrationIds.join(", "),s.updatedAtTimestamp])})}downloadSelectedCatalogCoursesCsv(){if(!this.selectedCourseCatalog||!this.selectedCourseRequest)return;const e=this.selectedCourseCatalog.id,s={...this.selectedCourseRequest,page:1,pageSize:1e4};this.customCatalogCoursesService.listCustomCatalogCourses(s).pipe((0,ft.h)(l=>!l.loading&&!l.error),(0,xt.q)(1)).subscribe(l=>{this.customCatalogCsvDownloadService.downloadCsv({filename:`custom-catalog-${e}-courses.csv`,headers:["Course GUID","Course Title"],rows:l.rows.map(i=>[i.courseGuid,i.title])})})}submitCreateAttempt(){if(this.createCatalogState.loading)return;this.resetCreateFeedback(),this.hasCreateSubmitAttempt=!0,this.createCatalogForm.markAllAsTouched(),this.updateParsedCourseGuids();const e=this.buildCreateRequest();if(this.validationReadyCreateRequest=e,!e)return;this.createCatalogState={loading:!0,result:null,error:null};const s=e.integrationIds;this.customCatalogCreateService.createCustomCatalog(e).subscribe(l=>this.handleCreateState(l,s),()=>this.handleCreateState(this.getCreateGeneralErrorState("Custom Catalog could not be created. Try again later."),s))}canAttemptCreate(){return G({title:this.createCatalogForm.get("title").value||"",isLoading:this.createCatalogState.loading,hasCourseGuids:this.parsedCourseGuids.courseGuids.length>0,hasInvalidCourseGuids:this.parsedCourseGuids.hasInvalidCourseGuids})}isCreateSubmitting(){return this.createCatalogState.loading}getTitleErrorMessage(){return F(this.createCatalogForm.get("title"),this.hasCreateSubmitAttempt)}getCourseGuidsErrorMessage(){return k(this.createCatalogForm.get("courseGuidText"),this.parsedCourseGuids,this.hasCreateSubmitAttempt)}updateParsedCourseGuids(){this.parsedCourseGuids=Z(this.createCatalogForm.get("courseGuidText").value||""),this.validationReadyCreateRequest=null}buildCreateRequest(){return this.canAttemptCreate()?R(this.createCatalogForm,this.parsedCourseGuids):null}getSelectedCreateIntegrations(e){return N(e,this.createCatalogForm.get("integrationIds").value||[])}getCreateIntegrationSetupLinks(){return z(this.customCatalogIntegrationOptions,this.successfulCreateIntegrationIds)}toggleCreateIntegrationSelection(e,s){const l=this.createCatalogForm.get("integrationIds"),i=E(e,s,l.value||[]);i&&(l.markAsTouched(),l.markAsDirty(),l.setValue(i.selectedIntegrationIds),this.pendingCreateIntegrationViewportState=i.viewportState,this.restoreCreateIntegrationViewport())}suppressNativeCreateIntegrationClick(e){Q(e)}removeCreateIntegration(e){const s=this.createCatalogForm.get("integrationIds");s.setValue(J(s.value||[],e))}
1refreshCustomCatalogList(){this.refreshListError="",this.customCatalogListState$=this.customCatalogListService.listCustomCatalogs().pipe((0,I.b)(e=>{e.error?this.refreshListError="Custom Catalog was created, but the table could not refresh. Try refreshing the list again.":(this.captureCustomCatalogRows(e),this.refreshSelectedCatalogCourses(e))}),(0,f.K)(()=>(this.refreshListError="Custom Catalog was created, but the table could not refresh. Try refreshing the list again.",(0,_.of)({loading:!1,rows:[],error:"Custom Catalogs could not be loaded. Try again later."}))))}captureCustomCatalogRows(e){!e.loading&&!e.error&&(this.customCatalogRows=e.rows)}getSortedCustomCatalogRows(){if(!this.customCatalogSort)return[...this.customCatalogRows];const e="asc"===this.customCatalogSort.sortDirection?1:-1;return[...this.customCatalogRows].sort((s,l)=>{const i=s[this.customCatalogSort.sortField],c=l[this.customCatalogSort.sortField];if("updatedAtTimestamp"===this.customCatalogSort.sortField){const g=this.normalizeUpdatedAtTimestamp(i),m=this.normalizeUpdatedAtTimestamp(c);return null===g&&null===m?0:null===g?1:null===m?-1:(g-m)*e}return"number"==typeof i&&"number"==typeof c?(i-c)*e:String(i).localeCompare(String(c))*e})}normalizeUpdatedAtTimestamp(e){return"number"==typeof e&&Number.isFinite(e)?e:null}loadSelectedCatalogCourses(){this.customCatalogCoursesState$=this.selectedCourseRequest?this.customCatalogCoursesService.listCustomCatalogCourses(this.selectedCourseRequest):null}refreshSelectedCatalogCourses(e){if(!this.selectedCourseCatalog||!this.selectedCourseRequest)return;const s=e.rows.find(l=>l.id===this.selectedCourseCatalog.id);if(!s)return this.selectedCourseCatalog=null,this.selectedCourseRequest=null,void(this.customCatalogCoursesState$=null);this.selectedCourseCatalog=s,this.selectedCourseRequest={...this.selectedCourseRequest,customCatalogId:s.id},this.loadSelectedCatalogCourses()}handleCreateState(e,s){this.createCatalogState=e,e.result&&(this.successfulCreateIntegrationIds=s,this.isCreateFormOpen=!0,this.validationReadyCreateRequest=null,this.hasCreateSubmitAttempt=!1,this.parsedCourseGuids=Z(""),this.resetCreateFormFieldsWithoutClearingFeedback(),this.refreshCustomCatalogList())}resetCreateFormFieldsWithoutClearingFeedback(){this.suppressCreateFeedbackClear=!0,this.createCatalogForm.reset({title:"",courseGuidText:"",integrationIds:[]}),this.suppressCreateFeedbackClear=!1}restoreCreateIntegrationViewport(){this.applyPendingCreateIntegrationViewportState(),"function"==typeof requestAnimationFrame&&requestAnimationFrame(()=>{this.applyPendingCreateIntegrationViewportState(),requestAnimationFrame(()=>this.applyPendingCreateIntegrationViewportState())})}applyPendingCreateIntegrationViewportState(){D(this.createIntegrationsSelectRef&&this.createIntegrationsSelectRef.nativeElement,this.pendingCreateIntegrationViewportState)}clearStaleCreateFeedback(){this.suppressCreateFeedbackClear||this.resetCreateFeedback()}resetCreateFeedback(){this.createCatalogState=this.getIdleCreateState(),this.refreshListError="",this.successfulCreateIntegrationIds=[]}getIdleCreateState(){return{loading:!1,result:null,error:null}}getCreateGeneralErrorState(e){return{loading:!1,result:null,error:{type:"general",message:e}}}};let o=n;return n.\u0275fac=function(s){return new(s||n)(t.Y36(y),t.Y36(Tt),t.Y36(Ut),t.Y36(bt),t.Y36(q),t.Y36(C.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-custom-catalogs-shell"]],viewQuery:function(s,l){if(1&s&&t.Gf($t,5),2&s){let i;t.iGM(i=t.CRH())&&(l.createIntegrationsSelectRef=i.first)}},decls:44,vars:7,consts:[["aria-labelledby","custom-catalogs-heading",1,"custom-catalogs-shell"],[1,"custom-catalogs-shell__header"],["aria-label","Breadcrumb",1,"custom-catalogs-shell__breadcrumb"],["routerLink","/internal-tools"],["aria-hidden","true"],["id","custom-catalogs-heading"],[1,"custom-catalogs-shell__route-note"],["aria-label","Custom Catalog support route status",1,"custom-catalogs-shell__content"],["class","custom-catalogs-shell__create-open",4,"ngIf"],["class","custom-catalogs-shell__create-form","aria-labelledby","custom-catalogs-create-heading",4,"ngIf"],["class","custom-catalogs-shell__refresh-error","role","alert",4,"ngIf"],[3,"state","updateRequested","coursesRequested","downloadRequested","sortChanged"],[3,"selectedCatalog","state","request","pageChanged","sortChanged","downloadRequested",4,"ngIf"],[1,"custom-catalogs-shell__footer"],["href","https://opensesame.slack.com/archives/C06C714NFCJ","target","_blank","rel","noopener noreferrer"],[1,"custom-catalogs-shell__create-open"],["buttonType","button","color","primary","variant","contained",3,"click"],["aria-labelledby","custom-catalogs-create-heading",1,"custom-catalogs-shell__create-form"],[3,"formGroup","ngSubmit"],[1,"custom-catalogs-shell__create-header"],[1,"custom-catalogs-shell__label"],["id","custom-catalogs-create-heading"],["class","custom-catalogs-shell__create-status","role","status","aria-live","polite",4,"ngIf"],["class","custom-catalogs-shell__create-error","role","alert",4,"ngIf"],[3,"text"],[1,"custom-catalogs-shell__field-grid"],[1,"custom-catalogs-shell__field"],["formControlName","title","id","custom-catalog-title","maxlength","255","type","text"],["class","custom-catalogs-shell__field-error","role","alert",4,"ngIf"],[1,"custom-catalogs-shell__field","custom-catalogs-shell__field--full"],["formControlName","courseGuidText","id","custom-catalog-course-guids","placeholder","Paste course GUIDs separated by commas, spaces, or new lines","rows","5"],["class","custom-catalogs-shell__duplicate-note",4,"ngIf"],["class","custom-catalogs-shell__invalid-guids","aria-live","polite","role","alert",4,"ngIf"],[4,"ngIf"],[1,"custom-catalogs-shell__actions"],["buttonType","submit","color","primary","variant","contained",3,"disabled"],["buttonType","button","className","custom-catalogs-shell__create-close","variant","outlined",3,"click"],["role","status","aria-live","polite",1,"custom-catalogs-shell__create-status"],[1,"custom-catalogs-shell__create-status-metadata"],["class","custom-catalogs-shell__integration-setup","aria-label","Finish setup for mapped integrations",4,"ngIf"],["aria-label","Finish setup for mapped integrations",1,"custom-catalogs-shell__integration-setup"],[4,"ngFor","ngForOf"],[3,"href"],["role","alert",1,"custom-catalogs-shell__create-error"],["role","alert",1,"custom-catalogs-shell__field-error"],[1,"custom-catalogs-shell__duplicate-note"],["aria-live","polite","role","alert",1,"custom-catalogs-shell__invalid-guids"],[1,"custom-catalogs-shell__invalid-guid-list"],["formControlName","integrationIds","id","custom-catalog-integrations","multiple",""],["createIntegrationsSelect",""],[3,"ngValue","mousedown","click",4,"ngFor","ngForOf"],[1,"custom-catalogs-shell__integration-setup-note"],["aria-live","polite",1,"custom-catalogs-shell__selected-integrations"],[1,"custom-catalogs-shell__selected-integrations-label"],["class","custom-catalogs-shell__selected-integrations-empty",4,"ngIf"],["class","custom-catalogs-shell__selected-integrations-list",4,"ngIf"],[3,"ngValue","mousedown","click"],[1,"custom-catalogs-shell__selected-integrations-empty"],[1,"custom-catalogs-shell__selected-integrations-list"],["type","button",3,"click"],["role","alert",1,"custom-catalogs-shell__refresh-error"],[3,"selectedCatalog","state","request","pageChanged","sortChanged","downloadRequested"]],template:function(s,l){1&s&&(t.TgZ(0,"section",0),t._uU(1,"\n  "),t.TgZ(2,"header",1),t._uU(3,"\n    "),t.TgZ(4,"nav",2),t._uU(5,"\n      "),t.TgZ(6,"a",3),t._uU(7,"Internal Tools"),t.qZA(),t._uU(8,"\n      "),t.TgZ(9,"span",4),t._uU(10,">"),t.qZA(),t._uU(11,"\n      "),t.TgZ(12,"span"),t._uU(13,"Product Support"),t.qZA(),t._uU(14,"\n    "),t.qZA(),t._uU(15,"\n    "),t.TgZ(16,"h1",5),t._uU(17,"Custom Catalogs"),t.qZA(),t._uU(18,"\n    "),t.TgZ(19,"p",6),t._uU(20,"Direct URL access for CSR users"),t.qZA(),t._uU(21,"\n  "),t.qZA(),t._uU(22,"\n\n  "),t.TgZ(23,"div",7),t._uU(24,"\n    "),t.YNc(25,Vt,5,0,"div",8),t._uU(26,"\n\n    "),t.YNc(27,ce,59,13,"section",9),t._uU(28,"\n\n    "),t.YNc(29,ue,2,1,"div",10),t._uU(30,"\n\n    "),t.TgZ(31,"app-custom-catalogs-table",11),t.NdJ("updateRequested",function(c){return l.navigateToUpdate(c)})("coursesRequested",function(c){return l.showCourses(c)})("downloadRequested",function(){return l.downloadCustomCatalogCsv()})("sortChanged",function(c){return l.handleCustomCatalogSortChange(c)}),t.ALo(32,"async"),t.qZA(),t._uU(33,"\n\n    "),t.YNc(34,ge,2,5,"app-custom-catalog-courses-table",12),t._uU(35,"\n\n    "),t.TgZ(36,"footer",13),t._uU(37,"\n      Bugs or Feedback? Message the\n      "),t.TgZ(38,"a",14),t._uU(39,"\n        #ask-marketplace-engineering-team\n      "),t.qZA(),t._uU(40,"\n      channel.\n    "),t.qZA(),t._uU(41,"\n  "),t.qZA(),t._uU(42,"\n"),t.qZA(),t._uU(43,"\n")),2&s&&(t.xp6(25),t.Q6J("ngIf",!l.isCreateFormOpen),t.xp6(2),t.Q6J("ngIf",l.isCreateFormOpen),t.xp6(2),t.Q6J("ngIf",l.refreshListError),t.xp6(2),t.Q6J("state",t.lcZ(32,5,l.customCatalogListState$)),t.xp6(3),t.Q6J("ngIf",l.selectedCourseCatalog))},dependencies:[L.r0,d.sg,d.O5,C.rH,r._Y,r.YN,r.Kr,r.Fj,r.K7,r.JJ,r.JL,r.nD,r.sg,r.u,O.$,yt,Lt,d.Ov],styles:["[_ngcontent-%COMP%]:root{--mobile-nav-break: 981px}.custom-catalogs-shell[_ngcontent-%COMP%]{background:#ffffff;color:#333;display:flex;flex-direction:column;font-family:Open Sans,Helvetica,Arial,sans-serif;gap:24px;letter-spacing:0;margin:0 auto;max-width:1320px;padding:32px 24px 48px}@media (max-width: 767px){.custom-catalogs-shell[_ngcontent-%COMP%]{padding:32px 16px 48px}}.custom-catalogs-shell__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.custom-catalogs-shell__header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{color:#2d2d35;font-size:24px;font-weight:600;line-height:1.3;margin:0}.custom-catalogs-shell__breadcrumb[_ngcontent-%COMP%], .custom-catalogs-shell__label[_ngcontent-%COMP%]{color:#59596c;font-size:12px;font-weight:600;line-height:1.3;margin:0}.custom-catalogs-shell__breadcrumb[_ngcontent-%COMP%]{align-items:center;display:flex;gap:6px}.custom-catalogs-shell__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#59596c;text-decoration:underline;text-underline-offset:2px;transition:color .25s ease}.custom-catalogs-shell__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalogs-shell__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#005472}.custom-catalogs-shell__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalogs-shell__breadcrumb[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#333}.custom-catalogs-shell__route-note[_ngcontent-%COMP%], .custom-catalogs-shell__panel[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]:last-child, .custom-catalogs-shell__footer[_ngcontent-%COMP%]{color:#4d4d4d;font-size:14px;font-weight:400;line-height:1.5;margin:0}.custom-catalogs-shell__states[_ngcontent-%COMP%]{display:grid;gap:24px;grid-template-columns:repeat(2,minmax(0,1fr))}.custom-catalogs-shell__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.custom-catalogs-shell__create-open[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.custom-catalogs-shell__footer[_ngcontent-%COMP%]{color:#4d4d4d;font-size:14px;font-weight:400;line-height:1.5;margin:0;border-top:1px solid #d8d8d8;padding-top:16px}.custom-catalogs-shell__footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#005e9e;text-decoration:underline;text-underline-offset:2px;transition:color .25s ease;font-weight:600}.custom-catalogs-shell__footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalogs-shell__footer[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#005472}.custom-catalogs-shell__create-form[_ngcontent-%COMP%]{background:#f5f5f5;border:1px solid #d8d8d8;border-radius:8px;display:flex;flex-direction:column;gap:24px;padding:24px}.custom-catalogs-shell__create-form[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.custom-catalogs-shell__create-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.custom-catalogs-shell__create-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#2d2d35;font-size:20px;font-weight:600;line-height:1.35;margin:0}.custom-catalogs-shell__create-status[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#e4f6ec;border:1px solid #50a54d;color:#156041;
1display:flex;flex-direction:column;gap:8px}.custom-catalogs-shell__create-status[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .custom-catalogs-shell__create-status[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}.custom-catalogs-shell__create-status[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:1.5}.custom-catalogs-shell__create-error[_ngcontent-%COMP%], .custom-catalogs-shell__refresh-error[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#fff4f4;border:1px solid #c34747;color:#7d1f1f}.custom-catalogs-shell__create-status-metadata[_ngcontent-%COMP%]{display:grid;gap:8px 16px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}.custom-catalogs-shell__create-status-metadata[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;min-width:0}.custom-catalogs-shell__create-status-metadata[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:12px;font-weight:600;line-height:1.3}.custom-catalogs-shell__create-status-metadata[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:0;overflow-wrap:anywhere}@media (max-width: 767px){.custom-catalogs-shell__create-status-metadata[_ngcontent-%COMP%]{grid-template-columns:1fr}}.custom-catalogs-shell__field-grid[_ngcontent-%COMP%]{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}.custom-catalogs-shell__field[_ngcontent-%COMP%]{color:#333;display:flex;flex-direction:column;font-size:14px;font-weight:400;gap:8px;line-height:1.5}.custom-catalogs-shell__field[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#59596c;font-size:12px;font-weight:600;line-height:1.3;margin:0}.custom-catalogs-shell__field[_ngcontent-%COMP%]   input[_ngcontent-%COMP%], .custom-catalogs-shell__field[_ngcontent-%COMP%]   select[_ngcontent-%COMP%], .custom-catalogs-shell__field[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{background:#ffffff;border:1px solid #d8d8d8;border-radius:4px;box-sizing:border-box;color:#333;font:inherit;letter-spacing:0;min-height:44px;padding:8px 12px;width:100%}.custom-catalogs-shell__field[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{min-height:132px;resize:vertical}.custom-catalogs-shell__field[_ngcontent-%COMP%]   select[multiple][_ngcontent-%COMP%]{min-height:116px}.custom-catalogs-shell__field-error[_ngcontent-%COMP%], .custom-catalogs-shell__field-error-list[_ngcontent-%COMP%]{color:#7d1f1f;font-size:14px;font-weight:400;line-height:1.5}.custom-catalogs-shell__field-error-list[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:24px}.custom-catalogs-shell__selected-integrations[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.custom-catalogs-shell__selected-integrations-label[_ngcontent-%COMP%]{color:#59596c;font-size:12px;font-weight:600;line-height:1.3;margin:0}.custom-catalogs-shell__selected-integrations-empty[_ngcontent-%COMP%]{color:#4d4d4d;font-size:14px;font-weight:400;line-height:1.5;margin:0}.custom-catalogs-shell__selected-integrations-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0}.custom-catalogs-shell__selected-integrations-list[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{align-items:center;background:#ffffff;border:1px solid #d8d8d8;border-radius:999px;color:#333;display:inline-flex;font-size:13px;gap:6px;line-height:1.4;max-width:100%;min-height:30px;padding:4px 8px 4px 12px}.custom-catalogs-shell__selected-integrations-list[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{overflow-wrap:anywhere}.custom-catalogs-shell__selected-integrations-list[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{align-items:center;background:transparent;border:0;border-radius:999px;color:#59596c;cursor:pointer;display:inline-flex;font-size:18px;font-weight:600;height:22px;justify-content:center;line-height:1;padding:0;width:22px;transition:all .25s ease}.custom-catalogs-shell__selected-integrations-list[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .custom-catalogs-shell__selected-integrations-list[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:focus{background:#f58220;color:#fff;outline:none}.custom-catalogs-shell__integration-setup-note[_ngcontent-%COMP%]{color:#59596c;font-size:14px;line-height:1.5;margin-top:8px}.custom-catalogs-shell__integration-setup[_ngcontent-%COMP%]{margin-top:16px}.custom-catalogs-shell__integration-setup[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:600;margin:0 0 8px}.custom-catalogs-shell__integration-setup[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:0;padding:0}.custom-catalogs-shell__integration-setup[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#005e9e;text-decoration:underline;text-underline-offset:2px;transition:color .25s ease;font-weight:600}.custom-catalogs-shell__integration-setup[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover, .custom-catalogs-shell__integration-setup[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus{color:#005472}.custom-catalogs-shell__duplicate-note[_ngcontent-%COMP%], .custom-catalogs-shell__invalid-guids[_ngcontent-%COMP%]{font-size:14px;line-height:1.5;margin:0}.custom-catalogs-shell__duplicate-note[_ngcontent-%COMP%]{color:#59596c}.custom-catalogs-shell__invalid-guids[_ngcontent-%COMP%]{border-radius:4px;font-size:14px;font-weight:400;line-height:1.5;padding:16px;background:#fff4f4;border:1px solid #c34747;color:#7d1f1f}.custom-catalogs-shell__invalid-guids[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:600;margin:0 0 8px}.custom-catalogs-shell__invalid-guids[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:0;padding-left:24px}.custom-catalogs-shell__actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.custom-catalogs-shell__panel[_ngcontent-%COMP%]{background:#f5f5f5;border:1px solid #d8d8d8;border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:24px}.custom-catalogs-shell__panel[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#2d2d35;font-size:20px;font-weight:600;line-height:1.35;margin:0}@media (max-width: 767px){.custom-catalogs-shell__states[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]}),o})()}];let pe=(()=>{const n=class{};let o=n;return n.\u0275fac=function(s){return new(s||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[C.Bz.forChild(de),C.Bz]}),o})(),_e=(()=>{const n=class{};let o=n;return n.\u0275fac=function(s){return new(s||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({imports:[S.hJ1,d.ez,pe,w.T,p.p,r.UX,h.U$,O.a
1]}),o})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.