ghost 6.0.10 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/tryghost-i18n-6.1.0.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +1 -1
- package/core/built/admin/assets/admin-x-activitypub/{index-wBqnq7A5.mjs → index-DmCoswaX.mjs} +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-XhNX0QuF.mjs → index-lT95Q15h.mjs} +8212 -8183
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-BDBDWpWl.mjs → CodeEditorView-Bu9qXr9c.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{index-BB7hgOf0.mjs → index-BEpRBH9g.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-DsbJfrQ7.mjs → index-qEdfz2hd.mjs} +94 -94
- package/core/built/admin/assets/admin-x-settings/{modals-CCpr5VWU.mjs → modals-BtQORnS4.mjs} +6 -6
- package/core/built/admin/assets/{chunk.524.695215c994f8cbf547d3.js → chunk.524.2aa0847042f20c9a2a00.js} +7 -7
- package/core/built/admin/assets/{chunk.582.a949b80543caba37906c.js → chunk.582.9182c19afab95991771e.js} +8 -8
- package/core/built/admin/assets/ghost-791574a9e2efe65c88412947d2e80170.css +1 -0
- package/core/built/admin/assets/{ghost-9c608430440a10746540adb7d2cd0f31.js → ghost-9c47d152972b304cab0fb982dc3fccc1.js} +38 -34
- package/core/built/admin/assets/ghost-dark-1a7d101d525c0fdcf406ac0abd98540f.css +1 -0
- package/core/built/admin/assets/posts/posts.js +27345 -27315
- package/core/built/admin/assets/stats/stats.js +28699 -28672
- package/core/built/admin/index.html +4 -4
- package/core/frontend/public/member-attribution.min.js +1 -1
- package/core/server/api/endpoints/search-index.js +2 -2
- package/core/server/api/endpoints/stats.js +10 -4
- package/core/server/data/migrations/versions/6.1/2025-09-11-00-38-13-add-uuid-column-to-tokens.js +8 -0
- package/core/server/data/migrations/versions/6.1/2025-09-11-00-39-08-backfill-tokens-uuid.js +19 -0
- package/core/server/data/migrations/versions/6.1/2025-09-11-00-39-36-tokens-drop-nullable-uuid.js +4 -0
- package/core/server/data/schema/schema.js +1 -0
- package/core/server/data/tinybird/datasources/_mv_hits.datasource +7 -4
- package/core/server/data/tinybird/endpoints/api_top_utm_campaigns.pipe +2 -8
- package/core/server/data/tinybird/endpoints/api_top_utm_contents.pipe +2 -8
- package/core/server/data/tinybird/endpoints/api_top_utm_mediums.pipe +2 -8
- package/core/server/data/tinybird/endpoints/api_top_utm_sources.pipe +2 -8
- package/core/server/data/tinybird/endpoints/api_top_utm_terms.pipe +2 -8
- package/core/server/data/tinybird/fixtures/analytics_events.ndjson +11 -11
- package/core/server/data/tinybird/pipes/mv_hits.pipe +12 -2
- package/core/server/data/tinybird/pipes/mv_session_data.pipe +16 -6
- package/core/server/data/tinybird/tests/api_top_utm_campaigns.yaml +35 -34
- package/core/server/data/tinybird/tests/api_top_utm_contents.yaml +57 -48
- package/core/server/data/tinybird/tests/api_top_utm_mediums.yaml +40 -38
- package/core/server/data/tinybird/tests/api_top_utm_sources.yaml +59 -39
- package/core/server/data/tinybird/tests/api_top_utm_terms.yaml +55 -48
- package/core/server/models/single-use-token.js +1 -0
- package/core/server/services/email-service/EmailRenderer.js +1 -0
- package/core/server/services/email-service/email-templates/template.hbs +6 -0
- package/core/server/services/members/emails/signin.js +4 -4
- package/core/server/services/stats/MrrStatsService.js +10 -5
- package/core/server/services/stats/StatsService.js +2 -2
- package/package.json +6 -6
- package/tsconfig.tsbuildinfo +1 -1
- package/yarn.lock +1002 -419
- package/components/tryghost-i18n-6.0.10.tgz +0 -0
- package/core/built/admin/assets/ghost-a7a53bf80dc45c37ae9c174a0d02a882.css +0 -1
- package/core/built/admin/assets/ghost-dark-6e0062029f988d8676e87f22d8e7f4a3.css +0 -1
|
@@ -691,14 +691,14 @@ e.default=Ember._setComponentTemplate(a,s)}),define("ghost-admin/components/gh-b
|
|
|
691
691
|
function P(e,t,i,r){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(r):void 0})}function _(e,t,i,r,n){var a={}
|
|
692
692
|
return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce(function(i,r){return r(e,t,i)||i},a),n&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(n):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(e,t,a),null):a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
693
693
|
const O=Ember.HTMLBars.template({id:"ErYely0X",block:'{"symbols":["&attrs"],"statements":[[11,"iframe"],[24,1,"billing-frame"],[24,0,"billing-frame"],[24,"frameborder","0"],[24,"title","Billing"],[24,"allow","clipboard-write"],[17,1],[4,[38,0],[[32,0,["setup"]]],null],[12],[13]],"hasEval":false,"upvars":["did-insert"]}',moduleName:"ghost-admin/components/gh-billing-iframe.hbs"})
|
|
694
|
-
let j=e.default=(r=Ember.inject.service,n=Ember.inject.service,a=Ember.inject.service,s=Ember.inject.service,o=Ember.inject.service,l=Ember.inject.service,u=Ember.inject.service,d=Ember._tracked,c=Ember._action,p=Ember._action,m=class extends t.default{constructor(...e){super(...e),P(this,"ajax",h,this),P(this,"billing",b,this),P(this,"configManager",f,this),P(this,"ghostPaths",g,this),P(this,"limit",v,this),P(this,"notifications",y,this),P(this,"session",w,this),P(this,"config",E,this),P(this,"isOwner",k,this)}willDestroy(){super.willDestroy(...arguments),window.removeEventListener("message",this.handleIframeMessage)}setup(){this.billing.getBillingIframe().src=this.billing.getIframeURL(),window.addEventListener("message",this.handleIframeMessage)}async handleIframeMessage(e){this.isDestroyed||this.isDestroying||e?.data&&this.billing.getIframeURL().includes(e?.origin)&&("token"===e.data?.request&&this._handleTokenRequest(),"forceUpgradeInfo"===e.data?.request&&this._handleForceUpgradeRequest(),e.data?.subscription&&this._handleSubscriptionUpdate(e.data))}_handleTokenRequest(){const e=()=>{this.isOwner=!1,this.billing.getBillingIframe().contentWindow.postMessage({request:"token",response:null},"*")}
|
|
694
|
+
let j=e.default=(r=Ember.inject.service,n=Ember.inject.service,a=Ember.inject.service,s=Ember.inject.service,o=Ember.inject.service,l=Ember.inject.service,u=Ember.inject.service,d=Ember._tracked,c=Ember._action,p=Ember._action,m=class extends t.default{constructor(...e){super(...e),P(this,"ajax",h,this),P(this,"billing",b,this),P(this,"configManager",f,this),P(this,"ghostPaths",g,this),P(this,"limit",v,this),P(this,"notifications",y,this),P(this,"session",w,this),P(this,"config",E,this),P(this,"isOwner",k,this)}willDestroy(){super.willDestroy(...arguments),window.removeEventListener("message",this.handleIframeMessage)}setup(){this.billing.getBillingIframe().src=this.billing.getIframeURL(),window.addEventListener("message",this.handleIframeMessage)}async handleIframeMessage(e){this.isDestroyed||this.isDestroying||e?.data&&this.billing.getIframeURL().includes(e?.origin)&&("token"===e.data?.request&&this._handleTokenRequest(),"forceUpgradeInfo"===e.data?.request&&this._handleForceUpgradeRequest(),e.data?.subscription&&await this._handleSubscriptionUpdate(e.data))}_handleTokenRequest(){const e=()=>{this.isOwner=!1,this.billing.getBillingIframe().contentWindow.postMessage({request:"token",response:null},"*")}
|
|
695
695
|
if(!this.session.user?.isOwnerOnly)return void e()
|
|
696
696
|
const t=this.ghostPaths.url.api("identities")
|
|
697
697
|
this.ajax.request(t).then(e=>{const t=e?.identities?.[0]?.token
|
|
698
698
|
this.billing.getBillingIframe().contentWindow.postMessage({request:"token",response:t},"*"),this.isOwner=!0}).catch(t=>{if("NoPermissionError"!==t.payload?.errors?.[0]?.type)throw t
|
|
699
699
|
e()})}_handleForceUpgradeRequest(){let e=null
|
|
700
700
|
const t=this.billing.ownerUser
|
|
701
|
-
t&&(e={name:t?.name,email:t?.email}),this.billing.getBillingIframe().contentWindow.postMessage({request:"forceUpgradeInfo",response:{forceUpgrade:this.config.hostSettings?.forceUpgrade,isOwner:this.isOwner,ownerUser:e}},"*")}async _handleSubscriptionUpdate(e){try{await this.configManager.fetch()}catch(t){}if(this.limit.reload(),window?.adminXQueryClient?.invalidateQueries&&"function"==typeof window.adminXQueryClient.invalidateQueries)try{window.adminXQueryClient.
|
|
701
|
+
t&&(e={name:t?.name,email:t?.email}),this.billing.getBillingIframe().contentWindow.postMessage({request:"forceUpgradeInfo",response:{forceUpgrade:this.config.hostSettings?.forceUpgrade,isOwner:this.isOwner,ownerUser:e}},"*")}async _handleSubscriptionUpdate(e){try{await this.configManager.fetch()}catch(t){}if(this.limit.reload(),window?.adminXQueryClient?.invalidateQueries&&"function"==typeof window.adminXQueryClient.invalidateQueries)try{window.adminXQueryClient.refetchQueries({queryKey:["ConfigResponseType"]}).catch(()=>{}),window.adminXQueryClient.refetchQueries({queryKey:["SettingsResponseType"]}).catch(()=>{})}catch(i){window.adminXQueryClient.refetchQueries(["ConfigResponseType"]).catch(()=>{}),window.adminXQueryClient.refetchQueries(["SettingsResponseType"]).catch(()=>{})}if(this.billing.subscription=e.subscription,this.billing.checkoutRoute=e?.checkoutRoute??"/plans","active"===e.subscription.status&&this.config.hostSettings?.forceUpgrade&&(this.config.hostSettings.forceUpgrade=!1),"past_due"===e.subscription.status||"unpaid"===e.subscription.status?this.notifications.showAlert("Billing error: This site is queued for suspension. The owner of this site must update payment information.",{type:"error",key:"billing.overdue"}):this.notifications.closeAlerts("billing.overdue"),e?.exceededLimits&&e?.exceededLimits.length&&e?.exceededLimits.indexOf("members")>=0&&e?.checkoutRoute){const e=this.billing.billingRouteRoot+"?action=checkout"
|
|
702
702
|
this.notifications.showAlert(Ember.String.htmlSafe(`Your audience has grown! To continue publishing, the site owner must confirm pricing for this number of members <a href="${e}">here</a>`),{type:"warn",key:"billing.exceeded"})}else this.notifications.closeAlerts("billing.exceeded")}},h=_(m.prototype,"ajax",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),b=_(m.prototype,"billing",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f=_(m.prototype,"configManager",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),g=_(m.prototype,"ghostPaths",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v=_(m.prototype,"limit",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),y=_(m.prototype,"notifications",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=_(m.prototype,"session",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),E=_(m.prototype,"config",[i.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k=_(m.prototype,"isOwner",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),_(m.prototype,"setup",[c],Object.getOwnPropertyDescriptor(m.prototype,"setup"),m.prototype),_(m.prototype,"handleIframeMessage",[p],Object.getOwnPropertyDescriptor(m.prototype,"handleIframeMessage"),m.prototype),m)
|
|
703
703
|
Ember._setComponentTemplate(O,j)}),define("ghost-admin/components/gh-billing-modal",["exports"],function(e){var t,i,r,n
|
|
704
704
|
function a(e,t,i,r,n){var a={}
|
|
@@ -1381,7 +1381,7 @@ n(this.didEnterViewport.bind(this)),a(this.didExitViewport.bind(this)),this.args
|
|
|
1381
1381
|
Ember._setComponentTemplate(u,d)}),define("ghost-admin/components/gh-search-input",["exports","@glimmer/component"],function(e,t){var i,r,n,a,s,o,l
|
|
1382
1382
|
function u(e,t,i,r){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(r):void 0})}function d(e,t,i,r,n){var a={}
|
|
1383
1383
|
return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce(function(i,r){return r(e,t,i)||i},a),n&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(n):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(e,t,a),null):a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
1384
|
-
const c=Ember.HTMLBars.template({id:"
|
|
1384
|
+
const c=Ember.HTMLBars.template({id:"P9iifeDx",block:'{"symbols":["name","select","&attrs"],"statements":[[11,"div"],[17,3],[12],[2,"\\n "],[10,"div"],[14,0,"ember-power-select-search"],[12],[2,"\\n "],[8,"power-select",[],[["@search","@onChange","@onClose","@placeholder","@searchEnabled","@triggerComponent","@renderInPlace","@loadingMessage","@extra"],[[30,[36,3],[[32,0,["search","searchTask"]]],null],[32,0,["openSelected"]],[32,0,["onClose"]],"Search site",false,[30,[36,4],["gh-input-with-select/trigger"],null],true,"Loading",[30,[36,5],null,[["autofocus","inputType","inputIcon","inputIconClass"],[true,"search","search","gh-nav-search-icon"]]]]],[["default"],[{"statements":[[2,"\\n "],[10,"div"],[14,0,"gh-nav-search-option"],[12],[2,"\\n "],[10,"div"],[12],[1,[30,[36,6],[[32,1,["title"]],[32,2,["searchText"]]],null]],[13],[2,"\\n"],[6,[37,1],[[30,[36,7],[[30,[36,0],[[32,1,["status"]],"draft"],null],[30,[36,0],[[32,1,["status"]],"scheduled"],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"div"],[15,0,[31,["gh-nav-search-label ",[30,[36,1],[[30,[36,0],[[32,1,["status"]],"draft"],null],"draft"],null]," ",[30,[36,1],[[30,[36,0],[[32,1,["status"]],"scheduled"],null],"scheduled"],null]]]],[12],[1,[30,[36,2],[[32,1,["status"]]],null]],[13],[2,"\\n"]],"parameters":[]}]]],[2," "],[13],[2,"\\n "]],"parameters":[1,2]}]]],[2,"\\n "],[13],[2,"\\n"],[13]],"hasEval":false,"upvars":["eq","if","capitalize","perform","component","hash","highlighted-text","or"]}',moduleName:"ghost-admin/components/gh-search-input.hbs"})
|
|
1385
1385
|
let p=e.default=(i=Ember.inject.service,r=Ember.inject.service,n=Ember._action,a=Ember._action,s=class extends t.default{constructor(...e){super(...e),u(this,"router",o,this),u(this,"search",l,this)}openSelected(e){if(e){if(this.args.onSelected?.(e),"Posts"===e.groupName){let t=e.id.replace("post.","")
|
|
1386
1386
|
this.router.transitionTo("lexical-editor.edit","post",t)}if("Pages"===e.groupName){let t=e.id.replace("page.","")
|
|
1387
1387
|
this.router.transitionTo("lexical-editor.edit","page",t)}if("Staff"===e.groupName){let t=e.id.replace("user.","")
|
|
@@ -4158,7 +4158,7 @@ try{return JSON.parse(e)||{}}catch(t){return{}}}get accessibility(){let e=this.g
|
|
|
4158
4158
|
try{return JSON.parse(e)||{}}catch(t){return{}}}fetch(){return this.settings.fetch().then(()=>(this.set("_user",this.session.user),this._setAdminTheme().then(()=>!0)))}update(e,t,i={}){let r=i.user?"accessibility":"labs",n=this.get(i.user?"_user":"settings"),a=this.get(r)
|
|
4159
4159
|
return Ember.set(a,e,t),i.requires&&!0===t&&i.requires.forEach(e=>{Ember.set(a,e,!0)}),n.set(r,JSON.stringify(a)),n.save().then(()=>(this.notifyPropertyChange(r),this.get(`${r}.${e}`))).catch(t=>{if(n.rollbackAttributes(),this.notifyPropertyChange(r),!t)throw new Ember.Error(`Validation of the feature service ${i.user?"user":"settings"} model failed when updating ${r}.`)
|
|
4160
4160
|
return this.notifications.showAPIError(t),this.get(`${r}.${e}`)})}_setAdminTheme(e){let i=e
|
|
4161
|
-
return void 0===i&&(i=e||this.nightShift),document.documentElement.classList.toggle("dark",i??!1),this.lazyLoader.loadStyle("dark","assets/ghost-dark-
|
|
4161
|
+
return void 0===i&&(i=e||this.nightShift),document.documentElement.classList.toggle("dark",i??!1),this.lazyLoader.loadStyle("dark","assets/ghost-dark-1a7d101d525c0fdcf406ac0abd98540f.css",!0).then(()=>{(0,t.default)("link[title=dark]").prop("disabled",!i)}).catch(()=>{(0,t.default)("link[title=dark]").prop("disabled",!0),document.documentElement.classList.remove("dark")})}},z=Q(T.prototype,"lazyLoader",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),x=Q(T.prototype,"notifications",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),S=Q(T.prototype,"session",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=Q(T.prototype,"settings",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=Q(T.prototype,"store",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),D=Q(T.prototype,"config",[i.inject],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=Q(T.prototype,"emailAnalytics",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),I=Q(T.prototype,"nightShift",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),L=Q(T.prototype,"referralInviteDismissed",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=Q(T.prototype,"audienceFeedback",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R=Q(T.prototype,"webmentions",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),F=Q(T.prototype,"stripeAutomaticTax",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=Q(T.prototype,"emailCustomization",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),B=Q(T.prototype,"i18n",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H=Q(T.prototype,"announcementBar",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),V=Q(T.prototype,"importMemberTier",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q=Q(T.prototype,"lexicalIndicators",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$=Q(T.prototype,"editorExcerpt",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Y=Q(T.prototype,"contentVisibility",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),W=Q(T.prototype,"contentVisibilityAlpha",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G=Q(T.prototype,"membersSigninOTC",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),K=Q(T.prototype,"tagsX",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),J=Q(T.prototype,"utmTracking",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Q(T.prototype,"labs",[O],Object.getOwnPropertyDescriptor(T.prototype,"labs"),T.prototype),Q(T.prototype,"accessibility",[j],Object.getOwnPropertyDescriptor(T.prototype,"accessibility"),T.prototype),T)}),define("ghost-admin/services/frontend",["exports","fetch","validator","ghost-admin/decorators/inject"],function(e,t,i,r){var n,a,s,o,l,u
|
|
4162
4162
|
function d(e,t,i,r){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(r):void 0})}function c(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e
|
|
4163
4163
|
var i=e[Symbol.toPrimitive]
|
|
4164
4164
|
if(void 0!==i){var r=i.call(e,t||"default")
|
|
@@ -4424,38 +4424,38 @@ e.forEach(e=>{const t=n[e.id]
|
|
|
4424
4424
|
t&&(a[e.uuid]={free:t.free_members||0,paid:t.paid_members||0})}),this.memberCounts={...this.memberCounts,...a}}catch(t){e.forEach(e=>this._fetchedMemberIds.delete(e.id)),this.memberCounts=this.memberCounts||{}}}},u=g(l.prototype,"ajax",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),d=g(l.prototype,"ghostPaths",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),c=g(l.prototype,"feature",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),p=g(l.prototype,"settings",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),m=g(l.prototype,"visitorCounts",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),h=g(l.prototype,"memberCounts",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),g(l.prototype,"_loadVisitorCounts",[t.task],Object.getOwnPropertyDescriptor(l.prototype,"_loadVisitorCounts"),l.prototype),g(l.prototype,"_loadMemberCounts",[t.task],Object.getOwnPropertyDescriptor(l.prototype,"_loadMemberCounts"),l.prototype),l)}),define("ghost-admin/services/power-calendar",["exports","ember-power-calendar/services/power-calendar"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ghost-admin/services/resize-detector",["exports","element-resize-detector"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4425
4425
|
class i extends Ember.Service{constructor(){super(...arguments),this.detector=(0,t.default)({strategy:"scroll"})}setup(e,t){const i="string"==typeof e?document.querySelector(e):e
|
|
4426
4426
|
i||console.error(`service:resize-detector - could not find element matching ${e}`),this.detector.listenTo(i,t)}teardown(e,t){const i="string"==typeof e?document.querySelector(e):e
|
|
4427
|
-
i&&this.detector.removeListener(i,t)}}e.default=i}),define("ghost-admin/services/search-provider-basic",["exports","ember-inflector","ember-concurrency"],function(e,t,i){var
|
|
4428
|
-
function
|
|
4427
|
+
i&&this.detector.removeListener(i,t)}}e.default=i}),define("ghost-admin/services/search-provider-basic",["exports","ghost-admin/utils/search","ember-inflector","ember-concurrency"],function(e,t,i,r){var n,a,s,o,l,u,d
|
|
4428
|
+
function c(e,t,i,r){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(r):void 0})}function p(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e
|
|
4429
4429
|
var i=e[Symbol.toPrimitive]
|
|
4430
4430
|
if(void 0!==i){var r=i.call(e,t||"default")
|
|
4431
4431
|
if("object"!=typeof r)return r
|
|
4432
4432
|
throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string")
|
|
4433
|
-
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function
|
|
4434
|
-
return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce(function(i,r){return r(e,t,i)||i},a),n&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(n):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(e,t,a),null):a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
return
|
|
4438
|
-
|
|
4439
|
-
Ember.
|
|
4440
|
-
try{
|
|
4441
|
-
|
|
4442
|
-
i
|
|
4443
|
-
function p(e,t,i,r){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(r):void 0})}function m(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function h(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e
|
|
4433
|
+
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function m(e,t,i,r,n){var a={}
|
|
4434
|
+
return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce(function(i,r){return r(e,t,i)||i},a),n&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(n):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(e,t,a),null):a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4435
|
+
e.default=(n=Ember.inject.service,a=Ember.inject.service,s=Ember.inject.service,o=class extends Ember.Service{constructor(...e){super(...e),c(this,"ajax",l,this),c(this,"notifications",u,this),c(this,"ghostPaths",d,this),p(this,"content",[])}*searchTask(e){const i=e.toString().toLowerCase(),r=[]
|
|
4436
|
+
return t.SEARCHABLES.forEach(e=>{let n=this.content.filter(t=>{const r=t.title.toString().toLowerCase()
|
|
4437
|
+
return t.groupName===e.name&&r.indexOf(i)>=0})
|
|
4438
|
+
n=(0,t.sortSearchResultsByStatus)(n,e.model),Ember.isEmpty(n)||r.push({groupName:e.name,options:n})}),r}*refreshContentTask(){const e=[],i=t.SEARCHABLES.map(t=>this._loadSearchable(t,e))
|
|
4439
|
+
try{yield Ember.RSVP.all(i),this.content=e}catch(r){console.error(r)}}async _loadSearchable(e,r){const n=this.ghostPaths.url.api(`search-index/${(0,i.pluralize)(e.model)}`),a={}
|
|
4440
|
+
try{const s=(await this.ajax.request(n,{data:a}))[(0,i.pluralize)(e.model)].map(i=>(0,t.createSearchResult)(e,i))
|
|
4441
|
+
r.push(...s)}catch(s){console.error(s),this.notifications.showAPIError(s,{key:`search.load${e.name}.error`})}}},l=m(o.prototype,"ajax",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),u=m(o.prototype,"notifications",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),d=m(o.prototype,"ghostPaths",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),m(o.prototype,"searchTask",[r.task],Object.getOwnPropertyDescriptor(o.prototype,"searchTask"),o.prototype),m(o.prototype,"refreshContentTask",[r.task],Object.getOwnPropertyDescriptor(o.prototype,"refreshContentTask"),o.prototype),o)}),define("ghost-admin/services/search-provider-flex",["exports","flexsearch","ghost-admin/utils/search","ember-inflector","ember-concurrency"],function(e,t,i,r,n){var a,s,o,l,u,d,c,p
|
|
4442
|
+
function m(e,t,i,r){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(r):void 0})}function h(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function b(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e
|
|
4444
4443
|
var i=e[Symbol.toPrimitive]
|
|
4445
4444
|
if(void 0!==i){var r=i.call(e,t||"default")
|
|
4446
4445
|
if("object"!=typeof r)return r
|
|
4447
4446
|
throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string")
|
|
4448
|
-
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function
|
|
4449
|
-
return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce(function(i,r){return r(e,t,i)||i},a),n&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(n):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(e,t,a),null):a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=
|
|
4450
|
-
const{Document:
|
|
4451
|
-
e.default=(
|
|
4452
|
-
return
|
|
4453
|
-
|
|
4454
|
-
n.
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4447
|
+
return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function f(e,t,i,r,n){var a={}
|
|
4448
|
+
return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=i.slice().reverse().reduce(function(i,r){return r(e,t,i)||i},a),n&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(n):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(e,t,a),null):a}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4449
|
+
const{Document:g}=t.default
|
|
4450
|
+
e.default=(a=Ember.inject.service,s=Ember.inject.service,o=Ember.inject.service,p=new WeakSet,l=class extends Ember.Service{constructor(...e){super(...e),h(this,p),m(this,"ajax",u,this),m(this,"notifications",d,this),m(this,"ghostPaths",c,this),b(this,"indexes",i.SEARCHABLES.reduce((e,t)=>(e[t.model]=new g({tokenize:"forward",document:{id:"id",index:t.index,store:!0}}),e),{}))}*searchTask(e){const t=[]
|
|
4451
|
+
return i.SEARCHABLES.forEach(r=>{const n=this.indexes[r.model].search(e,{enrich:!0}),a=new Set
|
|
4452
|
+
let s=[]
|
|
4453
|
+
n.forEach(e=>{e.result.forEach(e=>{const{id:t,doc:n}=e
|
|
4454
|
+
a.has(t)||(a.add(t),s.push((0,i.createSearchResult)(r,n)))})}),s=(0,i.sortSearchResultsByStatus)(s,r.model),Ember.isEmpty(s)||t.push({groupName:r.name,options:s})}),t}*refreshContentTask(){try{const e=i.SEARCHABLES.map(e=>function(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i
|
|
4455
|
+
throw new TypeError("Private element is not present on this object")}(p,this,v).call(this,e))
|
|
4456
|
+
yield Ember.RSVP.all(e)}catch(e){console.error(e)}}},u=f(l.prototype,"ajax",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),d=f(l.prototype,"notifications",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),c=f(l.prototype,"ghostPaths",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f(l.prototype,"searchTask",[n.task],Object.getOwnPropertyDescriptor(l.prototype,"searchTask"),l.prototype),f(l.prototype,"refreshContentTask",[n.task],Object.getOwnPropertyDescriptor(l.prototype,"refreshContentTask"),l.prototype),l)
|
|
4457
|
+
async function v(e){const t=this.ghostPaths.url.api(`search-index/${(0,r.pluralize)(e.model)}`),i={}
|
|
4458
|
+
try{(await this.ajax.request(t,{data:i}))[(0,r.pluralize)(e.model)].forEach(t=>{this.indexes[e.model].add(t)})}catch(n){console.error(n),this.notifications.showAPIError(n,{key:`search.load${e.name}.error`})}}}),define("ghost-admin/services/search",["exports","ember-concurrency"],function(e,t){var i,r,n,a,s,o,l,u,d,c,p,m,h,b,f,g,v,y
|
|
4459
4459
|
function w(e,t,i,r){i&&Object.defineProperty(e,t,{enumerable:i.enumerable,configurable:i.configurable,writable:i.writable,value:i.initializer?i.initializer.call(r):void 0})}function E(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e
|
|
4460
4460
|
var i=e[Symbol.toPrimitive]
|
|
4461
4461
|
if(void 0!==i){var r=i.call(e,t||"default")
|
|
@@ -4738,7 +4738,11 @@ try{return yield this.post.save({adapterOptions:t})}catch(i){throw this._revertM
|
|
|
4738
4738
|
try{return this.post.isScheduled&&(this.post.publishedAtUTC=null),this.post.status="draft",this.post.emailOnly=!1,yield this.post.save()}catch(i){throw this.post.status=e,this.post.publishedAtUTC=t,i}}_applyModelChanges(){const e=this.willEmail
|
|
4739
4739
|
if(this._originalModelValues={},!this.post.isDraft)return;["status","publishedAtUTC","emailOnly"].forEach(e=>{this._originalModelValues[e]=this.post[e]}),this.post.status=this.isScheduled?"scheduled":"published",this.isScheduled&&(this.post.publishedAtUTC=this.scheduledAtUTC),e&&(this.post.emailOnly="send"===this.publishType)}_revertModelChanges(){Object.keys(this._originalModelValues).forEach(e=>{this.post[e]=this._originalModelValues[e]})}async _checkSendingLimit(){await this.settings.reload()
|
|
4740
4740
|
try{this.limit.limiter&&this.limit.limiter.isLimited("emails")?await this.limit.limiter.errorIfWouldGoOverLimit("emails"):this.settings.emailVerificationRequired&&(this.emailDisabledError="Email sending is temporarily disabled because your account is currently in review. You should have an email about this from us already, but you can also reach us any time at support@ghost.org.")}catch(e){this.emailDisabledError=e.message}}async _checkPublishingLimit(){if(this.user.isAdmin)try{this.limit.limiter?.isLimited("members")&&await this.limit.limiter.errorIfIsOverLimit("members")}catch(e){const t=Ember.String.htmlSafe(e.message.replace(/please upgrade/i,'<a href="#/pro">$&</a>'))
|
|
4741
|
-
this.publishDisabledError=t}}}).prototype,"publishDisabledError",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),E=S(y.prototype,"totalMemberCount",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),k=S(y.prototype,"isScheduled",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),P=S(y.prototype,"scheduledAtUTC",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return this.minScheduledAt}}),S(y.prototype,"toggleScheduled",[o],Object.getOwnPropertyDescriptor(y.prototype,"toggleScheduled"),y.prototype),S(y.prototype,"setScheduledAt",[l],Object.getOwnPropertyDescriptor(y.prototype,"setScheduledAt"),y.prototype),S(y.prototype,"resetPastScheduledAt",[u],Object.getOwnPropertyDescriptor(y.prototype,"resetPastScheduledAt"),y.prototype),_=S(y.prototype,"publishType",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"publish+send"}}),O=S(y.prototype,"emailDisabledError",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),S(y.prototype,"setPublishType",[p],Object.getOwnPropertyDescriptor(y.prototype,"setPublishType"),y.prototype),j=S(y.prototype,"newsletter",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),T=S(y.prototype,"selectedRecipientFilter",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),S(y.prototype,"setNewsletter",[b],Object.getOwnPropertyDescriptor(y.prototype,"setNewsletter"),y.prototype),S(y.prototype,"setRecipientFilter",[f],Object.getOwnPropertyDescriptor(y.prototype,"setRecipientFilter"),y.prototype),S(y.prototype,"setupTask",[i.task],Object.getOwnPropertyDescriptor(y.prototype,"setupTask"),y.prototype),S(y.prototype,"fetchRequiredDataTask",[i.task],Object.getOwnPropertyDescriptor(y.prototype,"fetchRequiredDataTask"),y.prototype),S(y.prototype,"saveTask",[g],Object.getOwnPropertyDescriptor(y.prototype,"saveTask"),y.prototype),S(y.prototype,"revertToDraftTask",[v],Object.getOwnPropertyDescriptor(y.prototype,"revertToDraftTask"),y.prototype),y)}),define("ghost-admin/utils/route",["ghost-admin/decorators/inject"],function(e){Ember.Route.reopen({billing:Ember.inject.service(),router:Ember.inject.service(),config:(0,e.inject)(),actions:{willTransition(e){return this.get("upgradeStatus.isRequired")?(e.abort(),this.upgradeStatus.requireUpgrade(),!1):!this.config.hostSettings?.forceUpgrade||(!("pro.index"!==e.to?.name&&"signout"!==e.to?.name&&!e.to?.name.match(/settings-x\.*/))||(e.abort(),this.billing.openBillingWindow(this.router.currentURL,"/pro"),!1))}}})}),define("ghost-admin/utils/
|
|
4741
|
+
this.publishDisabledError=t}}}).prototype,"publishDisabledError",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),E=S(y.prototype,"totalMemberCount",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),k=S(y.prototype,"isScheduled",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),P=S(y.prototype,"scheduledAtUTC",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return this.minScheduledAt}}),S(y.prototype,"toggleScheduled",[o],Object.getOwnPropertyDescriptor(y.prototype,"toggleScheduled"),y.prototype),S(y.prototype,"setScheduledAt",[l],Object.getOwnPropertyDescriptor(y.prototype,"setScheduledAt"),y.prototype),S(y.prototype,"resetPastScheduledAt",[u],Object.getOwnPropertyDescriptor(y.prototype,"resetPastScheduledAt"),y.prototype),_=S(y.prototype,"publishType",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"publish+send"}}),O=S(y.prototype,"emailDisabledError",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),S(y.prototype,"setPublishType",[p],Object.getOwnPropertyDescriptor(y.prototype,"setPublishType"),y.prototype),j=S(y.prototype,"newsletter",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),T=S(y.prototype,"selectedRecipientFilter",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){}}),S(y.prototype,"setNewsletter",[b],Object.getOwnPropertyDescriptor(y.prototype,"setNewsletter"),y.prototype),S(y.prototype,"setRecipientFilter",[f],Object.getOwnPropertyDescriptor(y.prototype,"setRecipientFilter"),y.prototype),S(y.prototype,"setupTask",[i.task],Object.getOwnPropertyDescriptor(y.prototype,"setupTask"),y.prototype),S(y.prototype,"fetchRequiredDataTask",[i.task],Object.getOwnPropertyDescriptor(y.prototype,"fetchRequiredDataTask"),y.prototype),S(y.prototype,"saveTask",[g],Object.getOwnPropertyDescriptor(y.prototype,"saveTask"),y.prototype),S(y.prototype,"revertToDraftTask",[v],Object.getOwnPropertyDescriptor(y.prototype,"revertToDraftTask"),y.prototype),y)}),define("ghost-admin/utils/route",["ghost-admin/decorators/inject"],function(e){Ember.Route.reopen({billing:Ember.inject.service(),router:Ember.inject.service(),config:(0,e.inject)(),actions:{willTransition(e){return this.get("upgradeStatus.isRequired")?(e.abort(),this.upgradeStatus.requireUpgrade(),!1):!this.config.hostSettings?.forceUpgrade||(!("pro.index"!==e.to?.name&&"signout"!==e.to?.name&&!e.to?.name.match(/settings-x\.*/))||(e.abort(),this.billing.openBillingWindow(this.router.currentURL,"/pro"),!1))}}})}),define("ghost-admin/utils/search",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SEARCHABLES=void 0,e.createSearchResult=function(e,t){const i=e.idField||e.pathField
|
|
4742
|
+
return{id:`${e.model}.${t[i]}`,url:t.url,title:t[e.titleField],groupName:e.name,status:t.status,visibility:t.visibility,publishedAt:t.published_at}},e.sortSearchResultsByStatus=function(e,i){"post"!==i&&"page"!==i||e.sort((e,i)=>(t[e.status]||5)-(t[i.status]||5))
|
|
4743
|
+
return e}
|
|
4744
|
+
e.SEARCHABLES=[{name:"Staff",model:"user",pathField:"slug",idField:"slug",titleField:"name",index:["name"]},{name:"Tags",model:"tag",pathField:"slug",idField:"slug",titleField:"name",index:["name"]},{name:"Posts",model:"post",pathField:"id",idField:"id",titleField:"title",index:["title"]},{name:"Pages",model:"page",pathField:"id",idField:"id",titleField:"title",index:["title"]}]
|
|
4745
|
+
const t={scheduled:1,draft:2,published:3,sent:4}}),define("ghost-admin/utils/sentry",["exports","@sentry/integrations","@sentry/replay","ember-ajax/errors"],function(e,t,i,r){Object.defineProperty(e,"__esModule",{value:!0}),e.beforeSend=s,e.getSentryConfig=a,e.getSentryTestConfig=function(e){return a("https://abcdef0123456789abcdef0123456789@o12345.ingest.sentry.io/1234567","testing","5.0.0",e)}
|
|
4742
4746
|
const n=/\/e\.ghost\.org|plausible\.io/
|
|
4743
4747
|
function a(e,r,a,o){const l=[],u={dsn:e,transport:o,environment:r,release:`ghost@${a}`,beforeSend:s,ignoreErrors:[/The play\(\) request was interrupted.*/,/The request is not allowed by the user agent or the platform in the current context/,/Server was unreachable/,/NetworkError when attempting to fetch resource./,/Failed to fetch/,/Load failed/,/The operation was aborted./,/^TransitionAborted$/,/^ResizeObserver loop completed with undelivered notifications/,/^ResizeObserver loop limit exceeded/,"TaskCancelation"],integrations:function(e){return[...e.filter(e=>"testing"!==r||"Dedupe"!==e.name),...l]},beforeBreadcrumb:e=>"http"===e.category&&e.data?.url?.match(n)?null:e}
|
|
4744
4748
|
if("testing"!==r)try{u.replaysOnErrorSampleRate=.5,l.push(new i.Replay({mask:[".koenig-lexical",".gh-dashboard"],unmask:['[role="menu"]','[data-testid="settings-panel"]',".gh-nav"],maskAllText:!1,maskAllInputs:!0,blockAllMedia:!0}))}catch(d){console.error("Error enabling Sentry Replay:",d)}return"development"===r&&l.push(new t.Debug),u}function s(e,t){try{const i=t?.originalException
|
|
@@ -4799,13 +4803,13 @@ if(Ember.isEmpty(e.errors.errorsFor("publishedAtBlogTime"))){let t=e.status,r=(0
|
|
|
4799
4803
|
"draft"!==t&&"published"!==t||!n.isSameOrAfter(r)?!e.changedAttributes().status&&!e.changedAttributes().publishedAtUTC||"scheduled"!==t||a||(e.errors.add("publishedAtBlogDate","Please choose a future date and time."),this.invalidate()):(e.errors.add("publishedAtBlogDate","Please choose a past date and time."),this.invalidate())}}},featureImageAlt(e){r.default.isLength(e.featureImageAlt||"",{max:191})||(e.errors.add("featureImageAlt","Feature image alt text cannot be longer than 191 characters."),this.invalidate())}})}),define("ghost-admin/validators/reset",["exports","ghost-admin/validators/base","ghost-admin/validators/mixins/password","validator"],function(e,t,i,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4800
4804
|
const n=t.default.extend(i.default,{init(){this.properties=this.properties||["newPassword"],this._super(...arguments)},newPassword(e){let t=e.newPassword,i=e.ne2Password
|
|
4801
4805
|
Ember.isBlank(t)?(e.errors.add("newPassword","Please enter a password."),this.invalidate()):r.default.equals(t,i||"")||(e.errors.add("ne2Password","The two new passwords don't match."),this.invalidate()),this.passwordValidation(e,t,"newPassword")}})
|
|
4802
|
-
e.default=n.create()})
|
|
4806
|
+
e.default=n.create()})
|
|
4807
|
+
define("ghost-admin/validators/setting",["exports","ghost-admin/validators/base","validator"],function(e,t,i){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4803
4808
|
e.default=t.default.create({properties:["title","description","password","slackUrl"],title(e){let t=e.title
|
|
4804
4809
|
i.default.isLength(t||"",{max:150})||(e.errors.add("title","Title is too long"),this.invalidate())},description(e){let t=e.description
|
|
4805
4810
|
i.default.isLength(t||"",{max:200})||(e.errors.add("description","Description is too long"),this.invalidate())},password(e){let t=e.isPrivate,i=e.password
|
|
4806
4811
|
t&&""===i&&(e.errors.add("password","Password must be supplied"),this.invalidate())},slackUrl(e){let t=e.slackUrl
|
|
4807
|
-
Ember.isBlank(t)||i.default.isURL(t,{require_protocol:!0})||(e.errors.add("slackUrl","The URL must be in a format like https://hooks.slack.com/services/<your personal key>"),this.invalidate())}})})
|
|
4808
|
-
define("ghost-admin/validators/setup",["exports","ghost-admin/validators/new-user","validator"],function(e,t,i){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4812
|
+
Ember.isBlank(t)||i.default.isURL(t,{require_protocol:!0})||(e.errors.add("slackUrl","The URL must be in a format like https://hooks.slack.com/services/<your personal key>"),this.invalidate())}})}),define("ghost-admin/validators/setup",["exports","ghost-admin/validators/new-user","validator"],function(e,t,i){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4809
4813
|
e.default=t.default.create({properties:["name","email","password","blogTitle"],blogTitle(e){let t=e.blogTitle
|
|
4810
4814
|
i.default.isLength(t||"",{min:1})||(e.errors.add("blogTitle","Please enter a site title."),this.invalidate()),i.default.isLength(t||"",{max:150})||(e.errors.add("blogTitle","Title is too long"),this.invalidate())}})}),define("ghost-admin/validators/signin",["exports","ghost-admin/validators/base","validator"],function(e,t,i){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4811
4815
|
e.default=t.default.create({properties:["identification","signin","forgotPassword"],invalidMessage:"Email address is not valid",identification(e){let t=e.identification
|
|
@@ -4837,6 +4841,6 @@ this.passwordChange(e),e.hasValidated.addObject("password"),Ember.isBlank(t)&&(e
|
|
|
4837
4841
|
e.default=n.create()}),define("ghost-admin/validators/webhook",["exports","ghost-admin/validators/base","validator"],function(e,t,i){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4838
4842
|
e.default=t.default.create({properties:["name","event","targetUrl","secret"],name(e){Ember.isBlank(e.name)?(e.errors.add("name","Please enter a name"),e.hasValidated.pushObject("name"),this.invalidate()):i.default.isLength(e.name,{max:191})||(e.errors.add("name","Name is too long, max 191 chars"),e.hasValidated.pushObject("name"),this.invalidate())},event(e){Ember.isBlank(e.event)&&(e.errors.add("event","Please select an event"),e.hasValidated.pushObject("event"),this.invalidate())},targetUrl(e){Ember.isBlank(e.targetUrl)?e.errors.add("targetUrl","Please enter a target URL"):i.default.isURL(e.targetUrl||"",{require_protocol:!1})?i.default.isLength(e.targetUrl,{max:2e3})||e.errors.add("targetUrl","Target URL is too long, max 2000 chars"):e.errors.add("targetUrl","Please enter a valid URL"),e.hasValidated.pushObject("targetUrl"),e.errors.has("targetUrl")&&this.invalidate()},secret(e){Ember.isBlank(e.secret)||i.default.isLength(e.secret,{max:191})||(e.errors.add("secret","Secret is too long, max 191 chars"),e.hasValidated.pushObject("secret"),this.invalidate())}})}),define("ghost-admin/views/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
|
4839
4843
|
e.default=Ember.Component.extend({})}),define("ghost-admin/config/environment",[],function(){try{var e="ghost-admin/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),i={default:JSON.parse(decodeURIComponent(t))}
|
|
4840
|
-
return Object.defineProperty(i,"__esModule",{value:!0}),i}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("ghost-admin/app").default.create({version:"6.
|
|
4844
|
+
return Object.defineProperty(i,"__esModule",{value:!0}),i}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("ghost-admin/app").default.create({version:"6.1",name:"ghost-admin"})
|
|
4841
4845
|
|
|
4842
|
-
//# sourceMappingURL=ghost-
|
|
4846
|
+
//# sourceMappingURL=ghost-84b58c135e15fa4071de09276f0b1cef.map
|