@spfx-extensions/package 1.0.0 → 1.4.8

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.
Files changed (33) hide show
  1. package/dist/8d1029da-85e6-48cc-aaaf-37a5bbc0b9be.manifest.json +2 -2
  2. package/dist/d6ca1fc2-0591-4c6d-8a25-cae3262c017b.manifest.json +2 -2
  3. package/dist/{debug/ClientSideAssets/spfx-extension-application-customizer_02e75437509d6228ebfb.js → spfx-extension-application-customizer_deec56e911443a8e38f9.js} +1 -1
  4. package/dist/spfx-extension-core.js +2202 -1
  5. package/dist/spfx-extension-coreconfigurator.js +39509 -96
  6. package/dist/spfx-extension-loader_a2f8425b774226f5f084.js +3 -0
  7. package/dist/spfx-extension-wrapper.js +130 -1
  8. package/dist/{debug/ClientSideAssets/spfx-extensionloader-web-part_b51ed89cf71889d67683.js → spfx-extensionloader-web-part_cc4f89190581659bbfff.js} +1 -1
  9. package/package.json +2 -2
  10. package/dist/debug/83e13c11-682e-4eaa-9ae0-74617ca28f96/ClientSideInstance.xml +0 -9
  11. package/dist/debug/83e13c11-682e-4eaa-9ae0-74617ca28f96/Extension_8d1029da-85e6-48cc-aaaf-37a5bbc0b9be.xml +0 -1
  12. package/dist/debug/83e13c11-682e-4eaa-9ae0-74617ca28f96/WebPart_d6ca1fc2-0591-4c6d-8a25-cae3262c017b.xml +0 -1
  13. package/dist/debug/83e13c11-682e-4eaa-9ae0-74617ca28f96/elements.xml +0 -9
  14. package/dist/debug/AppManifest.xml +0 -1
  15. package/dist/debug/ClientSideAssets/3be36e80-4431-4b52-99c5-0a339b4e696e_color.png +0 -0
  16. package/dist/debug/ClientSideAssets/3be36e80-4431-4b52-99c5-0a339b4e696e_outline.png +0 -0
  17. package/dist/debug/ClientSideAssets/spfx-extension-core.js +0 -1
  18. package/dist/debug/ClientSideAssets/spfx-extension-coreconfigurator.js +0 -169
  19. package/dist/debug/ClientSideAssets/spfx-extension-loader_009c64efcf40eaeca598.js +0 -3
  20. package/dist/debug/ClientSideAssets/spfx-extension-wrapper.js +0 -1
  21. package/dist/debug/ClientSideAssets.xml +0 -1
  22. package/dist/debug/ClientSideAssets.xml.config.xml +0 -1
  23. package/dist/debug/[Content_Types].xml +0 -1
  24. package/dist/debug/_rels/.rels +0 -1
  25. package/dist/debug/_rels/AppManifest.xml.rels +0 -1
  26. package/dist/debug/_rels/ClientSideAssets.xml.rels +0 -1
  27. package/dist/debug/_rels/feature_83e13c11-682e-4eaa-9ae0-74617ca28f96.xml.rels +0 -1
  28. package/dist/debug/feature_83e13c11-682e-4eaa-9ae0-74617ca28f96.xml +0 -1
  29. package/dist/debug/feature_83e13c11-682e-4eaa-9ae0-74617ca28f96.xml.config.xml +0 -1
  30. package/dist/deploy/sp-fx-extensions.sppkg +0 -0
  31. package/dist/spfx-extension-application-customizer_02e75437509d6228ebfb.js +0 -1
  32. package/dist/spfx-extension-loader_009c64efcf40eaeca598.js +0 -3
  33. package/dist/spfx-extensionloader-web-part_b51ed89cf71889d67683.js +0 -3
