diff --git a/Resources/Private/Frontend/yarn.lock b/Resources/Private/Frontend/yarn.lock index 87c363f8..2490a6f8 100644 --- a/Resources/Private/Frontend/yarn.lock +++ b/Resources/Private/Frontend/yarn.lock @@ -146,9 +146,9 @@ integrity sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g== "@lit/reactive-element@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.1.tgz#b17d8818d9c72ccc489f44e35d87cfa18a9c8c93" - integrity sha512-eu50SQXHRthFwWJMp0oAFg95Rvm6MTPjxSXWuvAu7It90WVFLFpNBoIno7XOXSDvVgTrtKnUV4OLJqys2Svn4g== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.2.tgz#779ae9d265407daaf7737cb892df5ec2a86e22a0" + integrity sha512-SVOwLAWUQg3Ji1egtOt1UiFe4zdDpnWHyc5qctSceJ5XIu0Uc76YmGpIjZgx9YJ0XtdW0Jm507sDvjOu+HnB8w== dependencies: "@lit-labs/ssr-dom-shim" "^1.1.2" @@ -1857,29 +1857,29 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lit-element@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.0.1.tgz#fe9d82e2d034f819156f561f6f23b0ed0c9d19dc" - integrity sha512-OxRMJem4HKZt0320HplLkBPoi4KHiEHoPHKd8Lzf07ZQVAOKIjZ32yPLRKRDEolFU1RgrQBfSHQMoxKZ72V3Kw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.0.2.tgz#1a519896d5ab7c7be7a8729f400499e38779c093" + integrity sha512-/W6WQZUa5VEXwC7H9tbtDMdSs9aWil3Ou8hU6z2cOKWbsm/tXPAcsoaHVEtrDo0zcOIE5GF6QgU55tlGL2Nihg== dependencies: "@lit-labs/ssr-dom-shim" "^1.1.2" "@lit/reactive-element" "^2.0.0" - lit-html "^3.0.0" + lit-html "^3.1.0" -lit-html@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.0.2.tgz#25d2718b1e095a148a54c63bcd780c7550bb82f8" - integrity sha512-Q1A5lHza3bnmxoWJn6yS6vQZQdExl4fghk8W1G+jnAEdoFNYo5oeBBb/Ol7zSEdKd3TR7+r0zsJQyuWEVguiyQ== +lit-html@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.1.0.tgz#a7b93dd682073f2e2029656f4e9cd91e8034c196" + integrity sha512-FwAjq3iNsaO6SOZXEIpeROlJLUlrbyMkn4iuv4f4u1H40Jw8wkeR/OUXZUHUoiYabGk8Y4Y0F/rgq+R4MrOLmA== dependencies: "@types/trusted-types" "^2.0.2" lit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lit/-/lit-3.0.2.tgz#e22e90c2cbcc3f37bf3c2558df66f3af4331c9cf" - integrity sha512-ZoVUPGgXOQocP4OvxehEOBmC4rWB4cRYDPaz7aFmH8DFytsCi/NeACbr4C6vNPGDEC07BrhUos7uVNayDKLQ2Q== + version "3.1.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.0.tgz#76429b85dc1f5169fed499a0f7e89e2e619010c9" + integrity sha512-rzo/hmUqX8zmOdamDAeydfjsGXbbdtAFqMhmocnh2j9aDYqbu0fjXygjCa0T99Od9VQ/2itwaGrjZz/ZELVl7w== dependencies: "@lit/reactive-element" "^2.0.0" lit-element "^4.0.0" - lit-html "^3.0.0" + lit-html "^3.1.0" load-json-file@^4.0.0: version "4.0.0" diff --git a/Resources/Public/JavaScript/backend/toolbar-menu.js b/Resources/Public/JavaScript/backend/toolbar-menu.js index 76f85251..02cbd7a4 100644 --- a/Resources/Public/JavaScript/backend/toolbar-menu.js +++ b/Resources/Public/JavaScript/backend/toolbar-menu.js @@ -1 +1 @@ -import e from"@typo3/core/document-service.js";import t from"@typo3/core/event/regular-event.js";import{_ as r,t as n,C as o,L as i,I as a}from"../cache-warmer.js";import{LitElement as s}from"lit";import c from"@typo3/backend/icons.js";import l from"@typo3/backend/modal.js";import u from"@typo3/backend/notification.js";import"@typo3/backend/action-button/immediate-action.js";import"@typo3/core/ajax/ajax-request.js";const d=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function p(e,t){return(r,n,o)=>{const i=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:a}="object"==typeof n?r:o??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return d(r,n,{get(){if(t){let t=e.call(this);return void 0===t&&(t=i(this),a.call(this,t)),t}return i(this)}})}return d(r,n,{get(){return i(this)}})}}let g;function h(e){return(t,r)=>d(t,r,{get(){return(this.renderRoot??(g??=document.createDocumentFragment())).querySelectorAll(e)}})}var m="text/plain",f=e=>{};function b(e){f(e)}var y=!0;(function(){(console.warn||console.log).apply(console,arguments)}).bind("[clipboard-polyfill]");var v,w,x,C="undefined"==typeof window?void 0:window,T="undefined"==typeof globalThis?void 0:globalThis,k=null!=(x=null==(v=C)?void 0:v.Promise)?x:null==(w=T)?void 0:w.Promise;var S,_,E,I,A,D="undefined"==typeof navigator?void 0:navigator,j=null==D?void 0:D.clipboard,G=null==(S=null==j?void 0:j.read)?void 0:S.bind(j),L=null==(_=null==j?void 0:j.readText)?void 0:_.bind(j),R=null==(E=null==j?void 0:j.write)?void 0:E.bind(j),O=null==(I=null==j?void 0:j.writeText)?void 0:I.bind(j),U=null==(A=C)?void 0:A.ClipboardItem,B=function(){if(!k)throw new Error("No `Promise` implementation available for `clipboard-polyfill`. Consider using: https://github.com/lgarron/clipboard-polyfill#flat-file-version-with-promise-included");return k}(),M=C;function P(){return"undefined"==typeof ClipboardEvent&&void 0!==(null==M?void 0:M.clipboardData)&&void 0!==(null==M?void 0:M.clipboardData.setData)}function W(e,t,r){for(var n in b("listener called"),e.success=!0,t){var o=t[n],i=r.clipboardData;i.setData(n,o),n===m&&i.getData(n)!==o&&(b("setting text/plain failed"),e.success=!1)}r.preventDefault()}function N(e){var t={success:!1},r=W.bind(this,t,e);document.addEventListener("copy",r);try{document.execCommand("copy")}finally{document.removeEventListener("copy",r)}return t.success}function q(e,t){z(e);var r=N(t);return H(),r}function z(e){var t=document.getSelection();if(t){var r=document.createRange();r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r)}}function H(){var e=document.getSelection();e&&e.removeAllRanges()}function Y(e){var t=m in e;if(P()){if(!t)throw new Error("No `text/plain` value was specified.");if(function(e){if(!M.clipboardData)return!1;var t=M.clipboardData.setData("Text",e);return t&&b("writeTextIE worked"),t}(e[m]))return!0;throw new Error("Copying failed, possibly because the user rejected it.")}return N(e)?(b("regular execCopy worked"),!0):navigator.userAgent.indexOf("Edge")>-1?(b('UA "Edge" => assuming success'),!0):q(document.body,e)?(b("copyUsingTempSelection worked"),!0):function(e){var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important"),t.textContent="temporary element",document.body.appendChild(t);var r=q(t,e);return document.body.removeChild(t),r}(e)?(b("copyUsingTempElem worked"),!0):!!function(e){b("copyTextUsingDOM");var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important");var r=t;t.attachShadow&&(b("Using shadow DOM."),r=t.attachShadow({mode:"open"}));var n=document.createElement("span");n.innerText=e,r.appendChild(n),document.body.appendChild(t),z(n);var o=document.execCommand("copy");return H(),document.body.removeChild(t),o}(e[m])&&(b("copyTextUsingDOM worked"),!0)}function F(e,t){var r=[];for(var n in e){var o=e[n];r.push(t(o))}return B.all(r).then((t=>{for(var r={},n=0;nB.resolve(!0),V=B.resolve(!1);function K(e){return new B(((t,r)=>{try{t(e())}catch(e){r(e)}}))}function Q(e){if(!Y(function(e){var t={};return t[m]=e,t}(e)))throw new Error("writeText() failed")}function X(){return K((()=>{if(L)return b("Using `navigator.clipboard.readText()`."),L();if(P()){var e=function(){if(!M.clipboardData)throw new Error("Cannot read IE clipboard Data ");var e=M.clipboardData.getData("Text");if(""===e)throw new Error("Empty clipboard or could not read plain text from clipboard");return e}();return B.resolve(e)}throw new Error("Read is not supported in your browser.")}))}function Z(e,t){for(var r in e){if(-1!==e[r].types.indexOf(t))return!0}return!1}var ee=function(e,t){var r,n=Object.keys(e),o={};for(var i in e){var a=e[i];o[i]="string"==typeof a?te(i,a):a}return{types:n,presentationStyle:null!=(r=null==t?void 0:t.presentationStyle)?r:"unspecified",getType:function(e){return B.resolve(o[e])}}};function te(e,t){return new Blob([t],{type:e})}function re(e){return F(e.types,(function(t){return e.getType(t)})).then((t=>new Promise(((r,n)=>{var o={};e.presentationStyle&&(o.presentationStyle=e.presentationStyle),U?r(new U(t,o)):n("window.ClipboardItem is not defined")}))))}function ne(e){var t={};return t[m]=te(e,m),new ee(t)}function oe(e,t){return e.getType(t).then((e=>{return t=e,new B(((e,r)=>{var n=new FileReader;n.addEventListener("load",(()=>{var t=n.result;"string"==typeof t?e(t):r("could not convert blob to string")})),n.readAsText(t)}));var t}))}var ie,ae,se=Object.freeze({__proto__:null,ClipboardItem:ee,read:function(){return K((()=>G?(b("Using `navigator.clipboard.read()`."),G()):X().then((e=>[ne(e)]))))},readText:X,setDebugLog:function(e){f=e},suppressWarnings:function(){y=!1},write:function(e){return K((()=>{if(R&&U){var t=R;return b("Using `navigator.clipboard.write()`."),B.all(e.map(re)).then((r=>t(r).then($).catch((t=>{if(!Z(e,m)&&!Z(e,"text/html"))throw t;return V}))))}return V})).then((t=>{if(t)return J;var r=Z(e,m);return y&&!r&&b("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call suppressWarnings() to suppress this warning."),function(e){return F(e.types,(function(t){return oe(e,t)}))}(e[0]).then((e=>{if(!Y(e))throw new Error("write() failed")}))}))},writeText:function(e){return K((()=>O?(b("Using `navigator.clipboard.writeText()`."),O(e).catch(Q)):B.resolve(Q(e))))}});class ce extends Error{static create(){return new ce("The given site selection object is invalid.")}}class le{constructor(e,t,r){this.site=e,this.language=t,this.group=r}static fromJson(e){const t=JSON.parse(e);if("object"!=typeof t)throw ce.create();if(!("site"in t))throw ce.create();return new le(t.site,t.language??null,t.group??null)}getSiteIdentifier(){return this.site}getLanguageId(){return this.language}getGroupName(){return this.group}isWithinGroup(){return null!==this.group}isGroupRoot(){return this.isWithinGroup()&&null===this.language}isGroupItem(){return this.isWithinGroup()&&null!==this.language}}!function(e){e.form=".tx-warming-sites-modal",e.siteCheckbox=".tx-warming-sites-group-selector > input",e.siteCheckboxAll=".tx-warming-sites-group-selector > input[data-select-all]",e.useragentCopy="button.tx-warming-user-agent-copy-action",e.useragentCopyIcon="button.tx-warming-user-agent-copy-action .t3js-icon",e.useragentCopyText=".tx-warming-user-agent-copy-text"}(ie||(ie={})),function(e){e.startButton="tx-warming-start-warmup"}(ae||(ae={}));let ue=class extends s{constructor(){super(),this.cacheWarmer=new o,this.modal=l.currentModal}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeSites()}initializeSites(){const e=this.modal.querySelector(".modal-footer");e.classList.add("tx-warming-modal-footer","visually-hidden"),new t("submit",(e=>(e.preventDefault(),this.performCacheWarmup(),!1))).bindTo(this._form),this._checkboxes.forEach((r=>{new t("input",(t=>{e.classList.remove("visually-hidden"),this.toggleInputs(t.target)})).bindTo(r)})),new t("click",(e=>{e.preventDefault(),e.stopImmediatePropagation();const t=e.currentTarget.dataset.text;t&&this.copyUserAgentToClipboard(t)})).bindTo(this._useragentCopyButton)}performCacheWarmup(){if(!this.areSitesSelected())return void u.warning(TYPO3.lang[i.notificationNoSitesSelectedTitle],TYPO3.lang[i.notificationNoSitesSelectedMessage],15);const{configuration:e,sites:t}=this.parseFormValues();this.cacheWarmer.warmupCache(t,[],e)}parseFormValues(){const e=new FormData(this._form),t={},r={};for(const[n,o]of e)switch(n){case"site":try{const e=le.fromJson(o.toString()),t=e.getSiteIdentifier();if(e.isGroupRoot())continue;r[t]??(r[t]=[]),r[t].push(e.getLanguageId())}catch(e){}break;case"limit":t.limit=parseInt(o.toString());break;case"strategy":t.strategy=o.toString()}return{configuration:t,sites:r}}toggleInputs(e){if(e.dataset.selectAll)this.toggleAll(e.checked);else{const t=le.fromJson(e.value);t.isWithinGroup()&&this.toggleGroup(t,e),this.toggleSelectAll(e)}this.areSitesSelected()?this.getStartButton().classList.remove("disabled"):this.getStartButton().classList.add("disabled")}areSitesSelected(){let e=!1;return this._enabledCheckboxesWithoutGroupElements.forEach((t=>{if(t.checked)return e=!0,!1})),e}toggleGroup(e,t){let r=t.checked;null===e.getLanguageId()?this.getCheckboxesByGroup(e.getGroupName()).forEach((e=>{e.checked=r})):(r&&this.getCheckboxesByGroup(e.getGroupName()).forEach((e=>{if(e.id!==t.id&&!e.checked)return r=!1,!1})),this.getCheckboxGroupRoot(e.getGroupName()).checked=r)}toggleAll(e){this._enabledCheckboxes.forEach((t=>{t.checked=e}))}toggleSelectAll(e){let t=e.checked;t&&this._enabledCheckboxesWithoutGroupElements.forEach((r=>{if(r.id!==e.id&&!r.checked)return t=!1,!1})),this._selectAllCheckbox.checked=t}getCheckboxesByGroup(e){return this.renderRoot.querySelectorAll(`input[data-group="${e}"]:enabled`)}getCheckboxGroupRoot(e){return this.renderRoot.querySelector(`input[data-group-root="${e}"]:enabled`)}getStartButton(){return this.modal.querySelector(`button[name=${ae.startButton}]`)}copyUserAgentToClipboard(e){const t=this._useragentCopyIcon.cloneNode(!0);c.getIcon(a.spinner,c.sizes.small).then((e=>{this._useragentCopyIcon.innerHTML=e})),Promise.all([(navigator.clipboard??se).writeText(e),c.getIcon(a.check,c.sizes.small)]).then((async([,e])=>{const r=this._useragentCopyText.innerText;this._useragentCopyText.innerText=TYPO3.lang[i.modalSitesUserAgentActionSuccessful],this._useragentCopyIcon.innerHTML=e,window.setTimeout((()=>{this._useragentCopyIcon.innerHTML=t.innerHTML,this._useragentCopyText.innerText=r,this._useragentCopyButton.blur()}),3e3)}),(()=>{this._useragentCopyIcon.innerHTML=t.innerHTML}))}static createModal(){const e=new URL(TYPO3.settings.ajaxUrls.tx_warming_fetch_sites,window.location.origin);l.dismiss(),l.advanced({type:l.types.ajax,content:e.toString(),title:TYPO3.lang[i.modalSitesTitle],size:l.sizes.medium,buttons:[{text:TYPO3.lang[i.modalSitesButtonStart],icon:a.rocket,btnClass:"btn-primary disabled",name:ae.startButton,trigger:()=>{l.currentModal.querySelector(ie.form).requestSubmit()}}]})}};var de;r([p(ie.form)],ue.prototype,"_form",void 0),r([p(ie.siteCheckboxAll)],ue.prototype,"_selectAllCheckbox",void 0),r([h(ie.siteCheckbox)],ue.prototype,"_checkboxes",void 0),r([h(ie.siteCheckbox+":enabled")],ue.prototype,"_enabledCheckboxes",void 0),r([h(ie.siteCheckbox+":enabled:not([data-select-all])")],ue.prototype,"_enabledCheckboxesWithoutGroupElements",void 0),r([p(ie.useragentCopy)],ue.prototype,"_useragentCopyButton",void 0),r([p(ie.useragentCopyIcon)],ue.prototype,"_useragentCopyIcon",void 0),r([p(ie.useragentCopyText)],ue.prototype,"_useragentCopyText",void 0),ue=r([n("warming-sites-modal")],ue),function(e){e.container="#eliashaeussler-typo3warming-backend-toolbaritems-cachewarmuptoolbaritem"}(de||(de={}));var pe=new class{constructor(){e.ready().then((()=>{new t("click",(()=>{ue.createModal()})).delegateTo(document,de.container)}))}};export{pe as default}; +import e from"@typo3/core/document-service.js";import t from"@typo3/core/event/regular-event.js";import{_ as r,t as n,C as o,L as i,I as a}from"../cache-warmer.js";import{LitElement as s}from"lit";import l from"@typo3/backend/icons.js";import c from"@typo3/backend/modal.js";import u from"@typo3/backend/notification.js";import"@typo3/backend/action-button/immediate-action.js";import"@typo3/core/ajax/ajax-request.js";const d=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r);function p(e,t){return(r,n,o)=>{const i=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:t}="object"==typeof n?r:o??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return d(r,n,{get(){let r=e.call(this);return void 0===r&&(r=i(this),(null!==r||this.hasUpdated)&&t.call(this,r)),r}})}return d(r,n,{get(){return i(this)}})}}let g;function h(e){return(t,r)=>d(t,r,{get(){return(this.renderRoot??(g??=document.createDocumentFragment())).querySelectorAll(e)}})}var m="text/plain",f=e=>{};function b(e){f(e)}var y=!0;(function(){(console.warn||console.log).apply(console,arguments)}).bind("[clipboard-polyfill]");var v,w,x,C="undefined"==typeof window?void 0:window,T="undefined"==typeof globalThis?void 0:globalThis,k=null!=(x=null==(v=C)?void 0:v.Promise)?x:null==(w=T)?void 0:w.Promise;var S,_,E,I,A,D="undefined"==typeof navigator?void 0:navigator,j=null==D?void 0:D.clipboard,G=null==(S=null==j?void 0:j.read)?void 0:S.bind(j),L=null==(_=null==j?void 0:j.readText)?void 0:_.bind(j),R=null==(E=null==j?void 0:j.write)?void 0:E.bind(j),O=null==(I=null==j?void 0:j.writeText)?void 0:I.bind(j),U=null==(A=C)?void 0:A.ClipboardItem,B=function(){if(!k)throw new Error("No `Promise` implementation available for `clipboard-polyfill`. Consider using: https://github.com/lgarron/clipboard-polyfill#flat-file-version-with-promise-included");return k}(),M=C;function P(){return"undefined"==typeof ClipboardEvent&&void 0!==(null==M?void 0:M.clipboardData)&&void 0!==(null==M?void 0:M.clipboardData.setData)}function W(e,t,r){for(var n in b("listener called"),e.success=!0,t){var o=t[n],i=r.clipboardData;i.setData(n,o),n===m&&i.getData(n)!==o&&(b("setting text/plain failed"),e.success=!1)}r.preventDefault()}function N(e){var t={success:!1},r=W.bind(this,t,e);document.addEventListener("copy",r);try{document.execCommand("copy")}finally{document.removeEventListener("copy",r)}return t.success}function q(e,t){z(e);var r=N(t);return H(),r}function z(e){var t=document.getSelection();if(t){var r=document.createRange();r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r)}}function H(){var e=document.getSelection();e&&e.removeAllRanges()}function Y(e){var t=m in e;if(P()){if(!t)throw new Error("No `text/plain` value was specified.");if(function(e){if(!M.clipboardData)return!1;var t=M.clipboardData.setData("Text",e);return t&&b("writeTextIE worked"),t}(e[m]))return!0;throw new Error("Copying failed, possibly because the user rejected it.")}return N(e)?(b("regular execCopy worked"),!0):navigator.userAgent.indexOf("Edge")>-1?(b('UA "Edge" => assuming success'),!0):q(document.body,e)?(b("copyUsingTempSelection worked"),!0):function(e){var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important"),t.textContent="temporary element",document.body.appendChild(t);var r=q(t,e);return document.body.removeChild(t),r}(e)?(b("copyUsingTempElem worked"),!0):!!function(e){b("copyTextUsingDOM");var t=document.createElement("div");t.setAttribute("style","-webkit-user-select: text !important");var r=t;t.attachShadow&&(b("Using shadow DOM."),r=t.attachShadow({mode:"open"}));var n=document.createElement("span");n.innerText=e,r.appendChild(n),document.body.appendChild(t),z(n);var o=document.execCommand("copy");return H(),document.body.removeChild(t),o}(e[m])&&(b("copyTextUsingDOM worked"),!0)}function F(e,t){var r=[];for(var n in e){var o=e[n];r.push(t(o))}return B.all(r).then((t=>{for(var r={},n=0;nB.resolve(!0),V=B.resolve(!1);function K(e){return new B(((t,r)=>{try{t(e())}catch(e){r(e)}}))}function Q(e){if(!Y(function(e){var t={};return t[m]=e,t}(e)))throw new Error("writeText() failed")}function X(){return K((()=>{if(L)return b("Using `navigator.clipboard.readText()`."),L();if(P()){var e=function(){if(!M.clipboardData)throw new Error("Cannot read IE clipboard Data ");var e=M.clipboardData.getData("Text");if(""===e)throw new Error("Empty clipboard or could not read plain text from clipboard");return e}();return B.resolve(e)}throw new Error("Read is not supported in your browser.")}))}function Z(e,t){for(var r in e){if(-1!==e[r].types.indexOf(t))return!0}return!1}var ee=function(e,t){var r,n=Object.keys(e),o={};for(var i in e){var a=e[i];o[i]="string"==typeof a?te(i,a):a}return{types:n,presentationStyle:null!=(r=null==t?void 0:t.presentationStyle)?r:"unspecified",getType:function(e){return B.resolve(o[e])}}};function te(e,t){return new Blob([t],{type:e})}function re(e){return F(e.types,(function(t){return e.getType(t)})).then((t=>new Promise(((r,n)=>{var o={};e.presentationStyle&&(o.presentationStyle=e.presentationStyle),U?r(new U(t,o)):n("window.ClipboardItem is not defined")}))))}function ne(e){var t={};return t[m]=te(e,m),new ee(t)}function oe(e,t){return e.getType(t).then((e=>{return t=e,new B(((e,r)=>{var n=new FileReader;n.addEventListener("load",(()=>{var t=n.result;"string"==typeof t?e(t):r("could not convert blob to string")})),n.readAsText(t)}));var t}))}var ie,ae,se=Object.freeze({__proto__:null,ClipboardItem:ee,read:function(){return K((()=>G?(b("Using `navigator.clipboard.read()`."),G()):X().then((e=>[ne(e)]))))},readText:X,setDebugLog:function(e){f=e},suppressWarnings:function(){y=!1},write:function(e){return K((()=>{if(R&&U){var t=R;return b("Using `navigator.clipboard.write()`."),B.all(e.map(re)).then((r=>t(r).then($).catch((t=>{if(!Z(e,m)&&!Z(e,"text/html"))throw t;return V}))))}return V})).then((t=>{if(t)return J;var r=Z(e,m);return y&&!r&&b("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call suppressWarnings() to suppress this warning."),function(e){return F(e.types,(function(t){return oe(e,t)}))}(e[0]).then((e=>{if(!Y(e))throw new Error("write() failed")}))}))},writeText:function(e){return K((()=>O?(b("Using `navigator.clipboard.writeText()`."),O(e).catch(Q)):B.resolve(Q(e))))}});class le extends Error{static create(){return new le("The given site selection object is invalid.")}}class ce{constructor(e,t,r){this.site=e,this.language=t,this.group=r}static fromJson(e){const t=JSON.parse(e);if("object"!=typeof t)throw le.create();if(!("site"in t))throw le.create();return new ce(t.site,t.language??null,t.group??null)}getSiteIdentifier(){return this.site}getLanguageId(){return this.language}getGroupName(){return this.group}isWithinGroup(){return null!==this.group}isGroupRoot(){return this.isWithinGroup()&&null===this.language}isGroupItem(){return this.isWithinGroup()&&null!==this.language}}!function(e){e.form=".tx-warming-sites-modal",e.siteCheckbox=".tx-warming-sites-group-selector > input",e.siteCheckboxAll=".tx-warming-sites-group-selector > input[data-select-all]",e.useragentCopy="button.tx-warming-user-agent-copy-action",e.useragentCopyIcon="button.tx-warming-user-agent-copy-action .t3js-icon",e.useragentCopyText=".tx-warming-user-agent-copy-text"}(ie||(ie={})),function(e){e.startButton="tx-warming-start-warmup"}(ae||(ae={}));let ue=class extends s{constructor(){super(),this.cacheWarmer=new o,this.modal=c.currentModal}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeSites()}initializeSites(){const e=this.modal.querySelector(".modal-footer");e.classList.add("tx-warming-modal-footer","visually-hidden"),new t("submit",(e=>(e.preventDefault(),this.performCacheWarmup(),!1))).bindTo(this._form),this._checkboxes.forEach((r=>{new t("input",(t=>{e.classList.remove("visually-hidden"),this.toggleInputs(t.target)})).bindTo(r)})),new t("click",(e=>{e.preventDefault(),e.stopImmediatePropagation();const t=e.currentTarget.dataset.text;t&&this.copyUserAgentToClipboard(t)})).bindTo(this._useragentCopyButton)}performCacheWarmup(){if(!this.areSitesSelected())return void u.warning(TYPO3.lang[i.notificationNoSitesSelectedTitle],TYPO3.lang[i.notificationNoSitesSelectedMessage],15);const{configuration:e,sites:t}=this.parseFormValues();this.cacheWarmer.warmupCache(t,[],e)}parseFormValues(){const e=new FormData(this._form),t={},r={};for(const[n,o]of e)switch(n){case"site":try{const e=ce.fromJson(o.toString()),t=e.getSiteIdentifier();if(e.isGroupRoot())continue;r[t]??(r[t]=[]),r[t].push(e.getLanguageId())}catch(e){}break;case"limit":t.limit=parseInt(o.toString());break;case"strategy":t.strategy=o.toString()}return{configuration:t,sites:r}}toggleInputs(e){if(e.dataset.selectAll)this.toggleAll(e.checked);else{const t=ce.fromJson(e.value);t.isWithinGroup()&&this.toggleGroup(t,e),this.toggleSelectAll(e)}this.areSitesSelected()?this.getStartButton().classList.remove("disabled"):this.getStartButton().classList.add("disabled")}areSitesSelected(){let e=!1;return this._enabledCheckboxesWithoutGroupElements.forEach((t=>{if(t.checked)return e=!0,!1})),e}toggleGroup(e,t){let r=t.checked;null===e.getLanguageId()?this.getCheckboxesByGroup(e.getGroupName()).forEach((e=>{e.checked=r})):(r&&this.getCheckboxesByGroup(e.getGroupName()).forEach((e=>{if(e.id!==t.id&&!e.checked)return r=!1,!1})),this.getCheckboxGroupRoot(e.getGroupName()).checked=r)}toggleAll(e){this._enabledCheckboxes.forEach((t=>{t.checked=e}))}toggleSelectAll(e){let t=e.checked;t&&this._enabledCheckboxesWithoutGroupElements.forEach((r=>{if(r.id!==e.id&&!r.checked)return t=!1,!1})),this._selectAllCheckbox.checked=t}getCheckboxesByGroup(e){return this.renderRoot.querySelectorAll(`input[data-group="${e}"]:enabled`)}getCheckboxGroupRoot(e){return this.renderRoot.querySelector(`input[data-group-root="${e}"]:enabled`)}getStartButton(){return this.modal.querySelector(`button[name=${ae.startButton}]`)}copyUserAgentToClipboard(e){const t=this._useragentCopyIcon.cloneNode(!0);l.getIcon(a.spinner,l.sizes.small).then((e=>{this._useragentCopyIcon.innerHTML=e})),Promise.all([(navigator.clipboard??se).writeText(e),l.getIcon(a.check,l.sizes.small)]).then((async([,e])=>{const r=this._useragentCopyText.innerText;this._useragentCopyText.innerText=TYPO3.lang[i.modalSitesUserAgentActionSuccessful],this._useragentCopyIcon.innerHTML=e,window.setTimeout((()=>{this._useragentCopyIcon.innerHTML=t.innerHTML,this._useragentCopyText.innerText=r,this._useragentCopyButton.blur()}),3e3)}),(()=>{this._useragentCopyIcon.innerHTML=t.innerHTML}))}static createModal(){const e=new URL(TYPO3.settings.ajaxUrls.tx_warming_fetch_sites,window.location.origin);c.dismiss(),c.advanced({type:c.types.ajax,content:e.toString(),title:TYPO3.lang[i.modalSitesTitle],size:c.sizes.medium,buttons:[{text:TYPO3.lang[i.modalSitesButtonStart],icon:a.rocket,btnClass:"btn-primary disabled",name:ae.startButton,trigger:()=>{c.currentModal.querySelector(ie.form).requestSubmit()}}]})}};var de;r([p(ie.form)],ue.prototype,"_form",void 0),r([p(ie.siteCheckboxAll)],ue.prototype,"_selectAllCheckbox",void 0),r([h(ie.siteCheckbox)],ue.prototype,"_checkboxes",void 0),r([h(ie.siteCheckbox+":enabled")],ue.prototype,"_enabledCheckboxes",void 0),r([h(ie.siteCheckbox+":enabled:not([data-select-all])")],ue.prototype,"_enabledCheckboxesWithoutGroupElements",void 0),r([p(ie.useragentCopy)],ue.prototype,"_useragentCopyButton",void 0),r([p(ie.useragentCopyIcon)],ue.prototype,"_useragentCopyIcon",void 0),r([p(ie.useragentCopyText)],ue.prototype,"_useragentCopyText",void 0),ue=r([n("warming-sites-modal")],ue),function(e){e.container="#eliashaeussler-typo3warming-backend-toolbaritems-cachewarmuptoolbaritem"}(de||(de={}));var pe=new class{constructor(){e.ready().then((()=>{new t("click",(()=>{ue.createModal()})).delegateTo(document,de.container)}))}};export{pe as default}; diff --git a/Resources/Public/JavaScript/cache-warmer.js b/Resources/Public/JavaScript/cache-warmer.js index fc11074e..9c9952ea 100644 --- a/Resources/Public/JavaScript/cache-warmer.js +++ b/Resources/Public/JavaScript/cache-warmer.js @@ -1,4 +1,4 @@ -import t from"@typo3/backend/action-button/immediate-action.js";import e from"@typo3/backend/notification.js";import s from"@typo3/core/ajax/ajax-request.js";import r from"@typo3/backend/modal.js";import{LitElement as i,html as o}from"lit";import n from"@typo3/core/event/regular-event.js";function a(t,e,s,r){var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n}"function"==typeof SuppressedError&&SuppressedError;const l=globalThis,c=l.trustedTypes,d=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",u=`lit$${(Math.random()+"").slice(9)}$`,p="?"+u,g=`<${p}>`,m=document,f=()=>m.createComment(""),$=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,b="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,_=/>/g,A=RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),S=/'/g,P=/"/g,E=/^(?:script|style|textarea|title)$/i,x=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),U=new WeakMap,R=m.createTreeWalker(m,129);function N(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==d?d.createHTML(e):e}const T=(t,e)=>{const s=t.length-1,r=[];let i,o=2===e?"":"",n=v;for(let e=0;e"===l[0]?(n=i??v,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?A:'"'===l[3]?P:S):n===P||n===S?n=A:n===w||n===_?n=v:(n=A,i=void 0);const p=n===A&&t[e+1].startsWith("/>")?" ":"";o+=n===v?s+g:c>=0?(r.push(a),s.slice(0,c)+h+s.slice(c)+u+p):s+u+(-2===c?e:p)}return[N(t,o+(t[s]||"")+(2===e?"":"")),r]};class C{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0;const n=t.length-1,a=this.parts,[l,d]=T(t,e);if(this.el=C.createElement(l,s),R.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=R.nextNode())&&a.length0){r.textContent=c?c.emptyScript:"";for(let s=0;sy(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==O&&$(this._$AH)?this._$AA.nextSibling.data=t:this.$(m.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=C.createElement(N(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new k(r,this),s=t.u(this.options);t.p(e),this.$(s),this._$AH=t}}_$AC(t){let e=U.get(t.strings);return void 0===e&&U.set(t.strings,e=new C(t)),e}T(t){y(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const i of t)r===e.length?e.push(s=new j(this.k(f()),this.k(f()),this,this.options)):s=e[r],s._$AI(i),r++;r2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=O}_$AI(t,e=this,s,r){const i=this.strings;let o=!1;if(void 0===i)t=M(this,t,e,0),o=!$(t)||t!==this._$AH&&t!==x,o&&(this._$AH=t);else{const r=t;let n,a;for(t=i[0],n=0;n(...e)=>({_$litDirective$:t,values:e});let D=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const V=z(class extends D{constructor(t){if(super(t),t.type!==F||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.it)t in e||(s.remove(t),this.it.delete(t));for(const t in e){const r=!!e[t];r===this.it.has(t)||this.st?.has(t)||(r?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return x}}),J=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},Q=globalThis,Z=Q.ShadowRoot&&(void 0===Q.ShadyCSS||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol(),G=new WeakMap;let X=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==K)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Z&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=G.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&G.set(e,t))}return t}toString(){return this.cssText}};const tt=(t,e)=>{if(Z)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),r=Q.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=s.cssText,t.appendChild(e)}},et=Z?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new X("string"==typeof t?t:t+"",void 0,K))(e)})(t):t,{is:st,defineProperty:rt,getOwnPropertyDescriptor:it,getOwnPropertyNames:ot,getOwnPropertySymbols:nt,getPrototypeOf:at}=Object,lt=globalThis,ct=lt.trustedTypes,dt=ct?ct.emptyScript:"",ht=lt.reactiveElementPolyfillSupport,ut=(t,e)=>t,pt={toAttribute(t,e){switch(e){case Boolean:t=t?dt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},gt=(t,e)=>!st(t,e),mt={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:gt};Symbol.metadata??=Symbol("metadata"),lt.litPropertyMetadata??=new WeakMap;class ft extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=mt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&rt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:i}=it(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const o=r?.call(this);i.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mt}static _$Ei(){if(this.hasOwnProperty(ut("elementProperties")))return;const t=at(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ut("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ut("properties"))){const t=this.properties,e=[...ot(t),...nt(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(et(t))}else void 0!==t&&e.push(et(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$ES??=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$ES?.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return tt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$ES?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){const i=(void 0!==s.converter?.toAttribute?s.converter:pt).toAttribute(e,s.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const s=this.constructor,r=s._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=s.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:pt;this._$Em=r,this[r]=i.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s,r=!1,i){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??gt)(r?i:this[t],e))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$ES?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$ES?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}ft.elementStyles=[],ft.shadowRootOptions={mode:"open"},ft[ut("elementProperties")]=new Map,ft[ut("finalized")]=new Map,ht?.({ReactiveElement:ft}),(lt.reactiveElementVersions??=[]).push("2.0.1");const $t={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:gt},yt=(t=$t,e,s)=>{const{kind:r,metadata:i}=s;let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(s.name,t),"accessor"===r){const{name:r}=s;return{set(s){const i=e.get.call(this);e.set.call(this,s),this.requestUpdate(r,i,t)},init(e){return void 0!==e&&this.C(r,void 0,t),e}}}if("setter"===r){const{name:r}=s;return function(s){const i=this[r];e.call(this,s),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)};function bt(t){return(e,s)=>"object"==typeof s?yt(t,e,s):((t,e,s)=>{const r=e.hasOwnProperty(s);return e.constructor.createProperty(s,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}const vt="important",wt=" !"+vt,_t=z(class extends D{constructor(t){if(super(t),t.type!==F||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return null==r?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const r=e[t];if(null!=r){this.ut.add(t);const e="string"==typeof r&&r.endsWith(wt);t.includes("-")||e?s.setProperty(t,e?r.slice(0,-11):r,e?vt:""):s[t]=r}}return x}});class At extends D{constructor(t){if(super(t),this.et=O,t.type!==W)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===O||null==t)return this.vt=void 0,this.et=t;if(t===x)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}At.directiveName="unsafeHTML",At.resultType=1;const St=z(At);var Pt,Et;let xt;!function(t){t.approved="overlay-approved",t.check="actions-check",t.exclamationCircle="actions-exclamation-circle-alt",t.info="actions-info",t.listAlternative="actions-list-alternative",t.readonly="overlay-readonly",t.refresh="actions-refresh",t.rocket="actions-rocket",t.spinner="spinner-circle",t.viewPage="actions-view-page",t.warning="overlay-warning"}(Pt||(Pt={})),function(t){t.notificationShowReport="warming.notification.action.showReport",t.notificationActionRetry="warming.notification.action.retry",t.notificationAbortedTitle="warming.notification.aborted.title",t.notificationAbortedMessage="warming.notification.aborted.message",t.notificationErrorTitle="warming.notification.error.title",t.notificationErrorMessage="warming.notification.error.message",t.notificationNoSitesSelectedTitle="warming.notification.noSitesSelected.title",t.notificationNoSitesSelectedMessage="warming.notification.noSitesSelected.message",t.modalProgressTitle="warming.modal.progress.title",t.modalProgressButtonReport="warming.modal.progress.button.report",t.modalProgressButtonRetry="warming.modal.progress.button.retry",t.modalProgressButtonClose="warming.modal.progress.button.close",t.modalProgressFailedCounter="warming.modal.progress.failedCounter",t.modalProgressAllCounter="warming.modal.progress.allCounter",t.modalProgressPlaceholder="warming.modal.progress.placeholder",t.modalReportTitle="warming.modal.report.title",t.modalReportPanelFailed="warming.modal.report.panel.failed",t.modalReportPanelFailedSummary="warming.modal.report.panel.failed.summary",t.modalReportPanelSuccessful="warming.modal.report.panel.successful",t.modalReportPanelSuccessfulSummary="warming.modal.report.panel.successful.summary",t.modalReportPanelExcluded="warming.modal.report.panel.excluded",t.modalReportPanelExcludedSummary="warming.modal.report.panel.excluded.summary",t.modalReportPanelExcludedSitemaps="warming.modal.report.panel.excluded.sitemaps",t.modalReportPanelExcludedUrls="warming.modal.report.panel.excluded.urls",t.modalReportActionView="warming.modal.report.action.view",t.modalReportRequestId="warming.modal.report.message.requestId",t.modalReportTotal="warming.modal.report.message.total",t.modalReportNoUrlsCrawled="warming.modal.report.message.noUrlsCrawled",t.modalSitesTitle="warming.modal.sites.title",t.modalSitesUserAgentActionSuccessful="warming.modal.sites.userAgent.action.successful",t.modalSitesButtonStart="warming.modal.sites.button.start"}(Et||(Et={}));const Ot=new Uint8Array(16);function Ut(){if(!xt&&(xt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xt(Ot)}const Rt=[];for(let t=0;t<256;++t)Rt.push((t+256).toString(16).slice(1));var Nt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Tt(t,e,s){if(Nt.randomUUID&&!e&&!t)return Nt.randomUUID();const r=(t=t||{}).random||(t.rng||Ut)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){s=s||0;for(let t=0;t<16;++t)e[s+t]=r[t];return e}return function(t,e=0){return Rt[t[e+0]]+Rt[t[e+1]]+Rt[t[e+2]]+Rt[t[e+3]]+"-"+Rt[t[e+4]]+Rt[t[e+5]]+"-"+Rt[t[e+6]]+Rt[t[e+7]]+"-"+Rt[t[e+8]]+Rt[t[e+9]]+"-"+Rt[t[e+10]]+Rt[t[e+11]]+Rt[t[e+12]]+Rt[t[e+13]]+Rt[t[e+14]]+Rt[t[e+15]]}(r)}class Ct{static formatString(t,...e){return e.reduce(((t,e,s)=>t.replace(new RegExp(`\\{${s}}`),e)),t)}static generateUniqueId(){return Tt()}}let Mt=class extends i{constructor(){super(),this.id=`tx-warming-report-panel-${Ct.generateUniqueId()}`}createRenderRoot(){return this}render(){return o` +import t from"@typo3/backend/action-button/immediate-action.js";import e from"@typo3/backend/notification.js";import s from"@typo3/core/ajax/ajax-request.js";import r from"@typo3/backend/modal.js";import{LitElement as i,html as o}from"lit";import n from"@typo3/core/event/regular-event.js";function a(t,e,s,r){var i,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(o<3?i(n):o>3?i(e,s,n):i(e,s))||n);return o>3&&n&&Object.defineProperty(e,s,n),n}"function"==typeof SuppressedError&&SuppressedError;const l=globalThis,c=l.trustedTypes,d=c?c.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",u=`lit$${(Math.random()+"").slice(9)}$`,p="?"+u,g=`<${p}>`,m=document,f=()=>m.createComment(""),$=t=>null===t||"object"!=typeof t&&"function"!=typeof t,y=Array.isArray,b="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,_=/>/g,A=RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),S=/'/g,P=/"/g,E=/^(?:script|style|textarea|title)$/i,x=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),U=new WeakMap,R=m.createTreeWalker(m,129);function N(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==d?d.createHTML(e):e}const T=(t,e)=>{const s=t.length-1,r=[];let i,o=2===e?"":"",n=v;for(let e=0;e"===l[0]?(n=i??v,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?A:'"'===l[3]?P:S):n===P||n===S?n=A:n===w||n===_?n=v:(n=A,i=void 0);const p=n===A&&t[e+1].startsWith("/>")?" ":"";o+=n===v?s+g:c>=0?(r.push(a),s.slice(0,c)+h+s.slice(c)+u+p):s+u+(-2===c?e:p)}return[N(t,o+(t[s]||"")+(2===e?"":"")),r]};class C{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0;const n=t.length-1,a=this.parts,[l,d]=T(t,e);if(this.el=C.createElement(l,s),R.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=R.nextNode())&&a.length0){r.textContent=c?c.emptyScript:"";for(let s=0;sy(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==O&&$(this._$AH)?this._$AA.nextSibling.data=t:this.$(m.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=C.createElement(N(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new k(r,this),s=t.u(this.options);t.p(e),this.$(s),this._$AH=t}}_$AC(t){let e=U.get(t.strings);return void 0===e&&U.set(t.strings,e=new C(t)),e}T(t){y(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const i of t)r===e.length?e.push(s=new j(this.k(f()),this.k(f()),this,this.options)):s=e[r],s._$AI(i),r++;r2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=O}_$AI(t,e=this,s,r){const i=this.strings;let o=!1;if(void 0===i)t=M(this,t,e,0),o=!$(t)||t!==this._$AH&&t!==x,o&&(this._$AH=t);else{const r=t;let n,a;for(t=i[0],n=0;n(...e)=>({_$litDirective$:t,values:e});let D=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const V=z(class extends D{constructor(t){if(super(t),t.type!==F||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.it)t in e||(s.remove(t),this.it.delete(t));for(const t in e){const r=!!e[t];r===this.it.has(t)||this.st?.has(t)||(r?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return x}}),J=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)},Q=globalThis,Z=Q.ShadowRoot&&(void 0===Q.ShadyCSS||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol(),G=new WeakMap;let X=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==K)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Z&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=G.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&G.set(e,t))}return t}toString(){return this.cssText}};const tt=(t,e)=>{if(Z)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),r=Q.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=s.cssText,t.appendChild(e)}},et=Z?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new X("string"==typeof t?t:t+"",void 0,K))(e)})(t):t,{is:st,defineProperty:rt,getOwnPropertyDescriptor:it,getOwnPropertyNames:ot,getOwnPropertySymbols:nt,getPrototypeOf:at}=Object,lt=globalThis,ct=lt.trustedTypes,dt=ct?ct.emptyScript:"",ht=lt.reactiveElementPolyfillSupport,ut=(t,e)=>t,pt={toAttribute(t,e){switch(e){case Boolean:t=t?dt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},gt=(t,e)=>!st(t,e),mt={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:gt};Symbol.metadata??=Symbol("metadata"),lt.litPropertyMetadata??=new WeakMap;class ft extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=mt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&rt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:i}=it(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const o=r?.call(this);i.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mt}static _$Ei(){if(this.hasOwnProperty(ut("elementProperties")))return;const t=at(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ut("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ut("properties"))){const t=this.properties,e=[...ot(t),...nt(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(et(t))}else void 0!==t&&e.push(et(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return tt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){const i=(void 0!==s.converter?.toAttribute?s.converter:pt).toAttribute(e,s.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const s=this.constructor,r=s._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=s.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:pt;this._$Em=r,this[r]=i.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s,r=!1,i){if(void 0!==t){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??gt)(r?i:this[t],e))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}ft.elementStyles=[],ft.shadowRootOptions={mode:"open"},ft[ut("elementProperties")]=new Map,ft[ut("finalized")]=new Map,ht?.({ReactiveElement:ft}),(lt.reactiveElementVersions??=[]).push("2.0.2");const $t={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:gt},yt=(t=$t,e,s)=>{const{kind:r,metadata:i}=s;let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),o.set(s.name,t),"accessor"===r){const{name:r}=s;return{set(s){const i=e.get.call(this);e.set.call(this,s),this.requestUpdate(r,i,t)},init(e){return void 0!==e&&this.C(r,void 0,t),e}}}if("setter"===r){const{name:r}=s;return function(s){const i=this[r];e.call(this,s),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)};function bt(t){return(e,s)=>"object"==typeof s?yt(t,e,s):((t,e,s)=>{const r=e.hasOwnProperty(s);return e.constructor.createProperty(s,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}const vt="important",wt=" !"+vt,_t=z(class extends D{constructor(t){if(super(t),t.type!==F||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return null==r?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const t of this.ut)null==e[t]&&(this.ut.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const r=e[t];if(null!=r){this.ut.add(t);const e="string"==typeof r&&r.endsWith(wt);t.includes("-")||e?s.setProperty(t,e?r.slice(0,-11):r,e?vt:""):s[t]=r}}return x}});class At extends D{constructor(t){if(super(t),this.et=O,t.type!==W)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===O||null==t)return this.vt=void 0,this.et=t;if(t===x)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}At.directiveName="unsafeHTML",At.resultType=1;const St=z(At);var Pt,Et;let xt;!function(t){t.approved="overlay-approved",t.check="actions-check",t.exclamationCircle="actions-exclamation-circle-alt",t.info="actions-info",t.listAlternative="actions-list-alternative",t.readonly="overlay-readonly",t.refresh="actions-refresh",t.rocket="actions-rocket",t.spinner="spinner-circle",t.viewPage="actions-view-page",t.warning="overlay-warning"}(Pt||(Pt={})),function(t){t.notificationShowReport="warming.notification.action.showReport",t.notificationActionRetry="warming.notification.action.retry",t.notificationAbortedTitle="warming.notification.aborted.title",t.notificationAbortedMessage="warming.notification.aborted.message",t.notificationErrorTitle="warming.notification.error.title",t.notificationErrorMessage="warming.notification.error.message",t.notificationNoSitesSelectedTitle="warming.notification.noSitesSelected.title",t.notificationNoSitesSelectedMessage="warming.notification.noSitesSelected.message",t.modalProgressTitle="warming.modal.progress.title",t.modalProgressButtonReport="warming.modal.progress.button.report",t.modalProgressButtonRetry="warming.modal.progress.button.retry",t.modalProgressButtonClose="warming.modal.progress.button.close",t.modalProgressFailedCounter="warming.modal.progress.failedCounter",t.modalProgressAllCounter="warming.modal.progress.allCounter",t.modalProgressPlaceholder="warming.modal.progress.placeholder",t.modalReportTitle="warming.modal.report.title",t.modalReportPanelFailed="warming.modal.report.panel.failed",t.modalReportPanelFailedSummary="warming.modal.report.panel.failed.summary",t.modalReportPanelSuccessful="warming.modal.report.panel.successful",t.modalReportPanelSuccessfulSummary="warming.modal.report.panel.successful.summary",t.modalReportPanelExcluded="warming.modal.report.panel.excluded",t.modalReportPanelExcludedSummary="warming.modal.report.panel.excluded.summary",t.modalReportPanelExcludedSitemaps="warming.modal.report.panel.excluded.sitemaps",t.modalReportPanelExcludedUrls="warming.modal.report.panel.excluded.urls",t.modalReportActionView="warming.modal.report.action.view",t.modalReportRequestId="warming.modal.report.message.requestId",t.modalReportTotal="warming.modal.report.message.total",t.modalReportNoUrlsCrawled="warming.modal.report.message.noUrlsCrawled",t.modalSitesTitle="warming.modal.sites.title",t.modalSitesUserAgentActionSuccessful="warming.modal.sites.userAgent.action.successful",t.modalSitesButtonStart="warming.modal.sites.button.start"}(Et||(Et={}));const Ot=new Uint8Array(16);function Ut(){if(!xt&&(xt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xt(Ot)}const Rt=[];for(let t=0;t<256;++t)Rt.push((t+256).toString(16).slice(1));var Nt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Tt(t,e,s){if(Nt.randomUUID&&!e&&!t)return Nt.randomUUID();const r=(t=t||{}).random||(t.rng||Ut)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){s=s||0;for(let t=0;t<16;++t)e[s+t]=r[t];return e}return function(t,e=0){return Rt[t[e+0]]+Rt[t[e+1]]+Rt[t[e+2]]+Rt[t[e+3]]+"-"+Rt[t[e+4]]+Rt[t[e+5]]+"-"+Rt[t[e+6]]+Rt[t[e+7]]+"-"+Rt[t[e+8]]+Rt[t[e+9]]+"-"+Rt[t[e+10]]+Rt[t[e+11]]+Rt[t[e+12]]+Rt[t[e+13]]+Rt[t[e+14]]+Rt[t[e+15]]}(r)}class Ct{static formatString(t,...e){return e.reduce(((t,e,s)=>t.replace(new RegExp(`\\{${s}}`),e)),t)}static generateUniqueId(){return Tt()}}let Mt=class extends i{constructor(){super(),this.id=`tx-warming-report-panel-${Ct.generateUniqueId()}`}createRenderRoot(){return this}render(){return o`