@ms-cloudpack/overlay 0.19.73 → 0.19.74

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.
@@ -0,0 +1,2 @@
1
+ export const __webpack_esm_id__=739;export const __webpack_esm_ids__=[739];export const __webpack_esm_modules__={464(n,e,t){t.d(e,{default:()=>i});var r=t(692),a=t.n(r),s=t(860),o=t.n(s)()(a());o.push([n.id,".root__Rl6XMfFcB4M4Sp5RJbh8 {\n display: flex;\n background: var(--cp-neutralLighter);\n}\n\n/* left border color indicator */\n.statusBar__RsdQpgzZbI9fI4mSfjJX {\n flex-shrink: 0;\n border-radius: 4px;\n width: 4px;\n background: var(--cp-errorDark);\n box-shadow: 2px 0 4px 0 var(--cp-errorTransparent);\n}\n.statusBar__RsdQpgzZbI9fI4mSfjJX.warning__EcBSTvORlKqFlDbz3mr9 {\n background: var(--cp-warningDark);\n box-shadow: 2px 0 4px 0 var(--cp-warningTransparent);\n}\n\n/* everything but the status bar */\n.content__oaWQstIJN1TotKTOLcwX {\n padding: 8px;\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n flex-direction: column;\n}\n\n/* file path and error source */\n.titleArea__NUKs26I_j0KAivvaQbz4 {\n padding: 4px 0;\n font-weight: 500;\n}\n\n/* pre with error details */\n.text__qXRXiNO7j_FMkOf4b1Hi {\n word-wrap: break-word;\n white-space: pre-wrap;\n color: var(--cp-text);\n /* monospace fonts tend to have tight line-height and be too large */\n line-height: 1.5em;\n font-size: 0.9em;\n}\n","",{version:3,sources:["webpack://./src/components/StatusDialog/TaskResultItem.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,oCAAoC;AACtC;;AAEA,gCAAgC;AAChC;EACE,cAAc;EACd,kBAAkB;EAClB,UAAU;EACV,+BAA+B;EAC/B,kDAAkD;AACpD;AACA;EACE,iCAAiC;EACjC,oDAAoD;AACtD;;AAEA,kCAAkC;AAClC;EACE,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,gBAAgB;EAChB,sBAAsB;AACxB;;AAEA,+BAA+B;AAC/B;EACE,cAAc;EACd,gBAAgB;AAClB;;AAEA,2BAA2B;AAC3B;EACE,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,oEAAoE;EACpE,kBAAkB;EAClB,gBAAgB;AAClB",sourcesContent:[".root {\n display: flex;\n background: var(--cp-neutralLighter);\n}\n\n/* left border color indicator */\n.statusBar {\n flex-shrink: 0;\n border-radius: 4px;\n width: 4px;\n background: var(--cp-errorDark);\n box-shadow: 2px 0 4px 0 var(--cp-errorTransparent);\n}\n.statusBar.warning {\n background: var(--cp-warningDark);\n box-shadow: 2px 0 4px 0 var(--cp-warningTransparent);\n}\n\n/* everything but the status bar */\n.content {\n padding: 8px;\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n flex-direction: column;\n}\n\n/* file path and error source */\n.titleArea {\n padding: 4px 0;\n font-weight: 500;\n}\n\n/* pre with error details */\n.text {\n word-wrap: break-word;\n white-space: pre-wrap;\n color: var(--cp-text);\n /* monospace fonts tend to have tight line-height and be too large */\n line-height: 1.5em;\n font-size: 0.9em;\n}\n"],sourceRoot:""}]),o.locals={root:"root__Rl6XMfFcB4M4Sp5RJbh8",statusBar:"statusBar__RsdQpgzZbI9fI4mSfjJX",warning:"warning__EcBSTvORlKqFlDbz3mr9",content:"content__oaWQstIJN1TotKTOLcwX",titleArea:"titleArea__NUKs26I_j0KAivvaQbz4",text:"text__qXRXiNO7j_FMkOf4b1Hi"};const i=o},649(n,e,t){t.d(e,{default:()=>i});var r=t(692),a=t.n(r),s=t(860),o=t.n(s)()(a());o.push([n.id,"@keyframes cp-spin__gcFQred791GFVqluefOr {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.spin__cSlR0KG2ydLnzVkkbwdj {\n animation: cp-spin__gcFQred791GFVqluefOr 1s linear infinite;\n}\n\n.searchbox__LfVxJ7Te2Dle6scWlkNw {\n background-color: var(--cp-white);\n font-weight: 400;\n box-shadow: none;\n padding: 0px 8px;\n min-width: 160px;\n /* align to far right */\n margin-left: auto;\n}\n.searchbox__LfVxJ7Te2Dle6scWlkNw:disabled::placeholder {\n color: var(--cp-textDisabled);\n}\n","",{version:3,sources:["webpack://./src/components/StatusDialog/StatusDialog.module.css"],names:[],mappings:"AAAA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;AACF;;AAEA;EACE,2DAAqC;AACvC;;AAEA;EACE,iCAAiC;EACjC,gBAAgB;EAChB,gBAAgB;EAChB,gBAAgB;EAChB,gBAAgB;EAChB,uBAAuB;EACvB,iBAAiB;AACnB;AACA;EACE,6BAA6B;AAC/B",sourcesContent:["@keyframes cp-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.spin {\n animation: cp-spin 1s linear infinite;\n}\n\n.searchbox {\n background-color: var(--cp-white);\n font-weight: 400;\n box-shadow: none;\n padding: 0px 8px;\n min-width: 160px;\n /* align to far right */\n margin-left: auto;\n}\n.searchbox:disabled::placeholder {\n color: var(--cp-textDisabled);\n}\n"],sourceRoot:""}]),o.locals={spin:"spin__cSlR0KG2ydLnzVkkbwdj","cp-spin":"cp-spin__gcFQred791GFVqluefOr",searchbox:"searchbox__LfVxJ7Te2Dle6scWlkNw"};const i=o},739(n,e,t){t.d(e,{StatusDialog:()=>K,default:()=>V}),t.r(e);var r=t(621),a=t(104),s=t.n(a),o=t(478),i=t(938),l=t(606),c=t.n(l),d=t(607),A=t.n(d),u=t(437),p=t.n(u),h=t(750),g=t.n(h),x=t(994),C=t.n(x),m=t(415),f=t.n(m),b=t(464),B={};B.styleTagTransform=f(),B.setAttributes=g(),B.insert=p().bind(null,"head"),B.domAPI=A(),B.insertStyleElement=C(),c()(b.default,B);const k=b.default&&b.default.locals?b.default.locals:void 0;var w=t(747);const E=["ori","rollup","webpack","rspack","esbuild"],v=n=>{const{item:e,inputPath:t,index:a,type:o}=n,{location:i,notes:l=[]}=e,c=E.includes(e.source)?`${e.source} bundler`:`cloudpack ${e.source}`;return(0,r.jsxs)("div",{class:k.root,children:[(0,r.jsx)("div",{class:s()(k.statusBar,"warning"===o&&k.warning)}),(0,r.jsxs)("div",{class:k.content,children:[(0,r.jsxs)("div",{class:k.titleArea,children:[a+1,". ",(0,r.jsx)(j,{loc:i,inputPath:t})," (via: ",c,")"]}),(0,r.jsx)("pre",{class:k.text,children:_(e.text)}),l.length>0&&(0,r.jsxs)("details",{children:[(0,r.jsx)("summary",{children:"Expand for more details"}),(0,r.jsx)("ul",{children:l.map((n,e)=>(0,r.jsxs)("li",{children:[n.location&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{loc:n.location,inputPath:t}),(0,r.jsx)("br",{})]}),n.text&&(0,r.jsx)("pre",{class:k.text,children:_(n.text)})]},e))})]})]})]})};function _(n){return n.replace(/\x1b\[[\d;]+(m|[AKB]\b)/g,"")}const j=n=>{const{loc:e,inputPath:t}=n,a=(0,i.useCloudpack)();if(!e)return"(path unavailable)";const s=[e.file,e.line,e.column].filter(n=>void 0!==n).join(":");return!t||/[?!]/.test(s)?s:(0,r.jsx)(w.Button,{variant:"link",onClick:()=>{t&&a.openCodeEditor.mutate({rootPath:t,relativePath:e.file,line:e.line,column:e.column})},children:s})};var R=t(463),D=t(309);function y(n){return"pending"===n.status?"Running":[`Completed in ${n.duration}ms`,n.errors?.length&&`${n.errors.length} error${n.errors.length>1?"s":""}`,n.warnings?.length&&`${n.warnings.length} warning${n.warnings.length>1?"s":""}`].filter(Boolean).join(", ")}const S=n=>{const{task:e}=n,{name:t,warnings:a=[],errors:s=[],inputPath:o,outputPath:l}=e,c=(0,i.useCloudpack)(),d=n=>{c.openFilePath.mutate({rootPath:n})},A=()=>{o&&c.openCodeEditor.mutate({rootPath:o,relativePath:"package.json"})};return(0,r.jsx)(R.ResultsAccordion,{name:t||"<unknown>",index:n.index,result:s.length?"error":a.length?"warning":"success",headerEndContent:y(e),headerCommands:(0,r.jsx)(w.Button,{variant:"iconOnly",onClick:()=>{o&&c.restartTask.mutate({id:e.id,inputPath:o})},title:"Re-bundle this package","aria-label":"Re-bundle this package",children:(0,r.jsx)(D.Refresh20,{})}),getContent:()=>(0,r.jsxs)(r.Fragment,{children:[o?(0,r.jsx)(R.ResultsAccordionContent,{itemName:"Input path",itemValue:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.Button,{variant:"link",onClick:()=>d(o),children:o})," ","(",(0,r.jsx)(w.Button,{variant:"link",onClick:A,children:"package.json"}),")"]})}):"No input path found for bundle task. This is a Cloudpack bug. Please report it.",l&&(0,r.jsx)(R.ResultsAccordionContent,{itemName:"Output path",itemValue:(0,r.jsx)(w.Button,{variant:"link",onClick:()=>d(l),children:l})}),s.length>0&&(0,r.jsx)(R.ResultsAccordionContent,{title:"Errors",children:s.map((n,e)=>(0,r.jsx)(v,{type:"error",item:n,inputPath:o,index:e},e))}),a.length>0&&(0,r.jsx)(R.ResultsAccordionContent,{title:"Warnings",children:a.map((n,e)=>(0,r.jsx)(v,{type:"warning",item:n,inputPath:o,index:e},e))})]})})};var F=t(88);const T=({searchFilter:n,issuesOnly:e})=>{let t=[...(()=>{const n=(0,i.useCloudpack)(),[e,t]=(0,o.useState)({tasks:[]});return(0,o.useEffect)(()=>{const e=n?.onDataChanged.subscribe(F.taskListSource,{onData:n=>{t(n)}});return()=>{e.unsubscribe()}},[n]),e})().tasks].sort(P);return n&&(n=n.toLowerCase(),t=t.filter(({name:e})=>e?.toLowerCase().includes(n))),e&&(t=t.filter(({errors:n,warnings:e})=>n?.length||e?.length)),(0,r.jsx)(r.Fragment,{children:t.map((n,e)=>(0,r.jsx)(S,{index:e,task:n},n.name))})};function P(n,e){const t="pending"===n.status?1:0,r="pending"===e.status?1:0;if(t!==r)return t>r?-1:1;const a=n.errors?.length||0,s=e.errors?.length||0;return a!==s?a>s?-1:1:void 0===n.name&&void 0===e.name?n.id<e.id?-1:1:void 0===n.name?1:void 0===e.name||n.name<e.name?-1:1}var I=t(891),O=t(405),q=t(649),z={};z.styleTagTransform=f(),z.setAttributes=g(),z.insert=p().bind(null,"head"),z.domAPI=A(),z.insertStyleElement=C(),c()(q.default,z);const L=q.default&&q.default.locals?q.default.locals:void 0;var N=t(533);const K=({onClose:n})=>{const e=(0,i.useCloudpack)(),[t,a]=(0,o.useState)(""),[l,c]=(0,o.useState)(!1),[d,A]=(0,o.useState)(!1),u=(0,o.useCallback)(n=>{n.preventDefault(),a(n.target.value)},[]);return(0,r.jsx)(I.Dialog,{title:"Cloudpack bundle results",id:O.elementIds.statusDialogRoot,draggable:!0,onClose:d?void 0:n,commands:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(w.Button,{variant:"primary",onClick:()=>{A(!0),e.restartAllTasks.mutate()},disabled:d,children:[(0,r.jsx)(D.Refresh20,{class:s()(d&&L.spin)})," Re-bundle all packages"]}),(0,r.jsx)(w.Button,{onClick:()=>{c(n=>!n)},disabled:d,children:l?"Show all packages":"Show packages with issues"}),(0,r.jsx)("input",{type:"text","aria-label":"Search",placeholder:"Search",value:t,onInput:u,class:s()(L.searchbox,N.default.root,N.default.standard),disabled:d})]}),children:d?"Preparing to re-bundle (the page will refresh when ready)...":(0,r.jsx)(T,{searchFilter:t,issuesOnly:l})})},V=K}};
2
+ //# sourceMappingURL=739.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"739.chunk.js","mappings":"kLAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,4gCA0CtC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,qEAAqE,MAAQ,GAAG,SAAW,+XAA+X,eAAiB,CAAC,m3BAAm3B,WAAa,MAE14CH,EAAwBI,OAAS,CAChC,KAAQ,6BACR,UAAa,kCACb,QAAW,gCACX,QAAW,gCACX,UAAa,kCACb,KAAQ,8BAET,S,mECtDIJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,C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AgB,IACxB,EAAQC,OAAS,SAAc,KAAM,QACrC,EAAQC,OAAS,IACjB,EAAQC,mBAAqB,IAEhB,IAAI,UAAS,GAKnB,QAAe,WAAW,UAAQN,OAAS,UAAQA,YAASO,E,aCR5D,MAAMyG,EAAqD,EAAGC,cACnE,MAAMrE,GAAYC,EAAAA,EAAAA,iBACX0C,EAAc2B,IAAmBtB,EAAAA,EAAAA,UAAS,KAC1CJ,EAAY2B,IAAiBvB,EAAAA,EAAAA,WAAS,IACtCwB,EAAcC,IAAmBzB,EAAAA,EAAAA,WAAS,GAE3C0B,GAAqBC,EAAAA,EAAAA,aAA0DC,IACnFA,EAAMC,iBACNP,EAAgB,EAAOQ,OAA4BC,QAClD,IASH,OACE,SAACC,EAAAA,OAAMA,CACL7C,MAAM,2BACNhF,GAAI8H,EAAAA,WAAWC,iBACfC,WAAS,EAGTd,QAASG,OAAe7G,EAAY0G,EACpCe,UACE,sB,WAKE,UAAC1E,EAAAA,OAAMA,CAACC,QAAQ,UAAUC,QArBV,KACtB6D,GAAgB,GACXzE,EAAUqF,gBAAgBvE,UAmB2BwE,SAAUd,E,WAE5D,SAACnC,EAAAA,UAASA,CAAC3D,MAAOG,IAAG2F,GAAgB7F,EAAO4G,QAAS,8BAEvD,SAAC7E,EAAAA,OAAMA,CAACE,QApBS,KAAW2D,EAAeQ,IAAWA,IAoBnBO,SAAUd,E,SAC1C5B,EAAa,oBAAsB,+BAEtC,SAAC4C,QAAAA,CACCtH,KAAK,OACLkE,aAAW,SACXqD,YAAY,SACZV,MAAOpC,EACP+C,QAAShB,EACThG,MAAOG,IAAGF,EAAOgH,UAAWC,EAAAA,QAAYhH,KAAMgH,EAAAA,QAAYC,UAC1DP,SAAUd,O,SAKfA,EACC,gEAEA,SAAC9B,EAAQA,CAACC,aAAcA,EAAcC,WAAYA,OAM1D,G","sources":["webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/TaskResultItem.module.css","webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/StatusDialog.module.css","webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/TaskResultItem.module.css?35e6","webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/TaskResultItem.tsx","webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/TaskStatus.tsx","webpack://@ms-cloudpack/overlay/./src/components/CloudpackProvider/useTaskList.ts","webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/TaskList.tsx","webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/StatusDialog.module.css?9362","webpack://@ms-cloudpack/overlay/./src/components/StatusDialog/StatusDialog.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.root__Rl6XMfFcB4M4Sp5RJbh8 {\n display: flex;\n background: var(--cp-neutralLighter);\n}\n\n/* left border color indicator */\n.statusBar__RsdQpgzZbI9fI4mSfjJX {\n flex-shrink: 0;\n border-radius: 4px;\n width: 4px;\n background: var(--cp-errorDark);\n box-shadow: 2px 0 4px 0 var(--cp-errorTransparent);\n}\n.statusBar__RsdQpgzZbI9fI4mSfjJX.warning__EcBSTvORlKqFlDbz3mr9 {\n background: var(--cp-warningDark);\n box-shadow: 2px 0 4px 0 var(--cp-warningTransparent);\n}\n\n/* everything but the status bar */\n.content__oaWQstIJN1TotKTOLcwX {\n padding: 8px;\n display: flex;\n flex-grow: 1;\n overflow: hidden;\n flex-direction: column;\n}\n\n/* file path and error source */\n.titleArea__NUKs26I_j0KAivvaQbz4 {\n padding: 4px 0;\n font-weight: 500;\n}\n\n/* pre with error details */\n.text__qXRXiNO7j_FMkOf4b1Hi {\n word-wrap: break-word;\n white-space: pre-wrap;\n color: var(--cp-text);\n /* monospace fonts tend to have tight line-height and be too large */\n line-height: 1.5em;\n font-size: 0.9em;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/StatusDialog/TaskResultItem.module.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,aAAa;EACb,oCAAoC;AACtC;;AAEA,gCAAgC;AAChC;EACE,cAAc;EACd,kBAAkB;EAClB,UAAU;EACV,+BAA+B;EAC/B,kDAAkD;AACpD;AACA;EACE,iCAAiC;EACjC,oDAAoD;AACtD;;AAEA,kCAAkC;AAClC;EACE,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,gBAAgB;EAChB,sBAAsB;AACxB;;AAEA,+BAA+B;AAC/B;EACE,cAAc;EACd,gBAAgB;AAClB;;AAEA,2BAA2B;AAC3B;EACE,qBAAqB;EACrB,qBAAqB;EACrB,qBAAqB;EACrB,oEAAoE;EACpE,kBAAkB;EAClB,gBAAgB;AAClB\",\"sourcesContent\":[\".root {\\n display: flex;\\n background: var(--cp-neutralLighter);\\n}\\n\\n/* left border color indicator */\\n.statusBar {\\n flex-shrink: 0;\\n border-radius: 4px;\\n width: 4px;\\n background: var(--cp-errorDark);\\n box-shadow: 2px 0 4px 0 var(--cp-errorTransparent);\\n}\\n.statusBar.warning {\\n background: var(--cp-warningDark);\\n box-shadow: 2px 0 4px 0 var(--cp-warningTransparent);\\n}\\n\\n/* everything but the status bar */\\n.content {\\n padding: 8px;\\n display: flex;\\n flex-grow: 1;\\n overflow: hidden;\\n flex-direction: column;\\n}\\n\\n/* file path and error source */\\n.titleArea {\\n padding: 4px 0;\\n font-weight: 500;\\n}\\n\\n/* pre with error details */\\n.text {\\n word-wrap: break-word;\\n white-space: pre-wrap;\\n color: var(--cp-text);\\n /* monospace fonts tend to have tight line-height and be too large */\\n line-height: 1.5em;\\n font-size: 0.9em;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `root__Rl6XMfFcB4M4Sp5RJbh8`,\n\t\"statusBar\": `statusBar__RsdQpgzZbI9fI4mSfjJX`,\n\t\"warning\": `warning__EcBSTvORlKqFlDbz3mr9`,\n\t\"content\": `content__oaWQstIJN1TotKTOLcwX`,\n\t\"titleArea\": `titleArea__NUKs26I_j0KAivvaQbz4`,\n\t\"text\": `text__qXRXiNO7j_FMkOf4b1Hi`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@keyframes cp-spin__gcFQred791GFVqluefOr {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.spin__cSlR0KG2ydLnzVkkbwdj {\n animation: cp-spin__gcFQred791GFVqluefOr 1s linear infinite;\n}\n\n.searchbox__LfVxJ7Te2Dle6scWlkNw {\n background-color: var(--cp-white);\n font-weight: 400;\n box-shadow: none;\n padding: 0px 8px;\n min-width: 160px;\n /* align to far right */\n margin-left: auto;\n}\n.searchbox__LfVxJ7Te2Dle6scWlkNw:disabled::placeholder {\n color: var(--cp-textDisabled);\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/StatusDialog/StatusDialog.module.css\"],\"names\":[],\"mappings\":\"AAAA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;AACF;;AAEA;EACE,2DAAqC;AACvC;;AAEA;EACE,iCAAiC;EACjC,gBAAgB;EAChB,gBAAgB;EAChB,gBAAgB;EAChB,gBAAgB;EAChB,uBAAuB;EACvB,iBAAiB;AACnB;AACA;EACE,6BAA6B;AAC/B\",\"sourcesContent\":[\"@keyframes cp-spin {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n\\n.spin {\\n animation: cp-spin 1s linear infinite;\\n}\\n\\n.searchbox {\\n background-color: var(--cp-white);\\n font-weight: 400;\\n box-shadow: none;\\n padding: 0px 8px;\\n min-width: 160px;\\n /* align to far right */\\n margin-left: auto;\\n}\\n.searchbox:disabled::placeholder {\\n color: var(--cp-textDisabled);\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"spin\": `spin__cSlR0KG2ydLnzVkkbwdj`,\n\t\"cp-spin\": `cp-spin__gcFQred791GFVqluefOr`,\n\t\"searchbox\": `searchbox__LfVxJ7Te2Dle6scWlkNw`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/cjs.js??ruleSet[1].rules[0].oneOf[1].use[1]!./TaskResultItem.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/cjs.js??ruleSet[1].rules[0].oneOf[1].use[1]!./TaskResultItem.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import type { BundleMessage, BundleMessageLocation } from '@ms-cloudpack/common-types';\nimport type { FunctionComponent } from 'preact';\nimport cx from 'classnames';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport styles from './TaskResultItem.module.css';\nimport { Button } from '../Button/Button.js';\n\nexport interface TaskResultItemProps {\n item: BundleMessage;\n inputPath: string | undefined;\n /** 0-based index (will be adjusted for display) */\n index: number;\n type: 'error' | 'warning';\n}\n\n/**\n * Current and possible future bundler names, just to help with a friendlier error message\n * (we can't access the authoritative list from the bundler package here)\n */\nconst bundlerNames = ['ori', 'rollup', 'webpack', 'rspack', 'esbuild'];\n\n/**\n * Error or warning item in the details of a task/bundle result.\n */\nexport const TaskResultItem: FunctionComponent<TaskResultItemProps> = (props) => {\n const { item, inputPath, index, type } = props;\n const { location: loc, notes = [] } = item;\n\n // Update the message source to be more user-friendly. Usually it's either a bundler name,\n // or some internal of cloudpack, and since the user might not know about the different bundlers\n // and certainly doesn't know about cloudpack internals, a bit of context is helpful.\n const friendlySource = bundlerNames.includes(item.source) ? `${item.source} bundler` : `cloudpack ${item.source}`;\n\n return (\n <div class={styles.root}>\n <div class={cx(styles.statusBar, type === 'warning' && styles.warning)}></div>\n <div class={styles.content}>\n <div class={styles.titleArea}>\n {index + 1}. <ItemLocation loc={loc} inputPath={inputPath} /> (via: {friendlySource})\n </div>\n <pre class={styles.text}>{stripAnsi(item.text)}</pre>\n {notes.length > 0 && (\n // Formatting here might not be ideal, but messages very rarely have notes\n <details>\n <summary>Expand for more details</summary>\n <ul>\n {notes.map((note, i) => (\n <li key={i}>\n {note.location && (\n <>\n <ItemLocation loc={note.location} inputPath={inputPath} />\n <br />\n </>\n )}\n {note.text && <pre class={styles.text}>{stripAnsi(note.text)}</pre>}\n </li>\n ))}\n </ul>\n </details>\n )}\n </div>\n </div>\n );\n};\n\n/**\n * Remove ANSI codes from a string. (This is duplicated from `task-reporter` to avoid needing\n * browser support in that package, since the implementation is trivial.)\n */\nfunction stripAnsi(text: string): string {\n // eslint-disable-next-line no-control-regex -- supposed to match a control character\n return text.replace(/\\x1b\\[[\\d;]+(m|[AKB]\\b)/g, '');\n}\n\n/**\n * Return a link-button to open the source file, or a placeholder if the location is undefined.\n */\nconst ItemLocation: FunctionComponent<{ loc: BundleMessageLocation | undefined; inputPath: string | undefined }> = (\n props,\n) => {\n const { loc, inputPath } = props;\n const cloudpack = useCloudpack();\n\n if (!loc) {\n return '(path unavailable)';\n }\n\n const locationString = [loc.file, loc.line, loc.column].filter((val) => val !== undefined).join(':');\n // Don't make it clickable if we don't know the root path, or if the file path contains\n // webpack loader stuff. A real example:\n // ../../node_modules/.store/css-loader-virtual-bfb2cc7933/package/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!../../node_modules/.store/sass-loader-virtual-65ccb5bf2d/package/dist/cjs.js!./src/cssTest/example4.global.scss\n if (!inputPath || /[?!]/.test(locationString)) {\n return locationString;\n }\n\n const openSource = (): void => {\n if (!inputPath) return;\n void cloudpack.openCodeEditor.mutate({\n rootPath: inputPath,\n relativePath: loc.file,\n line: loc.line,\n column: loc.column,\n });\n };\n\n return (\n <Button variant=\"link\" onClick={openSource}>\n {locationString}\n </Button>\n );\n};\n","import type { FunctionComponent } from 'preact';\nimport type { TaskDescription } from '@ms-cloudpack/api-server/browser';\nimport { TaskResultItem } from './TaskResultItem.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport { Button } from '../Button/Button.js';\nimport {\n ResultsAccordion,\n ResultsAccordionContent,\n type ResultsAccordionProps,\n} from '../ResultsAccordion/ResultsAccordion.js';\nimport { Refresh20 } from '../icons/Refresh20.js';\n\nexport interface TaskStatusProps extends Pick<ResultsAccordionProps, 'index'> {\n task: TaskDescription;\n}\n\nfunction getCompletion(task: TaskDescription): string {\n if (task.status === 'pending') {\n return 'Running';\n }\n return [\n `Completed in ${task.duration}ms`,\n task.errors?.length && `${task.errors.length} error${task.errors.length > 1 ? 's' : ''}`,\n task.warnings?.length && `${task.warnings.length} warning${task.warnings.length > 1 ? 's' : ''}`,\n ]\n .filter(Boolean)\n .join(', ');\n}\n\n/**\n * Item (collapsible section) in the list of bundle task results in the StatusDialog.\n */\nexport const TaskStatus: FunctionComponent<TaskStatusProps> = (props) => {\n const { task } = props;\n const { name, warnings = [], errors = [], inputPath, outputPath } = task;\n const cloudpack = useCloudpack();\n\n const openPath = (rootPath: string) => void cloudpack.openFilePath.mutate({ rootPath });\n\n const openPackageJson = (): void => {\n if (!inputPath) return; // the button won't be shown in this case\n\n void cloudpack.openCodeEditor.mutate({\n rootPath: inputPath,\n relativePath: 'package.json',\n });\n };\n\n const restartTask = (): void => {\n if (!inputPath) return;\n\n void cloudpack.restartTask.mutate({ id: task.id, inputPath });\n };\n\n // This callback prevents rendering thousands of bundle result details unnecessarily.\n // It could be further optimized with useMemo etc if it's an actual performance issue.\n const getContent = () => (\n <>\n {inputPath ? (\n <ResultsAccordionContent\n itemName=\"Input path\"\n itemValue={\n <>\n <Button variant=\"link\" onClick={() => openPath(inputPath)}>\n {inputPath}\n </Button>{' '}\n (\n <Button variant=\"link\" onClick={openPackageJson}>\n package.json\n </Button>\n )\n </>\n }\n />\n ) : (\n 'No input path found for bundle task. This is a Cloudpack bug. Please report it.'\n )}\n {outputPath && (\n <ResultsAccordionContent\n itemName=\"Output path\"\n itemValue={\n <Button variant=\"link\" onClick={() => openPath(outputPath)}>\n {outputPath}\n </Button>\n }\n />\n )}\n {errors.length > 0 && (\n <ResultsAccordionContent title=\"Errors\">\n {errors.map((item, index) => (\n <TaskResultItem type=\"error\" key={index} item={item} inputPath={inputPath} index={index} />\n ))}\n </ResultsAccordionContent>\n )}\n {warnings.length > 0 && (\n <ResultsAccordionContent title=\"Warnings\">\n {warnings.map((item, index) => (\n <TaskResultItem type=\"warning\" key={index} item={item} inputPath={inputPath} index={index} />\n ))}\n </ResultsAccordionContent>\n )}\n </>\n );\n\n return (\n <ResultsAccordion\n name={name || '<unknown>'}\n index={props.index}\n result={errors.length ? 'error' : warnings.length ? 'warning' : 'success'}\n headerEndContent={getCompletion(task)}\n headerCommands={\n <Button\n variant=\"iconOnly\"\n onClick={restartTask}\n title=\"Re-bundle this package\"\n aria-label=\"Re-bundle this package\"\n >\n <Refresh20 />\n </Button>\n }\n getContent={getContent}\n />\n );\n};\n","import { useEffect, useState } from 'preact/hooks';\nimport { useCloudpack } from './CloudpackProvider.js';\nimport { taskListSource, type TaskList } from '@ms-cloudpack/api-server/browser';\n\nexport const useTaskList = (): TaskList => {\n const cloudpack = useCloudpack();\n const [taskList, setTaskList] = useState<TaskList>({ tasks: [] });\n\n useEffect(() => {\n const subscription = cloudpack?.onDataChanged.subscribe(taskListSource, {\n onData: (data) => {\n setTaskList(data as TaskList);\n },\n });\n\n return () => {\n subscription.unsubscribe();\n };\n }, [cloudpack]);\n\n return taskList;\n};\n","import type { FunctionComponent } from 'preact';\nimport { TaskStatus } from './TaskStatus.js';\nimport { useTaskList } from '../CloudpackProvider/useTaskList.js';\nimport type { TaskDescription } from '@ms-cloudpack/api-server/browser';\n\nexport interface TaskListProps {\n searchFilter: string;\n issuesOnly: boolean;\n}\n\n/**\n * List of task results to be displayed inside the StatusDialog.\n */\nexport const TaskList: FunctionComponent<TaskListProps> = ({ searchFilter, issuesOnly }) => {\n const taskList = useTaskList();\n\n let filteredTasks = [...taskList.tasks].sort(sortTasks);\n if (searchFilter) {\n searchFilter = searchFilter.toLowerCase();\n filteredTasks = filteredTasks.filter(({ name }) => name?.toLowerCase().includes(searchFilter));\n }\n if (issuesOnly) {\n filteredTasks = filteredTasks.filter(({ errors, warnings }) => errors?.length || warnings?.length);\n }\n\n // These must be wrapped in a fragment for proper layout by the Dialog\n return (\n <>\n {filteredTasks.map((task, index) => (\n <TaskStatus key={task.name} index={index} task={task} />\n ))}\n </>\n );\n};\n\n/**\n * Really the server should be sorting. Get stuff out of the browser.\n */\nfunction sortTasks(a: TaskDescription, b: TaskDescription): number {\n const aStatus = a.status === 'pending' ? 1 : 0;\n const bStatus = b.status === 'pending' ? 1 : 0;\n\n if (aStatus !== bStatus) {\n return aStatus > bStatus ? -1 : 1;\n }\n\n const aErrors = a.errors?.length || 0;\n const bErrors = b.errors?.length || 0;\n\n if (aErrors !== bErrors) {\n return aErrors > bErrors ? -1 : 1;\n }\n\n if (a.name === undefined && b.name === undefined) {\n return a.id < b.id ? -1 : 1;\n } else if (a.name === undefined) {\n return 1;\n } else if (b.name === undefined) {\n return -1;\n }\n\n return a.name < b.name ? -1 : 1;\n}\n","\n import API from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/.store/style-loader-virtual-bd73274477/package/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/cjs.js??ruleSet[1].rules[0].oneOf[1].use[1]!./StatusDialog.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/.store/css-loader-virtual-dc0abf2d03/package/dist/cjs.js??ruleSet[1].rules[0].oneOf[1].use[1]!./StatusDialog.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import cx from 'classnames';\nimport type { FunctionComponent, InputHTMLAttributes } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { TaskList } from './TaskList.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport { Button } from '../Button/Button.js';\nimport { Dialog } from '../Dialog/Dialog.js';\nimport { elementIds } from '../../constants.js';\nimport styles from './StatusDialog.module.css';\nimport inputStyles from '../Button/inputCommon.module.css';\nimport { Refresh20 } from '../icons/Refresh20.js';\n\nexport interface StatusDialogProps {\n onClose: () => void;\n}\n\nexport const StatusDialog: FunctionComponent<StatusDialogProps> = ({ onClose }) => {\n const cloudpack = useCloudpack();\n const [searchFilter, setSearchFilter] = useState('');\n const [issuesOnly, setIssuesOnly] = useState(false);\n const [isRestarting, setIsRestarting] = useState(false);\n\n const handleSearchChange = useCallback<NonNullable<InputHTMLAttributes['onInput']>>((event) => {\n event.preventDefault();\n setSearchFilter((event.target as HTMLInputElement).value);\n }, []);\n\n const restartAllTasks = () => {\n setIsRestarting(true);\n void cloudpack.restartAllTasks.mutate();\n };\n\n const toggleIssuesOnly = () => void setIssuesOnly((value) => !value);\n\n return (\n <Dialog\n title=\"Cloudpack bundle results\"\n id={elementIds.statusDialogRoot}\n draggable\n // Prevent closing the dialog and disable all the controls while restarting, to hopefully\n // avoid confusion (restarting currently involves clearing the whole cache and may take awhile).\n onClose={isRestarting ? undefined : onClose}\n commands={\n <>\n {/* Disable the button after it's clicked since the operation may take awhile, and the\n page will refresh when finished.\n TODO: ideally we'd have a spinner while restarting (this could probably be done by\n animating the refresh icon) */}\n <Button variant=\"primary\" onClick={restartAllTasks} disabled={isRestarting}>\n {/* the refresh icon spins while restarting to show something is happening */}\n <Refresh20 class={cx(isRestarting && styles.spin)} /> Re-bundle all packages\n </Button>\n <Button onClick={toggleIssuesOnly} disabled={isRestarting}>\n {issuesOnly ? 'Show all packages' : 'Show packages with issues'}\n </Button>\n <input\n type=\"text\"\n aria-label=\"Search\"\n placeholder=\"Search\"\n value={searchFilter}\n onInput={handleSearchChange}\n class={cx(styles.searchbox, inputStyles.root, inputStyles.standard)}\n disabled={isRestarting}\n />\n </>\n }\n >\n {isRestarting ? (\n 'Preparing to re-bundle (the page will refresh when ready)...'\n ) : (\n <TaskList searchFilter={searchFilter} issuesOnly={issuesOnly} />\n )}\n </Dialog>\n );\n};\n\nexport default StatusDialog;\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","bundlerNames","TaskResultItem","props","item","inputPath","index","type","location","loc","notes","friendlySource","includes","source","div","class","styles","root","cx","statusBar","warning","content","titleArea","ItemLocation","pre","text","stripAnsi","length","details","summary","ul","map","note","i","li","br","replace","cloudpack","useCloudpack","locationString","file","line","column","filter","val","join","test","Button","variant","onClick","openCodeEditor","mutate","rootPath","relativePath","getCompletion","task","status","duration","errors","warnings","Boolean","TaskStatus","name","outputPath","openPath","openFilePath","openPackageJson","ResultsAccordion","result","headerEndContent","headerCommands","restartTask","title","aria-label","Refresh20","getContent","ResultsAccordionContent","itemName","itemValue","TaskList","searchFilter","issuesOnly","filteredTasks","taskList","setTaskList","useState","tasks","useEffect","subscription","onDataChanged","subscribe","taskListSource","onData","data","unsubscribe","useTaskList","sort","sortTasks","toLowerCase","a","b","aStatus","bStatus","aErrors","bErrors","StatusDialog","onClose","setSearchFilter","setIssuesOnly","isRestarting","setIsRestarting","handleSearchChange","useCallback","event","preventDefault","target","value","Dialog","elementIds","statusDialogRoot","draggable","commands","restartAllTasks","disabled","spin","input","placeholder","onInput","searchbox","inputStyles","standard"],"ignoreList":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- export const __webpack_esm_id__=250;export const __webpack_esm_ids__=[250];export const __webpack_esm_modules__={116:(o,t,e)=>{e.d(t,{elementIds:()=>a});const a={root:"cloudpack-overlay-root",errorDialogRoot:"cloudpack-overlay-error-dialog",statusDialogRoot:"cloudpack-overlay-status-dialog",dialogTitle:"cloudpack-overlay-dialog-title",statusBadgeRoot:"cloudpack-overlay-status-badge"}}};import{__webpack_require__ as o}from"../runtime.js";import*as t from"./constants.js";o.C(t);const e=o(o.s=116).elementIds;export{e as elementIds};
1
+ var o={d:(e,a)=>{for(var t in a)o.o(a,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e)},e={};o.d(e,{elementIds:()=>a});const a={root:"cloudpack-overlay-root",errorDialogRoot:"cloudpack-overlay-error-dialog",statusDialogRoot:"cloudpack-overlay-status-dialog",dialogTitle:"cloudpack-overlay-dialog-title",statusBadgeRoot:"cloudpack-overlay-status-badge"},t=e.elementIds;export{t as elementIds};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lib/constants.js","mappings":"yJAGO,MAAMA,EAAa,CAIxBC,KAAM,yBAINC,gBAAiB,iCAIjBC,iBAAkB,kCAIlBC,YAAa,iCAIbC,gBAAiB,iC","sources":["webpack://@ms-cloudpack/overlay/./src/constants.ts"],"sourcesContent":["// This file serves as a separate entry point which can be imported without rendering the overlay\n// as a side effect.\n\nexport const elementIds = {\n /**\n * ID for the root element of the overlay.\n */\n root: 'cloudpack-overlay-root',\n /**\n * ID for the root element of the error dialog.\n */\n errorDialogRoot: 'cloudpack-overlay-error-dialog',\n /**\n * ID for the root element of the status dialog.\n */\n statusDialogRoot: 'cloudpack-overlay-status-dialog',\n /**\n * ID for the title element of any dialog.\n */\n dialogTitle: 'cloudpack-overlay-dialog-title',\n /**\n * ID for the root element of the status badge.\n */\n statusBadgeRoot: 'cloudpack-overlay-status-badge',\n} as const;\n"],"names":["elementIds","root","errorDialogRoot","statusDialogRoot","dialogTitle","statusBadgeRoot"],"ignoreList":[],"sourceRoot":""}
1
+ {"version":3,"file":"lib/constants.js","mappings":"AACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,+BCG3E,MAAMI,EAAa,CAIxBC,KAAM,yBAINC,gBAAiB,iCAIjBC,iBAAkB,kCAIlBC,YAAa,iCAIbC,gBAAiB,kC","sources":["webpack://@ms-cloudpack/overlay/webpack/bootstrap","webpack://@ms-cloudpack/overlay/webpack/runtime/define property getters","webpack://@ms-cloudpack/overlay/webpack/runtime/hasOwnProperty shorthand","webpack://@ms-cloudpack/overlay/./src/constants.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// This file serves as a separate entry point which can be imported without rendering the overlay\n// as a side effect.\n\nexport const elementIds = {\n /**\n * ID for the root element of the overlay.\n */\n root: 'cloudpack-overlay-root',\n /**\n * ID for the root element of the error dialog.\n */\n errorDialogRoot: 'cloudpack-overlay-error-dialog',\n /**\n * ID for the root element of the status dialog.\n */\n statusDialogRoot: 'cloudpack-overlay-status-dialog',\n /**\n * ID for the title element of any dialog.\n */\n dialogTitle: 'cloudpack-overlay-dialog-title',\n /**\n * ID for the root element of the status badge.\n */\n statusBadgeRoot: 'cloudpack-overlay-status-badge',\n} as const;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","elementIds","root","errorDialogRoot","statusDialogRoot","dialogTitle","statusBadgeRoot"],"ignoreList":[],"sourceRoot":""}