@@ -0,0 +1,3 @@
1
+ "use strict";(self.webpackJsonp_754d5434b112b964721b0222fb6e143b=self.webpackJsonp_754d5434b112b964721b0222fb6e143b||[]).push([[548],{364:(e,t,n)=>{n.d(t,{initCore:()=>u});var a=n(367),i=(Object.create,Object.getPrototypeOf,Object.defineProperty,Object.getOwnPropertyNames,Object.prototype.hasOwnProperty,"[SPFxExtensions/Core]");const r=n.p+"spfx-extension-core.js?v=f01fcd9372b396075a7e",o=n.p+"spfx-extension-coreconfigurator.js?v=5326bbb238803d8398d3",s=n.p+"spfx-extension-wrapper.js?v=c3b363c1b042c5c81dbf";let c,d=!1;async function l(){return Promise.resolve({coreUrl:r,configuratorUrl:o,wrapperUrl:s})}async function u(e,t,n){if(!c){const t="2025-05-01T08:40:07.631Z";console.info(a.Lf,"Initializing Core from SPFx Built:",t),c=async function(e,t){if(window.__SPFxExtensions?.__CorePromise)return window.__SPFxExtensions.__CorePromise;!function(e){if(!window.__SPFxExtensions){const{promise:e,resolve:t}=Promise.withResolvers();window.__SPFxExtensions={__CorePromise:e,__CorePromiseResolver:t}}if(!window.__SPFxExtensions.Utils){const{promise:t,resolve:n}=Promise.withResolvers(),{promise:a,resolve:i}=Promise.withResolvers();window.__SPFxExtensions.Utils={environmentType:e,initializedThroughSPFX:true,placeHolderProviderPromise:t,placeHolderResolver:n,appManifestPromises:[],spAppInitializationPromise:a,spAppInitializationPromiseResolver:i,fluentIconsInitialized:!1,ConfiguratorPageUrl:"/sites/appcatalog/SPFxExtensionsData/SitePages/SPFxExtensionsConfigurator.aspx"}}}(t);const n=await async function(e){const t=Number(localStorage.getItem("SPFXEXT")),n={core:"",configuratorUrl:""};if(t>0){const e=Date.now();return n.core=`https://localhost:${t}/__spfxCore.js?v=${e}`,n.configuratorUrl=`https://localhost:${t}/__spfxCoreConfigurator.js?v=${e}`,n}const{coreUrl:a,configuratorUrl:r}=await e();if(!a)throw new Error(`${i} Unable to resolve SPFx Core location`);if(!r)throw new Error(`${i} Unable to resolve SPFx Core Configurator location`);return n.core=a,n.configuratorUrl=r,console.info(i,"Core location resolved to",n),n}(e);window.__SPFxExtensions.__ConfiguratorUrl=n.configuratorUrl;const a=document.createElement("script");return a.src=n.core,a.type="module",a.addEventListener("error",e=>{console.error(i,"Catastrophic failure, cannot load SPFxExtensions Core from",n,e)}),document.head.appendChild(a),window.__SPFxExtensions.__CorePromise}(l,e)}await c,window.__SPFxExtensions.Utils&&!window.__SPFxExtensions.Utils.initializedThroughSPFX&&(window.__SPFxExtensions.Utils.environmentType=e,window.__SPFxExtensions.Utils.initializedThroughSPFX=!0),!d&&t&&n&&(d=!0,window.__SPFxExtensions.Utils.placeHolderResolver({placeHolderProvider:t,eventObserver:n}))}}
2
+ ,367:(e,t,n)=>{n.d(t,{Bc:()=>r,Lf:()=>o,Ne:()=>a,oz:()=>i});const a="Select one of these web parts for this column.",i="Edit page and select webpart.",r="Webpart that loads an app of your choice.",o="[SPFxExtensions]"}
3
+ }]);
@@ -1 +1,130 @@
1
- var Y=Object.create;var{getPrototypeOf:Z,defineProperty:J,getOwnPropertyNames:$}=Object;var b=Object.prototype.hasOwnProperty;var f=(j,k,q)=>{q=j!=null?Y(Z(j)):{};let B=k||!j||!j.__esModule?J(q,"default",{value:j,enumerable:!0}):q;for(let G of $(j))if(!b.call(B,G))J(B,G,{get:()=>j[G],enumerable:!0});return B};var w=(j,k)=>()=>(k||j((k={exports:{}}).exports,k),k.exports);var N=(j,k)=>{for(var q in k)J(j,q,{get:k[q],enumerable:!0,configurable:!0,set:(B)=>k[q]=()=>B})};var O=(j,k)=>()=>(j&&(k=j(j=0)),k);async function D(j){let k=Number(localStorage.getItem("SPFXEXT")),q={core:"",configuratorUrl:""};if(k>0){let H=Date.now();return q.core=`https://localhost:${k}/__spfxCore.js?v=${H}`,q.configuratorUrl=`https://localhost:${k}/__spfxCoreConfigurator.js?v=${H}`,q}let{coreUrl:B,configuratorUrl:G}=await j();if(!B)throw new Error("[SPFxExtensions/Core] Unable to resolve SPFx Core location");if(!G)throw new Error("[SPFxExtensions/Core] Unable to resolve SPFx Core Configurator location");return q.core=B,q.configuratorUrl=G,console.info("[SPFxExtensions/Core]","Core location resolved to",q),q}function L(j,k){if(!window.__SPFxExtensions){let{promise:q,resolve:B}=Promise.withResolvers();window.__SPFxExtensions={__CorePromise:q,__CorePromiseResolver:B}}if(!window.__SPFxExtensions.Utils){let{promise:q,resolve:B}=Promise.withResolvers(),{promise:G,resolve:H}=Promise.withResolvers();window.__SPFxExtensions.Utils={environmentType:j,initializedThroughSPFX:k,placeHolderProviderPromise:q,placeHolderResolver:B,appManifestPromises:[],spAppInitializationPromise:G,spAppInitializationPromiseResolver:H,fluentIconsInitialized:!1,ConfiguratorPageUrl:"/sites/appcatalog/SPFxExtensionsData/SitePages/SPFxExtensionsConfigurator.aspx"}}}async function V(j,k,q){if(window.__SPFxExtensions?.__CorePromise)return window.__SPFxExtensions.__CorePromise;L(k,q);let B=await D(j);window.__SPFxExtensions.__ConfiguratorUrl=B.configuratorUrl;let G=document.createElement("script");return G.src=B.core,G.type="module",G.addEventListener("error",(H)=>{console.error("[SPFxExtensions/Core]","Catastrophic failure, cannot load SPFxExtensions Core from",B,H)}),document.head.appendChild(G),window.__SPFxExtensions.__CorePromise}var Q="[SPFxExtensions/Wrapper]",M=!window._spBodyOnLoadFunctions,K=void 0;async function W(){if(M){console.error(Q,"This module can only be initialized in classic mode");return}if(!K){console.info(Q,"Initializing SPFx Extensions Core from Classic SharePoint page");let j=import.meta.resolve(`./spfx-extension-core.js?v=${Date.now()}`),k=import.meta.resolve(`./spfx-extension-coreconfigurator.js?v=${Date.now()}`);K=V(async()=>{return{coreUrl:j,configuratorUrl:k}},"ClassicSharePoint",!1)}return K}function A(){if(!window._spBodyOnLoadCalled&&window._spBodyOnLoadFunctions){window._spBodyOnLoadFunctions.push(W);return}if(window._spBodyOnLoadCalled){W();return}console.error(Q,"No _spBodyOnLoadFunctions or _spBodyOnLoadCalled object present. Can not initialize classic wrapper")}export{A as init};
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __toESM = (mod, isNodeMode, target) => {
7
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
8
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
+ for (let key of __getOwnPropNames(mod))
10
+ if (!__hasOwnProp.call(to, key))
11
+ __defProp(to, key, {
12
+ get: () => mod[key],
13
+ enumerable: true
14
+ });
15
+ return to;
16
+ };
17
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
18
+ var __export = (target, all) => {
19
+ for (var name in all)
20
+ __defProp(target, name, {
21
+ get: all[name],
22
+ enumerable: true,
23
+ configurable: true,
24
+ set: (newValue) => all[name] = () => newValue
25
+ });
26
+ };
27
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
28
+
29
+ // src/core/__spfxLoader.ts
30
+ var SPFXPREFIX = "[SPFxExtensions/Core]";
31
+ async function getRootCoreLocation(suggestedUrlResolver) {
32
+ const devPort = Number(localStorage.getItem("SPFXEXT"));
33
+ const coreUrls = {
34
+ core: "",
35
+ configuratorUrl: ""
36
+ };
37
+ if (devPort > 0) {
38
+ const t = Date.now();
39
+ coreUrls.core = `https://localhost:${devPort}/__spfxCore.js?v=${t}`;
40
+ coreUrls.configuratorUrl = `https://localhost:${devPort}/__spfxCoreConfigurator.js?v=${t}`;
41
+ return coreUrls;
42
+ }
43
+ const { coreUrl, configuratorUrl } = await suggestedUrlResolver();
44
+ if (!coreUrl) {
45
+ const msg = "Unable to resolve SPFx Core location";
46
+ throw new Error(`${SPFXPREFIX} ${msg}`);
47
+ }
48
+ if (!configuratorUrl) {
49
+ const msg = "Unable to resolve SPFx Core Configurator location";
50
+ throw new Error(`${SPFXPREFIX} ${msg}`);
51
+ }
52
+ coreUrls.core = coreUrl;
53
+ coreUrls.configuratorUrl = configuratorUrl;
54
+ console.info(SPFXPREFIX, "Core location resolved to", coreUrls);
55
+ return coreUrls;
56
+ }
57
+ function prepareEnv(environmentType, initializedThroughSPFX) {
58
+ if (!window.__SPFxExtensions) {
59
+ const { promise: corePromise, resolve: coreResolver } = Promise.withResolvers();
60
+ window.__SPFxExtensions = {
61
+ __CorePromise: corePromise,
62
+ __CorePromiseResolver: coreResolver
63
+ };
64
+ }
65
+ if (!window.__SPFxExtensions.Utils) {
66
+ const { promise: placeHolderProviderPromise, resolve: placeHolderResolver } = Promise.withResolvers();
67
+ const { promise: spAppInitializationPromise, resolve: spAppInitializationPromiseResolver } = Promise.withResolvers();
68
+ window.__SPFxExtensions.Utils = {
69
+ environmentType,
70
+ initializedThroughSPFX,
71
+ placeHolderProviderPromise,
72
+ placeHolderResolver,
73
+ appManifestPromises: [],
74
+ spAppInitializationPromise,
75
+ spAppInitializationPromiseResolver,
76
+ fluentIconsInitialized: false,
77
+ ConfiguratorPageUrl: "/sites/appcatalog/SPFxExtensionsData/SitePages/SPFxExtensionsConfigurator.aspx"
78
+ };
79
+ }
80
+ }
81
+ async function loadCoreForSPFxOrClassic(suggestedUrlResolver, envType, initializedThroughSPFX) {
82
+ if (window.__SPFxExtensions?.__CorePromise) {
83
+ return window.__SPFxExtensions.__CorePromise;
84
+ }
85
+ prepareEnv(envType, initializedThroughSPFX);
86
+ const coreAddress = await getRootCoreLocation(suggestedUrlResolver);
87
+ window.__SPFxExtensions.__ConfiguratorUrl = coreAddress.configuratorUrl;
88
+ const coreScript = document.createElement("script");
89
+ coreScript.src = coreAddress.core;
90
+ coreScript.type = "module";
91
+ coreScript.addEventListener("error", (err) => {
92
+ console.error(SPFXPREFIX, "Catastrophic failure, cannot load SPFxExtensions Core from", coreAddress, err);
93
+ });
94
+ document.head.appendChild(coreScript);
95
+ return window.__SPFxExtensions.__CorePromise;
96
+ }
97
+
98
+ // src/core/__spfxWrapperClassic.ts
99
+ var SPFXPREFIX2 = "[SPFxExtensions/Wrapper]";
100
+ var IS_MODERN_EXPIRIENCE = !window._spBodyOnLoadFunctions;
101
+ var corePromise = undefined;
102
+ async function initClassicCore() {
103
+ if (IS_MODERN_EXPIRIENCE) {
104
+ console.error(SPFXPREFIX2, "This module can only be initialized in classic mode");
105
+ return;
106
+ }
107
+ if (!corePromise) {
108
+ console.info(SPFXPREFIX2, "Initializing SPFx Extensions Core from Classic SharePoint page");
109
+ const coreUrl = import.meta.resolve(`./spfx-extension-core.js?v=${Date.now()}`);
110
+ const configuratorUrl = import.meta.resolve(`./spfx-extension-coreconfigurator.js?v=${Date.now()}`);
111
+ corePromise = loadCoreForSPFxOrClassic(async () => {
112
+ return { coreUrl, configuratorUrl };
113
+ }, "ClassicSharePoint", false);
114
+ }
115
+ return corePromise;
116
+ }
117
+ function init() {
118
+ if (!window._spBodyOnLoadCalled && window._spBodyOnLoadFunctions) {
119
+ window._spBodyOnLoadFunctions.push(initClassicCore);
120
+ return;
121
+ }
122
+ if (window._spBodyOnLoadCalled) {
123
+ initClassicCore();
124
+ return;
125
+ }
126
+ console.error(SPFXPREFIX2, "No _spBodyOnLoadFunctions or _spBodyOnLoadCalled object present. Can not initialize classic wrapper");
127
+ }
128
+ export {
129
+ init
130
+ };
@@ -1,3 +1,3 @@
1
1
  (()=>{var e=document.currentScript;define(["@microsoft/sp-core-library","@microsoft/sp-property-pane","@microsoft/sp-webpart-base"],(t,n,a)=>(()=>{"use strict";var i,r,o,s={367:(e,t,n)=>{n.d(t,{Bc:()=>r,Lf:()=>o,Ne:()=>a,oz:()=>i});const a="Select one of these web parts for this column.",i="Edit page and select webpart.",r="Webpart that loads an app of your choice.",o="[SPFxExtensions]"}
2
2
  ,574:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var a,i,r=function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};!function(e){e[e.sync=0]="sync",e[e.async=1]="async"}(a||(a={})),function(e){e[e.onlyThemable=1]="onlyThemable",e[e.onlyNonThemable=2]="onlyNonThemable",e[e.all=3]="all"}(i||(i={}));var o,s,c,d="undefined"==typeof window?n.g:window,l=d&&d.CSPSettings&&d.CSPSettings.nonce,u=((c=d.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(c=r(r({},c),{perf:{count:0,duration:0},runState:{flushTimer:0,mode:a.sync,buffer:[]}})),c.registeredThemableStyles||(c=r(r({},c),{registeredThemableStyles:[]})),d.__themeState__=c,c),f=/[\'\"]\[theme:\s*(\w+)\s*(?:\,\s*default:\s*([\\"\']?[\.\,\(\)\#\-\s\w]*[\.\,\(\)\#\-\w][\"\']?))?\s*\][\'\"]/g,p=function(){return"undefined"!=typeof performance&&performance.now?performance.now():Date.now()};function m(e){var t=p();e();var n=p();u.perf.duration+=n-t}function _(e,t){u.loadStyles?u.loadStyles(h(e).styleString,e):function(e){if("undefined"!=typeof document){var t=document.getElementsByTagName("head")[0],n=document.createElement("style"),a=h(e),i=a.styleString,r=a.themable;n.setAttribute("data-load-themed-styles","true"),l&&n.setAttribute("nonce",l),n.appendChild(document.createTextNode(i)),u.perf.count++,t.appendChild(n);var o=document.createEvent("HTMLEvents");o.initEvent("styleinsert",!0,!1),o.args={newStyle:n},document.dispatchEvent(o);var s={styleElement:n,themableStyle:e};r?u.registeredThemableStyles.push(s):u.registeredStyles.push(s)}}(e)}function h(e){var t=u.theme,n=!1;return{styleString:(e||[]).map(function(e){var a=e.theme;if(a){n=!0;var i=t?t[a]:void 0,r=e.defaultValue||"inherit";return t&&!i&&console,i||r}return e.rawString}).join(""),themable:n}}o='.spfxExtensionloader_be4e0fd1{color:"[theme:bodyText, default: #323130]";color:var(--bodyText);overflow:hidden;padding:1em}.spfxExtensionloader_be4e0fd1.teams_be4e0fd1{font-family:Segoe UI,-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif}.welcome_be4e0fd1{text-align:center}.welcomeImage_be4e0fd1{max-width:420px;width:100%}.links_be4e0fd1 a{color:"[theme:link, default:#03787c]";color:var(--link);text-decoration:none}.links_be4e0fd1 a:hover{color:"[theme:linkHovered, default: #014446]";color:var(--linkHovered);text-decoration:underline}.SPFxExtensionApp_be4e0fd1 .loader_be4e0fd1{animation:rotation_be4e0fd1 1s linear infinite;border:2px solid #003755;border-bottom-color:#009fda;border-radius:50%;box-sizing:border-box;display:inline-block;height:28px;width:28px}@keyframes rotation_be4e0fd1{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.SPFxExtensionApp_be4e0fd1 .buttonLoader_be4e0fd1{align-items:center;border:none;display:flex;height:80px;justify-content:center;width:120px}.SPFxExtensionApp_be4e0fd1 .shimmerShine_be4e0fd1{-webkit-animation-duration:1s;-webkit-animation-fill-mode:forwards;-webkit-animation-iteration-count:infinite;-webkit-animation-name:placeholderShimmer_be4e0fd1;-webkit-animation-timing-function:linear;background:#f6f7f8;background-image:linear-gradient(90deg,#f6f7f8 0,#edeef1 20%,#f6f7f8 40%,#f6f7f8);background-repeat:no-repeat;background-size:200px 80px;border:none;display:block;height:80px;position:relative;width:120px}@keyframes placeholderShimmer_be4e0fd1{0%{background-position:-80px 0}to{background-position:120px 0}}.SPFxExtensionApp_be4e0fd1 .applicationListSection_be4e0fd1{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center;min-height:320px;text-align:center}.SPFxExtensionApp_be4e0fd1 .header_be4e0fd1{color:#242424;font-weight:600;letter-spacing:1px;line-height:32px;padding:0 12px}.SPFxExtensionApp_be4e0fd1 .icon_be4e0fd1{font-size:28px;font-style:normal;height:28px;line-height:28px;min-width:28px;width:28px}.SPFxExtensionApp_be4e0fd1 .icon_be4e0fd1>img,.SPFxExtensionApp_be4e0fd1 .icon_be4e0fd1>svg{height:auto;width:100%}.SPFxExtensionApp_be4e0fd1 .iconFont_be4e0fd1{background-color:#f6f7f8}.SPFxExtensionApp_be4e0fd1 .appButtonsContainer_be4e0fd1{align-items:center;display:flex;flex-wrap:wrap;height:100%;justify-content:center}.SPFxExtensionApp_be4e0fd1 .appButtonsWrapper_be4e0fd1{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;height:100%;justify-content:flex-start;width:100%}.SPFxExtensionApp_be4e0fd1 .appButton_be4e0fd1{align-items:center;background-color:unset;border:none;display:flex;flex-direction:column;height:80px;padding-top:14px;width:120px}.SPFxExtensionApp_be4e0fd1 .appButton_be4e0fd1:hover{background-color:#c8e3fa}',void 0===(s=!0)&&(s=!1),m(function(){var e=Array.isArray(o)?o:function(e){var t=[];if(e){for(var n=0,a=void 0;a=f.exec(e);){var i=a.index;i>n&&t.push({rawString:e.substring(n,i)}),t.push({theme:a[1],defaultValue:a[2]}),n=f.lastIndex}t.push({rawString:e.substring(n)})}return t}(o),t=u.runState,n=t.mode,i=t.buffer,r=t.flushTimer;s||n===a.async?(i.push(e),r||(u.runState.flushTimer=self.setTimeout(function(){u.runState.flushTimer=0,m(function(){var e=u.runState.buffer.slice();u.runState.buffer=[];var t=[].concat.apply([],e);t.length>0&&_(t)})},0))):_(e)});const b={spfxExtensionloader_be4e0fd1:"spfxExtensionloader_be4e0fd1",teams_be4e0fd1:"teams_be4e0fd1",welcome_be4e0fd1:"welcome_be4e0fd1",welcomeImage_be4e0fd1:"welcomeImage_be4e0fd1",links_be4e0fd1:"links_be4e0fd1",SPFxExtensionApp_be4e0fd1:"SPFxExtensionApp_be4e0fd1",loader_be4e0fd1:"loader_be4e0fd1",rotation_be4e0fd1:"rotation_be4e0fd1",buttonLoader_be4e0fd1:"buttonLoader_be4e0fd1",shimmerShine_be4e0fd1:"shimmerShine_be4e0fd1",placeholderShimmer_be4e0fd1:"placeholderShimmer_be4e0fd1",applicationListSection_be4e0fd1:"applicationListSection_be4e0fd1",header_be4e0fd1:"header_be4e0fd1",icon_be4e0fd1:"icon_be4e0fd1",iconFont_be4e0fd1:"iconFont_be4e0fd1",appButtonsContainer_be4e0fd1:"appButtonsContainer_be4e0fd1",appButtonsWrapper_be4e0fd1:"appButtonsWrapper_be4e0fd1",appButton_be4e0fd1:"appButton_be4e0fd1"}}
3
- ,676:e=>{e.exports=t},877:e=>{e.exports=n},642:e=>{e.exports=a}},c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return s[e](n,n.exports,d),n.exports}d.m=s,d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce((t,n)=>(d.f[n](e,t),t),[])),d.u=e=>"spfx-extension-loader_009c64efcf40eaeca598.js",d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},r="a21cb634b9853a44eebbd86b6c31bc1c:",d.l=(e,t,n,a)=>{if(i[e])i[e].push(t);else{var o,s;if(void 0!==n)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var u=c[l];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+n){o=u;break}}o||(s=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-webpack",r+n),o.src=e,0!==o.src.indexOf(window.location.origin+"/")&&(o.crossOrigin="anonymous")),i[e]=[t];var f=(t,n)=>{o.onerror=o.onload=null,clearTimeout(p);var a=i[e];if(delete i[e],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach(e=>e(n)),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=f.bind(null,o.onerror),o.onload=f.bind(null,o.onload),s&&document.head.appendChild(o)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o=e?e.src:"",d.p=o.slice(0,o.lastIndexOf("/")+1),(()=>{var e={650:0};d.f.j=(t,n)=>{var a=d.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var i=new Promise((n,i)=>a=e[t]=[n,i]);n.push(a[2]=i);var r=d.p+d.u(t),o=new Error;d.l(r,n=>{if(d.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",o.name="ChunkLoadError",o.type=i,o.request=r,a[1](o)}},"chunk-"+t,t)}};var t=(t,n)=>{var a,i,[r,o,s]=n,c=0;if(r.some(t=>0!==e[t])){for(a in o)d.o(o,a)&&(d.m[a]=o[a]);s&&s(d)}for(t&&t(n);c<r.length;c++)i=r[c],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackJsonp_a21cb634b9853a44eebbd86b6c31bc1c=self.webpackJsonp_a21cb634b9853a44eebbd86b6c31bc1c||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var l={};return(()=>{d.r(l),d.d(l,{default:()=>i});var e=d(676),t=d(877),n=d(642);d(574);var a=d(367);class i extends n.BaseClientSideWebPart{SPFxExtensionInstance;allApps=[];appCatalogUrl="/sites/appcatalog";dropDownProps={options:[],selectedKey:"",disabled:!0};appDescription="";hideAppSelectorWhenAppLoaded=!1;hideConfiguratorButton=!1;configDomElement;emptyRendered=!1;_isDarkTheme=!1;async onInit(){const t=e.Environment.type===e.EnvironmentType.SharePoint?"SharePoint":"ClassicSharePoint",{initCore:n}=await d.e(548).then(d.bind(d,364));await n(t),this.appCatalogUrl=window.__SPFxExtensions.Utils.ConfiguratorPageUrl,this.properties.selectedApp&&this.mountApp(this.properties.selectedApp).catch(e=>{console.error(a.Lf,"Error while mounting appid",this.properties.selectedApp,e)})}onPropertyPaneConfigurationComplete(){!this.context.propertyPane.isPropertyPaneOpen()&&this.SPFxExtensionInstance&&this.SPFxExtensionInstance.executeListeners("onConfigurationClose",void 0)}onPropertyPaneFieldChanged(e,t,n){if("selectedApp"===e){if(t&&t!==n&&this.SPFxExtensionInstance){if(!confirm("You are about to switch app, this will erase all previous app configuration. Are you sure?"))return void(this.properties[e]=t);this.unmountApp()}n&&(this.webpartSectionElement.remove(),this.mountApp(n).catch(e=>{console.error(a.Lf,"Error while mounting appid",n,e)}))}}onDisplayModeChanged(t){const n=t===e.DisplayMode.Edit?"Read":"Edit";this.SPFxExtensionInstance&&this.SPFxExtensionInstance.executeListeners("onDisplayModeChange",n)}openPropertyPane(){this.context.propertyPane.open()}closePropertyPane(){this.context.propertyPane.close()}isPropertyPaneOpen(){return this.context.propertyPane.isPropertyPaneOpen()}saveConfigValue(e,t=!0){this.properties.SPFxExtensionAppConfiguration=e,t&&this.SPFxExtensionInstance?.executeListeners("onConfigurationChange",e)}getConfigValue(e){return e?this.properties[e]:this.properties.SPFxExtensionAppConfiguration}getSearchData(){return{searchableText:this.properties.searchableText,searchableHtml:this.properties.searchableHtml}}setSearchData(e){this.properties.searchableText=e.searchableText,this.properties.searchableHtml=e.searchableHtml}async mountApp(e){const t={domElement:this.domElement,webpartContext:this.context,openPropertyPane:()=>{this.openPropertyPane()},closePropertyPane:()=>{this.closePropertyPane()},isPropertyPaneOpen:()=>this.isPropertyPaneOpen(),saveConfigValue:(e,t=!0)=>{this.saveConfigValue(e,t)},getConfigValue:e=>this.getConfigValue(e),getSearchableData:()=>this.getSearchData(),setSearchableData:e=>{this.setSearchData(e)}};if(this.SPFxExtensionInstance=await window.__SPFxExtensions.InstantiateApp(e,t),!this.SPFxExtensionInstance)return;const n=window.__SPFxExtensions.Apps.find(t=>t.id===e);n&&(this.appDescription=n.description)}unmountApp(){this.SPFxExtensionInstance&&this.SPFxExtensionInstance.unmount&&this.SPFxExtensionInstance.unmount(),this.properties.SPFxExtensionAppConfiguration=void 0}onDispose(){this.unmountApp()}appButtonElements=[];webpartSectionElement=document.createElement("section");webpartSectionTitle=document.createElement("header");appButtonsWrapper=document.createElement("div");appButtonsContainer=document.createElement("div");generateIconElement(e){const t=document.createElement("i");if(t.classList.add("icon_be4e0fd1"),!e)return t.innerHTML='<svg fill="currentColor" class="___12fm75w f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M20.84 2.66a2.25 2.25 0 0 0-3.18 0L13.5 6.8v-.56c0-1.24-1-2.25-2.25-2.25h-7C3.01 4 2 5.01 2 6.25v18c0 .97.78 1.75 1.75 1.75h18c1.24 0 2.25-1 2.25-2.25v-7c0-1.24-1-2.25-2.25-2.25h-.56l4.16-4.15c.88-.88.88-2.3 0-3.19l-4.5-4.5ZM17.31 14.5H13.5v-3.8l3.8 3.8Zm1.41-10.78c.3-.3.77-.3 1.06 0l4.5 4.5c.3.3.3.77 0 1.06l-4.5 4.51c-.3.3-.77.3-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.07l4.5-4.5ZM12 6.25v8.25H3.5V6.25c0-.41.34-.75.75-.75h7c.41 0 .75.34.75.75Zm-8.5 17.5V16H12v8.5H4.25a.75.75 0 0 1-.75-.75Zm10-7.75h8.25c.41 0 .75.34.75.75v7c0 .42-.34.75-.75.75H13.5V16Z" fill="currentColor"></path></svg>',t;if("font"===e.iconType&&e.fontFamily&&(t.style.fontFamily=e.fontFamily,t.classList.add("iconFont_be4e0fd1")),"url"===e.iconType){const n=document.createElement("img");n.src=e.iconData,t.appendChild(n)}return"svg"===e.iconType&&(t.innerHTML=e.iconData),t}createAndAppendAppButtons(e){const t=document.createElement("button");t.title=a.Bc,t.ariaLabel=a.Bc,t.className="appButton_be4e0fd1";const n=this.generateIconElement(e.icon);t.append(n,e.name),t.title=e.name,t.addEventListener("click",()=>{this.properties.selectedApp=e.id,this.webpartSectionElement.remove(),this.mountApp(e.id).catch(t=>{console.error(a.Lf,"Error while mounting app",e,t)})}),this.appButtonsContainer.appendChild(t)}createWebpartSection(e){this.webpartSectionElement.className="applicationListSection_be4e0fd1",this.webpartSectionTitle.className="header_be4e0fd1",this.webpartSectionElement.appendChild(this.webpartSectionTitle),e&&this.webpartSectionElement.appendChild(this.appButtonsWrapper)}renderDisplayMode(){this.webpartSectionElement.ariaLabel=a.oz,this.webpartSectionTitle.textContent=a.oz,this.createWebpartSection(),this.domElement.appendChild(this.webpartSectionElement)}renderEditMode(){this.webpartSectionElement.ariaLabel=a.Ne,this.webpartSectionTitle.textContent=a.Ne,this.createWebpartSection(!0),this.appButtonsContainer.className="appButtonsContainer_be4e0fd1",this.appButtonsWrapper.appendChild(this.appButtonsContainer),this.appButtonsWrapper.className="appButtonsWrapper_be4e0fd1",this.domElement.appendChild(this.webpartSectionElement),window.__SPFxExtensions.AddAppEventListener("appAdded",e=>{e.isWebPartApp&&this.createAndAppendAppButtons(e)}),window.__SPFxExtensions.Apps.filter(e=>e.registrationCompleted).forEach(e=>{e.isWebPartApp&&this.createAndAppendAppButtons(e)}),window.__SPFxExtensions.Utils.spAppInitializationPromise.then(()=>{this.domElement.appendChild(this.webpartSectionElement),window.__SPFxExtensions.Utils.appManifestPromises.forEach(e=>{const t=document.createElement("div"),n=document.createElement("span");t.className="buttonLoader_be4e0fd1",n.className="loader_be4e0fd1",t.appendChild(n),this.appButtonsContainer.append(t),e.catch(()=>{}).finally(()=>{t.remove()})})}).catch(()=>{})}render(){this.context.propertyPane.isPropertyPaneOpen()&&this.onPropertyPaneConfigurationStart(),this.properties.selectedApp||(this.domElement.className="SPFxExtensionApp_be4e0fd1",this.displayMode===e.DisplayMode.Read&&this.renderDisplayMode(),this.displayMode===e.DisplayMode.Edit&&this.renderEditMode())}get propertiesMetadata(){return{searchableText:{isSearchablePlainText:!0},searchableHtml:{isHtmlString:!0}}}onPropertyPaneConfigurationStart(){window.__SPFxExtensions.AllAppAssetsLoadedPromise.then(()=>{const e=window.__SPFxExtensions.Apps.find(e=>e.id===this.properties.selectedApp);e&&(this.appDescription=e.description,this.hideAppSelectorWhenAppLoaded=e.hideAppSelectorWhenAppLoaded??!1,this.hideConfiguratorButton=e.hideConfiguratorButton??!1),this.dropDownProps.options?.splice(0,this.dropDownProps.options?.length);const t=window.__SPFxExtensions.Apps.filter(e=>e.isWebPartApp).map(e=>({key:e.id,text:e.name}));this.dropDownProps.options?.push(...t),this.dropDownProps.selectedKey=this.properties.selectedApp,this.dropDownProps.disabled=!1,this.context.propertyPane.refresh()}).catch(e=>{console.error(a.Lf,"Error while awaiting all app assets to load",e)})}CustomWebpartConfigurationField(e){return{type:t.PropertyPaneFieldType.Custom,targetProperty:e,properties:{key:"SPFxExtensionAppConfiguration",onRender:(e,t,n)=>{this.configDomElement=e,this.SPFxExtensionInstance&&this.SPFxExtensionInstance.instanceLoadPromise.then(()=>{this.SPFxExtensionInstance?.executeListeners("onConfigurationRender",{domElement:e})}).catch(e=>{console.error(a.Lf,"Error while awaiting app to load",e)})},onDispose:(e,t)=>{this.SPFxExtensionInstance&&this.SPFxExtensionInstance.executeListeners("onConfigurationClose",void 0)}}}}getPropertyPaneConfiguration(){const e={groupFields:[(0,t.PropertyPaneLabel)("spfxExtensionLoaderLabel",{text:"App not working? Try refreshing the page. Or go to the configuration page."}),(0,t.PropertyPaneButton)("configuratorButton",{text:"Open Configurator",buttonType:1,onClick:()=>{window.open(`${this.appCatalogUrl}?web=${this.context.pageContext.web.absoluteUrl}`,"_blank")}})]},n=this.hideConfiguratorButton?[]:[e],a={groupFields:[(0,t.PropertyPaneDropdown)("selectedApp",{label:"App",disabled:this.dropDownProps.disabled,options:this.dropDownProps.options,selectedKey:this.dropDownProps.selectedKey}),(0,t.PropertyPaneLabel)("selectedAppDecription",{text:this.appDescription})]};return{pages:[{groups:[...n,...this.hideAppSelectorWhenAppLoaded?[]:[a],{groupFields:[this.CustomWebpartConfigurationField("SPFxExtensionAppConfiguration")]}]}]}}onThemeChanged(e){if(!e)return;this._isDarkTheme=!!e.isInverted;const{semanticColors:t}=e;t&&(this.domElement.style.setProperty("--bodyText",t.bodyText||null),this.domElement.style.setProperty("--link",t.link||null),this.domElement.style.setProperty("--linkHovered",t.linkHovered||null))}get dataVersion(){return e.Version.parse("1.0")}}})(),l})())})();
3
+ ,676:e=>{e.exports=t},877:e=>{e.exports=n},642:e=>{e.exports=a}},c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return s[e](n,n.exports,d),n.exports}d.m=s,d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce((t,n)=>(d.f[n](e,t),t),[])),d.u=e=>"spfx-extension-loader_a2f8425b774226f5f084.js",d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},r="754d5434b112b964721b0222fb6e143b:",d.l=(e,t,n,a)=>{if(i[e])i[e].push(t);else{var o,s;if(void 0!==n)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var u=c[l];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+n){o=u;break}}o||(s=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-webpack",r+n),o.src=e,0!==o.src.indexOf(window.location.origin+"/")&&(o.crossOrigin="anonymous")),i[e]=[t];var f=(t,n)=>{o.onerror=o.onload=null,clearTimeout(p);var a=i[e];if(delete i[e],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach(e=>e(n)),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=f.bind(null,o.onerror),o.onload=f.bind(null,o.onload),s&&document.head.appendChild(o)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o=e?e.src:"",d.p=o.slice(0,o.lastIndexOf("/")+1),(()=>{var e={650:0};d.f.j=(t,n)=>{var a=d.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var i=new Promise((n,i)=>a=e[t]=[n,i]);n.push(a[2]=i);var r=d.p+d.u(t),o=new Error;d.l(r,n=>{if(d.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",o.name="ChunkLoadError",o.type=i,o.request=r,a[1](o)}},"chunk-"+t,t)}};var t=(t,n)=>{var a,i,[r,o,s]=n,c=0;if(r.some(t=>0!==e[t])){for(a in o)d.o(o,a)&&(d.m[a]=o[a]);s&&s(d)}for(t&&t(n);c<r.length;c++)i=r[c],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackJsonp_754d5434b112b964721b0222fb6e143b=self.webpackJsonp_754d5434b112b964721b0222fb6e143b||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var l={};return(()=>{d.r(l),d.d(l,{default:()=>i});var e=d(676),t=d(877),n=d(642);d(574);var a=d(367);class i extends n.BaseClientSideWebPart{SPFxExtensionInstance;allApps=[];appCatalogUrl="/sites/appcatalog";dropDownProps={options:[],selectedKey:"",disabled:!0};appDescription="";hideAppSelectorWhenAppLoaded=!1;hideConfiguratorButton=!1;configDomElement;emptyRendered=!1;_isDarkTheme=!1;async onInit(){const t=e.Environment.type===e.EnvironmentType.SharePoint?"SharePoint":"ClassicSharePoint",{initCore:n}=await d.e(548).then(d.bind(d,364));await n(t),this.appCatalogUrl=window.__SPFxExtensions.Utils.ConfiguratorPageUrl,this.properties.selectedApp&&this.mountApp(this.properties.selectedApp).catch(e=>{console.error(a.Lf,"Error while mounting appid",this.properties.selectedApp,e)})}onPropertyPaneConfigurationComplete(){!this.context.propertyPane.isPropertyPaneOpen()&&this.SPFxExtensionInstance&&this.SPFxExtensionInstance.executeListeners("onConfigurationClose",void 0)}onPropertyPaneFieldChanged(e,t,n){if("selectedApp"===e){if(t&&t!==n&&this.SPFxExtensionInstance){if(!confirm("You are about to switch app, this will erase all previous app configuration. Are you sure?"))return void(this.properties[e]=t);this.unmountApp()}n&&(this.webpartSectionElement.remove(),this.mountApp(n).catch(e=>{console.error(a.Lf,"Error while mounting appid",n,e)}))}}onDisplayModeChanged(t){const n=t===e.DisplayMode.Edit?"Read":"Edit";this.SPFxExtensionInstance&&this.SPFxExtensionInstance.executeListeners("onDisplayModeChange",n)}openPropertyPane(){this.context.propertyPane.open()}closePropertyPane(){this.context.propertyPane.close()}isPropertyPaneOpen(){return this.context.propertyPane.isPropertyPaneOpen()}saveConfigValue(e,t=!0){this.properties.SPFxExtensionAppConfiguration=e,t&&this.SPFxExtensionInstance?.executeListeners("onConfigurationChange",e)}getConfigValue(e){return e?this.properties[e]:this.properties.SPFxExtensionAppConfiguration}getSearchData(){return{searchableText:this.properties.searchableText,searchableHtml:this.properties.searchableHtml}}setSearchData(e){this.properties.searchableText=e.searchableText,this.properties.searchableHtml=e.searchableHtml}async mountApp(e){const t={domElement:this.domElement,webpartContext:this.context,openPropertyPane:()=>{this.openPropertyPane()},closePropertyPane:()=>{this.closePropertyPane()},isPropertyPaneOpen:()=>this.isPropertyPaneOpen(),saveConfigValue:(e,t=!0)=>{this.saveConfigValue(e,t)},getConfigValue:e=>this.getConfigValue(e),getSearchableData:()=>this.getSearchData(),setSearchableData:e=>{this.setSearchData(e)}};if(this.SPFxExtensionInstance=await window.__SPFxExtensions.InstantiateApp(e,t),!this.SPFxExtensionInstance)return;const n=window.__SPFxExtensions.Apps.find(t=>t.id===e);n&&(this.appDescription=n.description)}unmountApp(){this.SPFxExtensionInstance&&this.SPFxExtensionInstance.unmount&&this.SPFxExtensionInstance.unmount(),this.properties.SPFxExtensionAppConfiguration=void 0}onDispose(){this.unmountApp()}appButtonElements=[];webpartSectionElement=document.createElement("section");webpartSectionTitle=document.createElement("header");appButtonsWrapper=document.createElement("div");appButtonsContainer=document.createElement("div");generateIconElement(e){const t=document.createElement("i");if(t.classList.add("icon_be4e0fd1"),!e)return t.innerHTML='<svg fill="currentColor" class="___12fm75w f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M20.84 2.66a2.25 2.25 0 0 0-3.18 0L13.5 6.8v-.56c0-1.24-1-2.25-2.25-2.25h-7C3.01 4 2 5.01 2 6.25v18c0 .97.78 1.75 1.75 1.75h18c1.24 0 2.25-1 2.25-2.25v-7c0-1.24-1-2.25-2.25-2.25h-.56l4.16-4.15c.88-.88.88-2.3 0-3.19l-4.5-4.5ZM17.31 14.5H13.5v-3.8l3.8 3.8Zm1.41-10.78c.3-.3.77-.3 1.06 0l4.5 4.5c.3.3.3.77 0 1.06l-4.5 4.51c-.3.3-.77.3-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.07l4.5-4.5ZM12 6.25v8.25H3.5V6.25c0-.41.34-.75.75-.75h7c.41 0 .75.34.75.75Zm-8.5 17.5V16H12v8.5H4.25a.75.75 0 0 1-.75-.75Zm10-7.75h8.25c.41 0 .75.34.75.75v7c0 .42-.34.75-.75.75H13.5V16Z" fill="currentColor"></path></svg>',t;if("font"===e.iconType&&e.fontFamily&&(t.style.fontFamily=e.fontFamily,t.classList.add("iconFont_be4e0fd1")),"url"===e.iconType){const n=document.createElement("img");n.src=e.iconData,t.appendChild(n)}return"svg"===e.iconType&&(t.innerHTML=e.iconData),t}createAndAppendAppButtons(e){const t=document.createElement("button");t.title=a.Bc,t.ariaLabel=a.Bc,t.className="appButton_be4e0fd1";const n=this.generateIconElement(e.icon);t.append(n,e.name),t.title=e.name,t.addEventListener("click",()=>{this.properties.selectedApp=e.id,this.webpartSectionElement.remove(),this.mountApp(e.id).catch(t=>{console.error(a.Lf,"Error while mounting app",e,t)})}),this.appButtonsContainer.appendChild(t)}createWebpartSection(e){this.webpartSectionElement.className="applicationListSection_be4e0fd1",this.webpartSectionTitle.className="header_be4e0fd1",this.webpartSectionElement.appendChild(this.webpartSectionTitle),e&&this.webpartSectionElement.appendChild(this.appButtonsWrapper)}renderDisplayMode(){this.webpartSectionElement.ariaLabel=a.oz,this.webpartSectionTitle.textContent=a.oz,this.createWebpartSection(),this.domElement.appendChild(this.webpartSectionElement)}renderEditMode(){this.webpartSectionElement.ariaLabel=a.Ne,this.webpartSectionTitle.textContent=a.Ne,this.createWebpartSection(!0),this.appButtonsContainer.className="appButtonsContainer_be4e0fd1",this.appButtonsWrapper.appendChild(this.appButtonsContainer),this.appButtonsWrapper.className="appButtonsWrapper_be4e0fd1",this.domElement.appendChild(this.webpartSectionElement),window.__SPFxExtensions.AddAppEventListener("appAdded",e=>{e.isWebPartApp&&this.createAndAppendAppButtons(e)}),window.__SPFxExtensions.Apps.filter(e=>e.registrationCompleted).forEach(e=>{e.isWebPartApp&&this.createAndAppendAppButtons(e)}),window.__SPFxExtensions.Utils.spAppInitializationPromise.then(()=>{this.domElement.appendChild(this.webpartSectionElement),window.__SPFxExtensions.Utils.appManifestPromises.forEach(e=>{const t=document.createElement("div"),n=document.createElement("span");t.className="buttonLoader_be4e0fd1",n.className="loader_be4e0fd1",t.appendChild(n),this.appButtonsContainer.append(t),e.catch(()=>{}).finally(()=>{t.remove()})})}).catch(()=>{})}render(){this.context.propertyPane.isPropertyPaneOpen()&&this.onPropertyPaneConfigurationStart(),this.properties.selectedApp||(this.domElement.className="SPFxExtensionApp_be4e0fd1",this.displayMode===e.DisplayMode.Read&&this.renderDisplayMode(),this.displayMode===e.DisplayMode.Edit&&this.renderEditMode())}get propertiesMetadata(){return{searchableText:{isSearchablePlainText:!0},searchableHtml:{isHtmlString:!0}}}onPropertyPaneConfigurationStart(){window.__SPFxExtensions.AllAppAssetsLoadedPromise.then(()=>{const e=window.__SPFxExtensions.Apps.find(e=>e.id===this.properties.selectedApp);e&&(this.appDescription=e.description,this.hideAppSelectorWhenAppLoaded=e.hideAppSelectorWhenAppLoaded??!1,this.hideConfiguratorButton=e.hideConfiguratorButton??!1),this.dropDownProps.options?.splice(0,this.dropDownProps.options?.length);const t=window.__SPFxExtensions.Apps.filter(e=>e.isWebPartApp).map(e=>({key:e.id,text:e.name}));this.dropDownProps.options?.push(...t),this.dropDownProps.selectedKey=this.properties.selectedApp,this.dropDownProps.disabled=!1,this.context.propertyPane.refresh()}).catch(e=>{console.error(a.Lf,"Error while awaiting all app assets to load",e)})}CustomWebpartConfigurationField(e){return{type:t.PropertyPaneFieldType.Custom,targetProperty:e,properties:{key:"SPFxExtensionAppConfiguration",onRender:(e,t,n)=>{this.configDomElement=e,this.SPFxExtensionInstance&&this.SPFxExtensionInstance.instanceLoadPromise.then(()=>{this.SPFxExtensionInstance?.executeListeners("onConfigurationRender",{domElement:e})}).catch(e=>{console.error(a.Lf,"Error while awaiting app to load",e)})},onDispose:(e,t)=>{this.SPFxExtensionInstance&&this.SPFxExtensionInstance.executeListeners("onConfigurationClose",void 0)}}}}getPropertyPaneConfiguration(){const e={groupFields:[(0,t.PropertyPaneLabel)("spfxExtensionLoaderLabel",{text:"App not working? Try refreshing the page. Or go to the configuration page."}),(0,t.PropertyPaneButton)("configuratorButton",{text:"Open Configurator",buttonType:1,onClick:()=>{window.open(`${this.appCatalogUrl}?web=${this.context.pageContext.web.absoluteUrl}`,"_blank")}})]},n=this.hideConfiguratorButton?[]:[e],a={groupFields:[(0,t.PropertyPaneDropdown)("selectedApp",{label:"App",disabled:this.dropDownProps.disabled,options:this.dropDownProps.options,selectedKey:this.dropDownProps.selectedKey}),(0,t.PropertyPaneLabel)("selectedAppDecription",{text:this.appDescription})]};return{pages:[{groups:[...n,...this.hideAppSelectorWhenAppLoaded?[]:[a],{groupFields:[this.CustomWebpartConfigurationField("SPFxExtensionAppConfiguration")]}]}]}}onThemeChanged(e){if(!e)return;this._isDarkTheme=!!e.isInverted;const{semanticColors:t}=e;t&&(this.domElement.style.setProperty("--bodyText",t.bodyText||null),this.domElement.style.setProperty("--link",t.link||null),this.domElement.style.setProperty("--linkHovered",t.linkHovered||null))}get dataVersion(){return e.Version.parse("1.0")}}})(),l})())})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spfx-extensions/package",
3
- "version": "1.0.0",
3
+ "version": "1.4.8",
4
4
  "author": "SPWizard01",
