2024-05-19 07:25:58 -05:00

448 строки
110 KiB
Plaintext

define("organization-manage-community/components/all-events-modal",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","tracked-toolbox","global-helpers/helpers/load","@ember/debug","organization-manage-community/utils/data-providers","rsvp","@ember/object","@ember/service","@glimmer/tracking","@glimmer/component","artdeco-modal/components/artdeco-modal","ember-cli-pemberly-i18n/helpers/t","global-helpers/helpers/not","ember-cli-artdeco-tabs/components/artdeco-tabs","dummy-yield-wrapper/components/dummy-yield-wrapper","global-helpers/helpers/gte","organization-manage-community/components/all-events-paginated-list","@ember/helper","artdeco-loader/components/artdeco-loader","artdeco-empty-state/components/artdeco-empty-state"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h,f,y,_,v,E,S,T,w,k){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var I,C,O,N,P,D
e.default=(0,a.setComponentTemplate)((0,l.createTemplateFactory)({id:"sq4zLtAb",block:'[[[1,"\\n"],[1,"\\n "],[11,0],[17,1],[12],[1,"\\n "],[8,[32,0],null,[["@testId","@isOpen","@size","@overlayClasses","@dismissModal"],["manage-events",[30,2],"large","organization-outlet",[30,3]]],[["default"],[[[[1,"\\n "],[8,[30,4,["artdeco-modal-header"]],null,null,[["default"],[[[[1,"\\n "],[10,"h1"],[14,1,"org-manage-community-all-events-modal-header"],[12],[1,"\\n "],[1,[28,[32,1],["i18n_org_manage_events","organization-manage-community/components/all-events-modal"],null]],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[8,[30,4,["artdeco-modal-content"]],[[24,0,"overflow-hidden"]],[["@hasPadding"],[[28,[32,2],[[30,0,["eventsCollectionRequestsPromise","isLoaded"]]],null]]],[["default"],[[[[1,"\\n"],[41,[30,0,["eventsCollectionRequestsPromise","isLoaded"]],[[[1," "],[8,[32,3],null,[["@in-modal","@selection"],[true,[30,0,["activeTab"]]]],[["default"],[[[[1,"\\n\\n "],[8,[30,5,["tablist"]],null,null,[["default"],[[[[1,"\\n "],[8,[30,6,["tab"]],null,[["@model","@on-select"],["upcoming",[30,0,["onTabSelection"]]]],[["default"],[[[[1,"\\n "],[1,[28,[32,1],["i18n_org_upcoming_events_with_count","organization-manage-community/components/all-events-modal"],[["count"],[[30,0,["upcomingEventsTotalCount"]]]]]],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[8,[30,6,["tab"]],null,[["@model","@on-select"],["past",[30,0,["onTabSelection"]]]],[["default"],[[[[1,"\\n "],[1,[28,[32,1],["i18n_org_past_events_with_count","organization-manage-community/components/all-events-modal"],[["count"],[[30,0,["pastEventsTotalCount"]]]]]],[1,"\\n "]],[]]]]],[1,"\\n "]],[6]]]]],[1,"\\n\\n "],[10,0],[14,0,"org-manage-community-all-events-modal__tab-panel-container"],[12],[1,"\\n"],[44,[[50,[32,4],0,null,null]],[[[1," "],[8,[30,5,["tabpanel"]],[[24,0,"org-manage-community-all-events-modal__tab-panel"]],[["@model"],["upcoming"]],[["default"],[[[[1,"\\n"],[41,[28,[32,5],[[30,0,["upcomingEventsTotalCount"]],1],null],[[[1," "],[8,[32,6],null,[["@eventsCollection","@organizationName","@loadMore"],[[30,0,["upcomingEvents"]],[30,8],[28,[32,7],[[30,0,["loadMoreEvents"]],[30,0,["_upcomingEventsLifecycleStates"]]],null]]],null],[1,"\\n"]],[]],[[[1," "],[18,10,[[28,[32,8],null,[["upcomingEventsEmptyState"],[[50,[30,7],0,null,null]]]]]],[1,"\\n"]],[]]],[1," "]],[]]]]],[1,"\\n\\n "],[8,[30,5,["tabpanel"]],[[24,0,"org-manage-community-all-events-modal__tab-panel"]],[["@model"],["past"]],[["default"],[[[[1,"\\n"],[41,[28,[32,5],[[30,0,["pastEventsTotalCount"]],1],null],[[[1," "],[18,10,[[28,[32,8],null,[["pastEventsListHelpText"],[[50,[30,7],0,null,null]]]]]],[1,"\\n "],[8,[32,6],null,[["@eventsCollection","@organizationName","@loadMore"],[[30,0,["pastEvents"]],[30,8],[28,[32,7],[[30,0,["loadMoreEvents"]],[30,0,["_pastEventsLifecycleStates"]]],null]]],null],[1,"\\n"]],[]],[[[1," "],[18,10,[[28,[32,8],null,[["pastEventsEmptyState"],[[50,[30,7],0,null,null]]]]]],[1,"\\n"]],[]]],[1," "]],[]]]]],[1,"\\n"]],[7]]],[1," "],[13],[1,"\\n "]],[5]]]]],[1,"\\n\\n"]],[]],[[[41,[30,0,["eventsCollectionRequestsPromise","isLoading"]],[[[1," "],[8,[32,9],null,null,null],[1,"\\n"]],[]],[[[41,[30,0,["eventsCollectionRequestsPromise","isError"]],[[[1," "],[8,[32,10],null,[["@illustration","@headline","@message","@size"],["sad-browser",[28,[32,1],["i18n_error","organization-manage-community/components/all-events-modal"],null],[28,[32,1],["i18n_unable_to_load_events","organization-manage-community/components/all-events-modal"],[["organizerName"],[[30,9]]]],1]],null],[1,"\\n "]],[]],null]],[]]]],[]]],[1," "]],[]]]]],[1,"\\n "]],[4]]]]],[1,"\\n "],[13],[1,"\\n "]],["&attrs","@isOpen","@dismissModal","modal","tabs","tablist","DummyYieldWrapper","@organizationName","@organizerName","&default"],false,["if","let","component","yield"]]',moduleName:"organization-manage-community/components/all-events-modal.gjs",scope:()=>[h.default,f.default,y.default,_.default,v.default,E.default,S.default,T.fn,T.hash,w.default,k.default],isStrictMode:!0}),(I=(0,m.inject)("tracking"),C=(0,m.inject)("@linkedin/ember-restli-graphql@graphql"),O=class extends g.default{get isMemberViewer(){return this.args.isMemberViewer??!0}get eventsCollectionRequestsPromise(){return(0,o.load)(this._getEventsHostedByOrganization())}get upcomingEvents(){return this.eventsCollectionRequestsPromise.isLoaded&&this.eventsCollectionRequestsPromise.value.upcomingEvents}get pastEvents(){return this.eventsCollectionRequestsPromise.isLoaded&&this.eventsCollectionRequestsPromise.value.pastEvents}get upcomingEventsTotalCount(){return(0,p.get)(this.upcomingEvents,"paging.total")}get pastEventsTotalCount(){return(0,p.get)(this.pastEvents,"paging.total")}constructor(){super(...arguments);(0,t.default)(this,"tracking",N,this);(0,t.default)(this,"graphql",P,this);(0,t.default)(this,"activeTab",D,this);(0,i.default)(this,"_upcomingEventsLifecycleStates",Object.freeze(["ONGOING","FUTURE"]));(0,i.default)(this,"_pastEventsLifecycleStates",Object.freeze(["PAST"]))
this.activeTab="upcoming"
this.tracking.firePageViewEvent("d_flagship3_organization_events_modal")}onTabSelection(e){if(this.activeTab!==e){this.tracking.fireInteractionEvent("past"===e?"past_events_tab":"upcoming_events_tab")
this.activeTab=e}}loadMoreEvents(e,t){return this._fetchEventsInCertainLifestateHostedByOrg(e,t)}_getEventsHostedByOrganization(){return(0,d.hash)({pastEvents:this._fetchEventsInCertainLifestateHostedByOrg(this._pastEventsLifecycleStates),upcomingEvents:this._fetchEventsInCertainLifestateHostedByOrg(this._upcomingEventsLifecycleStates)})}_fetchEventsInCertainLifestateHostedByOrg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._upcomingEventsLifecycleStates,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0
return this.graphql.executeQuery(...(0,c.getEventsHostedByOrganization)(this.args.organizer,e,t,this.isMemberViewer,10)).then((e=>(0,p.get)(e,"data.searchDashClustersByAll")))}},N=(0,n.default)(O.prototype,"tracking",[I],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),P=(0,n.default)(O.prototype,"graphql",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),D=(0,n.default)(O.prototype,"activeTab",[b.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"upcoming"}}),(0,n.default)(O.prototype,"eventsCollectionRequestsPromise",[s.cached],Object.getOwnPropertyDescriptor(O.prototype,"eventsCollectionRequestsPromise"),O.prototype),(0,n.default)(O.prototype,"onTabSelection",[p.action],Object.getOwnPropertyDescriptor(O.prototype,"onTabSelection"),O.prototype),(0,n.default)(O.prototype,"loadMoreEvents",[p.action],Object.getOwnPropertyDescriptor(O.prototype,"loadMoreEvents"),O.prototype),O))}))
define("organization-manage-community/components/all-events-paginated-list",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","tracked-toolbox","@ember/debug","@ember/object","@glimmer/component","scaffold-finite-scroll/components/finite-scroll","global-helpers/helpers/not","@ember/helper","reusable-search/components/entity-cluster-v2"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var g,h,f
e.default=(0,a.setComponentTemplate)((0,l.createTemplateFactory)({id:"oza8+ch1",block:'[[[1,"\\n "],[8,[32,0],null,[["@isDisabled","@onTrigger","@items"],[[28,[32,1],[[30,0,["hasNextPage"]]],null],[30,0,["loadMoreEvents"]],[28,[32,2],[[30,1,["elements"]],"0"],null]]],[["content"],[[[[1,"\\n "],[8,[32,3],null,[["@items","@cluster","@initialRenderCount","@searchId","@wrapClusterInADCard"],[[30,3,["items"]],[30,3],10,[30,1,["metadata","searchId"]],false]],[["entityResult"],[[[[1,"\\n "],[8,[30,2],null,[["@index"],[[30,5,["rowIndex"]]]],[["default"],[[[[1,"\\n "],[8,[30,4],null,[["@result","@searchId","@colIndex","@rowIndex"],[[30,5,["result"]],[30,1,["metadata","searchId"]],[30,5,["colIndex"]],[30,5,["rowIndex"]]]],null],[1,"\\n "]],[]]]]],[1,"\\n "]],[4,5]]]]],[1,"\\n "]],[2,3]]]]],[1,"\\n "]],["@eventsCollection","ItemContainer","items","EntityResult","list"],false,[]]',moduleName:"organization-manage-community/components/all-events-paginated-list.gjs",scope:()=>[d.default,p.default,m.get,b.default],isStrictMode:!0}),(g=(0,s.localCopy)("args.eventsCollection.paging"),h=class extends c.default{constructor(){super(...arguments);(0,t.default)(this,"paging",f,this)}get hasNextPage(){return this.paging&&(0,u.get)(this.paging,"start")+(0,u.get)(this.paging,"count")<(0,u.get)(this.paging,"total")}loadMoreEvents(){return this.args.loadMore((0,u.get)(this.paging,"start")+10).then((e=>{if(!this.isDestroying){this.paging=(0,u.get)(e,"paging")
const t=(0,u.get)(this.args.eventsCollection,"elements.0.items")
t?t.push(...(0,u.get)(e,"elements.0.items")):(0,u.get)(this.args.eventsCollection,"elements.0.results").push(...(0,u.get)(e,"elements.0.results"))}}))}},f=(0,n.default)(h.prototype,"paging",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,n.default)(h.prototype,"loadMoreEvents",[u.action],Object.getOwnPropertyDescriptor(h.prototype,"loadMoreEvents"),h.prototype),h))}))
define("organization-manage-community/components/manage-card-item",["exports","@ember/template-factory","@ember/component/template-only","@ember/component","ember-engines/components/link-to-external","ember-cli-pemberly-tracking/modifiers/track-interaction","artdeco-entity-lockup/components/artdeco-entity-lockup","@ember/helper","dummy-yield-wrapper/components/dummy-yield-wrapper"],(function(e,t,i,n,r,l,a,s,o){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
const u=(0,n.setComponentTemplate)((0,t.createTemplateFactory)({id:"O1rK9+2G",block:'[[[1,"\\n "],[10,"li"],[14,0,"mt1"],[12],[1,"\\n"],[41,[30,1],[[[1," "],[8,[32,0],[[4,[32,1],[[30,3]],null]],[["@route","@models"],[[30,1],[30,2]]],[["default"],[[[[1,"\\n "],[8,[32,2],null,[["@size"],[2]],[["default"],[[[[1,"\\n "],[8,[30,4,["content"]],[[24,0,"flex-1 align-self-flex-start"]],null,[["default"],[[[[1,"\\n "],[8,[30,4,["title"]],[[24,0,"org-manage-community-manage-card-item__title break-words"]],null,[["default"],[[[[1,"\\n "],[18,6,[[28,[32,3],null,[["Title"],[[50,[32,4],0,null,null]]]]]],[1,"\\n "]],[]]]]],[1,"\\n "],[8,[30,4,["metadata"]],null,null,[["default"],[[[[1,"\\n "],[18,6,[[28,[32,3],null,[["Subtitle"],[[50,[32,4],0,null,null]]]]]],[1,"\\n "]],[]]]]],[1,"\\n "]],[]]]]],[1,"\\n "]],[4]]]]],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],[[[1," "],[8,[32,2],null,[["@size"],[2]],[["default"],[[[[1,"\\n "],[8,[30,5,["content"]],[[24,0,"flex-1 align-self-flex-start"]],null,[["default"],[[[[1,"\\n "],[8,[30,5,["title"]],[[24,0,"org-manage-community-manage-card-item__title break-words"]],null,[["default"],[[[[1,"\\n "],[18,6,[[28,[32,3],null,[["Title"],[[50,[32,4],0,null,null]]]]]],[1,"\\n "]],[]]]]],[1,"\\n "],[8,[30,5,["metadata"]],null,null,[["default"],[[[[1,"\\n "],[18,6,[[28,[32,3],null,[["Subtitle"],[[50,[32,4],0,null,null]]]]]],[1,"\\n "]],[]]]]],[1,"\\n "]],[]]]]],[1,"\\n "]],[5]]]]],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n"]],["@linkRoute","@linkModel","@linkInteractionName","elements","elements","&default"],false,["if","yield","component"]]',moduleName:"organization-manage-community/components/manage-card-item.gjs",scope:()=>[r.default,l.default,a.default,s.hash,o.default],isStrictMode:!0}),(0,i.default)("manage-card-item","ManageCardItem"))
e.default=u}))
define("organization-manage-community/components/manage-card-tab",["exports","@ember/template-factory","@ember/component","dash-interop-helper/utils/get-graphql-value-with-dash-fallback","@ember/object","@glimmer/component","hue-web-icons/components/icon","artdeco-button/components/artdeco-button","ember-cli-pemberly-tracking/modifiers/track-interaction","@ember/helper","global-helpers/helpers/slice","global-helpers/helpers/and","global-helpers/helpers/gte","artdeco-loader/components/artdeco-loader","artdeco-empty-state/components/artdeco-empty-state","ember-cli-pemberly-i18n/helpers/t","global-helpers/helpers/or","global-helpers/helpers/eq","ember-engines/components/link-to-external","@ember/modifier"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h,f,y,_){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
class v extends l.default{get results(){if(this.args.asyncData.value){var e
return null!==(e=(0,r.get)(this.args.asyncData.value,"items"))&&void 0!==e&&e.length?(0,r.get)(this.args.asyncData.value,"items").map((e=>(0,n.getGraphQlValueWithDashFallback)(e,"item.entityResult"))):(0,r.get)(this.args.asyncData.value,"results")||[]}}}e.default=v;(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"GaoB3e3r",block:'[[[1,"\\n"],[1," "],[11,"li"],[17,1],[12],[1,"\\n "],[10,0],[14,0,"display-flex justify-space-between align-items-center"],[12],[1,"\\n "],[10,0],[14,0,"display-flex t-black--light"],[12],[1,"\\n "],[8,[32,0],[[24,0,"v-align-top"]],[["@type","@name","@size"],["system",[30,2],"medium"]],null],[1,"\\n "],[10,"h3"],[14,0,"ml2 t-bold t-16 flex-1 inline-block"],[12],[1,"\\n "],[1,[30,3]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"],[41,[30,4],[[[1," "],[8,[32,1],[[24,0,"org-manage-community-manage-card-tab__create-btn artdeco-card__action inline-flex"],[16,"aria-label",[30,5]],[4,[32,2],["click",[30,7]],null],[4,[32,3],[[30,8]],null]],[["@size","@icon","@type","@color"],[2,[30,6],"tertiary","muted"]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n"],[41,[30,9,["isLoaded"]],[[[1," "],[10,"ul"],[14,0,"artdeco-list"],[12],[1,"\\n"],[41,[30,0,["results"]],[[[1," "],[18,15,[[28,[32,4],null,[["loadedItemsToShow"],[[28,[32,5],[[30,0,["results"]],0,3],null]]]]]],[1,"\\n"]],[]],[[[41,[28,[32,6],[[30,9,["value"]],[28,[32,7],[[30,9,["value","length"]],0],null]],null],[[[1," "],[18,15,[[28,[32,4],null,[["loadedItemsToShow"],[[28,[32,5],[[30,9,["value"]],0,3],null]]]]]],[1,"\\n "]],[]],null]],[]]],[1," "],[13],[1,"\\n"]],[]],[[[41,[30,9,["isLoading"]],[[[1," "],[8,[32,8],null,[["@a11yText","@size"],[[30,10],"small"]],null],[1,"\\n"]],[]],[[[41,[30,9,["isError"]],[[[1," "],[8,[32,9],null,[["@size","@headline","@message","@illustration"],[1,[28,[32,10],["i18n_error_loading","organization-manage-community/components/manage-card-tab"],null],[30,11],"error-server"]],null],[1,"\\n "]],[]],null]],[]]]],[]]],[41,[28,[32,11],[[30,12],[30,13]],null],[[[1," "],[10,0],[14,0,"mt2"],[12],[1,"\\n"],[41,[28,[32,12],[[30,14,["type"]],"link"],null],[[[1," "],[8,[32,13],[[24,0,"t-12 t-bold t-bold truncate block"],[4,[32,3],[[30,14,["controlName"]]],null]],[["@route","@model","@query"],[[30,14,["link","route"]],[30,14,["link","model"]],[30,14,["link","query"]]]],[["default"],[[[[1,"\\n "],[10,1],[14,0,"t-black--light"],[12],[1,"\\n "],[1,[30,14,["label"]]],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n"]],[]],[[[41,[28,[32,12],[[30,14,["type"]],"button"],null],[[[1," "],[11,"button"],[24,0,"t-12 t-bold t-black--light text-align-left block"],[24,4,"button"],[4,[32,3],[[30,14,["controlName"]]],null],[4,[32,2],["click",[30,14,["action"]]],null],[12],[1,"\\n "],[1,[30,14,["label"]]],[1,"\\n "],[13],[1,"\\n "]],[]],null]],[]]],[1," "],[13],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n "]],["&attrs","@tabIconName","@header","@canCreate","@createBtnLabel","@createBtnIconName","@createHandler","@createInteractionName","@asyncData","@loadingText","@errorText","@shouldAlwaysRenderFooterButton","@shouldRenderFooterButtons","@footerButton","&default"],false,["if","yield"]]',moduleName:"organization-manage-community/components/manage-card-tab.gjs",scope:()=>[a.default,s.default,_.on,o.default,u.hash,c.default,d.default,p.default,m.default,b.default,g.default,h.default,f.default,y.default],isStrictMode:!0}),v)}))
define("organization-manage-community/components/manage-card",["exports","@ember/template-factory","@ember/component","@ember/object","@glimmer/component","organization-custom-tracking/components/org-module-tracking","ember-cli-pemberly-i18n/helpers/t","artdeco-hoverables/components/artdeco-hoverable-trigger","hue-web-icons/components/icon","@ember/helper","organization-manage-community/components/manage-card-tab","organization-manage-community/components/manage-card-item"],(function(e,t,i,n,r,l,a,s,o,u,c,d){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
class p extends r.default{get allLoaded(){return this.args.asyncDataCollection.every((e=>e.isLoaded))}get shouldRenderFooterButtons(){return this.allLoaded&&this.args.asyncDataCollection.some((e=>(0,n.get)(e,"value.results.length")>0||(0,n.get)(e,"value.length")>0))}}e.default=p;(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"5zRDW2sA",block:'[[[1,"\\n"],[1," "],[8,[32,0],[[24,0,"artdeco-card pt3 pb1 ph3"]],[["@moduleName"],["ADMIN_RIGHT_RAIL_MODULES_CONTAINER"]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"display-flex align-items-center"],[12],[1,"\\n "],[10,"h2"],[14,0,"t-20 t-bold"],[12],[1,"\\n "],[1,[28,[32,1],["admin_right_rail_manage","organization-manage-community/components/manage-card"],null]],[1,"\\n "],[13],[1,"\\n "],[8,[32,2],null,[["@on","@placement"],["click","top"]],[["default"],[[[[1,"\\n "],[10,"button"],[14,0,"t-black--light block ml1"],[15,"aria-controls",[30,1,["ariaId"]]],[15,"aria-expanded",[30,1,["ariaExpanded"]]],[15,"aria-label",[28,[32,1],["i18n_org_admin_right_rail_hoverable_aria_label","organization-manage-community/components/manage-card"],null]],[14,4,"button"],[12],[1,"\\n "],[8,[32,3],[[24,0,"block"]],[["@type","@name","@size"],["system","question","small"]],null],[1,"\\n "],[13],[1,"\\n "],[8,[30,1,["artdeco-hoverable-content"]],null,[["@contentClass","@theme"],["org-manage-community-manage-card__hoverable-content","inverse"]],[["default"],[[[[1,"\\n "],[10,2],[12],[1,"\\n "],[1,[28,[32,1],["i18n_manage_areas_of_page_community","organization-manage-community/components/manage-card"],[["linkInfo"],[[28,[32,4],null,[["data-control-name","href","target","rel","data-test-manage-card-hoverable-help-link"],["org_admin_manage_right_rail_module_help_link","/help/linkedin/answer/124727","_blank","noopener noreferrer",true]]]]]]],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n "]],[1]]]]],[1,"\\n "],[13],[1,"\\n "],[10,"ul"],[14,0,"list-style-none mt1"],[12],[1,"\\n "],[18,2,[[28,[32,4],null,[["Tab","Item"],[[50,[32,5],0,null,[["shouldRenderFooterButtons"],[[30,0,["shouldRenderFooterButtons"]]]]],[50,[32,6],0,null,null]]]]]],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n "]],["trigger","&default"],false,["yield","component"]]',moduleName:"organization-manage-community/components/manage-card.gjs",scope:()=>[l.default,a.default,s.default,o.default,u.hash,c.default,d.default],isStrictMode:!0}),p)}))
define("organization-manage-community/helpers/none-special-characters-formatter",["exports","@ember/component/helper"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
e.nonSpecialCharacterString=i
function i(e){let[t]=e
return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:""
return e.replace(/[/\\|[\]~!@#$%^&*)?><(+=.-]/g,"").replace(/\s/g,"")}(t)}const n=(0,t.helper)(i)
e.default=n}))
define("organization-manage-community/template-registry",[],(function(){}))
define("organization-manage-community/utils/data-providers",["exports","graphql-queries/queries/search/search-cluster-collection.graphql"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.getEventsHostedByOrganization=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10
const a={...i.length&&{eventLifecycleStates:i},viewAsMember:[r.toString()],organizer:[e]},s={count:l,query:{queryParameters:a,flagshipSearchIntent:"GROWTH_EVENTS_PAGE_HOSTED_EVENT_INDEX"},start:n},o=[]
Object.keys(s.query.queryParameters).forEach((e=>{o.push({key:e,value:s.query.queryParameters[e]})}))
s.query.queryParameters=o
return[t.default,s,{reload:!0}]}}))
define("publishing-shared/components/-private/i18n-strings",["exports","@ember/template-factory","@ember/component/template-only","@ember/component"],(function(e,t,i,n){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
const r=(0,n.setComponentTemplate)((0,t.createTemplateFactory)({id:"i3g3TpfS",block:'[[[1,"\\n"],[1,"\\n"],[1," "]],[],false,[]]',moduleName:"publishing-shared/components/-private/i18n-strings.gts",isStrictMode:!0}),(0,i.default)("i18n-strings","I18nStrings"))
e.default=r}))
define("publishing-shared/components/company-actor-detour",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/helper","@ember/component","graphql-queries/queries/service-marketplace/admin-widget.graphql","@glimmer/tracking","@glimmer/component","@ember/service","@ember/object","ember-cli-pemberly-i18n/helpers/t","publishing-shared/components/company-actor-list-item","global-helpers/helpers/eq","dash-interop-helper/helpers/get-graphql-value-with-dash-fallback","artdeco-button/components/artdeco-button","ember-cli-pemberly-tracking/modifiers/track-interaction","@ember/modifier"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h,f,y,_){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var v,E,S,T,w,k,I,C,O,N,P,D,A
e.default=(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"7v0BOboH",block:'[[[1,"\\n"],[1," "],[10,"form"],[12],[1,"\\n "],[10,"fieldset"],[12],[1,"\\n "],[10,"legend"],[14,0,"visually-hidden"],[12],[1,"\\n "],[1,[28,[32,0],["i18n_actor_btn_a11y_label","publishing-shared/components/company-actor-detour"],[["label"],[[30,0,["fullName"]]]]]],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"artdeco-list share-generic-list"],[14,"role","radiogroup"],[12],[1,"\\n "],[8,[32,1],null,[["@id","@image","@imageClass","@isSelected","@name","@onClick"],[[30,0,["authenticatedUser","miniProfile","entityUrn"]],[30,0,["authenticatedUser","miniProfile","picture"]],"EntityPhoto-circle-2",[28,[32,2],[[30,0,["selectedEntity"]],[30,0,["authenticatedUser","miniProfile","entityUrn"]]],null],[30,0,["fullName"]],[30,0,["onActorSelect"]]]],null],[1,"\\n"],[42,[28,[31,1],[[28,[31,1],[[30,0,["actorEntities"]]],null]],null],null,[[[1," "],[8,[32,1],null,[["@id","@image","@imageClass","@isSelected","@name","@onClick"],[[30,1,["entityUrn"]],[28,[32,3],[[30,1],"logoResolutionResult.vectorImage"],null],"EntityPhoto-square-2",[28,[32,2],[[30,0,["selectedEntity"]],[30,1,["entityUrn"]]],null],[30,1,["name"]],[30,0,["onActorSelect"]]]],null],[1,"\\n"]],[1]],null],[1," "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"share-box-footer"],[12],[1,"\\n "],[10,0],[14,0,"share-box-footer__main-actions"],[12],[1,"\\n "],[8,[32,4],[[4,[32,5],["click",[30,0,["onNext"]]],null],[4,[32,6],["pages_publishing_actor_next"],null]],[["@text","@type","@controlType","@size","@class"],[[28,[32,0],["i18n_next","publishing-shared/components/company-actor-detour"],null],"primary","button",2,"ml2"]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["entity"],false,["each","-track-array"]]',moduleName:"publishing-shared/components/company-actor-detour.gjs",scope:()=>[m.default,b.default,g.default,h.default,f.default,_.on,y.default],isStrictMode:!0}),(v=(0,d.inject)("authentication@authenticated-user"),E=(0,d.inject)("formatter"),S=(0,d.inject)("i18n"),T=(0,d.inject)("router"),w=(0,d.inject)("@linkedin/ember-restli-graphql@graphql"),k=class e extends c.default{get fullName(){return this.formatter.formatName((0,p.getProperties)((0,p.get)(this,"authenticatedUser.miniProfile"),"firstName","maidenName","lastName"),"full")}constructor(){var i,n
super(...arguments);(0,t.default)(this,"authenticatedUser",I,this);(0,t.default)(this,"formatter",C,this);(0,t.default)(this,"i18n",O,this);(0,t.default)(this,"router",N,this);(0,t.default)(this,"selectedEntity",P,this);(0,t.default)(this,"actorEntities",D,this);(0,t.default)(this,"graphql",A,this)
null===(i=(n=this.args).updateShareboxModalConfig)||void 0===i||i.call(n,{modalHeader:this.i18n.lookupTranslation(e,"i18n_detour_header")(),controlName:"pages_publishing_actor_close",shouldFocusOnHeader:!0})
this.fetchPagesAdminOrganization().then((e=>{if(!this.isDestroying){this.selectedEntity=(0,p.get)(this,"authenticatedUser.miniProfile.entityUrn")
this.actorEntities=(0,p.get)(e,"data.organizationDashCompaniesByViewerPermissions.elements")}}))}fetchPagesAdminOrganization(){return this.graphql.executeQuery(o.default,{start:this.orgsPaginationStart,viewerPermissions:{canCreateOrganicShare:!0}})}onActorSelect(e){this.selectedEntity=e}onNext(){this.router.transitionTo("publishing.post.new.index",{queryParams:{author:this.selectedEntity}})}},I=(0,n.default)(k.prototype,"authenticatedUser",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,n.default)(k.prototype,"formatter",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=(0,n.default)(k.prototype,"i18n",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=(0,n.default)(k.prototype,"router",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),P=(0,n.default)(k.prototype,"selectedEntity",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),D=(0,n.default)(k.prototype,"actorEntities",[u.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),A=(0,n.default)(k.prototype,"graphql",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,n.default)(k.prototype,"onActorSelect",[p.action],Object.getOwnPropertyDescriptor(k.prototype,"onActorSelect"),k.prototype),(0,n.default)(k.prototype,"onNext",[p.action],Object.getOwnPropertyDescriptor(k.prototype,"onNext"),k.prototype),k))}))
define("publishing-shared/components/company-actor-list-item",["exports","@ember/template-factory","@ember/component/template-only","@ember/component","@ember/modifier","ember-cli-pemberly-tracking/modifiers/track-interaction","ember-vector-images/components/lazy-image","@ember/helper"],(function(e,t,i,n,r,l,a,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
const o=(0,n.setComponentTemplate)((0,t.createTemplateFactory)({id:"Iw8eBoYr",block:'[[[1,"\\n "],[10,0],[14,0,"p0"],[12],[1,"\\n "],[11,"button"],[24,"role","radio"],[24,0,"publishing-s-company-list__item-button t-14 t-bold t-black"],[16,"aria-checked",[52,[30,1],"true","false"]],[24,4,"button"],[4,[32,0],["click",[28,[32,1],[[30,2],[30,3]],null]],null],[4,[32,2],["share_company_actor_select"],null],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-company-list__item-row"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-company-list__content"],[12],[1,"\\n "],[10,1],[14,0,"publishing-s-company-list__image"],[12],[1,"\\n "],[8,[32,3],null,[["@alt","@class","@desiredWidth","@ghostType","@image","@role"],["",[30,4],50,"person",[30,5],"presentation"]],null],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"overflow-hidden text-align-left"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-company-list__text pl3 t-black"],[12],[1,"\\n "],[10,1],[14,0,"publishing-s-company-list__description-double-line"],[12],[1,"\\n "],[1,[30,6]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"publishing-s-company-list__radio-button"],[12],[1,"\\n"],[1," "],[10,"input"],[15,1,[28,[32,4],["share-generic-list-radio-",[30,3]],null]],[15,"checked",[30,1]],[14,"tabindex","-1"],[14,4,"radio"],[12],[13],[1,"\\n "],[10,"label"],[15,"for",[28,[32,4],["share-generic-list-radio-",[30,3]],null]],[12],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],["@isSelected","@onClick","@id","@imageClass","@image","@name"],false,["if"]]',moduleName:"publishing-shared/components/company-actor-list-item.gjs",scope:()=>[r.on,s.fn,l.default,a.default,s.concat],isStrictMode:!0}),(0,i.default)("company-actor-list-item","CompanyActorListItem"))
e.default=o}))
define("publishing-shared/components/entity-embed",["exports","@ember/template-factory","@ember/component","app-aware-link/components/app-aware-link","artdeco-entity-lockup/components/artdeco-entity-lockup","artdeco-button/components/artdeco-button","@glimmer/component","ember-vector-images/components/lazy-image","text-view-model/components/text-view-model-v2","ember-cli-pemberly-i18n/helpers/t"],(function(e,t,i,n,r,l,a,s,o,u){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
class c extends a.default{get imageGhostType(){return{EVENT:"events",GROUP:"group",JOB:"job",MEMBER:"person",NEWSLETTER:"content",ORGANIZATION:"company"}[this.args.entityType]}get imageShape(){return"MEMBER"===this.args.entityType?"circle":"square"}}e.default=c;(0,i.setComponentTemplate)((0,t.createTemplateFactory)({id:"6wgVCwC9",block:'[[[1,"\\n"],[1," "],[10,0],[14,0,"publishing-s-entity-embed"],[12],[1,"\\n "],[8,[32,0],[[24,0,"publishing-s-entity-embed__link"],[24,"target","_blank"]],[["@href","@useDefaultLinkBehavior"],[[30,1],true]],[["default"],[[[[1,"\\n "],[8,[32,1],[[24,0,"flex-wrap"]],[["@size"],[6]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"flex-shrink-zero p4"],[12],[1,"\\n "],[8,[30,2,["image"]],null,[["@type"],[[30,0,["imageShape"]]]],[["default"],[[[[1,"\\n "],[8,[32,2],null,[["@ghostType","@image"],[[30,0,["imageGhostType"]],[30,3]]],null],[1,"\\n "]],[]]]]],[1,"\\n "],[13],[1,"\\n\\n "],[8,[30,2,["content"]],null,null,[["default"],[[[[1,"\\n "],[8,[30,2,["title"]],[[24,0,"hoverable-link-text mb2 text-heading-xlarge"]],null,[["default"],[[[[1,"\\n "],[8,[32,3],null,[["@tvm"],[[30,4]]],null],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[8,[30,2,["subtitle"]],[[24,0,"mb2 text-body-medium"]],null,[["default"],[[[[1,"\\n "],[8,[32,3],null,[["@tvm"],[[30,5]]],null],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[8,[30,2,["metadata"]],[[24,0,"text-body-medium"]],null,[["default"],[[[[1,"\\n "],[8,[32,3],null,[["@tvm"],[[30,6]]],null],[1,"\\n "]],[]]]]],[1,"\\n "]],[]]]]],[1,"\\n "]],[2]]]]],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[10,0],[14,0,"p4"],[12],[1,"\\n"],[41,[30,7],[[[1," "],[8,[32,4],null,[["@icon","@size","@text","@type"],["add","2","Follow","secondary"]],null],[1,"\\n"]],[]],[[[1," "],[8,[32,0],[[24,"target","_blank"]],[["@href","@useDefaultLinkBehavior"],[[30,1],true]],[["default"],[[[[1,"\\n "],[8,[32,4],null,[["@icon","@iconRight","@size","@text","@type"],["link-external",true,"2",[28,[32,5],["i18n_cta_fallback_text","publishing-shared/components/entity-embed"],null],"secondary"]],null],[1,"\\n "]],[]]]]],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "],[13],[1,"\\n "]],["@destinationUrl","elements","@image","@title","@description","@subDescription","@ctaButton"],false,["if"]]',moduleName:"publishing-shared/components/entity-embed.gjs",scope:()=>[n.default,r.default,s.default,o.default,l.default,u.default],isStrictMode:!0}),c)}))
define("publishing-shared/components/newsletter-access-banner",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/helper","@ember/component","@ember/debug","@ember/object","@glimmer/component","@ember/service","@ember/render-modifiers/modifiers/did-insert","@ember/modifier","ember-cli-pemberly-tracking/modifiers/track-interaction","ember-cli-pemberly-i18n/helpers/t","artdeco-button/components/artdeco-button"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var f,y,_
e.default=(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"jgfTHveV",block:'[[[1,"\\n"],[1," "],[11,0],[24,0,"publishing-s-newsletter-access-banner"],[4,[32,0],[[30,0,["onDidInsertHandler"]]],null],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-newsletter-access-banner__inner"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-newsletter-access-banner__content pv4"],[12],[1,"\\n "],[10,"h3"],[14,0,"t-light mb2"],[12],[1,[30,1]],[13],[1,"\\n "],[10,2],[14,0,"publishing-s-newsletter-access-banner__message t-14 mb3"],[12],[1,[30,2]],[13],[1,"\\n "],[11,"button"],[24,0,"link t-16"],[24,4,"button"],[4,[32,1],["click",[30,0,["onPrimaryActionClick"]]],null],[4,[32,2],["onboarding_banner_cta"],null],[12],[1,"\\n "],[1,[28,[32,3],["i18n_banner_cta_primary","publishing-shared/components/newsletter-access-banner"],null]],[1,"\\n "],[13],[1,"\\n "],[8,[32,4],[[4,[32,1],["click",[30,0,["onDismissButtonClick"]]],null],[4,[32,2],["onboarding_banner_dismiss"],null]],[["@class","@type","@circle","@icon","@color"],["publishing-s-newsletter-access-banner__dismiss-button absolute","tertiary",true,"close","muted"]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],["@headlineText","@messageText"],false,[]]',moduleName:"publishing-shared/components/newsletter-access-banner.gjs",scope:()=>[p.default,m.on,b.default,g.default,h.default],isStrictMode:!0}),(f=(0,d.inject)("lego@tracking"),y=class extends c.default{constructor(){super(...arguments);(0,t.default)(this,"legoTracking",_,this)}get legoTrackingToken(){return this.args.legoTrackingToken}get headerText(){return this.args.headerText}get messageText(){return this.args.messageText}onDidInsertHandler(){const{legoTracking:e}=this
e.sendLegoImpression(this.legoTrackingToken,e.LEGO_IMPRESSION_VISIBILITY_SHOW)}onPrimaryActionClick(){const{legoTracking:e}=this
e.sendLegoAction(this.legoTrackingToken,e.LEGO_ACTION_PRIMARY)
"function"==typeof this.args.onPrimaryAction&&this.args.onPrimaryAction()}onDismissButtonClick(){const{legoTracking:e}=this
e.sendLegoAction(this.legoTrackingToken,e.LEGO_ACTION_DISMISS)
"function"==typeof this.args.onDismiss&&this.args.onDismiss()}},_=(0,n.default)(y.prototype,"legoTracking",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,n.default)(y.prototype,"onDidInsertHandler",[u.action],Object.getOwnPropertyDescriptor(y.prototype,"onDidInsertHandler"),y.prototype),(0,n.default)(y.prototype,"onPrimaryActionClick",[u.action],Object.getOwnPropertyDescriptor(y.prototype,"onPrimaryActionClick"),y.prototype),(0,n.default)(y.prototype,"onDismissButtonClick",[u.action],Object.getOwnPropertyDescriptor(y.prototype,"onDismissButtonClick"),y.prototype),y))}))
define("publishing-shared/components/publish-modal",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","@ember/destroyable","publishing-shared/utils/visibility-options","global-utils/utils/url","publishing-shared/utils/preview-builder","@ember/service","@ember/object","@glimmer/component","sharing-entry/components/share-box-modal","publishing-shared/components/-private/i18n-strings","@ember/helper"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var f,y,_,v,E,S,T,w,k,I,C,O,N,P,D,A,x
e.default=(0,a.setComponentTemplate)((0,l.createTemplateFactory)({id:"bvijONEW",block:'[[[1,"\\n"],[41,[30,1],[[[1," "],[8,[32,0],null,[["@fixedVisibilityType","@customPrimaryButtonText","@customTextInputI18nPlaceholderText","@disableDetourPreviewRemoval","@disableSuccessToasts","@initialDetourManager","@isShareboxModalOpen","@onCloseShareboxModal","@onShareSuccess","@shareOrigin","@actorsOverride","@onShareFailure"],[[30,0,["shareboxContainerVisibilityType"]],[30,0,["modalTranslations","publishText"]],[52,[30,2],[30,0,["modalTranslations","publishNewsletterPromptText"]],[30,0,["modalTranslations","publishArticlePromptText"]]],true,true,[30,0,["initialDetourManager"]],[30,1],[30,3],[30,0,["onShareSuccess"]],"PUBLISHING",[28,[32,1],[[30,4]],null],[30,0,["watchmanTrackingFailEvent"]]]],null],[1,"\\n"]],[]],null],[1," "]],["@isOpen","@currentNewsletter","@onClose","@currentAuthor"],false,["if"]]',moduleName:"publishing-shared/components/publish-modal.gjs",scope:()=>[b.default,h.array],isStrictMode:!0}),(f=(0,d.inject)("client-sensor-web@client-sensor"),y=(0,d.inject)("global-services@internal-logger"),_=(0,d.inject)("i18n"),v=(0,d.inject)("m3-schema"),E=(0,d.inject)("persistent-toast-manager@persistent-toast-manager"),S=(0,d.inject)("router"),T=(0,d.inject)("tracking"),w=(0,d.inject)("watchman-tracking@watchman-tracking"),k=class extends m.default{constructor(){super(...arguments);(0,t.default)(this,"clientSensor",I,this);(0,t.default)(this,"internalLogger",C,this);(0,t.default)(this,"i18n",O,this);(0,t.default)(this,"m3Schema",N,this);(0,t.default)(this,"persistentToastManager",P,this);(0,t.default)(this,"router",D,this);(0,t.default)(this,"tracking",A,this);(0,t.default)(this,"watchmanTracking",x,this)}get modalTranslations(){return{publishText:this.i18n.lookupTranslation(g.default,"i18n_publish_button")(),publishArticlePromptText:this.i18n.lookupTranslation(g.default,"i18n_tell_your_network_article")(),publishNewsletterPromptText:this.i18n.lookupTranslation(g.default,"i18n_tell_your_network_newsletter")()}}get shareboxContainerVisibilityType(){return(0,o.getVisibilityOptions)(this.i18n,{isCompanyAuthor:this.args.isPageAuthor,newsletterEntityUrn:this.args.currentNewsletter?this.args.currentNewsletter.entityUrn:null,newsletterTitle:this.args.currentNewsletter?this.args.currentNewsletter.title:null})}get initialDetourManager(){return(0,c.default)(this.args.currentArticle,this.m3Schema,this.watchmanTracking,this.args.isUsingDashAndGql)}onShareSuccess(e,t,i){this.internalLogger.log({postState:i},["publishing:controllers/post:onShareSuccess"])
"SCHEDULED"===i?this.didScheduleArticle():this.args.publishArticle().then((e=>{if(!(0,s.isDestroying)(this)){this.watchmanTracking.endInteraction({userInteraction:"article_editor_publish_article_endSuccess",userJourney:"publish-article",groupName:"publishing-reliability"})
return this.didPublishArticle(e)}})).catch((e=>{if((0,s.isDestroying)(this))throw e
this.clientSensor.incrementMetricCounter({groupName:"publishing",metricName:"article-publish-failed"})
this.persistentToastManager.error({message:this.i18n.lookupTranslation(g.default,"i18n_error_publish_failure")()})
this.watchmanTrackingFailEvent()})).finally((()=>{var e,t
if(!(0,s.isDestroying)(this))return null===(e=(t=this.args).onClose)||void 0===e?void 0:e.call(t)}))}watchmanTrackingFailEvent(){this.watchmanTracking.endInteractionWithError({userInteraction:"article_editor_publish_article_endError",userJourney:"publish-article",groupName:"publishing-reliability"})}didPublishArticle(e){const t=e.series
if(t){if(1===t.issueCount){const e=(0,u.getInAppParams)(this.router,t.shareableLink)
if(e)return this.router.transitionTo(e)}}return this.router.transitionTo("article-reader.index",e.permalink,{queryParams:{published:"t"}})}didScheduleArticle(){this.tracking.fireInteractionEvent("scheduled_publish_button")
this.router.transitionTo("article-editor.index.new",{queryParams:this.router.currentRoute.queryParams})
this.persistentToastManager.success({message:this.i18n.lookupTranslation(g.default,"i18n_article_scheduled"),ctaText:this.i18n.lookupTranslation(g.default,"i18n_see_scheduled_articles"),ctaRouteName:"article-editor.index.manage.scheduled",ctaOptions:{queryParams:this.router.currentRoute.queryParams}})}},I=(0,n.default)(k.prototype,"clientSensor",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,n.default)(k.prototype,"internalLogger",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=(0,n.default)(k.prototype,"i18n",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=(0,n.default)(k.prototype,"m3Schema",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),P=(0,n.default)(k.prototype,"persistentToastManager",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),D=(0,n.default)(k.prototype,"router",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=(0,n.default)(k.prototype,"tracking",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),x=(0,n.default)(k.prototype,"watchmanTracking",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,n.default)(k.prototype,"onShareSuccess",[p.action],Object.getOwnPropertyDescriptor(k.prototype,"onShareSuccess"),k.prototype),(0,n.default)(k.prototype,"watchmanTrackingFailEvent",[p.action],Object.getOwnPropertyDescriptor(k.prototype,"watchmanTrackingFailEvent"),k.prototype),k))}))
define("publishing-shared/components/series-modal",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","global-utils/utils/keyboard-utils","rsvp","publishing-tracking/constants/tracking","publishing-shared/utils/utils","publishing-shared/constants/series","publishing-shared/utils/data-request","publishing-shared/utils/get-timespan","publishing-shared/utils/get-cadence","publishing-shared/utils/file-upload","global-utils/utils/urn-converter","global-utils/utils/is-browser","ember-vector-images/utils/vector-url","@linkedin/ember-m3-pdsc-model-builder","@linkedin/ember-pem/utils/failure-tracking-metadata","@glimmer/tracking","@glimmer/component","@ember/service","@ember/object","@ember/destroyable","artdeco-modal/components/artdeco-modal","@ember/render-modifiers/modifiers/did-insert","@ember/render-modifiers/modifiers/did-update","ember-cli-pemberly-i18n/helpers/t","artdeco-text-input/components/artdeco-text-input","@ember/helper","global-modifiers/modifiers/focus","global-helpers/helpers/eq","artdeco-inline-feedback/components/artdeco-inline-feedback","@ember/modifier","publishing-shared/helpers/cadence","artdeco-loader/components/artdeco-loader","hue-web-icons/components/icon","artdeco-button/components/artdeco-button"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h,f,y,_,v,E,S,T,w,k,I,C,O,N,P,D,A,x,U,M,L,R,z,j){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var q,F,B,G,V,H,W,Y,$,K,Q,J,Z,X,ee,te,ie,ne,re,le,ae,se,oe,ue,ce,de,pe,me,be,ge,he,fe,ye,_e,ve
const Ee={description:"series-modal__description-input",title:"series-modal__title"},Se={title:"series-modal__title",cadence:"series-modal__frequency-select"}
Se.description=Ee.description
const Te="title",we="description",ke="cadence"
e.default=(0,a.setComponentTemplate)((0,l.createTemplateFactory)({id:"QpuUQON8",block:'[[[1,"\\n"],[1," "],[8,[32,0],[[4,[32,1],[[30,0,["loadContentSeriesData"]]],null],[4,[32,2],[[30,0,["loadContentSeriesData"]],[30,3],[30,4],[30,1]],null]],[["@closeButtonInHeader","@dismissModal","@headerId","@isOpen","@modalClasses","@returnFocusTo","@size"],[true,[30,0,["closeModal"]],"series-modal__header",[30,1],"series-modal",[30,2],"large"]],[["default"],[[[[1,"\\n "],[8,[30,5,["artdeco-modal-header"]],null,[["@classNames"],["ph5"]],[["default"],[[[[1,"\\n "],[10,"h2"],[14,1,"series-modal__header"],[12],[1,"\\n"],[41,[30,3],[[[1," "],[1,[28,[32,3],["i18n_edit_series_details","publishing-shared/components/series-modal"],null]],[1,"\\n"]],[]],[[[1," "],[1,[28,[32,3],["i18n_create_new_series","publishing-shared/components/series-modal"],null]],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],[]]]]],[1,"\\n\\n "],[8,[30,5,["artdeco-modal-content"]],null,[["@classNames"],["ph5"]],[["default"],[[[[1,"\\n "],[10,2],[14,0,"series-modal__newsletter-cap-description pt1 pb2 p-4 t-sans t-14 t-black"],[12],[1,"\\n "],[1,[30,0,["newsletterCapDescription"]]],[1,"\\n "],[10,3],[14,6,"/help/linkedin/answer/97507"],[14,"rel","noopener noreferrer"],[14,"target","_blank"],[15,"aria-label",[28,[32,3],["i18n_a11y_learn_more","publishing-shared/components/series-modal"],null]],[14,"tabindex","0"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_learn_more","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,"h3"],[14,0,"t-16 t-black t-bold"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_newsletter_details","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"publishing-s-series-modal__title-frequency-field-container display-flex pt2 flex-wrap-wrap justify-space-between"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-series-modal__field-container publishing-s-series-modal__field-container--title flex-grow-1"],[12],[1,"\\n "],[8,[32,4],[[4,[32,6],null,[["onSelector","when"],["input",[28,[32,7],[[30,0,["elementToBeFocussed"]],"title"],null]]]]],[["@inputId","@label","@placeholder","@value","@maxLength","@required","@restrictToMaxLength","@name","@onKeyUp","@onFocusIn","@aria-describedby"],["series-modal__title",[28,[32,3],["i18n_series_title","publishing-shared/components/series-modal"],null],[28,[32,3],["i18n_series_title_placeholder","publishing-shared/components/series-modal"],null],[30,0,["title"]],30,true,true,"title",[30,0,["setTitle"]],[28,[32,5],[[30,0,["fireTrackingEvent"]],"series_modal_title"],null],"series-title-error"]],null],[1,"\\n "],[10,1],[15,0,[29,["publishing-s-series-modal__error\\n ",[52,[51,[30,0,["titleError"]]],"visually-hidden"]]]],[14,1,"series-title-error"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_series_title_required","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n"],[41,[30,3],[[[1," "],[8,[32,8],[[16,"aria-label",[28,[32,3],["i18_series_title_change_warning","publishing-shared/components/series-modal"],null]]],[["@class","@type","@message"],["pt1","yield",[28,[32,3],["i18_series_title_change_warning","publishing-shared/components/series-modal"],null]]],null],[1,"\\n"]],[]],null],[1," "],[13],[1,"\\n\\n "],[10,0],[14,0,"publishing-s-series-modal__field-container"],[12],[1,"\\n "],[10,"label"],[14,"for","series-modal__frequency-select"],[14,0,"publishing-s-series-modal__frequency-label publishing-s-series-modal__frequency-label--required mt0"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_how_often_publish","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[11,"select"],[24,1,"series-modal__frequency-select"],[24,"required",""],[24,3,"cadence"],[16,2,[30,0,["cadence"]]],[16,"onchange",[30,0,["onCadenceChange"]]],[24,"aria-describedby","series-frequency-error"],[4,[32,6],null,[["when"],[[28,[32,7],[[30,0,["elementToBeFocussed"]],"select"],null]]]],[4,[32,9],["keyup",[30,0,["onKeyUp"]]],null],[12],[1,"\\n "],[10,"option"],[14,"disabled",""],[14,"selected",""],[14,2,""],[12],[1,[28,[32,3],["i18n_select_one","publishing-shared/components/series-modal"],null]],[13],[1,"\\n "],[10,"option"],[14,2,"DAILY"],[15,"selected",[28,[32,7],["i18n_daily",[28,[32,10],[[30,0,["publishFrequency"]]],null]],null]],[12],[1,[28,[32,3],["i18n_daily","publishing-shared/components/series-modal"],null]],[13],[1,"\\n "],[10,"option"],[14,2,"WEEKLY"],[15,"selected",[28,[32,7],["i18n_weekly",[28,[32,10],[[30,0,["publishFrequency"]]],null]],null]],[12],[1,[28,[32,3],["i18n_weekly","publishing-shared/components/series-modal"],null]],[13],[1,"\\n "],[10,"option"],[14,2,"TWICE_MONTH"],[15,"selected",[28,[32,7],["i18n_twice_month",[28,[32,10],[[30,0,["publishFrequency"]]],null]],null]],[12],[1,[28,[32,3],["i18n_twice_month","publishing-shared/components/series-modal"],null]],[13],[1,"\\n "],[10,"option"],[14,2,"MONTHLY"],[15,"selected",[28,[32,7],["i18n_monthly",[28,[32,10],[[30,0,["publishFrequency"]]],null]],null]],[12],[1,[28,[32,3],["i18n_monthly","publishing-shared/components/series-modal"],null]],[13],[1,"\\n "],[13],[1,"\\n "],[10,1],[15,0,[29,["publishing-s-series-modal__error\\n ",[52,[51,[30,0,["cadenceError"]]],"visually-hidden"]]]],[14,1,"series-frequency-error"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_series_cadence_required","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"display-flex pt3"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-series-modal__field-container publishing-s-series-modal__field-container--description"],[12],[1,"\\n "],[8,[32,4],[[4,[32,6],null,[["onSelector","when"],["input",[28,[32,7],[[30,0,["elementToBeFocussed"]],"description"],null]]]]],[["@inputId","@label","@placeholder","@value","@maxLength","@required","@restrictToMaxLength","@name","@onKeyUp","@onFocusIn","@aria-describedby"],["series-modal__description-input",[28,[32,3],["i18n_series_description","publishing-shared/components/series-modal"],null],[28,[32,3],["i18n_series_description_placeholder","publishing-shared/components/series-modal"],null],[30,0,["description"]],120,true,true,"description",[30,0,["setDescription"]],[28,[32,5],[[30,0,["fireTrackingEvent"]],"series_modal_description"],null],"series-description-error"]],null],[1,"\\n "],[10,1],[15,0,[29,["publishing-s-series-modal__error\\n ",[52,[51,[30,0,["descriptionError"]]],"visually-hidden"]]]],[14,1,"series-description-error"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_series_description_required","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"t-12 t-black--light pv1"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_series_description_explainer","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"display-flex align-items-center mt2"],[12],[1,"\\n"],[41,[30,0,["isImageLoading"]],[[[1," "],[10,0],[14,0,"publishing-s-series-modal__logo-loader mr4"],[12],[1,"\\n "],[8,[32,11],null,[["@size"],["small"]],null],[1,"\\n "],[13],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"publishing-s-series-modal__logo-entity-container mr4"],[14,"role","alert"],[12],[1,"\\n"],[41,[30,0,["logoPreviewPath"]],[[[1," "],[10,"img"],[14,0,"publishing-s-series-modal__logo-entity"],[15,"src",[30,0,["logoPreviewPath"]]],[15,"alt",[30,0,["title"]]],[12],[13],[1,"\\n"]],[]],[[[1," "],[10,0],[14,0,"EntityPhoto-square-5-ghost-content"],[12],[13],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n"]],[]]],[1,"\\n "],[10,0],[14,0,"publishing-s-series-modal__field-container flex-1"],[12],[1,"\\n "],[10,2],[14,0,"t-14 t-black pb1"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_add_image","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"t-12 t-black--light pb2"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_recommended_image_size","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[11,"input"],[24,1,"upload-image"],[24,0,"visually-hidden publishing-s-series-modal__upload-image-input"],[24,"accept","image/*"],[24,4,"file"],[4,[32,9],["change",[30,0,["fileSelected"]]],null],[12],[13],[1,"\\n "],[11,"label"],[24,0,"artdeco-button artdeco-button--muted artdeco-button--2 artdeco-button--secondary mv0"],[24,"for","upload-image"],[4,[32,9],["click",[30,0,["onUploadImageClick"]]],null],[12],[1,"\\n "],[1,[28,[32,3],["i18n_upload_image","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"],[41,[30,0,["logoTypeError"]],[[[1," "],[10,"label"],[14,0,"series-modal__error"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_logo_type_error","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,0,["logoSizeError"]],[[[1," "],[10,"label"],[14,0,"series-modal__error"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_logo_type_error","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[41,[30,0,["hasGenericError"]],[[[1," "],[10,"label"],[14,0,"publishing-s-series-modal__error"],[12],[1,"\\n "],[1,[28,[32,3],["i18_series_error_generic","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n"],[41,[51,[30,0,["issueCount"]]],[[[1," "],[10,0],[14,0,"publishing-s-series-modal__invite-subscribe-container"],[12],[1,"\\n\\n "],[10,0],[14,0,"display-flex align-items-center"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-series-modal__invite-subscribe-illustration mail-open-56 illustration-48 mr2"],[12],[13],[1,"\\n "],[10,0],[14,0,"mv0"],[12],[1,"\\n "],[10,"h4"],[14,0,"t-14 t-black t-bold mb2"],[12],[1,"\\n "],[1,[52,[30,0,["isPageAuthor"]],[28,[32,3],["i18n_series_invite_headline_pages","publishing-shared/components/series-modal"],null],[28,[32,3],["i18n_series_invite_headline_members","publishing-shared/components/series-modal"],null]]],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"t-14 t-black"],[12],[1,"\\n "],[1,[52,[30,0,["isPageAuthor"]],[28,[32,3],["i18n_series_invite_notify_pages","publishing-shared/components/series-modal"],null],[28,[32,3],["i18n_series_invite_notify_members","publishing-shared/components/series-modal"],null]]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n"],[41,[51,[30,3]],[[[1," "],[10,0],[14,0,"display-flex align-items-center mt5"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-series-modal__invite-subscribe-illustration success-check illustration-48 mr2"],[12],[13],[1,"\\n "],[10,0],[14,0,"mv0"],[12],[1,"\\n "],[10,"h4"],[14,0,"t-14 t-black t-bold mb2"],[12],[1,"\\n "],[1,[52,[30,0,["isPageAuthor"]],[28,[32,3],["i18n_series_subscribe_headline_pages","publishing-shared/components/series-modal"],null],[28,[32,3],["i18n_series_subscribe_headline_members","publishing-shared/components/series-modal"],null]]],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"t-14 t-black"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_series_subscribe_subheadline","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n\\n "],[10,0],[14,0,"display-flex align-items-center mt5"],[12],[1,"\\n "],[10,0],[14,0,"publishing-s-series-modal__feature-on-profile-illustration"],[12],[13],[1,"\\n "],[10,0],[14,0,"mv0"],[12],[1,"\\n "],[10,"h4"],[14,0,"t-14 t-black t-bold mb2"],[12],[1,"\\n "],[1,[52,[30,0,["isPageAuthor"]],[28,[32,3],["i18n_series_feature_on_profile_headline_pages","publishing-shared/components/series-modal"],null],[28,[32,3],["i18n_series_feature_on_profile_headline_members","publishing-shared/components/series-modal"],null]]],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"t-14 t-black"],[12],[1,"\\n "],[1,[52,[30,0,["isPageAuthor"]],[28,[32,3],["i18n_series_feature_on_profile_desc_pages","publishing-shared/components/series-modal"],null],[28,[32,3],["i18n_series_feature_on_profile_desc_members","publishing-shared/components/series-modal"],null]]],[1,"\\n "],[10,3],[14,6,"/help/linkedin/answer/a550399"],[14,"rel","noopener noreferrer"],[14,"target","_blank"],[15,"aria-label",[28,[32,3],["i18n_a11y_learn_more","publishing-shared/components/series-modal"],null]],[14,"tabindex","0"],[12],[1,"\\n "],[1,[28,[32,3],["i18n_learn_more","publishing-shared/components/series-modal"],null]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "]],[]]]]],[1,"\\n\\n "],[8,[30,5,["artdeco-modal-footer"]],null,[["@has-divider","@classNames"],["true","ph5"]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"display-flex justify-flex-end"],[12],[1,"\\n"],[41,[30,0,["serverValidationError"]],[[[1," "],[10,0],[14,0,"publishing-s-series-modal__server-validation-error"],[12],[1,"\\n "],[10,1],[14,0,"publishing-s-series-modal__server-validation-error-icon"],[12],[1,"\\n "],[8,[32,12],null,[["@type","@size","@name"],["system","medium","signal-caution"]],null],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"publishing-s-series-modal__server-validation-error-text t-12"],[12],[1,"\\n "],[1,[30,0,["serverValidationError"]]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]],null],[1," "],[10,0],[14,0,"flex-shrink-zero"],[12],[1,"\\n "],[8,[32,13],[[4,[32,9],["click",[30,0,["closeModal"]]],null]],[["@class","@text","@type"],["series-modal__cancel-button",[28,[32,3],["i18n_cancel","publishing-shared/components/series-modal"],null],"secondary"]],null],[1,"\\n "],[8,[32,13],[[4,[32,9],["click",[52,[30,3],[30,0,["onEditSubmit"]],[30,0,["onCreateSubmit"]]]],null]],[["@class","@text"],["series-modal__submit-button ml1",[28,[32,3],["i18n_done","publishing-shared/components/series-modal"],null]]],null],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n "]],[5]]]]],[1,"\\n "]],["@isOpen","@returnFocusTo","@isEditForm","@contentSeriesUrn","modal"],false,["if","unless"]]',moduleName:"publishing-shared/components/series-modal.gjs",scope:()=>[I.default,C.default,O.default,N.default,P.default,D.fn,A.default,x.default,U.default,M.on,L.default,R.default,z.default,j.default],isStrictMode:!0}),(q=(0,T.inject)("@linkedin/ember-restli-graphql@graphql"),F=(0,T.inject)("jet"),B=(0,T.inject)("lix"),G=(0,T.inject)("global-services@store-shim"),V=(0,T.inject)("tracking"),H=(0,T.inject)("vector@vector-media-upload"),W=(0,T.inject)("i18n"),Y=(0,T.inject)("persistent-toast-manager@persistent-toast-manager"),$=class e extends S.default{constructor(){super(...arguments);(0,t.default)(this,"graphql",K,this);(0,t.default)(this,"jet",Q,this);(0,t.default)(this,"lix",J,this);(0,t.default)(this,"storeShim",Z,this);(0,t.default)(this,"tracking",X,this);(0,t.default)(this,"vectorMediaUpload",ee,this);(0,t.default)(this,"i18n",te,this);(0,t.default)(this,"persistentToastManager",ie,this);(0,t.default)(this,"authorSubscribe",ne,this);(0,t.default)(this,"title",re,this);(0,t.default)(this,"cadence",le,this);(0,t.default)(this,"isImageLoading",ae,this);(0,t.default)(this,"description",se,this);(0,t.default)(this,"publishFrequency",oe,this);(0,t.default)(this,"logo",ue,this);(0,t.default)(this,"issueCount",ce,this);(0,t.default)(this,"logoUrn",de,this);(0,t.default)(this,"logoPreviewPath",pe,this);(0,t.default)(this,"titleError",me,this);(0,t.default)(this,"cadenceError",be,this);(0,t.default)(this,"descriptionError",ge,this);(0,t.default)(this,"logoTypeError",he,this);(0,t.default)(this,"logoSizeError",fe,this);(0,t.default)(this,"editSeriesRecord",ye,this);(0,t.default)(this,"serverValidationError",_e,this);(0,t.default)(this,"hasGenericError",ve,this)}get elementToBeFocussed(){return this.titleError?Te:this.cadenceError?"select":this.descriptionError?we:""}get isContentSeriesGraphQLEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.publishing-graphql-content-series")}get isPageAuthor(){return!!(0,w.get)(this.args,"pageAuthor")}get logoVectorImage(){var e,t,i,n,r
if(this.isContentSeriesGraphQLEnabled){var l,a,s,o,u
return null===(l=this.editSeriesRecord)||void 0===l||null===(a=l.logo)||void 0===a||null===(s=a.attributes)||void 0===s||null===(o=s[0])||void 0===o||null===(u=o.detailData)||void 0===u?void 0:u.vectorImage}return null===(e=this.editSeriesRecord)||void 0===e||null===(t=e.logo)||void 0===t||null===(i=t.attributes)||void 0===i||null===(n=i[0])||void 0===n||null===(r=n.detailDataUnion)||void 0===r?void 0:r.vectorImage}get newsletterCapDescription(){return this.i18n.lookupTranslation(e,this.isPageAuthor?"i18n_newsletter_cap_description_pages_v2":"i18n_newsletter_cap_description_members_v2")([{limit:this.args.isMultipleNewslettersEnabled?d.SERIES_CREATION_LIMIT:1}])}isValidLogo(e){if(!(0,g.validImageType)(e.type)){this.logoTypeError=!0
return!1}if(!(0,g.validImageSize)(e.size,e.type)){this.logoSizeError=!0
return!1}return!0}_createTimeSpan(e){const{duration:t,unit:i}=(0,m.default)(e)
return(0,_.buildModel)("com.linkedin.common.TimeSpan",{duration:t,unit:i})}_createSeriesModel(){const e={title:this.title,description:this.description,publishFrequency:this._createTimeSpan(this.cadence),inviteTargetAudiences:!0}
null!==this.logoUrn&&(e.logoUrn=this.logoUrn)
if(this.isPageAuthor){const t=(0,w.get)(this.args,"pageAuthor.entityUrn"),i=(0,h.fromUrn)(t).id
e.authorUnion=(0,_.buildModel)("com.linkedin.voyager.dash.publishing.AuthorEntityUnion",{companyUrn:(0,h.toUrn)("fsd_company",i)})}return this.storeShim.createRecord("com.linkedin.voyager.dash.publishing.ContentSeries",e)}validate(e){this.flushValidations(e)
let t=!1
Object.keys(e).forEach((e=>{if(!((0,w.get)(this,e)&&(0,w.get)(this,e).trim())){t=!0
f.default&&(e===Te?this.titleError=!0:e===ke?this.cadenceError=!0:e===we&&(this.descriptionError=!0))}}))
return t?o.Promise.reject("Failed to validate series model"):o.Promise.resolve()}flushValidations(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
this.hasGenericError=!1
this.logoTypeError=!1
this.logoSizeError=!1
this.serverValidationError=""
Object.keys(e).forEach((e=>{f.default&&(e===Te?this.titleError=!1:e===ke?this.cadenceError=!1:e===we&&(this.descriptionError=!1))}))}loadContentSeriesData(){if(this.args.isEditForm&&this.args.contentSeriesUrn&&this.args.isOpen){this.flushValidations()
const e={failures:[new v.default("find-series","failed",{productName:"Voyager - Article Creator"})],degradedEntityIDsToRemove:[]}
let t
const i=(0,h.fromUrn)(this.args.contentSeriesUrn).id,n=(0,h.toUrn)("fsd_contentSeries",i)
t=this.isContentSeriesGraphQLEnabled?this.graphql.executeQuery(...(0,p.findNewsletterByUrnGraphQL)({entityUrn:n,adapterOptions:e})):this.storeShim.findRecord(...(0,p.findNewsletterRecord)({entityUrn:this.args.contentSeriesUrn,pemAdapterOptions:e}))
t.then((e=>{if(this.isDestroying)return
let t
if(this.isContentSeriesGraphQLEnabled){var i
t=null==e||null===(i=e.data)||void 0===i?void 0:i.publishingDashContentSeriesById}else t=e
const{title:n,description:r,publishFrequency:l,logoUrn:a,issueCount:s}=(0,w.getProperties)(t,"title","description","publishFrequency","logo","logoUrn","issueCount")
this.editSeriesRecord=t
this.title=n
this.description=r
this.publishFrequency=l
this.cadence=(0,b.default)(l)
this.logoUrn=a
this.issueCount=s
this.logoPreviewPath=(0,y.default)(this.logoVectorImage,200,200)}))}}_clearForm(){this.title=null
this.description=null
this.cadence=null
this.publishFrequency=null
this.logoUrn=null
this.logoPreviewPath=null
this.issueCount=0}closeModal(){this.fireTrackingEvent("series_modal_close")
this._clearForm()
this.args.onClose()
this.flushValidations(Se)}onCadenceChange(e){let{target:{value:t}}=e
this.fireTrackingEvent(`series_modal_cadence_${t.toLowerCase()}`)
this.cadence=t}onCreateSubmit(){this.fireTrackingEvent(u.CONTROL_URNS.SERIES_MODAL_DONE)
return this.validate(Se).then((()=>{if((0,k.isDestroying)(this))return
const e={failures:[new v.default("create-series-model","failed",{productName:"Voyager - Article Creator"})],degradedEntityIDsToRemove:[]}
return this._createSeriesModel().save(...(0,p.createContentSeries)({pemAdapterOptions:e}))})).then((e=>{var t,i
if((0,k.isDestroying)(this))return
this._clearForm()
const n=[null===(t=(i=this.args).onCreateSuccess)||void 0===t?void 0:t.call(i,e)]
if(this.authorSubscribe){const t=(0,w.get)(e,"id"),i=this.storeShim.adapterFor("-ember-m3"),r=`urn:li:fsd_subscribeAction:urn:li:contentSeries:${t}`,l=i.ajax(...(0,p.updateNewsletterSubscription)({isSubscribed:!1,urn:r})).catch((e=>{if((0,k.isDestroying)(this))throw e
this.jet.logError(new Error(`Network request failed while attempting to subscribe to the newsletter with urn ${r}`),"publishing-subscribe-to-newsletter",!1)
throw e}))
n.push(l)}return o.Promise.all(n)})).then((()=>{if(!(0,k.isDestroying)(this)){this.persistentToastManager.success({message:this.i18n.lookupTranslation(e,"i18n_newsletter_create_message")()})
this.closeModal()}})).catch((e=>{if((0,k.isDestroying)(this))throw e
if("Failed to validate series model"===e)return o.Promise.resolve();(0,c.isValidVoyagerUserVisibleException)(e)?this.serverValidationError=e.errors[0].message:this.hasGenericError=!0
throw e}))}onEditSubmit(){this.fireTrackingEvent(u.CONTROL_URNS.SERIES_MODAL_DONE)
return this.validate(Ee).then((()=>{if((0,k.isDestroying)(this))return
const{editSeriesRecord:e}=this;(0,w.setProperties)(e,{title:this.title,description:this.description,publishFrequency:this._createTimeSpan(this.cadence)})
this._updateFields()
this.logoUrn&&(0,w.set)(e,"logoUrn",this.logoUrn)
this.issueCount||(0,w.set)(e,"inviteTargetAudiences",!0)
const t={failures:[new v.default("edit-series","failed",{productName:"Voyager - Article Creator"})],degradedEntityIDsToRemove:[]}
e.save(...(0,p.editContentSeries)({entityUrn:(0,w.get)(e,"entityUrn"),pemAdapterOptions:t}))
this.closeModal()})).catch((e=>{if((0,k.isDestroying)(this))throw e
if("Failed to validate series model"===e)return o.Promise.resolve()
this.hasGenericError=!0
throw e}))}onUploadImageClick(){this.fireTrackingEvent("series_modal_logo")}fileSelected(e){var t=this
let{target:i}=e
const n=i.files[0]
if(this.isValidLogo(n)){this.logoSizeError=!1
this.logoTypeError=!1
this.isImageLoading=!0;(0,g.getBlobFromFile)(n).then((e=>{if(!this.isDestroying){this.logoPreviewPath=e.dataUrl
const i="PUBLISHING_SERIES_LOGO"
this.vectorMediaUpload.ingest([{file:n,mediaUploadType:i}]).then((e=>{let[t]=e
return t})).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
if(!t.isDestroying){const i=(null==e?void 0:e.urn)||(0,w.get)(e,"meta.urn")
i&&(t.logoUrn=i)}})).catch((e=>{if(!this.isDestroying){this.logoPreviewPath=null
this.logoUrn=null}throw e})).finally((()=>{this.isDestroying||(this.isImageLoading=!1)}))}}))}}fireTrackingEvent(e){this.tracking.fireInteractionEvent(e)}setDescription(e){let{target:{value:t}}=e
this.description=t}setTitle(e){let{target:{value:t}}=e
this.title=t}_updateFields(){this.args.updateField("title",this.title)
this.args.updateField("description",this.description)
this.args.updateField("publishFrequency",this._createTimeSpan(this.cadence))}onKeyUp(e){(0,s.isEscapeKey)(e)&&e.stopPropagation()}},K=(0,n.default)($.prototype,"graphql",[q],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Q=(0,n.default)($.prototype,"jet",[F],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),J=(0,n.default)($.prototype,"lix",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Z=(0,n.default)($.prototype,"storeShim",[G],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),X=(0,n.default)($.prototype,"tracking",[V],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ee=(0,n.default)($.prototype,"vectorMediaUpload",[H],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),te=(0,n.default)($.prototype,"i18n",[W],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ie=(0,n.default)($.prototype,"persistentToastManager",[Y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ne=(0,n.default)($.prototype,"authorSubscribe",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),re=(0,n.default)($.prototype,"title",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),le=(0,n.default)($.prototype,"cadence",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),ae=(0,n.default)($.prototype,"isImageLoading",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),se=(0,n.default)($.prototype,"description",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),oe=(0,n.default)($.prototype,"publishFrequency",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ue=(0,n.default)($.prototype,"logo",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ce=(0,n.default)($.prototype,"issueCount",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),de=(0,n.default)($.prototype,"logoUrn",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),pe=(0,n.default)($.prototype,"logoPreviewPath",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),me=(0,n.default)($.prototype,"titleError",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),be=(0,n.default)($.prototype,"cadenceError",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ge=(0,n.default)($.prototype,"descriptionError",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),he=(0,n.default)($.prototype,"logoTypeError",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),fe=(0,n.default)($.prototype,"logoSizeError",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ye=(0,n.default)($.prototype,"editSeriesRecord",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_e=(0,n.default)($.prototype,"serverValidationError",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ve=(0,n.default)($.prototype,"hasGenericError",[E.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),(0,n.default)($.prototype,"loadContentSeriesData",[w.action],Object.getOwnPropertyDescriptor($.prototype,"loadContentSeriesData"),$.prototype),(0,n.default)($.prototype,"closeModal",[w.action],Object.getOwnPropertyDescriptor($.prototype,"closeModal"),$.prototype),(0,n.default)($.prototype,"onCadenceChange",[w.action],Object.getOwnPropertyDescriptor($.prototype,"onCadenceChange"),$.prototype),(0,n.default)($.prototype,"onCreateSubmit",[w.action],Object.getOwnPropertyDescriptor($.prototype,"onCreateSubmit"),$.prototype),(0,n.default)($.prototype,"onEditSubmit",[w.action],Object.getOwnPropertyDescriptor($.prototype,"onEditSubmit"),$.prototype),(0,n.default)($.prototype,"onUploadImageClick",[w.action],Object.getOwnPropertyDescriptor($.prototype,"onUploadImageClick"),$.prototype),(0,n.default)($.prototype,"fileSelected",[w.action],Object.getOwnPropertyDescriptor($.prototype,"fileSelected"),$.prototype),(0,n.default)($.prototype,"fireTrackingEvent",[w.action],Object.getOwnPropertyDescriptor($.prototype,"fireTrackingEvent"),$.prototype),(0,n.default)($.prototype,"setDescription",[w.action],Object.getOwnPropertyDescriptor($.prototype,"setDescription"),$.prototype),(0,n.default)($.prototype,"setTitle",[w.action],Object.getOwnPropertyDescriptor($.prototype,"setTitle"),$.prototype),(0,n.default)($.prototype,"onKeyUp",[w.action],Object.getOwnPropertyDescriptor($.prototype,"onKeyUp"),$.prototype),$))}))
define("publishing-shared/components/subscribe-button",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/helper","@ember/component","publishing-shared/utils/newsletter-subscribe","feed-utils/utils/article-toast-utils","@glimmer/component","@ember/service","@ember/object","artdeco-button/components/artdeco-button","ember-cli-pemberly-i18n/helpers/t","global-helpers/helpers/or","ember-cli-pemberly-tracking/modifiers/track-interaction","@ember/modifier"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h,f){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var y,_,v,E,S,T,w,k,I,C,O
const N="subscribe-newsletter-via-newsletter-entity-header"
e.default=(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"SEh6FnUC",block:'[[[1,"\\n"],[1," "],[8,[32,0],[[16,"aria-label",[52,[30,0,["isSubscribed"]],[28,[32,1],["i18n_unsubscribe_series_name","publishing-shared/components/subscribe-button"],[["seriesName"],[[30,1,["title"]]]]],[28,[32,1],["i18n_subscribe_to_series_name","publishing-shared/components/subscribe-button"],[["seriesName"],[[30,1,["title"]]]]]]],[17,2],[4,[32,3],["click",[30,0,["onClick"]]],null],[4,[32,4],["series_subscribe_toggle"],null]],[["@color","@icon","@text","@type"],[[28,[32,2],[[30,3],"default"],null],[30,0,["icon"]],[52,[30,0,["isSubscribed"]],[28,[32,1],["i18n_subscribed_series","publishing-shared/components/subscribe-button"],null],[28,[32,1],["i18n_subscribe_series","publishing-shared/components/subscribe-button"],null]],[30,4]]],null],[1,"\\n "]],["@entity","&attrs","@color","@type"],false,["if"]]',moduleName:"publishing-shared/components/subscribe-button.gjs",scope:()=>[m.default,b.default,g.default,f.on,h.default],isStrictMode:!0}),(y=(0,d.inject)("i18n"),_=(0,d.inject)("jet"),v=(0,d.inject)("persistent-toast-manager@persistent-toast-manager"),E=(0,d.inject)("global-services@store-shim"),S=(0,d.inject)("watchman-tracking@watchman-tracking"),T=class extends c.default{constructor(){super(...arguments);(0,t.default)(this,"i18n",w,this);(0,t.default)(this,"jet",k,this);(0,t.default)(this,"persistentToastManager",I,this);(0,t.default)(this,"storeShim",C,this);(0,t.default)(this,"watchmanTracking",O,this)}get isSubscribed(){return(0,p.get)(this.args.entity,"subscribeAction.subscribed")}get toastManager(){return new u.default(this.persistentToastManager,this.i18n)}get icon(){return this.args.isIconDisabled?"":this.isSubscribed?"check-icon":"add"}onClick(){var e,t
this.watchmanTracking.startInteraction({userInteraction:N,userJourney:"subscribe-to-newsletter",groupName:"publishing-reliability"})
null===(e=(t=this.args).onSubscribeButtonClick)||void 0===e||e.call(t);(0,o.default)(this.args.entity,this.isSubscribed,this.storeShim,this.jet,this.toastManager,this.isDestroying,this.args.onSubscribeSuccess,this.watchmanTracking,N)}},w=(0,n.default)(T.prototype,"i18n",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k=(0,n.default)(T.prototype,"jet",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),I=(0,n.default)(T.prototype,"persistentToastManager",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,n.default)(T.prototype,"storeShim",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=(0,n.default)(T.prototype,"watchmanTracking",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),(0,n.default)(T.prototype,"onClick",[p.action],Object.getOwnPropertyDescriptor(T.prototype,"onClick"),T.prototype),T))}))
define("publishing-shared/components/subscribers-list-item",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/helper","@ember/component","@glimmer/component","@ember/object","ember-engines/components/link-to-external","ember-cli-pemberly-tracking/modifiers/track-interaction","feed-components-shared/components/avatar-image","global-helpers/helpers/actor-name","distance-badge/components/distance-badge","@ember/service"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var h,f,y
const _=["connection","noConnection","self"]
e.default=(0,s.setComponentTemplate)((0,l.createTemplateFactory)({id:"IVLqZmNi",block:'[[[1,"\\n "],[10,0],[12],[1,"\\n "],[8,[32,0],[[24,0,"reader-subscriber-list-item__actor-profile-link"],[4,[32,1],["article_reader_subscriber_list_profile_tracking"],null]],[["@model","@route"],[[30,0,["publicIdentifier"]],"profile.common.profile"]],[["default"],[[[[1,"\\n "],[10,0],[14,0,"display-flex flex-row"],[12],[1,"\\n "],[8,[32,2],[[24,0,"mr2"]],[["@alt","@avatar","@avatarEntityClassSize","@avatarType"],[[28,[32,3],[[30,0,["miniProfile"]]],null],[30,0,["profilePicture"]],4,"member"]],null],[1,"\\n "],[10,0],[14,0,"display-flex flex-column justify-center"],[12],[1,"\\n "],[10,"h3"],[14,0,"t-16 t-black t-bold"],[12],[1,"\\n "],[1,[28,[32,3],[[30,0,["miniProfile"]]],null]],[1,"\\n "],[8,[32,4],null,[["@class","@distanceEnum","@separator"],["reader-subscribers-list_distance_badge",[30,0,["distance"]],true]],null],[1,"\\n "],[13],[1,"\\n "],[10,2],[14,0,"t-14 t-black--light"],[12],[1,"\\n "],[1,[30,0,["headline"]]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n "],[13],[1,"\\n "]],[],false,[]]',moduleName:"publishing-shared/components/subscribers-list-item.gjs",scope:()=>[c.default,d.default,p.default,m.default,b.default],isStrictMode:!0}),(h=(0,g.inject)("lix"),f=class extends o.default{constructor(){super(...arguments);(0,t.default)(this,"lix",y,this)}get isNewsletterEntityGraphQlEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.publishing-graphql-newsletter-entity")}get distance(){var e,t
const i=this.isNewsletterEntityGraphQlEnabled?null===(e=this.args.subscriber)||void 0===e||null===(t=e.memberRelationship)||void 0===t?void 0:t.memberRelationship:(0,u.get)(this.args,"subscriber.memberRelationship.memberRelationshipUnion")
if(i){switch(_.find((e=>!!(0,u.get)(i,e)))){case"connection":return"DISTANCE_1"
case"noConnection":return(0,u.get)(i,"noConnection.memberDistance")
case"self":return"SELF"
default:return""}}return""}get headline(){return(0,u.get)(this.args,"subscriber.headline")}get miniProfile(){return{miniProfile:{firstName:(0,u.get)(this.args,"subscriber.firstName"),lastName:(0,u.get)(this.args,"subscriber.lastName")}}}get publicIdentifier(){return(0,u.get)(this.args,"subscriber.publicIdentifier")}get profilePicture(){if(this.isNewsletterEntityGraphQlEnabled){var e,t,i
return null===(e=this.args.subscriber)||void 0===e||null===(t=e.profilePicture)||void 0===t||null===(i=t.displayImageReferenceResolutionResult)||void 0===i?void 0:i.vectorImage}return(0,u.get)(this.args,"subscriber.profilePicture.displayImageReference.vectorImage")}},y=(0,n.default)(f.prototype,"lix",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f))}))
define("publishing-shared/components/subscribers-list",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/template-factory","@ember/component","publishing-shared/utils/data-request","rsvp","feed-pagination-state/utils/pagination-state","@glimmer/tracking","@glimmer/component","@ember/object","@ember/service","@ember/destroyable","scaffold-finite-scroll/components/finite-scroll","global-helpers/helpers/not","publishing-shared/components/subscribers-list-item"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p,m,b,g,h,f){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var y,_,v,E,S,T,w,k,I,C,O,N
e.default=(0,a.setComponentTemplate)((0,l.createTemplateFactory)({id:"iW9JireD",block:'[[[1,"\\n "],[8,[32,0],null,[["@isDisabled","@items","@onTrigger"],[[28,[32,1],[[30,0,["canInfiniteScroll"]]],null],[30,0,["subscribers"]],[30,0,["onInfiniteScroll"]]]],[["content"],[[[[1,"\\n "],[10,"ul"],[14,0,"artdeco-list artdeco-list--offset-2 reader-subscriber-list__list"],[14,"tabindex","0"],[12],[1,"\\n"],[42,[28,[31,1],[[28,[31,1],[[30,2]],null]],null],null,[[[1," "],[10,"li"],[14,0,"artdeco-list__item reader-subscriber-list__actor-list-item"],[14,"tabindex","0"],[12],[1,"\\n "],[8,[30,1],null,[["@index"],[[30,4]]],[["default"],[[[[1,"\\n "],[8,[32,2],null,[["@subscriber"],[[30,3]]],null],[1,"\\n "]],[]]]]],[1,"\\n "],[13],[1,"\\n"]],[3,4]],null],[1," "],[13],[1,"\\n "]],[1,2]]]]],[1,"\\n "]],["ItemContainer","items","subscriber","index"],false,["each","-track-array"]]',moduleName:"publishing-shared/components/subscribers-list.gjs",scope:()=>[g.default,h.default,f.default],isStrictMode:!0}),(y=(0,m.inject)("global-services@store-shim"),_=(0,m.inject)("@linkedin/ember-restli-graphql@graphql"),v=(0,m.inject)("lix"),E=(0,m.inject)("router"),S=class extends d.default{get isNewsletterEntityGraphQlEnabled(){return this.lix.getTreatmentIsEnabled("voyager.web.publishing-graphql-newsletter-entity")}constructor(){super(...arguments);(0,t.default)(this,"storeShim",T,this);(0,t.default)(this,"graphql",w,this);(0,t.default)(this,"lix",k,this);(0,t.default)(this,"router",I,this);(0,t.default)(this,"isLoading",C,this);(0,t.default)(this,"subscribers",O,this);(0,t.default)(this,"canInfiniteScroll",N,this)
this.paginationState=new u.default({start:0,count:10,pagingSize:10,total:this.args.totalSubscribers,direction:"next"})
const e=this.paginationState.getCurrentState()
this.loadPage(e)}loadPage(e){if(e.count<=0){this.canInfiniteScroll=!1
return(0,o.resolve)()}const{contentSeriesUrn:t}=this.args
this.isLoading=!0
return this.isNewsletterEntityGraphQlEnabled?this.graphql.executeQuery(...(0,s.newsletterSubscribersRequestGraphQL)({urn:t,count:e.count,start:e.start})).then((e=>{var t
if((0,b.isDestroying)(this))return
this.isLoading=!1
const{elements:i}=e.data.publishingDashSeriesSubscribersByContentSeries,n=null===(t=i.filter((e=>e)))||void 0===t?void 0:t.map((e=>e.subscriber))
this.subscribers=this.subscribers.concat(n)
return n})).catch((e=>{var t,i
if((0,b.isDestroying)(this))throw e
"403"===(null==e||null===(t=e.errors)||void 0===t||null===(i=t[0])||void 0===i?void 0:i.status)&&this.router.transitionTo("publishing-entity.newsletter")
throw e})):this.storeShim.queryURL(...(0,s.newsletterSubscribersRequest)({contentSeriesUrn:t,reload:!1,paging:{start:e.start,count:e.count}})).then((e=>{if(!this.isDestroying){this.isLoading=!1
const t=(0,p.get)(e,"elements").map((e=>(0,p.get)(e,"subscriber")))
this.subscribers=this.subscribers.concat(t)}})).catch((e=>{if((0,b.isDestroying)(this))throw e
"403"===e.errors[0].status&&this.router.transitionTo("publishing-entity.newsletter")
throw e}))}onInfiniteScroll(){const e=this.paginationState.getNextPagingValues()
return this.loadPage(e)}},T=(0,n.default)(S.prototype,"storeShim",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=(0,n.default)(S.prototype,"graphql",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k=(0,n.default)(S.prototype,"lix",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),I=(0,n.default)(S.prototype,"router",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,n.default)(S.prototype,"isLoading",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),O=(0,n.default)(S.prototype,"subscribers",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),N=(0,n.default)(S.prototype,"canInfiniteScroll",[c.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),(0,n.default)(S.prototype,"onInfiniteScroll",[p.action],Object.getOwnPropertyDescriptor(S.prototype,"onInfiniteScroll"),S.prototype),S))}))
define("publishing-shared/components/subscribers-modal",["exports","@ember/template-factory","@ember/component/template-only","@ember/component","artdeco-modal/components/artdeco-modal","ember-cli-pemberly-tracking/helpers/tracked-action","ember-cli-pemberly-i18n/helpers/t","publishing-shared/components/subscribers-list"],(function(e,t,i,n,r,l,a,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
const o=(0,n.setComponentTemplate)((0,t.createTemplateFactory)({id:"yjntvsxb",block:'[[[1,"\\n"],[1," "],[8,[32,0],null,[["@isOpen","@headerId","@dismissModal","@modalClasses","@size"],[[30,1],"subscribers-modal-label",[28,[32,1],["close",[30,2]],null],"reader-subscribers-modal","medium"]],[["default"],[[[[1,"\\n "],[8,[30,3,["artdeco-modal-header"]],null,[["@classNames"],["reader-subscribers-modal__header"]],[["default"],[[[[1,"\\n "],[10,"h2"],[14,1,"subscribers-modal-label"],[14,0,"reader-subscribers-modal__subscribers-count truncated-text t-21px-black-70%"],[12],[1,"\\n "],[1,[28,[32,2],["num_subscribers","publishing-shared/components/subscribers-modal"],[["numSubscribers"],[[30,4]]]]],[1,"\\n "],[13],[1,"\\n "]],[]]]]],[1,"\\n "],[8,[30,3,["artdeco-modal-content"]],null,[["@classNames"],["reader-subscribers-modal__content flex-1"]],[["default"],[[[[1,"\\n "],[8,[32,3],null,[["@contentSeriesUrn","@totalSubscribers"],[[30,5],[30,4]]],null],[1,"\\n "]],[]]]]],[1,"\\n "]],[3]]]]],[1,"\\n"]],["@isSubscribersModalOpen","@onCloseSubscribersModal","modal","@totalSubscribers","@contentSeriesUrn"],false,[]]',moduleName:"publishing-shared/components/subscribers-modal.gjs",scope:()=>[r.default,l.default,a.default,s.default],isStrictMode:!0}),(0,i.default)("subscribers-modal","SubscribersModal"))
e.default=o}))
define("publishing-shared/constants/series",["exports"],(function(e){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.TIME_SPAN_UNIT=e.SERIES_URN_DELETE_VALUE=e.SERIES_URN=e.SERIES_LOGO_SIZE_IN_BYTES=e.SERIES_CREATION_LIMIT=e.SERIES_CADENCE=void 0
e.SERIES_LOGO_SIZE_IN_BYTES=8388608,e.SERIES_CADENCE={DAILY:"DAILY",WEEKLY:"WEEKLY",MONTHLY:"MONTHLY",TWICE_MONTH:"TWICE_MONTH"},e.SERIES_CREATION_LIMIT=5,e.TIME_SPAN_UNIT={DAY:"DAY",WEEK:"WEEK",MONTH:"MONTH"},e.SERIES_URN_DELETE_VALUE="-1",e.SERIES_URN="seriesUrn"}))
define("publishing-shared/helpers/cadence",["exports","@ember/component/helper","publishing-shared/utils/get-cadence"],(function(e,t,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.cadenceHelper=r
e.default=void 0
const n={DAILY:"i18n_daily",WEEKLY:"i18n_weekly",MONTHLY:"i18n_monthly"}
function r(e){let[t]=e
const r=(0,i.default)(t)
return"TWICE_MONTH"===r?"i18n_twice_month":r?n[r]:void 0}const l=(0,t.helper)(r)
e.default=l}))
define("publishing-shared/modifiers/input-change-enforcer",["exports","@ember/debug","ember-modifier"],(function(e,t,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
const n=(0,i.modifier)(((e,t,i)=>{let{maxLength:n,onChange:r}=i
const l=e=>{const{value:t}=e.target
if(n){const i=t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').length-t.length
e.target.value=t.slice(0,n-i)}r(e)}
e.addEventListener("input",l)
return()=>{e.removeEventListener("input",l)}}),{eager:!1})
e.default=n}))
define("publishing-shared/modifiers/reload-page-on-cookie-consent-accept",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/destroyable","@ember/service","ember-lifeline","ember-modifier"],(function(e,t,i,n,r,l,a,s,o){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var u,c,d
e.default=(u=(0,a.inject)("global-services@window"),c=class extends o.default{get acceptButton(){var e
return null===(e=this.globalAlertContainer)||void 0===e?void 0:e.querySelector(".artdeco-global-alert--cookie_consent button")}constructor(){super(...arguments);(0,t.default)(this,"windowService",d,this)
this.globalAlertContainer=document.getElementById("artdeco-global-alert-container")
this.mutationObserver=null
this.reloadPage=this.reloadPage.bind(this);(0,l.registerDestructor)(this,(()=>{var e
return null===(e=this.mutationObserver)||void 0===e?void 0:e.disconnect()}))}addGlobalCookieConsentListener(e){(0,s.addEventListener)(this,e,"click",this.reloadPage)}modify(){if(this.globalAlertContainer){const e=this.acceptButton
if(e)this.addGlobalCookieConsentListener(e)
else{this.mutationObserver=new MutationObserver((()=>{this.addGlobalCookieConsentListener(this.acceptButton)}))
this.mutationObserver.observe(this.globalAlertContainer,{childList:!0})}}}reloadPage(){this.windowService.getLocation().reload()}},d=(0,n.default)(c.prototype,"windowService",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),c)}))
define("publishing-shared/template-registry",[],(function(){}))
define("publishing-shared/utils/constants",["exports"],(function(e){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.PUBLISHING_LEGO_CONFIGS=e.ARTICLE_READER_LEGO_CONFIGS=void 0
e.PUBLISHING_LEGO_CONFIGS=Object.freeze({PAGE_KEY:"voyager_publishing",SLOT_ID:"promo",GROUP_ID:"promo_group",WIDGET:{NEWSLETTER_ACCESS_BANNER:"publishing_newsletter_access_banner"}}),e.ARTICLE_READER_LEGO_CONFIGS=Object.freeze({PAGE_KEY:"voyager_article_reader",SLOT_ID:"promo",GROUP_ID:"promo_group",WIDGET:{NEWSLETTER_ACCESS_BANNER:"article_reader_newsletter_access_banner"}})}))
define("publishing-shared/utils/data-request",["exports","@ember/debug","voyager-web/config/environment","global-utils/utils/url","global-utils/utils/urn-id-helpers","graphql-queries/queries/publishing/content-series-by-id.graphql","graphql-queries/queries/publishing/content-series-by-owner-and-access.graphql","graphql-queries/queries/publishing/content-series-by-slug.graphql","graphql-queries/queries/publishing/series-subscribers-by-id.graphql","@linkedin/ember-pem/utils/failure-tracking-metadata","data-layer/utils/organization/resource-to-url-map","graphql-queries/queries/organizations/member-company-by-company-urns.graphql","global-utils/utils/urn-converter"],(function(e,t,i,n,r,l,a,s,o,u,c,d,p){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.createContentSeries=function(){let{readOnCreate:e=!1,pemAdapterOptions:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const n=`/${i.default.namespace}/voyagerPublishingDashContentSeries`,r={recipe:"com.linkedin.voyager.dash.deco.publishing.ContentSeries"}
return[{adapterOptions:{url:n,params:r,readOnCreate:e,...t}}]}
e.deleteContentSeries=function(){let{entityUrn:e,readOnCreate:t=!1,pemAdapterOptions:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const l=`urn:li:fsd_contentSeries:${(0,r.extractUrnParts)(e)[1]}`,a=`/${i.default.namespace}/voyagerPublishingDashContentSeries/${l}`,s={recipe:"com.linkedin.voyager.dash.deco.publishing.ContentSeries"}
return[{adapterOptions:{url:a,params:s,readOnCreate:t,...n}}]}
e.editContentSeries=function(){let{entityUrn:e,readOnCreate:t=!1,pemAdapterOptions:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const l=`urn:li:fsd_contentSeries:${(0,r.extractUrnParts)(e)[1]}`,a=`/${i.default.namespace}/voyagerPublishingDashContentSeries/${l}`,s={recipe:"com.linkedin.voyager.dash.deco.publishing.ContentSeries"}
return[{adapterOptions:{url:a,params:s,readOnCreate:t,partial:!0,...n}}]}
e.fetchNewslettersAndAccess=function(){let{companyOwner:e,reload:t=!1,pemAdapterOptions:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const l={count:10,q:"ownerAndAccess",recipe:"com.linkedin.voyager.dash.deco.publishing.ContentSeries"},a=`/${i.default.namespace}/voyagerPublishingDashContentSeries`
if(e){const t=`urn:li:fsd_company:${(0,r.extractUrnParts)(e)[1]}`
l.companyOwner=t}return[a,{params:l,reload:t,adapterOptions:{url:a,readOnCreate:!1,...n}}]}
e.fetchNewslettersAndAccessGraphQL=function(){let{companyOwner:e,count:t=10,start:i=0,adapterOptions:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const l={count:t,start:i}
e&&(l.companyOwner=`urn:li:fsd_company:${(0,r.extractUrnParts)(e)[1]}`)
return[a.default,{...l},{adapterOptions:{...n}}]}
e.findNewsletterByUrnGraphQL=function(e){let{entityUrn:t,adapterOptions:i={}}=e
const n=`urn:li:fsd_contentSeries:${(0,r.extractUrnParts)(t)[1]}`
return[l.default,{contentSeriesId:n},{adapterOptions:{...i}}]}
e.findNewsletterRecord=function(){let{entityUrn:e,pemAdapterOptions:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const n=`urn:li:fsd_contentSeries:${(0,r.extractUrnParts)(e)[1]}`,l=`/${i.default.namespace}/voyagerPublishingDashContentSeries/${n}`,a="com.linkedin.voyager.dash.deco.publishing.ContentSeries",s={recipe:"com.linkedin.voyager.dash.deco.publishing.ContentSeries"}
return[a,e,{adapterOptions:{url:l,params:s,...t},backgroundReload:!1}]}
e.getNewsletterBySlug=function(){let{newsletterId:e,isDashEnabled:t=!0,pemAdapterOptions:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const r={q:"slug",slug:e}
let l=`/${i.default.namespace}/publishing/contentSeries`
if(t){l=`/${i.default.namespace}/voyagerPublishingDashContentSeries`
r.recipe="com.linkedin.voyager.dash.deco.publishing.ContentSeries"}return[l,{params:r,reload:!0,adapterOptions:{...n}}]}
e.getNewsletterBySlugGraphQL=function(){let{slug:e,adapterOptions:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
return[s.default,{slug:e},{adapterOptions:{...t}}]}
e.getOrganizationDataGraphQL=function(e,t,i,n){const r=(0,p.fromUrn)(e),l=(0,c.buildFullUrl)(c.urlsMap.OrganizationDashCompaniesResource,r)
return i.executeQuery(d.default,{companyUrns:[e]},{adapterOptions:{failures:[new u.default("get-page-author","failed",{productName:n})],degradedEntityIDsToRemove:[r],url:l}}).catch((e=>{t.logError(new Error(`Network request while attempting to fetch organization ${r}`),"publishing-page-admin",!1)
throw e}))}
e.newsletterSubscribersRequest=function(e){let{contentSeriesUrn:t,paging:n={},reload:l=!1}=e
const{start:a=0,count:s=10}=n,o={q:"contentSeries",start:a,count:s,recipe:"com.linkedin.voyager.dash.deco.publishing.SeriesSubscriberMiniProfile"}
o.seriesUrn=`urn:li:fsd_contentSeries:${(0,r.extractUrnParts)(t)[1]}`
const u=`/${i.default.namespace}/voyagerPublishingDashSeriesSubscribers`
return[u,{cacheKey:`publishing/voyagerPublishingDashSeriesSubscribers|subscribers|${a}|${s}|${t}`,params:o,reload:l}]}
e.newsletterSubscribersRequestGraphQL=function(e){let{urn:t,start:i=0,count:n=10}=e
let l=t;(0,r.isDashUrn)(t)||(l=`urn:li:fsd_contentSeries:${(0,r.extractUrnParts)(t)[1]}`)
return[o.default,{seriesUrn:l,start:i,count:n}]}
e.saveArticle=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
const{entityUrn:t="",state:n,transformPayload:l,pemProductName:a}=e,s=(0,r.extractUrnParts)(t)[1],o={degradedEntityIDsToRemove:[s]}
o.failures="AUTOSAVED"===n||"AUTOSAVED_OF_PUBLISHED"===n?[new u.default("autosave-article","failed",{productName:a})]:[new u.default("publish-article","failed",{productName:a})]
const c=`/${i.default.namespace}/voyagerPublishingDashFirstPartyArticles/${t}`,d={url:c,partial:!0,readOnCreate:!1,...o}
l&&(d.transformPayload=l)
return[{adapterOptions:d}]}
e.updateNewsletterSubscription=function(e){let{isSubscribed:t,urn:l}=e
const a=(0,r.extractUrnParts)(l)[1],s=t?{subscribeActionUrn:l}:{contentSeriesUrn:a},o=(0,n.addQueryParam)(`/${i.default.namespace}/voyagerPublishingDashSeriesSubscribers`,"action",t?"unsubscribe":"subscribeSeries")
return[o,"POST",{data:s}]}
e.updateStoreOnSubscribeAction=function(e,t,i,n){const r=t.split(":").at(-1),l="com.linkedin.voyager.dash.publishing.SubscribeAction",a=`urn:li:fsd_subscribeAction:urn:li:fsd_contentSeries:${r}`
e.peekRecord(l,a)&&e.push({data:{id:a,type:l,attributes:{subscribed:i,subscriberCount:n}}})
const s="com.linkedin.voyager.feed.render.SubscribeAction",o=`urn:li:fs_subscribeAction:urn:li:contentSeries:${r}`
e.peekRecord(s,o)&&e.push({data:{id:o,type:s,attributes:{subscribed:i,subscriberCount:n}}})}}))
define("publishing-shared/utils/file-upload",["exports","@ember/debug","rsvp","global-utils/utils/is-browser","ember-test-waiters"],(function(e,t,i,n,r){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.getBlobFromFile=function(e){if(n.default)return(0,r.waitForPromise)(new i.Promise(((t,i)=>{const n=new window.FileReader
n.onload=()=>{const r=new window.Image,l=n.result
r.onload=i=>{t({dataUrl:l,size:e.size,name:e.name,type:e.type,width:i.target.naturalWidth,height:i.target.naturalHeight})}
r.onerror=e=>{i(e)}
r.src=l}
n.onerror=e=>i(e)
try{n.readAsDataURL(e)}catch(e){i(e)}})),"publishing-shared-file-onload-waiter")
return(0,i.resolve)()}
e.validImageDimensions=function(e,t){return e&&t&&e<=7680&&t<=4320}
e.validImageSize=function(e,t){if(t&&"image/gif"===t)return e&&e<5242880
return e&&e<=209715200}
e.validImageType=function(e){return e&&e.match("image.*")&&l.indexOf(e.split("/")[1])>-1}
const l=["png","jpg","jpeg","gif","webp"]}))
define("publishing-shared/utils/get-cadence",["exports","@ember/debug","@ember/object"],(function(e,t,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.UNIT_CADENCE_MAP=void 0
e.default=function(e){if(!e)return
const t=(0,i.get)(e,"duration"),r=(0,i.get)(e,"unit")
if("MONTH"===r&&2===t)return"TWICE_MONTH"
return n[r]}
const n=e.UNIT_CADENCE_MAP={DAY:"DAILY",WEEK:"WEEKLY",MONTH:"MONTHLY"}}))
define("publishing-shared/utils/get-timespan",["exports","publishing-shared/constants/series"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=function(e){let i,n
switch(e){case t.SERIES_CADENCE.DAILY:i=1
n=t.TIME_SPAN_UNIT.DAY
break
case t.SERIES_CADENCE.WEEKLY:i=1
n=t.TIME_SPAN_UNIT.WEEK
break
case t.SERIES_CADENCE.TWICE_MONTH:i=2
n=t.TIME_SPAN_UNIT.MONTH
break
default:i=1
n=t.TIME_SPAN_UNIT.MONTH}return{duration:i,unit:n}}}))
define("publishing-shared/utils/newsletter-subscribe",["exports","publishing-shared/utils/data-request","@ember/object","global-utils/utils/get-attributed-link"],(function(e,t,i,n){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=function(e,r,l,a,s,o,u,c){let d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"subscribe-newsletter-via-newsletter-entity-header"
const p=l.adapterFor("-ember-m3"),m=(0,i.get)(e,"subscribeAction.dashEntityUrn")||(0,i.get)(e,"subscribeAction.entityUrn"),b=r?"unsubscribe":"subscribe"
return p.ajax(...(0,t.updateNewsletterSubscription)({isSubscribed:r,urn:m})).catch((e=>{a.logError(new Error(`Network request failed while attempting to ${b} to the newsletter with urn ${m}`),`publishing-${b}-to-newsletter`,!1)
null==c||c.endInteractionWithError({userInteraction:d,userJourney:"subscribe-to-newsletter",groupName:"publishing-reliability"})
throw e})).then((a=>{var p
if(!o){null==u||u()
const n=!r,a=n?(0,i.get)(e,"subscribeAction.subscriberCount")+1:(0,i.get)(e,"subscribeAction.subscriberCount")-1;(0,i.setProperties)(e,{"subscribeAction.subscribed":n,"subscribeAction.subscriberCount":a});(0,t.updateStoreOnSubscribeAction)(l,m,n,a)}null==c||c.endInteraction({userInteraction:d,userJourney:"subscribe-to-newsletter",groupName:"publishing-reliability"})
const b=(0,n.default)(null==a||null===(p=a.data)||void 0===p?void 0:p.value)
s.success((0,i.get)(e,"subscribeAction.subscribed"),null==b?void 0:b.message,null==b?void 0:b.ctaText,null==b?void 0:b.ctaUrl)})).catch((e=>{null==c||c.endInteractionWithError({userInteraction:d,userJourney:"subscribe-to-newsletter",groupName:"publishing-reliability"})
s.error()
throw e}))}}))
define("publishing-shared/utils/pem",["exports","@linkedin/ember-pem/utils/failure-tracking-metadata"],(function(e,t){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.FAILURE_TRACKING_METADATA=void 0
e.getFailureTrackingMetadata=i
function i(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"failure",{productName:n=""}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
return new t.default(e,i,{productName:n})}e.FAILURE_TRACKING_METADATA=Object.freeze({CREATE_SERIES_MODEL:i("create-series-model","failure",{productName:"Voyager - Article Creator"}),DELETE_ARTICLE:i("delete-article","failure",{productName:"Voyager - Article Creator"}),DELETE_CONTENT_SERIES:i("delete-content-series","failure",{productName:"Voyager - Article Creator"}),NEWSLETTER_ENTITY_DELETE_CONTENT_SERIES:i("delete-content-series","failure",{productName:"Voyager - Newsletter Entity"}),EDIT_SERIES:i("edit-series","failure",{productName:"Voyager - Article Creator"}),FETCH_ARTICLE:i("fetch-article","failure",{productName:"Voyager - Article Creator"}),FETCH_DRAFT_ARTICLES:i("fetch-draft-articles","failure",{productName:"Voyager - Article Creator"}),FETCH_NEWSLETTER:i("fetch-newsletter","failure",{productName:"Voyager - Article Creator"}),FETCH_PUBLISHED_ARTICLES:i("fetch-published-articles","failure",{productName:"Voyager - Article Creator"}),FETCH_SERIES_ARTICLES:i("fetch-series-articles","failure",{productName:"Voyager - Article Creator"}),FIND_SERIES:i("find-series","failure",{productName:"Voyager - Article Creator"}),GET_ENCRYPTED_ID:i("get-encrypted-id","failure",{productName:"Voyager - Article Creator"}),GET_PAGE_AUTHOR:i("get-page-author","failure",{productName:"Voyager - Article Creator"}),PUBLISH_ARTICLE:i("publish-article","failure",{productName:"Voyager - Article Creator"}),PUBLISH_NEW_ARTICLE_REQUEST:i("publish-new-article-request","failure",{productName:"Voyager - Article Creator"})})}))
define("publishing-shared/utils/preview-builder",["exports","rsvp","detour-framework/utils/detour-manager","global-utils/utils/url","global-utils/utils/image-utils","global-utils/utils/get-asset-url-for-environment","ember-vector-images/utils/vector-url","global-utils/utils/is-browser","detour-framework/utils/detour-constants","detour-framework/utils/detour-preview-data","detour-framework/utils/detour-status-data","detour-framework/utils/dash-detour-preview-data"],(function(e,t,i,n,r,l,a,s,o,u,c,d){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=function(e,n,r,l){if(!e)return null
const a=n.buildModel("com.linkedin.voyager.dash.feed.component.article.ArticleComponent",{type:"FIRST_PARTY",articleUrn:e.linkedInArticleUrn,largeImage:m(e,n,l),navigationContext:n.buildModel("com.linkedin.voyager.dash.feed.navigation.FeedNavigationContext",{actionTarget:"#",accessibilityText:""}),title:n.buildModel("com.linkedin.voyager.dash.common.text.TextViewModel",{text:e.title})}),s=n.buildModel("com.linkedin.voyager.dash.feed.component.FeedComponent",{articleComponent:a}),p=new i.default({detourStatusData:new c.default({detourState:o.DETOUR_STATES.SUCCEEDED}),detourPreviewData:new u.default({previewComponent:a,previewState:o.DETOUR_PREVIEW_STATES.SUCCEEDED}),dashDetourPreviewData:new d.default({previewComponent:s,previewState:o.DETOUR_PREVIEW_STATES.SUCCEEDED}),detourType:o.DETOUR_TYPES.PUBLISHING_ARTICLE})
p.getShareMedia=()=>{r.startInteraction({userInteraction:"article_editor_publish_article_start",userJourney:"publish-article",groupName:"publishing-reliability"})
return t.Promise.resolve([n.buildModel("com.linkedin.voyager.contentcreation.ShareMedia",{mediaUrn:e.linkedInArticleUrn})])}
p.getDashShareMedia=()=>{r.startInteraction({userInteraction:"article_editor_publish_article_start",userJourney:"publish-article",groupName:"publishing-reliability"})
return t.Promise.resolve([{mediaUrn:e.linkedInArticleUrn,category:"URN_REFERENCE"}])}
return p}
function p(e,t){if(s.default){if(e.coverMedia){var i,o,u,c,d,p,m,b,g,h
const l=t?null===(i=e.coverMedia)||void 0===i||null===(o=i.originalImage)||void 0===o||null===(u=o.attributes)||void 0===u||null===(c=u[0])||void 0===c||null===(d=c.detailData)||void 0===d?void 0:d.vectorImage:null===(p=e.coverMedia)||void 0===p||null===(m=p.originalImage)||void 0===m||null===(b=m.attributes)||void 0===b||null===(g=b[0])||void 0===g||null===(h=g.detailDataUnion)||void 0===h?void 0:h.vectorImage,s=(0,a.default)(l,1e4,1e4)
if(s)return s
const f=document.querySelector(".article-editor-cover-image__image")
if(f&&((0,n.isUrl)(f.src)||(0,r.isDataURI)(f.src)))return f.src}const l=document.querySelector(".article-editor-content__inline-image")
if(l&&((0,n.isUrl)(l.src)||(0,r.isDataURI)(l.src)))return l.src}return(0,l.default)("assets/img/publishing/default_cover_media.png")}function m(e,t,i){return t.buildModel("com.linkedin.voyager.dash.common.image.ImageViewModel",{attributes:[t.buildModel("com.linkedin.voyager.dash.common.image.ImageAttribute",{detailDataUnion:{imageUrl:t.buildModel("com.linkedin.voyager.dash.common.ImageUrl",{url:p(e,i)})}})]})}}))
define("publishing-shared/utils/utils",["exports","@ember/debug","publishing-shared/utils/constants","lego/utils/lego-page-content","@ember/object"],(function(e,t,i,n,r){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.getNewsletterBannerLegoData=l
e.isValidVoyagerUserVisibleException=function(e){const t="com.linkedin.voyager.common.VoyagerUserVisibleException"===(0,r.get)(e,"errors.0.exceptionClass"),i=(0,r.get)(e,"errors.0.message")
return Boolean(t&&i)}
e.shouldShowNewsletterBanner=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]
const r=l(t,n)
return Boolean(e&&0===i&&r&&r.trackingToken)}
function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]
const{SLOT_ID:r,GROUP_ID:l,WIDGET:a}=i.PUBLISHING_LEGO_CONFIGS
return t?(0,n.getWidgetFromDataGraphQL)(e,r,l,a.NEWSLETTER_ACCESS_BANNER):(0,n.getWidgetFromData)(e,r,l,a.NEWSLETTER_ACCESS_BANNER)}}))
define("publishing-shared/utils/visibility-options",["exports","@ember/debug","publishing-shared/components/-private/i18n-strings"],(function(e,t,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.getVisibilityOptions=function(e,t){let{isCompanyAuthor:n=!1,newsletterEntityUrn:r="",newsletterTitle:l=""}=t
if(r)return{type:"CONTAINER",containerEntity:r,name:e.lookupTranslation(i.default,"i18n_publish_visibility_name_newsletter")(),subText:e.lookupTranslation(i.default,"i18n_publish_visibility_subtext")([{seriesName:l}]),iconType:"people"}
if(n)return null
return{type:"ANYONE"}}}))
define("publishing-tracking/constants/tracking",["exports"],(function(e){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.QUILL_EVENTS_MAP=e.PUBLISH_EVENT_NAME=e.PUBLISHING_WORKFLOW=e.PUBLISHING_TRACKABLE_OBJECT=e.EMBED_TYPES=e.EMBED_PROVIDER_MAP=e.EMBED_ACTION_EVENT_NAME=e.EMBED_ACTIONS=e.EDIT_EVENT_NAME=e.DEFAULT_URN=e.DEFAULT_MEDIA_URN=e.CONTROL_URNS=e.ACTION_EVENT_NAME=void 0
e.ACTION_EVENT_NAME="PublishingActionEvent",e.EDIT_EVENT_NAME="PublishingEditEvent",e.PUBLISH_EVENT_NAME="PublishingPublishEvent",e.EMBED_ACTION_EVENT_NAME="PublishingEmbedActionEvent"
const t=e.CONTROL_URNS={EMBED_TOOLBAR_TOGGLE:"embed_toolbar_toggle",SERIES_MODAL_DONE:"series_modal_done"}
e.PUBLISHING_TRACKABLE_OBJECT="publishingTrackableObject",e.PUBLISHING_WORKFLOW="publishingWorkFlow",e.DEFAULT_URN="urn:li:linkedInArticleUrn:-9",e.DEFAULT_MEDIA_URN="urn:li:digitalmediaAsset:-9",e.EMBED_PROVIDER_MAP={video:["YouTube","Vimeo"],image:null,slides:["SlideShare","Prezi"],universal:["Twitter","Instagram"]},e.EMBED_TYPES={IMAGE:"IMAGE",VIDEO:"VIDEO",LINK:"LINK",SLIDESHOW:"SLIDESHOW",UNKNOWN:"UNKNOWN"},e.EMBED_ACTIONS={ADD:"ADD"},e.QUILL_EVENTS_MAP=[{eventName:"slate-embed-toolbar-open",controlUrn:t.EMBED_TOOLBAR_TOGGLE},{eventName:"slate-embed-toolbar-close",controlUrn:t.EMBED_TOOLBAR_TOGGLE},{eventName:"slate-image-embed-uploading",controlUrn:"upload_from_computer"},{eventName:"slate-resizable-image-embed-changed",evaluation:(e,t)=>({controlUrn:t.buttonClass.replace(/-/g,"_")})},{eventName:"slate-embed-toolbar-clicked",evaluation(e){switch(e){case"image":return{controlUrn:"embed_toolbar_image"}
case"video":return{controlUrn:"embed_toolbar_video"}
case"slides":return{controlUrn:"embed_toolbar_slides"}
case"code":return{controlUrn:"embed_toolbar_code"}
case"universal":return{controlUrn:"embed_toolbar_links"}
default:return{}}}}]}))
define("publishing-tracking/services/publishing-workflow",["exports","@babel/runtime/helpers/esm/initializerDefineProperty","@babel/runtime/helpers/esm/defineProperty","@babel/runtime/helpers/esm/applyDecoratedDescriptor","@babel/runtime/helpers/esm/initializerWarningHelper","@ember/service","@glimmer/tracking","ember-cli-pemberly-tracking/utils/tracking"],(function(e,t,i,n,r,l,a,s){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.default=void 0
var o,u
e.default=(o=class extends l.default{constructor(){super(...arguments);(0,t.default)(this,"trackingId",u,this)}setPublishingWorkFlow(){this.trackingId=(0,s.generateTrackingId)()}},u=(0,n.default)(o.prototype,"trackingId",[a.tracked],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),o)}))
define("publishing-tracking/template-registry",[],(function(){}))
define("publishing-tracking/utils/fire-event",["exports","ember-cli-pemberly-tracking/utils/tracking","publishing-tracking/constants/tracking"],(function(e,t,i){"use strict"
Object.defineProperty(e,"__esModule",{value:!0})
e.firePublishingTrackingEvent=function(e,r){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.DEFAULT_URN,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(0,t.generateTrackingId)(),s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[]
const o={[i.PUBLISHING_TRACKABLE_OBJECT]:{objectUrn:l,trackingId:a},[i.PUBLISHING_WORKFLOW]:a}
Object.keys(s).forEach((function(t){let i=s[t]
t===n&&(i=e.generateControlUrn(i))
o[t]=i}))
e.fireTrackingPayload(r,o)}
const n="controlUrn"}))
//# sourceMappingURL=engine-vendor.map