5
5
  "access": "public",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "@microsoft/sp-office-ui-fabric-core": "1.21.0",
34
34
  "@microsoft/sp-property-pane": "1.21.0",
35
35
  "@microsoft/sp-webpart-base": "1.21.0",
36
- "@spfx-extensions/core": "^0.7.0",
36
+ "@spfx-extensions/core": "^0.7.2",
37
37
  "tslib": "^2.8.1"
38
38
  },
39
39
  "devDependencies": {
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
3
- <ClientSideComponentInstance
4
- Title="SpFxExtensionsCustomizer"
5
- Location="ClientSideExtension.ApplicationCustomizer"
6
- ComponentId="8d1029da-85e6-48cc-aaaf-37a5bbc0b9be"
7
- Properties="">
8
- </ClientSideComponentInstance>
9
- </Elements>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><ClientSideComponent Name="SpfxExtensionApplicationCustomizer" Id="8d1029da-85e6-48cc-aaaf-37a5bbc0b9be" ComponentManifest="{&quot;id&quot;:&quot;8d1029da-85e6-48cc-aaaf-37a5bbc0b9be&quot;,&quot;alias&quot;:&quot;SpfxExtensionApplicationCustomizer&quot;,&quot;componentType&quot;:&quot;Extension&quot;,&quot;extensionType&quot;:&quot;ApplicationCustomizer&quot;,&quot;version&quot;:&quot;1.4.7&quot;,&quot;manifestVersion&quot;:2,&quot;loaderConfig&quot;:{&quot;internalModuleBaseUrls&quot;:[&quot;HTTPS://SPCLIENTSIDEASSETLIBRARY/&quot;],&quot;entryModuleId&quot;:&quot;spfx-extension-application-customizer&quot;,&quot;scriptResources&quot;:{&quot;spfx-extension-application-customizer&quot;:{&quot;type&quot;:&quot;path&quot;,&quot;path&quot;:&quot;spfx-extension-application-customizer_02e75437509d6228ebfb.js&quot;},&quot;@microsoft/sp-application-base&quot;:{&quot;type&quot;:&quot;component&quot;,&quot;id&quot;:&quot;4df9bb86-ab0a-4aab-ab5f-48bf167048fb&quot;,&quot;version&quot;:&quot;1.21.0&quot;}}}}" Type="Extension"></ClientSideComponent></Elements>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><ClientSideComponent Name="SPFx Extension Loader" Id="d6ca1fc2-0591-4c6d-8a25-cae3262c017b" ComponentManifest="{&quot;id&quot;:&quot;d6ca1fc2-0591-4c6d-8a25-cae3262c017b&quot;,&quot;alias&quot;:&quot;SpfxExtensionloaderWebPart&quot;,&quot;componentType&quot;:&quot;WebPart&quot;,&quot;version&quot;:&quot;1.4.7&quot;,&quot;manifestVersion&quot;:2,&quot;supportedHosts&quot;:[&quot;SharePointWebPart&quot;,&quot;TeamsPersonalApp&quot;,&quot;TeamsTab&quot;,&quot;SharePointFullPage&quot;],&quot;supportsThemeVariants&quot;:true,&quot;supportsFullBleed&quot;:true,&quot;preconfiguredEntries&quot;:[{&quot;groupId&quot;:&quot;5c03119e-3074-46fd-976b-c60198311f70&quot;,&quot;group&quot;:{&quot;default&quot;:&quot;Advanced&quot;},&quot;title&quot;:{&quot;default&quot;:&quot;SPFx Extension Loader&quot;},&quot;description&quot;:{&quot;default&quot;:&quot;Allows you to add a custom developed app&quot;},&quot;officeFabricIconFontName&quot;:&quot;Page&quot;,&quot;properties&quot;:{&quot;description&quot;:&quot;Select an app to load from the dropdown below&quot;}}],&quot;loaderConfig&quot;:{&quot;internalModuleBaseUrls&quot;:[&quot;HTTPS://SPCLIENTSIDEASSETLIBRARY/&quot;],&quot;entryModuleId&quot;:&quot;spfx-extensionloader-web-part&quot;,&quot;scriptResources&quot;:{&quot;spfx-extensionloader-web-part&quot;:{&quot;type&quot;:&quot;path&quot;,&quot;path&quot;:&quot;spfx-extensionloader-web-part_b51ed89cf71889d67683.js&quot;},&quot;@microsoft/sp-core-library&quot;:{&quot;type&quot;:&quot;component&quot;,&quot;id&quot;:&quot;7263c7d0-1d6a-45ec-8d85-d4d1d234171b&quot;,&quot;version&quot;:&quot;1.21.0&quot;},&quot;@microsoft/sp-property-pane&quot;:{&quot;type&quot;:&quot;component&quot;,&quot;id&quot;:&quot;f9e737b7-f0df-4597-ba8c-3060f82380db&quot;,&quot;version&quot;:&quot;1.21.0&quot;},&quot;@microsoft/sp-webpart-base&quot;:{&quot;type&quot;:&quot;component&quot;,&quot;id&quot;:&quot;974a7777-0990-4136-8fa6-95d80114c2e0&quot;,&quot;version&quot;:&quot;1.21.0&quot;}}}}" Type="WebPart"></ClientSideComponent><Module Name="SPFx Extension Loader" Url="_catalogs/wp" List="113"></Module></Elements>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
3
- <CustomAction
4
- Title="SpFxExtensionsCustomizer"
5
- Location="ClientSideExtension.ApplicationCustomizer"
6
- ClientSideComponentId="8d1029da-85e6-48cc-aaaf-37a5bbc0b9be"
7
- ClientSideComponentProperties="">
8
- </CustomAction>
9
- </Elements>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?><App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="SPFx Extensions" ProductID="7d56fff0-e90e-40a7-98cf-fcdbc63a9b01" SharePointMinVersion="16.0.0.0" IsClientSideSolution="true" Version="1.4.7.0" SkipFeatureDeployment="true" IsDomainIsolated="false"><Properties><Title>SPFx Extensions</Title><DeveloperProperties>{&quot;name&quot;:&quot;SPWizard01&quot;,&quot;websiteUrl&quot;:&quot;https://github.com/SPWizard01/spfx-extensions&quot;,&quot;privacyUrl&quot;:&quot;https://github.com/SPWizard01/spfx-extensions/blob/main/README.md&quot;,&quot;termsOfUseUrl&quot;:&quot;https://github.com/SPWizard01/spfx-extensions/blob/main/LICENSE&quot;,&quot;mpnId&quot;:&quot;Undefined-1.21.0&quot;}</DeveloperProperties><ShortDescription><LocalizedString CultureName="default">SPFxExtensions App allows you to develop framework agnostic apps.</LocalizedString></ShortDescription><LongDescription><LocalizedString CultureName="default">SPFxExtensions App is a SharePoint Framework (SPFx) extension that allows developers to create framework-agnostic applications. This solution provides a streamlined way to deploy extensions and client-side components, enhancing the functionality and user experience of SharePoint sites. With this extension, developers can easily integrate their custom solutions into SharePoint, leveraging the power of SPFx to build robust and scalable applications.</LocalizedString></LongDescription><CategoryID>Content management,Productivity,Site Design</CategoryID><Screenshots></Screenshots></Properties></App>
@@ -1 +0,0 @@
1
- var l1=Object.create;var{getPrototypeOf:a1,defineProperty:Hx,getOwnPropertyNames:r1}=Object;var e1=Object.prototype.hasOwnProperty;var Xw=(x,w,y)=>{y=x!=null?l1(a1(x)):{};let $=w||!x||!x.__esModule?Hx(y,"default",{value:x,enumerable:!0}):y;for(let Q of r1(x))if(!e1.call($,Q))Hx($,Q,{get:()=>x[Q],enumerable:!0});return $};var _w=(x,w)=>()=>(w||x((w={exports:{}}).exports,w),w.exports);var Rw=(x,w)=>{for(var y in w)Hx(x,y,{get:w[y],enumerable:!0,configurable:!0,set:($)=>w[y]=()=>$})};var Fw=(x,w)=>()=>(x&&(w=x(x=0)),w);var qx="d6ca1fc2-0591-4c6d-8a25-cae3262c017b",A="45e75137-13c5-4bb2-a2b3-8ab6382682ee",px="SPFxExtensionsConfigurator",t="SitePages/SPFxExtensionsConfigurator.aspx",m="manifest.txt",X="collectionconfig.txt",kx="Loading...",v="SPFxExtensionsConfiguration",U="SPFxExtensionsWhiteList",Lw="SPFxExtensions",g="/SPFxExtensions/",_="SPFxExtensionsData",P="[SPFxExtensionCore]",Dx={appDefinitionMap:[],appRelativeEntryPointUrls:[],isESM:!0},nw={enabledEverywhere:!1,excludedHubIds:[],excludedIds:[],includedHubIds:[],includedIds:[]},Gx={enabledAppCollections:[],urlMap:[]},s="00000000-0000-0000-0000-000000000000";function B(x,w,y=x){return($)=>{let Q=""+$,Z=Q.indexOf(w,x.length);return~Z?x+x9(Q,w,y,Z)+w:x+Q+w}}function x9(x,w,y,$){let Q="",Z=0;do Q+=x.substring(Z,$)+y,Z=$+w.length,$=x.indexOf(w,Z);while(~$);return Q+x.substring(Z)}var hw=B("\x1B[0m","\x1B[0m"),Ew=B("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),Aw=B("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),dw=B("\x1B[3m","\x1B[23m"),Sw=B("\x1B[4m","\x1B[24m"),Mw=B("\x1B[7m","\x1B[27m"),vw=B("\x1B[8m","\x1B[28m"),Uw=B("\x1B[9m","\x1B[29m"),gw=B("\x1B[30m","\x1B[39m"),fw=B("\x1B[31m","\x1B[39m"),Cw=B("\x1B[32m","\x1B[39m"),Nw=B("\x1B[33m","\x1B[39m"),ow=B("\x1B[34m","\x1B[39m"),Iw=B("\x1B[35m","\x1B[39m"),uw=B("\x1B[36m","\x1B[39m"),Tw=B("\x1B[37m","\x1B[39m"),cw=B("\x1B[90m","\x1B[39m"),pw=B("\x1B[40m","\x1B[49m"),tw=B("\x1B[41m","\x1B[49m"),sw=B("\x1B[42m","\x1B[49m"),iw=B("\x1B[43m","\x1B[49m"),lw=B("\x1B[44m","\x1B[49m"),aw=B("\x1B[45m","\x1B[49m"),rw=B("\x1B[46m","\x1B[49m"),ew=B("\x1B[47m","\x1B[49m"),x3=B("\x1B[90m","\x1B[39m"),w3=B("\x1B[91m","\x1B[39m"),i=B("\x1B[92m","\x1B[39m"),y3=B("\x1B[93m","\x1B[39m"),$3=B("\x1B[94m","\x1B[39m"),Q3=B("\x1B[95m","\x1B[39m"),Z3=B("\x1B[96m","\x1B[39m"),b3=B("\x1B[97m","\x1B[39m"),V3=B("\x1B[100m","\x1B[49m"),z3=B("\x1B[101m","\x1B[49m"),B3=B("\x1B[102m","\x1B[49m"),Y3=B("\x1B[103m","\x1B[49m"),W3=B("\x1B[104m","\x1B[49m"),j3=B("\x1B[105m","\x1B[49m"),K3=B("\x1B[106m","\x1B[49m"),J3=B("\x1B[107m","\x1B[49m");function V(...x){console.error(i(P),(/*@__PURE__*/new Date()).toISOString(),...x)}function O(...x){console.warn(i(P),(/*@__PURE__*/new Date()).toISOString(),...x)}function j(...x){console.info(i(P),(/*@__PURE__*/new Date()).toISOString(),...x)}function K(...x){}function Ox(x,w,y){V("Error while executing onInstanceRequested for app",x.id,"with name",x.name,y?`Additional Data: ${y}`:"",w)}function f(){return O("The app instance event was called before app instance was initialized."),()=>{}}var Xx=window.crypto.randomUUID();function l(){return Xx}function tx(){return Xx=window.crypto.randomUUID(),Xx}function _x(x){return x.replace("{","").replace("}","")}function O3(x){return JSON.parse(JSON.stringify(x))}function w9(x,w,y){let $=x.instances.findIndex((Q)=>Q.key===w);if($>-1){let Q=x.instances.splice($,1);if(Q.length<1)return;let Z=Q[0];Z.executeListeners("onConfigurationClose",void 0),Z.allEventListeners.splice(0,Z.allEventListeners.length),y?.()}}async function sx(x){let w=window.__SPFxExtensions.Apps.filter((y)=>!y.isWebPartApp&&!y.keepOnContextChange&&y.id!==A);for(let y of w){K(y,"---Unmounting on context change");for(let $ of y.instances.filter((Q)=>Q.contextId!==x))$.unmount()}}function a(x,w){if(w.hasBeenRequested)return;try{w.hasBeenRequested=!0,x.onInstanceRequested(w).then((y)=>{w.unmount=()=>{w9(x,w.key,y)},w.instanceLoadPromiseResolver()}).catch((y)=>{Ox(x,y)})}catch(y){Ox(x,y)}}function y9(x){K("Executing appAdded event for",x.id),window.__SPFxExtensions.AppEventListeners.filter((w)=>w.eventName==="appAdded").forEach((w)=>{try{w.handler(x)}catch(y){V("Error executing appAdded event",y)}})}function Rx(x){let w=window.__SPFxExtensions.Apps.find((y)=>y.id===x);if(!w)K("Registering new app",x),w={id:x,name:kx,description:kx,isWebPartApp:!1,keepOnContextChange:!1,autoExecute:!1,maxInstances:1/0,hideAppSelectorWhenAppLoaded:!1,hideConfiguratorButton:!1,registrationCompleted:!1,instances:[],async onInstanceRequested(){return f}},window.__SPFxExtensions.Apps.push(w);return w}function ix(){if(!window.__SPFxExtensions.Apps)window.__SPFxExtensions.Apps=[];if(!window.__SPFxExtensions.RegisterApp)window.__SPFxExtensions.RegisterApp=async(x)=>{let w=Rx(x.id);if(w.registrationCompleted)return w;return w.registrationCompleted=!0,w.name=x.name,w.description=x.description,w.isWebPartApp=x.isWebPartApp,w.keepOnContextChange=x.keepOnContextChange??!1,w.autoExecute=x.autoExecute??!1,w.maxInstances=x.maxInstances??1/0,w.hideAppSelectorWhenAppLoaded=x.hideAppSelectorWhenAppLoaded??!1,w.hideConfiguratorButton=x.hideConfiguratorButton??!1,w.icon=x.icon,w.onInstanceRequested=x.onInstanceRequested,y9(w),w.instances.forEach((y)=>{a(w,y)}),w};if(!window.__SPFxExtensions.UnregisterApp)window.__SPFxExtensions.UnregisterApp=async(x)=>{let w=window.__SPFxExtensions.Apps.findIndex(($)=>$.id===x);if(w<0)return;let y=window.__SPFxExtensions.Apps.splice(w,1);if(y.length<1)return;return K("Unregistering app",y[0].id,y[0].name),y[0].instances.forEach(($)=>{$.unmount()}),y[0]}}function $9(x){let w=(Q)=>{let Z=x.allEventListeners.findIndex((b)=>b.key===Q.key);if(Z>-1)K("Removing event listener",Q),x.allEventListeners.splice(Z,1)},y=(Q,Z)=>{let b={key:window.crypto.randomUUID(),eventName:Q,handler:Z};return x.allEventListeners.push(b),()=>{w(b)}},$=(Q,Z)=>{for(let b of x.allEventListeners){if(b.eventName!=Q)continue;if(b.handler)b.handler(Z)}};x.addEventListener=y,x.executeListeners=$}function Q9(x,w){K("Executing instanceAdded event for app",x.id,"instance",w.key),window.__SPFxExtensions.AppEventListeners.filter((y)=>y.eventName==="instanceAdded").forEach((y)=>{try{y.handler({app:x,instance:w})}catch($){V("Error executing instanceAdded event",$)}})}function Z9(x){let{promise:w,resolve:y}=Promise.withResolvers(),$={...x,key:window.crypto.randomUUID(),contextId:l(),hasBeenRequested:!1,unmount:f,allEventListeners:[],addEventListener:f,executeListeners:f,instanceLoadPromise:w,instanceLoadPromiseResolver:y};return $9($),$}function lx(){if(!window.__SPFxExtensions.InstantiateApp)window.__SPFxExtensions.InstantiateApp=async(x,w)=>{let y=Rx(x);K("Creating app instance for app",x);let $=Z9(w);if(y.instances.push($),Q9(y,$),y.registrationCompleted)a(y,$);return $}}async function C(x,w=0){let $=(/*@__PURE__*/new TextEncoder()).encode(x),Q=await window.crypto.subtle.digest("SHA-1",$),b=Array.from(new Uint8Array(Q)).map((W)=>W.toString(16).padStart(2,"0")).join("");return w>0?b.substring(0,w):b}var Lx=(x,w)=>w.some((y)=>x instanceof y),ax,rx;function b9(){return ax||(ax=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function V9(){return rx||(rx=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var nx=/*@__PURE__*/new WeakMap,Fx=/*@__PURE__*/new WeakMap,r=/*@__PURE__*/new WeakMap;function z9(x){let w=new Promise((y,$)=>{let Q=()=>{x.removeEventListener("success",Z),x.removeEventListener("error",b)},Z=()=>{y(d(x.result)),Q()},b=()=>{$(x.error),Q()};x.addEventListener("success",Z),x.addEventListener("error",b)});return r.set(w,x),w}function B9(x){if(nx.has(x))return;let w=new Promise((y,$)=>{let Q=()=>{x.removeEventListener("complete",Z),x.removeEventListener("error",b),x.removeEventListener("abort",b)},Z=()=>{y(),Q()},b=()=>{$(x.error||new DOMException("AbortError","AbortError")),Q()};x.addEventListener("complete",Z),x.addEventListener("error",b),x.addEventListener("abort",b)});nx.set(x,w)}var mx={get(x,w,y){if(x instanceof IDBTransaction){if(w==="done")return nx.get(x);if(w==="store")return y.objectStoreNames[1]?void 0:y.objectStore(y.objectStoreNames[0])}return d(x[w])},set(x,w,y){return x[w]=y,!0},has(x,w){if(x instanceof IDBTransaction&&(w==="done"||w==="store"))return!0;return w in x}};function y1(x){mx=x(mx)}function Y9(x){if(V9().includes(x))return function(...w){return x.apply(hx(this),w),d(this.request)};return function(...w){return d(x.apply(hx(this),w))}}function W9(x){if(typeof x==="function")return Y9(x);if(x instanceof IDBTransaction)B9(x);if(Lx(x,b9()))return new Proxy(x,mx);return x}function d(x){if(x instanceof IDBRequest)return z9(x);if(Fx.has(x))return Fx.get(x);let w=W9(x);if(w!==x)Fx.set(x,w),r.set(w,x);return w}var hx=(x)=>r.get(x);function $1(x,w,{blocked:y,upgrade:$,blocking:Q,terminated:Z}={}){let b=indexedDB.open(x,w),W=d(b);if($)b.addEventListener("upgradeneeded",(z)=>{$(d(b.result),z.oldVersion,z.newVersion,d(b.transaction),z)});if(y)b.addEventListener("blocked",(z)=>y(z.oldVersion,z.newVersion,z));return W.then((z)=>{if(Z)z.addEventListener("close",()=>Z());if(Q)z.addEventListener("versionchange",(Y)=>Q(Y.oldVersion,Y.newVersion,Y))}).catch(()=>{}),W}function Q1(x,{blocked:w}={}){let y=indexedDB.deleteDatabase(x);if(w)y.addEventListener("blocked",($)=>w($.oldVersion,$));return d(y).then(()=>{return})}var j9=["get","getKey","getAll","getAllKeys","count"],K9=["put","add","delete","clear"],Px=/*@__PURE__*/new Map;function ex(x,w){if(!(x instanceof IDBDatabase&&!(w in x)&&typeof w==="string"))return;if(Px.get(w))return Px.get(w);let y=w.replace(/FromIndex$/,""),$=w!==y,Q=K9.includes(y);if(!(y in($?IDBIndex:IDBObjectStore).prototype)||!(Q||j9.includes(y)))return;let Z=async function(b,...W){let z=this.transaction(b,Q?"readwrite":"readonly"),Y=z.store;if($)Y=Y.index(W.shift());return(await Promise.all([Y[y](...W),Q&&z.done]))[0]};return Px.set(w,Z),Z}y1((x)=>({...x,get:(w,y,$)=>ex(w,y)||x.get(w,y,$),has:(w,y)=>!!ex(w,y)||x.has(w,y)}));var J9=["continue","continuePrimaryKey","advance"],x1={},Ex=/*@__PURE__*/new WeakMap,Z1=/*@__PURE__*/new WeakMap,H9={get(x,w){if(!J9.includes(w))return x[w];let y=x1[w];if(!y)y=x1[w]=function(...$){Ex.set(this,Z1.get(this)[w](...$))};return y}};async function*q9(...x){let w=this;if(!(w instanceof IDBCursor))w=await w.openCursor(...x);if(!w)return;w=w;let y=new Proxy(w,H9);Z1.set(y,w),r.set(y,hx(w));while(w)yield y,w=await(Ex.get(y)||w.continue()),Ex.delete(y)}function w1(x,w){return w===Symbol.asyncIterator&&Lx(x,[IDBIndex,IDBObjectStore,IDBCursor])||w==="iterate"&&Lx(x,[IDBIndex,IDBObjectStore])}y1((x)=>({...x,get(w,y,$){if(w1(w,y))return q9;return x.get(w,y,$)},has(w,y){return w1(w,y)||x.has(w,y)}}));var h={SPFXEXT:"SPFXEXT_",SPFXEXT_CORE:"SPFXEXT"};function k9(){return Object.keys(localStorage).some((x)=>x.indexOf(h.SPFXEXT)>-1&&Number(localStorage[x])>0)}function b1(x){return x.hostname.toLowerCase()==="localhost"}function V1(x){return Number(localStorage.getItem(`${h.SPFXEXT}${x}`))>0}var L=k9();var J={AppFolderManifestCache:"AppFolderManifestCache",AppCollectionManifestCache:"AppCollectionManifestCache",AllowedApps:"AllowedApps",HubSiteData:"HubSiteData",SPFxExtensionConfig:"SPFxExtensionConfig"},z1=`${h.SPFXEXT}COREDB`,B1=$1(z1,1,{blocking(x,w,y){G.close(),alert("A new version of this page is ready. Please reload the page.")},async upgrade(x,w,y,$,Q){if(w===0)x.createObjectStore(J.AppFolderManifestCache,{keyPath:"url"}),x.createObjectStore(J.AppCollectionManifestCache,{keyPath:"url"}),x.createObjectStore(J.AllowedApps,{keyPath:"Id"}),x.createObjectStore(J.HubSiteData,{keyPath:"SiteId"}),x.createObjectStore(J.SPFxExtensionConfig,{keyPath:"Title"})}});B1.catch((x)=>{throw V("Error opening database for Core, please contact your administrator."),Q1(z1).then(()=>{window.location.reload()}),x});var G=await B1;function N(x){let w=/*@__PURE__*/new Date;return w.setMinutes(w.getMinutes()+x),{expires:w.toISOString()}}async function o(x,w){let y=await G.getAll(x),$=/*@__PURE__*/new Date,Q=y.filter((b)=>{let W=new Date(b.expires);return $>=W}),Z=Q.length;if(Z>0){let b=G.transaction(x,"readwrite"),W=b.objectStore(x);Q.forEach((z)=>W.delete(z[w])),await b.done,O(`Evicted ${Z} items from ${x} cache.`)}return Z}async function Ax(){return await o(J.SPFxExtensionConfig,"Title"),G.getAll(J.SPFxExtensionConfig)}async function S(x){return await o(J.SPFxExtensionConfig,"Title"),G.get(J.SPFxExtensionConfig,x)}async function n(x,w=60){await G.put(J.SPFxExtensionConfig,{...x,...N(w)})}function Y1(x,w){let y=G.transaction(J.SPFxExtensionConfig,"readwrite"),$=y.objectStore(J.SPFxExtensionConfig);return x.forEach((Q)=>$.put({...Q,...N(w)})),y.done}async function W1(){return G.getAll(J.AllowedApps)}async function dx(x){return G.get(J.AppFolderManifestCache,x)}async function Sx(x){return G.get(J.AppCollectionManifestCache,x)}async function j1(x){return G.get(J.HubSiteData,x)}async function K1(x,w=60){await G.put(J.HubSiteData,{...x,...N(w)})}async function D9(x,w=60){await G.put(J.AppCollectionManifestCache,{...x,...N(w)})}async function G9(x,w=60){await G.put(J.AppFolderManifestCache,{...x,...N(w)})}async function J1(x,w=5){let y=N(w),$=G.transaction(J.AllowedApps,"readwrite"),Q=$.objectStore(J.AllowedApps);return x.forEach((Z)=>Q.put({...y,...Z})),$.done}function O9(x){return G.delete(J.AppCollectionManifestCache,x)}function X9(x){return G.delete(J.AppFolderManifestCache,x)}async function _9(){return o(J.AppCollectionManifestCache,"url")}async function R9(){return o(J.AppFolderManifestCache,"url")}async function H1(){return o(J.AllowedApps,"Id")}async function q1(){return o(J.HubSiteData,"SiteId")}async function e(x){if(x){let w=await dx(x.url);if(w){if(w.hash!==x.hash)await X9(x.url),O(`Evicted ${m} ${w.url} from cache. Because of hash mismatch.`)}}return R9()}async function xx(x){if(x){let w=await Sx(x.url);if(w){if(w.hash!==x.hash)await O9(x.url),O(`Evicted ${X} ${w.url} from cache. Because of hash mismatch.`)}}return _9()}async function k1(x){if(await e(),L)return;return dx(x)}async function D1(x,w){await e(x);let y=await dx(x.url);if(y&&y.hash===x.hash&&!L)return;await G9(x,w)}async function G1(x,w){await xx(x);let y=await Sx(x.url);if(y&&y.hash===x.hash&&!L)return;await D9(x,w)}async function O1(x){if(await xx(),L)return;return Sx(x)}async function X1(x){let w=await fetch(`${x}/_api/contextinfo`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json"}});if(w.status===200)return(await w.json()).d.GetContextWebInformation.FormDigestValue;else V("Error while getting digest",w.status);return""}var Mx=(x)=>{},wx;async function T(x=""){if(wx)return wx;wx=new Promise((w)=>{Mx=w});try{let $=(await(await fetch(`${x}/_api/SP_TenantSettings_Current`,{headers:{Accept:"application/json;odata=verbose"}})).json()).d.CorporateCatalogUrl;Mx($)}catch(w){V("Error while getting app catalog url. Trying default /sites/appcatalog",w);let y=`${window.location.origin}/sites/appcatalog`;Mx(y)}return wx}async function F9(x=""){let w=await S("AppCatalogUrl");if(w?.Data)return w.Data;let y=await T(x);return await n({Title:"AppCatalogUrl",Data:y,date:"",expires:""},240),y}async function E(x=""){let y=`${await T()}${x?`/${x}`:""}`;return X1(y)}var P9=await F9(),H=`${P9}/${_}`;var R1={Status:"Status",RootCDNLocation:"RootCDNLocation",InterceptHistory:"InterceptHistory",EnableAppWhiteList:"EnableAppWhiteList",AppCatalogUrl:"AppCatalogUrl",AppCatalogWebs:"AppCatalogWebs",ConfiguratorPageData:"ConfiguratorPageData",AppWhiteList:"AppWhiteList",Version:"2025-04-25T11:07:28.675Z"},_1=[{Title:"Status",Data:"Installed"},{Title:"InterceptHistory",Data:"true"},{Title:"EnableAppWhiteList",Data:"false"},{Title:"RootCDNLocation",Data:`/sites/appcatalog/${_}`}];function F1(x){let w=_1.find((y)=>y.Title==="RootCDNLocation");if(w)w.Data=x;return _1}var L9=Object.keys(R1).length,$x=await E(_),yx;async function n9(){let x=`${H}/_api/web/lists/GetByTitle('${v}')/fields`;try{let w=await fetch(x,{headers:{Accept:"application/json;odata=verbose"}});if(w.status===200){let $=(await w.json()).d.results,Q=$.map((b)=>b.InternalName),Z=$.find((b)=>b.InternalName==="Title");if(!Z){V("Title field not found.");return}if(!Z.EnforceUniqueValues)if((await fetch(`${H}/_api/web/lists/GetByTitle('${v}')/fields('${Z.Id}')`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":$x,"X-HTTP-Method":"MERGE","If-Match":"*"},body:JSON.stringify({__metadata:{type:"SP.Field"},Indexed:!0,EnforceUniqueValues:!0})})).status===204)j("Title field updated successfully.");else V("Unable to update Title field.");if(!Q.includes("Data"))if((await fetch(x,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":$x},body:JSON.stringify({__metadata:{type:"SP.Field"},Title:"Data",FieldTypeKind:2,Required:!0})})).status===201)j("Data field added successfully.");else V("Unable to add Data field.")}}catch(w){V("Error while ensuring configuration list data fields.",w)}}async function m9(){let x=!1;try{if(x=(await fetch(`${H}/_api/web/lists/GetByTitle('${v}')`)).status===404,x)if(j("Creating configuration list."),(await fetch(`${H}/_api/web/lists`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":$x},body:JSON.stringify({__metadata:{type:"SP.List"},BaseTemplate:100,Title:"SPFxExtensionsConfiguration",Description:"Configuration list for SPFxExtensions"})})).status===201)j("Configuration list created successfully.");else V("Unable to create configuration list.");await n9()}catch(w){V("Error while ensuring configuration list.",w)}return x}async function P1(){let x=`${H}/_api/web/lists/GetByTitle('${v}')/items?$select=Title,Data`,y=await fetch(x,{...{headers:{Accept:"application/json;odata=verbose"}}});if(y.status!==200)return V("Unable to fetch configuration list items."),[];return(await y.json()).d.results}async function h9(){for(let x of F1(H))if((await fetch(`${H}/_api/web/lists/GetByTitle('${v}')/items`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":$x},body:JSON.stringify({__metadata:{type:"SP.Data.SPFxExtensionsConfigurationListItem"},...x})})).status===201)j(`Item ${x.Title} added successfully.`);else V(`Unable to add item ${x.Title}.`)}function L1(x=!1){if(x)return P1();if(yx)return yx;return yx=E9(),yx}async function E9(){let x=await Ax();if(x.length<L9){if(await m9())await h9();let y=await P1();await Y1(y,240),x=await Ax()}return x}async function A9(x){let w=await T(),y=await E(),$=await fetch(`${w}/_api/web/webs/add`,{method:"POST",headers:{Accept:"application/json;odata=nometadata","Content-Type":"application/json","X-RequestDigest":y},body:JSON.stringify({parameters:{Description:"Site that stores SPFxExtensions Data and global apps",Language:1033,Title:"SPFxExtensions Data",Url:x,UseSamePermissionsAsParentSite:!0,WebTemplate:"STS"}})});if(!$.ok)throw new Error(`Failed to create SPFxExtensionsData web in ${w}`);return await $.json()}async function d9(){let x=await T(),w=await E(),y=await fetch(`${x}/_api/web/webs`,{method:"GET",headers:{Accept:"application/json;odata=nometadata","X-RequestDigest":w}});if(!y.ok)throw new Error(`Failed to fetch data from ${x}/_api/web/webs`);return(await y.json()).value}async function S9(){return(await S("AppCatalogWebs"))?.Data??[]}var Qx;async function n1(){if(Qx)return Qx;return Qx=M9(),Qx}async function M9(){let x=await S9();if(!x.some((y)=>y.ServerRelativeUrl.endsWith(_))){let y=await d9();if(!y.some((Q)=>Q.ServerRelativeUrl.endsWith(_))){let Q=await A9(_);y.push(Q),await n({Title:"AppCatalogWebs",Data:y,date:"",expires:""},240)}return y}return x}var vx="f3ab710f-2c08-422e-a7ad-5d93eb51e7a3",v9=await E(_),Zx={accept:"application/json"},Ux={"X-RequestDigest":v9},U9={"Content-Type":"application/json"};async function g9(){return(await(await fetch(`${H}/_api/sitepages/pages`,{headers:{...Zx,...Ux,...U9},body:JSON.stringify({PageLayoutType:"SingleWebPartAppPage",PromotedState:0}),method:"POST"})).json()).Id}async function gx(){let x=await fetch(`${H}/_api/sitepages/pages/GetByUrl('${t}')`,{headers:{...Zx},method:"GET"});if(x.status===404)return;return await x.json()}var f9=[{dataVersion:"1.4",description:"Title Region Description",id:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",instanceId:"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",properties:{authorByline:[],authors:[],layoutType:"FullWidthImage",showPublishDate:!1,showTopicHeader:!1,textAlignment:"Left",title:"SPFx Extensions Configurator",topicHeader:"",enableGradientEffect:!0},reservedHeight:280,serverProcessedContent:{htmlStrings:{},searchablePlainTexts:{},imageSources:{},links:{}},title:"Title area"}],C9=[{addedFromPersistedData:!1,controlType:3,displayMode:2,emphasis:{},id:vx,position:{controlIndex:1,layoutIndex:1,sectionFactor:12,sectionIndex:1,zoneIndex:1},reservedHeight:500,reservedWidth:500,webPartData:{dataVersion:"1.0",description:"Allows you to add a custom developed app",id:qx,instanceId:vx,properties:{description:"Select an app to load from the dropdown below",selectedApp:A,SPFxExtensionAppConfiguration:void 0},title:"SPFx Extension Loader"},webPartId:qx},{controlType:0,pageSettingsSlice:{isDefaultDescription:!0,isDefaultThumbnail:!0}}],N9={CanvasContent1:`${JSON.stringify(C9)}`,LayoutWebpartsContent:`${JSON.stringify(f9)}`,Title:px};async function m1(x){await fetch(`${H}/_api/sitepages/pages(${x})/savepage`,{headers:{"Content-Type":"application/json",...Zx,...Ux},body:JSON.stringify(N9),method:"POST"}),await fetch(`${H}/_api/sitepages/pages(${x})/publish`,{headers:{...Zx,...Ux},method:"POST"})}async function o9(){let x=await g9();return await m1(x),gx()}async function I9(){let x=await S("ConfiguratorPageData");if(x?.Data)return x.Data;let w=await gx();if(w)await n({Title:"ConfiguratorPageData",Data:w,date:"",expires:""},480);return w}async function h1(){let x=await I9();if(!x)return o9();if(x.CanvasContent1.indexOf(vx)===-1){await m1(x.Id);let w=await gx();return await n({Title:"ConfiguratorPageData",Data:w,date:"",expires:""},480),w}return x}var E1=await E(_);async function u9(){let x=`${H}/_api/web/lists/GetByTitle('${U}')/fields`;try{let w=await fetch(x,{headers:{Accept:"application/json;odata=verbose"}});if(w.status===200){if(!(await w.json()).d.results.map((Z)=>Z.InternalName).some((Z)=>Z==="EntryPointUrl"))await T9(x,"EntryPointUrl","Full URL to the Entrypoint JS file, if * is specified all entries will be allowed.",!0)}}catch(w){V("Error while ensuring list fields.",w)}}async function T9(x,w,y,$){if((await fetch(x,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":E1},body:JSON.stringify({__metadata:{type:"SP.Field"},Title:w,FieldTypeKind:3,Required:$,Description:y})})).status===201)j(w,"field added successfully.");else V(w,"Unable to add field.")}async function c9(){try{let x=await fetch(`${H}/_api/web/lists/GetByTitle('${U}')?$select=*`,{method:"GET",headers:{Accept:"application/json;odata=verbose"}});if(x.status===404){j("Creating app white list.");let y=await fetch(`${H}/_api/web/lists`,{method:"POST",headers:{Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose","X-RequestDigest":E1},body:JSON.stringify({__metadata:{type:"SP.List"},BaseTemplate:100,Title:U,Description:"App whitelist for SPFxExtensions"})});if(y.status===201)return j("App whitelist created successfully."),y.json();else{V("Unable to create app whitelist.");return}}return await u9(),x.json()}catch(x){V("Error while ensuring app whitelist.",x)}return}async function A1(){let x=await S("AppWhiteList");if(x?.Data)return x.Data;let w=await c9();if(w)await n({Title:"AppWhiteList",Data:w,date:"",expires:""},480);return w}var bx;async function fx(){if(bx)return bx;return bx=p9(),bx}async function p9(){await n1(),await A1(),await h1(),window.__SPFxExtensions.Utils.ConfiguratorPageUrl=`${H}/${t}`}async function M(x=!1){return await fx(),L1(x)}async function d1(){return`${`${(await M()).find(($)=>$.Title==="RootCDNLocation")?.Data??`${H}`}${g}`}${X}`}async function S1(){let x=await M(),w=["spfxextensions","ff36e5d0-f7c7-421d-9e21-0a422626209a"];if(x.find((y)=>y.Title==="Version")?.Data!=="2025-04-25T11:07:28.675Z"){x=await M(!0),n({Title:"Version",Data:"2025-04-25T11:07:28.675Z",date:"",expires:""},240);let y=await caches.keys(),$=!1;for(let Q of y){let Z=await caches.open(Q),b=await Z.keys(),W=[];for(let z of b){let Y=z.url.toLowerCase();if(w.some((F)=>Y.indexOf(F)>-1))K("Deleting cache key",z),$=!0,W.push(Z.delete(z,{ignoreMethod:!0,ignoreSearch:!0}))}await Promise.allSettled(W)}if($)window.location.reload()}}function m0(){return C(`${Date.now()}`,13)}var t9=s9();async function s9(){try{let x=await H1(),w=await W1();if(w.length>0&&!x)return w;if(w.length>0)j("Cache mismatch, loading allowed apps data...");let y=await M1();return await J1(y,5),y}catch(x){return V("Unable to load allowed apps data...",x),[]}}async function M1(x=!1){if((await M(x)).find(($)=>$.Title==="EnableAppWhiteList")?.Data!=="true")return[{Id:1,Title:"All apps allowed",EntryPointUrl:"*",date:(/*@__PURE__*/new Date()).toISOString(),expires:(/*@__PURE__*/new Date()).toISOString()}];return i9()}async function i9(){let x=`${H}/_api/web/lists/getByTitle('${U}')/Items?$select=Id,Title,EntryPointUrl&$top=1000`;return await l9(x)}async function l9(x){let w=x,y=[];while(w){let Q=await(await fetch(w,{method:"GET",headers:{Accept:"application/json;odata=verbose"}})).json();if(Q.error)throw new Error(JSON.stringify(Q.error));y.push(...Q.d.results),w=Q.d.__next}return y}function a9(x,w){if(w.some((Q)=>Q.EntryPointUrl==="*"))return!0;let $=(x.origin+x.pathname).toLowerCase();return w.some((Q)=>{try{let Z=new URL(Q.EntryPointUrl),b=Z.origin+Z.pathname;return $===b.toLowerCase()}catch(Z){return V("Error while parsing allowed entry URL",Q.EntryPointUrl,Z),!1}})}async function v1(x,w,y=!1){if(b1(x))return!0;let $=y?await M1(y):await t9;if(!a9(x,$))return O("File",x,`is not allowed to be executed. Please add it to whitelist @ ${H}.`),O(`If you are a developer you can enable this app by adding localStorage item ${h.SPFXEXT}${w} with a number value corresponding to development port of the localhost server.`),!1;return!0}async function g0(){if(window.moduleLoaderPromise)return(await window.moduleLoaderPromise)?.context;console.error("Unable to retrieve Modern SP Context...")}async function U1(){if(window.moduleLoaderPromise){let x=await window.moduleLoaderPromise;if(x?.context?.pageContext)return{contextType:"SPOModernContext",context:x.context.pageContext};throw"It seems this is a modern page, however it was not possible to retrieve SP Context..."}if(window._spPageContextInfo)return{contextType:"ClassicContext",context:window._spPageContextInfo};throw"It was not possible to retrieve SP Context either through modern or through classic means..."}var k=await U1();function g1(){return k.contextType==="SPOModernContext"?k.context.web.id.toString():_x(k.context.webId)}function Cx(){return(k.contextType==="SPOModernContext"?k.context.web.absoluteUrl:k.context.webAbsoluteUrl).replace(/\/$/,"")}function Vx(){return k.contextType==="SPOModernContext"?k.context.site.id.toString():_x(k.context.siteId)}function c(){return k.contextType==="SPOModernContext"?k.context.site.absoluteUrl:k.context.siteAbsoluteUrl}function zx(){return(k.contextType==="SPOModernContext"?k.context.legacyPageContext.hubSiteId?.toString():k.context.hubSiteId)??s}function f1(){return k.contextType==="SPOModernContext"?k.context.legacyPageContext.isHubSite:k.context.isHubSite}function r9(x){if(!Array.isArray(x.enabledAppCollections))throw`${P} ${X} enabledAppCollections should be an array`;if(!Array.isArray(x.urlMap))throw`${P} ${X} urlMap should be an array`}async function Bx(x,w,y,$,Q=!1,Z=60){let b=Gx,W=x.toLowerCase();if(!Q&&!L){let q=await O1(W);if(q)return q.isHubFetch=$,q}let z=`${W}?v=${Date.now()}`;try{K(`Fetching ${X} from`,z);let I=await(await fetch(z)).text();b=JSON.parse(I)}catch(q){O(`Unable to fetch ${X} from`,z,q)}try{r9(b)}catch(q){V(`Error while parsing ${X} from`,z,q),b=Gx}let Y=await C(JSON.stringify(b)),R={manifest:b,...{name:w,url:W,type:y,hash:Y}};return await G1(R,L?1:Z),R.isHubFetch=$,R}async function Yx(x,w,y,$=!1){let Q=[],Z=await d1();Q.push(Bx(Z,"apps","root",!0,$));let b=x+g;if(Q.push(Bx(`${b}${X}`,"apps","site",!1,$)),y){let q=y+g;Q.push(Bx(`${q}${X}`,"apps","site",!0,$))}let z=`${w+g}${X}`,Y=x.toLowerCase()===w.toLowerCase(),F=z.toLowerCase()===Z.toLowerCase();if(!Y&&!F)Q.push(Bx(z,"apps","web",!1,$));return await Promise.all(Q)}function e9(x){if(Array.isArray(x)||typeof x!=="object")throw`${P} App manifest has to be an object.`;if(!x.appRelativeEntryPointUrls)throw V("Manifest does not have appRelativeEntryPointUrl property.",x),`${P} Manifest does not have appRelativeEntryPointUrl property.`;if(!x.appDefinitionMap)throw V("Manifest does not have enabledApps property.",x),`${P} Manifest does not have enabledApps property.`}async function xw(x,w,y,$,Q=!1,Z=60){let b={...Dx},W=x.toLowerCase();if(!Q&&!L){let q=await k1(W);if(q)return q.isHubFetch=$,q}let z=`${W}?v=${Date.now()}`;try{K(`Fetching ${m} from`,z);let I=await(await fetch(z)).text();b=JSON.parse(I)}catch(q){O(`Unable to fetch ${m} from`,z,q)}try{e9(b)}catch(q){V(`Error while parsing ${m} from`,z,q),b={...Dx}}let Y=await C(JSON.stringify(b)),R={manifest:b,...{name:w,url:W,type:y,hash:Y}};return await D1(R,L?1:Z),R.isHubFetch=$,R}function ww(x,w){let y=`${x}${w}/${m}`,$=`${h.SPFXEXT}${w}`,Q=Number(localStorage.getItem($));if(Q>0){let Z=`https://localhost:${Q}/${m}`;return j(`<${w}> App is in debug mode, loading from`,Z),Z}return y}function Nx(x,w=!1){if(x.length===0)return[];let y=[];for(let $ of x){let Q=$.url.toLowerCase().replace(X.toLowerCase(),"");for(let Z of $.manifest.enabledAppCollections){let b=ww(Q,Z);y.push(xw(b,Z,$.type,$.isHubFetch??!1,w))}}return y}function Wx(x,w=!1){let y=x.filter((Y)=>Y.type==="root"),$=Nx(y,w),Q=x.filter((Y)=>Y.type==="site"),Z=Nx(Q,w),b=x.filter((Y)=>Y.type==="web"),W=Nx(b,w);return[...$,...Z,...W]}var Ix=!1,jx=[];async function yw(x,w,y){if(!y.isESM){let $=y.appDefinitionMap.find((Z)=>Z.appId===w);if(!$){let Z=`Could not find app configuration item for non-ESM app ${w}`;return V(Z),[]}if(!C1($))return j(`App ${w} is not enabled in current context. Skipping...`),[];try{O("Non-ESM module detected. Make sure to call window.__SPFxExtensions.RegisterApp and window.__SPFxExtensions.InstantiateApp in code.",x),await import(x)}catch(Z){let b=`Error while importing or executing ${x} ${Z}`;return V(b),[]}return[]}else try{let Q=(await import(x)).default;if(!Q)return V(`No default export found in ${x}, only ESM modules are supported.`),[];return Zw(Q,y,x)}catch($){return V("Error while importing or executing",x,$),[]}}async function ox(x){let w=[],y=x.url.replace(m,"");K("Parsing",x.type,"manifest:",x.manifest);for(let $ of x.manifest.appRelativeEntryPointUrls){let Q=$.replace(/\.\.\/?/g,"./").replace(/^\.\//,""),Z=`${y}${Q}`.toLowerCase();K("EntryPoint JS: ",Z);let b=new URL(Z);if(x.manifest.cacheString&&x.manifest.enableCaching){let R=V1(x.name)?`${(/*@__PURE__*/new Date()).getTime()}`:x.manifest.cacheString;b.searchParams.set("v",`${R}`)}if(!await v1(b,x.name))continue;let z=`${b.origin}${b.pathname}`,Y=`${b}`;if(jx.includes(z)){j("EntryPoint already loaded:",Y);continue}jx.push(z),w.push(yw(Y,$,x.manifest))}return w}async function ux(x,w,y,$,Q=!1){if(Q)$w($);if(Ix)return;Ix=!0;let Z=await Yx(x,w,y),b=Wx(Z);window.__SPFxExtensions.Utils.appManifestPromises=b,window.__SPFxExtensions.Utils.spAppInitializationPromiseResolver();let z=(await Promise.allSettled(b)).filter((D)=>D.status==="fulfilled"),Y=[],F=z.filter((D)=>D.value.type==="root"),R=z.filter((D)=>D.value.type==="site"),q=z.filter((D)=>D.value.type==="web");for(let D of F){let u=await ox(D.value);Y.push(...u)}K("Root apps loaded.");for(let D of R){let u=await ox(D.value);Y.push(...u)}K("Site apps loaded.");for(let D of q){let u=await ox(D.value);Y.push(...u)}K("SiteWeb apps loaded.");let I=(await Promise.allSettled(Y)).filter((D)=>D.status==="fulfilled").flatMap((D)=>D.value);await Qw(I),window.__SPFxExtensions.AllAppAssetsLoadedResolver(),j("SPFx Extensions Core Components Loaded.")}function $w(x){Ix=!1,jx.splice(0,jx.length),sx(x);let{promise:w,resolve:y}=Promise.withResolvers();window.__SPFxExtensions.AllAppAssetsLoadedPromise=w,window.__SPFxExtensions.AllAppAssetsLoadedResolver=y}async function Qw(x){for(let w of window.__SPFxExtensions.Apps)if(!x.find(($)=>$.id===w.id)&&w.id!==A){if(await window.__SPFxExtensions.UnregisterApp(w.id))O(`Unregistered App ${w.id} (${w.name}) as it does not belong in this context`)}}async function Zw(x,w,y){if(!Array.isArray(x))V("Default export of entry point should be an array of App definitions. TODO: add documentation url",y);let $=[];for(let Q of x){if(!Q.id){V("App definition does not have an id. Make sure that returned array is in proper format. TODO: add documentation url",y,Q);continue}let Z=w.appDefinitionMap.find((Y)=>Y.appId.toLowerCase()===Q.id.toLowerCase()),b=`App with id ${Q.id} (${Q.name}) is not enabled for current web. Skipping...`;if(!Z){j(b);continue}if(!C1(Z)){j(b);continue}let z=await window.__SPFxExtensions.RegisterApp(Q);if($.push(Q),!Q.isWebPartApp&&Q.autoExecute){if(z.instances.length<(Q.maxInstances??1/0))window.__SPFxExtensions.InstantiateApp(Q.id,{})}}return $}function C1(x){let w=g1().toLowerCase(),y=Vx().toLowerCase(),$=zx().toLowerCase();return x.config.enabledEverywhere?x.config.excludedIds.indexOf(w)===-1&&x.config.excludedIds.indexOf(y)===-1&&x.config.excludedHubIds.indexOf($)===-1:!0}var N1=!1;function I1(){if(window.moduleLoaderPromise&&!N1)N1=!0,window.moduleLoaderPromise.then((x)=>{let w=x.context.pageContext.initialize;x.context.pageContext.initialize=function(y,$){let Q=x.context.pageContext._initializationData;w.call(this,y,$);let Z={initializationData:y,legacyContext:$};if(Q.web.id===y.web.id){o1("contextRefresh",Z);return}o1("contextChange",Z)}})}function o1(x,w){let y=new CustomEvent(x,{detail:w});window.dispatchEvent(y),window.__SPFxExtensions.Apps.forEach(($)=>{$.instances.forEach((Q)=>{Q.executeListeners(x,w)})})}function u1(){if(!window.__SPFxExtensions.AppEventListeners)window.__SPFxExtensions.AppEventListeners=[];if(!window.__SPFxExtensions.AddAppEventListener)window.__SPFxExtensions.AddAppEventListener=(x,w)=>{let y={key:window.crypto.randomUUID(),eventName:x,handler:w};return window.__SPFxExtensions.AppEventListeners.push(y),y};if(!window.__SPFxExtensions.RemoveAppEventListener)window.__SPFxExtensions.RemoveAppEventListener=(x)=>{let w=window.__SPFxExtensions.AppEventListeners.findIndex((y)=>y.key===x.key);if(w>-1)window.__SPFxExtensions.AppEventListeners.splice(w,1)}}var bw=window.history.pushState,Vw=window.history.replaceState,zw=window.history.back,Bw=window.history.forward,Yw=window.history.go;function Ww(){let x=window.history.state,w=window.location.href;return{currentState:x,previousUrl:w}}function p(x,w){let y={...Ww(),...w},$=new CustomEvent(x,{detail:y});window.dispatchEvent($)}function jw(){function x(w,y,$){bw.call(this,w,y,$),p("historyPush",{newState:w,newUrl:$})}window.history.pushState=x}function Kw(){function x(w,y,$){Vw.call(this,w,y,$),p("historyReplace",{newState:w,newUrl:$})}window.history.replaceState=x}function Jw(){function x(){zw.call(this),p("historyBack",{})}window.history.back=x}function Hw(){function x(){Bw.call(this),p("historyForward",{})}window.history.forward=x}function qw(){function x(w){Yw.call(this,w),p("historyGo",{delta:w})}window.history.go=x}var T1=!1;function c1(){if(T1)return;T1=!0,Kw(),jw(),Hw(),Jw(),qw()}async function Tx(){if(f1())return"";let x=zx(),w=Vx();if(!x||x===s||x===w)return"";await q1();let y=await j1(x);if(!y){let $=c();j("Getting Hub data for HubSiteId:",x);try{let Z=await(await fetch(`${$}/_api/hubsites/GetById?hubSiteId='${x}'`,{headers:{accept:"application/json;odata=nometadata"}})).json();return await K1(Z),Z.SiteUrl}catch(Q){return V("Error fetching hub site data.",Q),""}}return y.SiteUrl}var p1="CORE_MANIFEST_CHECK",s1=Number(localStorage.getItem(h.SPFXEXT_CORE))>0?1e5:60000,Kx=0;function cx(x,w,y,$=!1){if($)window.clearInterval(Kx),Kx=0;if(Kx>0)return;Kx=window.setInterval(t1,s1,x,w,y),t1(x,w,y)}async function t1(x,w,y){try{let Q=localStorage.getItem(p1);if(Q){let W=new Date(Q),Y=(/*@__PURE__*/new Date()).getTime()-W.getTime(),F=s1-2000;if(Y<F){K("Manifest check already performed recently, skipping.",`${Y} < ${F}`);return}}j("Checking for manifest updates across all locations..."),await Promise.all([xx(),e()]);let Z=await Yx(x,w,y,!0),b=Wx(Z,!0);await Promise.allSettled(b)}catch(Q){V("Error checking for manifest updates",Q)}let $=(/*@__PURE__*/new Date()).toISOString();K("Setting next manifest check to",$),localStorage.setItem(p1,$)}var Jx;async function kw(){if(Jx)return Jx;return Jx=Dw(),Jx}async function Dw(){if(await fx(),(await M()).find((Q)=>Q.Title==="InterceptHistory")?.Data==="true")c1();I1(),u1(),ix(),lx();let{promise:y,resolve:$}=Promise.withResolvers();if(!window.__SPFxExtensions.AllAppAssetsLoadedPromise)window.__SPFxExtensions.AllAppAssetsLoadedPromise=y,window.__SPFxExtensions.AllAppAssetsLoadedResolver=$}async function i1(){await S1(),await kw(),window.__SPFxExtensions.__CorePromiseResolver?.();let x=c(),w=Cx(),y=await Tx();await ux(x,w,y,l()),window.addEventListener("contextChange",async()=>{j("Context changed, reloading apps...");let $=c(),Q=Cx(),Z=await Tx(),b=tx();await ux($,Q,Z,b,!0),cx($,Q,Z,!0)}),cx(x,w,y),j("SPFx Extensions Core Has Been initialized.")}var Gw={id:A,description:"Allows configuring custom apps",isWebPartApp:!1,hideAppSelectorWhenAppLoaded:!0,hideConfiguratorButton:!0,name:"SPFx Extensions Configurator",async onInstanceRequested(x){let w=import.meta.url.indexOf("localhost")>-1;if(w)K("Core is in debug mode");let y=w?import.meta.resolve(`./__spfxCoreConfigurator.js?v=${Date.now()}`):window.__SPFxExtensions.__ConfiguratorUrl;try{return(await import(y)).launch(x)}catch($){if(V("Error launching configurator app",$),x.domElement)x.domElement.innerHTML=`<div style="text-align: center; padding: 20px; color: red;">Error launching configurator app. ${$}</div>`;return()=>{}}}};async function Ow(){j("Initializing Core Services Built:","2025-04-25T11:07:28.675Z"),await i1();try{await window.__SPFxExtensions.RegisterApp(Gw)}catch(w){V("Error registering configurator app",w)}}Ow();