@ui5/webcomponents-base 0.31.22 → 0.31.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/resources/bundle.esm.js +12 -12
- package/dist/resources/bundle.esm.js.map +1 -1
- package/dist/theming/CustomStyle.js +23 -3
- package/dist/util/encodeXML.js +35 -0
- package/dist/util/escapeRegex.js +10 -0
- package/dist/util/generateHighlightedMarkup.js +42 -0
- package/hash.txt +1 -0
- package/package.json +2 -2
- package/src/theming/CustomStyle.js +23 -3
- package/src/util/encodeXML.js +35 -0
- package/src/util/escapeRegex.js +10 -0
- package/src/util/generateHighlightedMarkup.js +42 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.31.23](https://github.com/SAP/ui5-webcomponents/compare/v0.31.22...v0.31.23) (2021-11-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui5-input:** escape HTML before highlighting suggestions (XSS) ([#4296](https://github.com/SAP/ui5-webcomponents/issues/4296)) ([8120f6c](https://github.com/SAP/ui5-webcomponents/commit/8120f6c)), closes [#4245](https://github.com/SAP/ui5-webcomponents/issues/4245)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* the addCustomCss should use getSharedResource ([#4269](https://github.com/SAP/ui5-webcomponents/issues/4269)) ([f8a9186](https://github.com/SAP/ui5-webcomponents/commit/f8a9186))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.31.22](https://github.com/SAP/ui5-webcomponents/compare/v0.31.21...v0.31.22) (2021-10-26)
|
|
7
23
|
|
|
8
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t={default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT","de_CH","el","el_CY","en","en_AU","en_GB","en_HK","en_IE","en_IN","en_NZ","en_PG","en_SG","en_ZA","es","es_AR","es_BO","es_CL","es_CO","es_MX","es_PE","es_UY","es_VE","et","fa","fi","fr","fr_BE","fr_CA","fr_CH","fr_LU","he","hi","hr","hu","id","it","it_CH","ja","kk","ko","lt","lv","ms","nb","nl","nl_BE","pl","pt","pt_PT","ro","ru","ru_UA","sk","sl","sr","sv","th","tr","uk","vi","zh_CN","zh_HK","zh_SG","zh_TW"]},e={default:"sap_fiori_3",all:["sap_fiori_3","sap_fiori_3_dark","sap_belize","sap_belize_hcb","sap_belize_hcw","sap_fiori_3_hcb","sap_fiori_3_hcw"]}.default,s={default:"en",all:["ar","bg","ca","cs","da","de","el","en","es","et","fi","fr","hi","hr","hu","it","iw","ja","kk","ko","lt","lv","ms","nl","no","pl","pt","ro","ru","sh","sk","sl","sv","th","tr","uk","vi","zh_CN","zh_TW"]}.default,n=t.default,i=t.all;var a=()=>{const t=navigator.languages;return t&&t[0]||navigator.language||navigator.userLanguage||navigator.browserLanguage||s},r={},o=r.hasOwnProperty,l=r.toString,c=o.toString,d=c.call(Object),h=function(t){var e,s;return!(!t||"[object Object]"!==l.call(t))&&(!(e=Object.getPrototypeOf(t))||"function"==typeof(s=o.call(e,"constructor")&&e.constructor)&&c.call(s)===d)},u=Object.create(null),p=function(){var t,e,s,n,i,a,r=arguments[2]||{},o=3,l=arguments.length,c=arguments[0]||!1,d=arguments[1]?void 0:u;for("object"!=typeof r&&"function"!=typeof r&&(r={});o<l;o++)if(null!=(i=arguments[o]))for(n in i)t=r[n],s=i[n],"__proto__"!==n&&r!==s&&(c&&s&&(h(s)||(e=Array.isArray(s)))?(e?(e=!1,a=t&&Array.isArray(t)?t:[]):a=t&&h(t)?t:{},r[n]=p(c,arguments[1],a,s)):s!==d&&(r[n]=s));return r},g=function(){var t=[!0,!1];return t.push.apply(t,arguments),p.apply(null,t)};const m=new Map,f=t=>m.get(t);let _=!1,w={animationMode:"full",theme:e,rtl:null,language:null,calendarType:null,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1,assetsPath:""};const y=new Map;y.set("true",!0),y.set("false",!1);const v=()=>{_||((()=>{const t=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(t){try{e=JSON.parse(t.innerHTML)}catch(t){console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(w=g(w,e))}})(),new URLSearchParams(window.location.search).forEach(((t,e)=>{if(!e.startsWith("sap-ui"))return;const s=t.toLowerCase(),n=e.split("sap-ui-")[1];y.has(t)&&(t=y.get(s)),w[n]=t})),(()=>{const t=f("OpenUI5Support");if(!t||!t.isLoaded())return;const e=t.getConfigurationSettingsObject();w=g(w,e)})(),_=!0)};class b{constructor(){this._eventRegistry={}}attachEvent(t,e){const s=this._eventRegistry;let n=s[t];Array.isArray(n)||(s[t]=[],n=s[t]),n.push({function:e})}detachEvent(t,e){const s=this._eventRegistry;let n=s[t];n&&(n=n.filter((t=>t.function!==e)),0===n.length&&delete s[t])}fireEvent(t,e){const s=this._eventRegistry[t];return s?s.map((t=>t.function.call(this,e))):[]}fireEventAsync(t,e){return Promise.all(this.fireEvent(t,e))}isHandlerAttached(t,e){const s=this._eventRegistry[t];if(!s)return!1;for(let t=0;t<s.length;t++){if(s[t].function===e)return!0}return!1}hasListeners(t){return!!this._eventRegistry[t]}}const S=new b,A=t=>{S.attachEvent("languageChange",t)};const E=t=>{const e=[];return t.forEach((t=>{e.push(t)})),e},C=new Set,x=new Set;let O;const M=t=>{C.add(t)},P=()=>{console.warn("The following tags have already been defined by a different UI5 Web Components version: "+E(x).join(", ")),x.clear()},L=new Set,T=new Set,N=new b,I=new class{constructor(){this.list=[],this.lookup=new Set}add(t){this.lookup.has(t)||(this.list.push(t),this.lookup.add(t))}remove(t){this.lookup.has(t)&&(this.list=this.list.filter((e=>e!==t)),this.lookup.delete(t))}shift(){const t=this.list.shift();if(t)return this.lookup.delete(t),t}isEmpty(){return 0===this.list.length}isAdded(t){return this.lookup.has(t)}process(t){let e;const s=new Map;for(e=this.shift();e;){const n=s.get(e)||0;if(n>10)throw new Error("Web component processed too many times this task, max allowed is: 10");t(e),s.set(e,n+1),e=this.shift()}}};let R,$,k,D;const V=t=>{N.fireEvent("beforeComponentRender",t),T.add(t),t._render()},j=async()=>{D||(D=new Promise((t=>{window.requestAnimationFrame((()=>{I.process(V),D=null,t(),k||(k=setTimeout((()=>{k=void 0,I.isEmpty()&&B()}),200))}))}))),await D},U=()=>{const t=E(C).map((t=>customElements.whenDefined(t)));return Promise.all(t)},F=async()=>{await U(),await(R||(R=new Promise((t=>{$=t,window.requestAnimationFrame((()=>{I.isEmpty()&&(R=void 0,t())}))})),R))},B=()=>{I.isEmpty()&&$&&($(),$=void 0,R=void 0)};let H,Z;const z=()=>(void 0===H&&(v(),H=w.language),H),W=()=>{var t;return void 0===Z&&(v(),t=w.fetchDefaultLanguage,Z=t),Z},q=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;class G{constructor(t){const e=q.exec(t.replace(/_/g,"-"));if(null===e)throw new Error(`The given language ${t} does not adhere to BCP-47.`);this.sLocaleId=t,this.sLanguage=e[1]||null,this.sScript=e[2]||null,this.sRegion=e[3]||null,this.sVariant=e[4]&&e[4].slice(1)||null,this.sExtension=e[5]&&e[5].slice(1)||null,this.sPrivateUse=e[6]||null,this.sLanguage&&(this.sLanguage=this.sLanguage.toLowerCase()),this.sScript&&(this.sScript=this.sScript.toLowerCase().replace(/^[a-z]/,(t=>t.toUpperCase()))),this.sRegion&&(this.sRegion=this.sRegion.toUpperCase())}getLanguage(){return this.sLanguage}getScript(){return this.sScript}getRegion(){return this.sRegion}getVariant(){return this.sVariant}getVariantSubtags(){return this.sVariant?this.sVariant.split("-"):[]}getExtension(){return this.sExtension}getExtensionSubtags(){return this.sExtension?this.sExtension.slice(2).split("-"):[]}getPrivateUse(){return this.sPrivateUse}getPrivateUseSubtags(){return this.sPrivateUse?this.sPrivateUse.slice(2).split("-"):[]}hasPrivateUseSubtag(t){return this.getPrivateUseSubtags().indexOf(t)>=0}toString(){const t=[this.sLanguage];return this.sScript&&t.push(this.sScript),this.sRegion&&t.push(this.sRegion),this.sVariant&&t.push(this.sVariant),this.sExtension&&t.push(this.sExtension),this.sPrivateUse&&t.push(this.sPrivateUse),t.join("-")}}const J=new Map,X=t=>(J.has(t)||J.set(t,new G(t)),J.get(t)),Y=t=>{try{if(t&&"string"==typeof t)return X(t)}catch(t){}},K=t=>t?Y(t):z()?X(z()):Y(a()),Q=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i,tt=/(?:^|-)(saptrc|sappsd)(?:-|$)/i,et={he:"iw",yi:"ji",id:"in",sr:"sh"},st=t=>{if(!t)return n;if("zh_HK"===t)return"zh_TW";const e=t.lastIndexOf("_");return e>=0?t.slice(0,e):t!==n?n:""},nt=new Set,it=new Set,at=new Map,rt=new Map,ot=new Map,lt=(t,e)=>{at.set(t,e)},ct=(t,e)=>{const s=`${t}/${e}`;return ot.has(s)},dt=async t=>{const e=K().getLanguage(),i=K().getRegion();let a=(t=>{let e;if(!t)return n;if("string"==typeof t&&(e=Q.exec(t.replace(/_/g,"-")))){let t=e[1].toLowerCase(),s=e[3]?e[3].toUpperCase():void 0;const n=e[2]?e[2].toLowerCase():void 0,i=e[4]?e[4].slice(1):void 0,a=e[6];return t=et[t]||t,a&&(e=tt.exec(a))||i&&(e=tt.exec(i))?"en_US_"+e[1].toLowerCase():("zh"!==t||s||("hans"===n?s="CN":"hant"===n&&(s="TW")),t+(s?"_"+s+(i?"_"+i.replace("-","_"):""):""))}})(e+(i?"-"+i:""));for(;a!==s&&!ct(t,a);)a=st(a);const r=W();if(a!==s||r)if(ct(t,a))try{const e=await((t,e)=>{const s=`${t}/${e}`,n=ot.get(s);return rt.get(s)||rt.set(s,n(e)),rt.get(s)})(t,a);lt(t,e)}catch(t){it.has(t.message)||(it.add(t.message),console.error(t.message))}else(t=>{nt.has(t)||(console.warn(`[${t}]: Message bundle assets are not configured. Falling back to English texts.`,` Add \`import "${t}/dist/Assets.js"\` in your bundle and make sure your build tool supports dynamic imports and JSON imports. See section "Assets" in the documentation for more information.`),nt.add(t))})(t);else lt(t,null)};A((()=>{const t=[...at.keys()];return Promise.all(t.map(dt))}));const ht=new Map,ut=new Map,pt=new Map,gt=new Set,mt={iw:"he",ji:"yi",in:"id",sh:"sr"},ft=(t,e)=>{ht.set(t,e)},_t=async(t,e,s)=>{const a=((t,e,s)=>{"no"===(t=t&&mt[t]||t)&&(t="nb"),"zh"!==t||e||("Hans"===s?e="CN":"Hant"===s&&(e="TW"));let a=`${t}_${e}`;return i.includes(a)||(a=t),i.includes(a)||(a=n),a})(t,e,s),r=f("OpenUI5Support");if(r){const t=r.getLocaleDataObject();if(t)return void ft(a,t)}try{const t=await(t=>{const e=ut.get(t);return pt.get(t)||pt.set(t,e(t)),pt.get(t)})(a);ft(a,t)}catch(t){gt.has(t.message)||(gt.add(t.message),console.error(t.message))}};var wt,yt;wt="en",yt=async t=>(await fetch("https://ui5.sap.com/1.60.2/resources/sap/ui/core/cldr/en.json")).json(),ut.set(wt,yt),A((()=>{const t=K();return _t(t.getLanguage(),t.getRegion(),t.getScript())}));const vt=new Map,bt=new Map,St=new Set,At=new Set,Et=(t,e,s)=>{bt.set(`${t}/${e}`,s),St.add(t),At.add(e)},Ct=async(t,s)=>{const n=vt.get(`${t}_${s}`);if(void 0!==n)return n;if(!At.has(s)){const s=[...At.values()].join(", ");return console.warn(`You have requested a non-registered theme - falling back to ${e}. Registered themes are: ${s}`),vt.get(`${t}_${e}`)}const i=bt.get(`${t}/${s}`);if(!i)return void console.error(`Theme [${s}] not registered for package [${t}]`);let a;try{a=await i(s)}catch(e){return void console.error(t,e.message)}const r=a._||a;return vt.set(`${t}_${s}`,r),r},xt=()=>St,Ot=(t,e=document.body)=>{let s=document.querySelector(t);return s||(s=document.createElement(t),e.insertBefore(s,e.firstChild))},Mt=(t,e)=>{const s=t.split(".");let n=Ot("ui5-shared-resources",document.head);for(let t=0;t<s.length;t++){const i=s[t],a=t===s.length-1;Object.prototype.hasOwnProperty.call(n,i)||(n[i]=a?e:{}),n=n[i]}return n},Pt=new Map,Lt=Mt("SVGIcons.registry",new Map),Tt=Mt("SVGIcons.promises",new Map),Nt=(t,{pathData:e,ltr:s,accData:n,collection:i,packageName:a}={})=>{i||(i="SAP-icons");const r=`${i}/${t}`;Lt.set(r,{pathData:e,ltr:s,accData:n,packageName:a})},It=async t=>{const{collection:e,registryKey:s}=(t=>{let e;return t.startsWith("sap-icon://")&&(t=t.replace("sap-icon://","")),[t,e]=t.split("/").reverse(),e=e||"SAP-icons","SAP-icons-TNT"===e&&(e="tnt"),{name:t,collection:e,registryKey:`${e}/${t}`}})(t);let n="ICON_NOT_FOUND";try{n=await(async t=>{if(!Tt.has(t)){const e=Pt.get(t);Tt.set(t,e(t))}return Tt.get(t)})(e)}catch(t){console.error(t.message)}return"ICON_NOT_FOUND"===n?n:(Lt.has(s)||(t=>{Object.keys(t.data).forEach((e=>{const s=t.data[e];Nt(e,{pathData:s.path,ltr:s.ltr,accData:s.acc,collection:t.collection,packageName:t.packageName})}))})(n),Lt.get(s))},Rt=(t,e={})=>{const s=document.createElement("style");return s.type="text/css",Object.entries(e).forEach((t=>s.setAttribute(...t))),s.textContent=t,document.head.appendChild(s),s},$t=(t,e)=>{const s=document.head.querySelector(`style[data-ui5-theme-properties="${e}"]`);if(s)s.textContent=t||"";else{Rt(t,{"data-ui5-theme-properties":e})}},kt=()=>{const t=(()=>{let t=document.querySelector(".sapThemeMetaData-Base-baseLib");if(t)return getComputedStyle(t).backgroundImage;t=document.createElement("span"),t.style.display="none",t.classList.add("sapThemeMetaData-Base-baseLib"),document.body.appendChild(t);const e=getComputedStyle(t).backgroundImage;return document.body.removeChild(t),e})();if(!t||"none"===t)return;return(t=>{let e,s;try{e=t.Path.match(/\.([^.]+)\.css_variables$/)[1],s=t.Extends[0]}catch(e){return void console.warn("Malformed theme metadata Object",t)}return{themeName:e,baseThemeName:s}})((t=>{const e=/\(["']?data:text\/plain;utf-8,(.*?)['"]?\)$/i.exec(t);if(e&&e.length>=2){let t=e[1];if(t=t.replace(/\\"/g,'"'),"{"!==t.charAt(0)&&"}"!==t.charAt(t.length-1))try{t=decodeURIComponent(t)}catch(t){return void console.warn("Malformed theme metadata string, unable to decodeURIComponent")}try{return JSON.parse(t)}catch(t){console.warn("Malformed theme metadata string, unable to parse JSON")}}})(t))},Dt=new b,Vt="@ui5/webcomponents-theme-base",jt=async t=>{if(!xt().has(Vt))return;const e=await Ct(Vt,t);$t(e,Vt)},Ut=async t=>{const e=(()=>{const t=kt();if(t)return t;const e=f("OpenUI5Support");if(e&&e.cssVariablesLoaded())return{themeName:e.getConfigurationSettingsObject().theme}})();e&&t===e.themeName?(()=>{const t=document.head.querySelector(`style[data-ui5-theme-properties="${Vt}"]`);t&&t.parentElement.removeChild(t)})():await jt(t);const s=(t=>At.has(t))(t)?t:e&&e.baseThemeName;await(async t=>{xt().forEach((async e=>{if(e===Vt)return;const s=await Ct(e,t);$t(s,e)}))})(s),(t=>{Dt.fireEvent("themeLoaded",t)})(t)};let Ft;const Bt=()=>(void 0===Ft&&(v(),Ft=w.theme),Ft),Ht=async t=>{Ft!==t&&(Ft=t,await Ut(Ft))},Zt=Mt("PopupUtilsData",{});Zt.currentZIndex=Zt.currentZIndex||100;const zt=()=>Zt.currentZIndex,Wt=()=>{const t=window.sap;return t&&t.ui&&"function"==typeof t.ui.getCore&&t.ui.getCore()};var qt,Gt;qt="OpenUI5Support",Gt={isLoaded:()=>!!Wt(),init:()=>{const t=Wt();return t?new Promise((e=>{t.attachInit((()=>{window.sap.ui.require(["sap/ui/core/LocaleData","sap/ui/core/Popup"],((t,s)=>{s.setInitialZIndex(zt()),e()}))}))})):Promise.resolve()},getConfigurationSettingsObject:()=>{const t=Wt();if(!t)return;const e=t.getConfiguration(),s=window.sap.ui.require("sap/ui/core/LocaleData");return{animationMode:e.getAnimationMode(),language:e.getLanguage(),theme:e.getTheme(),rtl:e.getRTL(),calendarType:e.getCalendarType(),formatSettings:{firstDayOfWeek:s?s.getInstance(e.getLocale()).getFirstDayOfWeek():void 0}}},getLocaleDataObject:()=>{const t=Wt();if(!t)return;const e=t.getConfiguration();return window.sap.ui.require("sap/ui/core/LocaleData").getInstance(e.getLocale())._get()},attachListeners:()=>{Wt()&&(()=>{const t=Wt(),e=t.getConfiguration();t.attachThemeChanged((async()=>{await Ht(e.getTheme())}))})()},cssVariablesLoaded:()=>{if(!Wt())return;const t=[...document.head.children].find((t=>"sap-ui-theme-sap.ui.core"===t.id));return t?!!t.href.match(/\/css(-|_)variables\.css/):void 0},getNextZIndex:()=>{if(!Wt())return;return window.sap.ui.require("sap/ui/core/Popup").getNextZIndex()},setInitialZIndex:()=>{if(!Wt())return;window.sap.ui.require("sap/ui/core/Popup").setInitialZIndex(zt())}},m.set(qt,Gt);const Jt=()=>{document.querySelector("head>style[data-ui5-font-face]")||Rt('\n\t@font-face {\n\t\tfont-family: "72";\n\t\tfont-style: normal;\n\t\tfont-weight: 400;\n\t\tsrc: local("72"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular.woff?ui5-webcomponents) format("woff");\n\t}\n\t\n\t@font-face {\n\t\tfont-family: "72full";\n\t\tfont-style: normal;\n\t\tfont-weight: 400;\n\t\tsrc: local(\'72-full\'),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular-full.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular-full.woff?ui5-webcomponents) format("woff");\n\t\t\n\t}\n\t\n\t@font-face {\n\t\tfont-family: "72";\n\t\tfont-style: normal;\n\t\tfont-weight: 700;\n\t\tsrc: local(\'72-Bold\'),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff?ui5-webcomponents) format("woff");\n\t}\n\t\n\t@font-face {\n\t\tfont-family: "72full";\n\t\tfont-style: normal;\n\t\tfont-weight: 700;\n\t\tsrc: local(\'72-Bold-full\'),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff?ui5-webcomponents) format("woff");\n\t}\n',{"data-ui5-font-face":""})},Xt=()=>{document.querySelector("head>style[data-ui5-font-face-override]")||Rt("\n\t@font-face {\n\t\tfont-family: '72override';\n\t\tunicode-range: U+0102-0103, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EB7, U+1EB8-1EC7, U+1EC8-1ECB, U+1ECC-1EE3, U+1EE4-1EF1, U+1EF4-1EF7;\n\t\tsrc: local('Arial'), local('Helvetica'), local('sans-serif');\n\t}\n",{"data-ui5-font-face-override":""})};let Yt;const Kt=new b,Qt=()=>Yt||(Yt=new Promise((async t=>{const e=f("OpenUI5Support");e&&await e.init(),await new Promise((t=>{document.body?t():document.addEventListener("DOMContentLoaded",(()=>{t()}))})),await Ut(Bt()),e&&e.attachListeners(),(()=>{const t=f("OpenUI5Support");t&&t.isLoaded()||Jt(),Xt()})(),document.querySelector("head>style[data-ui5-system-css-vars]")||Rt('\n\t:root {\n\t\t--_ui5_content_density:cozy;\n\t}\n\t\n\t[data-ui5-compact-size],\n\t.ui5-content-density-compact,\n\t.sapUiSizeCompact {\n\t\t--_ui5_content_density:compact;\n\t}\n\t\n\t[dir="rtl"] {\n\t\t--_ui5_dir:rtl;\n\t}\n\t\n\t[dir="ltr"] {\n\t\t--_ui5_dir:ltr;\n\t}\n',{"data-ui5-system-css-vars":""}),await Kt.fireEventAsync("boot"),t()})),Yt);class te{static isValid(t){}static generateTypeAccessors(t){Object.keys(t).forEach((e=>{Object.defineProperty(this,e,{get:()=>t[e]})}))}}const ee=new Map,se=new Map,ne=t=>{if(!ee.has(t)){const e=ae(t.split("-"));ee.set(t,e)}return ee.get(t)},ie=t=>{if(!se.has(t)){const e=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();se.set(t,e)}return se.get(t)},ae=t=>t.map(((t,e)=>0===e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase())).join(""),re=t=>t&&t instanceof HTMLElement&&"slot"===t.localName,oe=t=>re(t)?t.assignedNodes({flatten:!0}).filter((t=>t instanceof HTMLElement)):[t];let le={include:[/^ui5-/],exclude:[]};const ce=new Map,de=t=>{if(!ce.has(t)){const e=le.include.some((e=>t.match(e)))&&!le.exclude.some((e=>t.match(e)));ce.set(t,e)}return ce.get(t)},he=t=>{de(t)};class ue{constructor(t){this.metadata=t}getInitialState(){if(Object.prototype.hasOwnProperty.call(this,"_initialState"))return this._initialState;const t={},e=this.slotsAreManaged(),s=this.getProperties();for(const e in s){const n=s[e].type,i=s[e].defaultValue;n===Boolean?(t[e]=!1,void 0!==i&&console.warn("The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default")):s[e].multiple?t[e]=[]:t[e]=n===Object?"defaultValue"in s[e]?s[e].defaultValue:{}:n===String?"defaultValue"in s[e]?s[e].defaultValue:"":i}if(e){const e=this.getSlots();for(const[s,n]of Object.entries(e)){t[n.propertyName||s]=[]}}return this._initialState=t,t}static validatePropertyValue(t,e){return e.multiple?t.map((t=>pe(t,e))):pe(t,e)}static validateSlotValue(t,e){return ge(t,e)}getPureTag(){return this.metadata.tag}getTag(){const t=this.metadata.tag,e=he(t);return e?`${t}-${e}`:t}getAltTag(){const t=this.metadata.altTag;if(!t)return;const e=he(t);return e?`${t}-${e}`:t}hasAttribute(t){const e=this.getProperties()[t];return e.type!==Object&&!e.noAttribute}getPropertiesList(){return Object.keys(this.getProperties())}getAttributesList(){return this.getPropertiesList().filter(this.hasAttribute,this).map(ie)}getSlots(){return this.metadata.slots||{}}canSlotText(){const t=this.getSlots().default;return t&&t.type===Node}hasSlots(){return!!Object.entries(this.getSlots()).length}hasIndividualSlots(){return this.slotsAreManaged()&&Object.entries(this.getSlots()).some((([t,e])=>e.individualSlots))}slotsAreManaged(){return!!this.metadata.managedSlots}getProperties(){return this.metadata.properties||{}}getEvents(){return this.metadata.events||{}}isLanguageAware(){return!!this.metadata.languageAware}shouldInvalidateOnChildChange(t,e,s){const n=this.getSlots()[t].invalidateOnChildChange;if(void 0===n)return!1;if("boolean"==typeof n)return n;if("object"==typeof n){if("property"===e){if(void 0===n.properties)return!1;if("boolean"==typeof n.properties)return n.properties;if(Array.isArray(n.properties))return n.properties.includes(s);throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected")}if("slot"===e){if(void 0===n.slots)return!1;if("boolean"==typeof n.slots)return n.slots;if(Array.isArray(n.slots))return n.slots.includes(s);throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected")}}throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected")}}const pe=(t,e)=>{const s=e.type;return s===Boolean?"boolean"==typeof t&&t:s===String?"string"==typeof t||null==t?t:t.toString():s===Object?"object"==typeof t?t:e.defaultValue:((t,e,s=!1)=>{if("function"!=typeof t||"function"!=typeof e)return!1;if(s&&t===e)return!0;let n=t;do{n=Object.getPrototypeOf(n)}while(null!==n&&n!==e);return n===e})(s,te)?s.isValid(t)?t:e.defaultValue:void 0},ge=(t,e)=>(t&&oe(t).forEach((t=>{if(!(t instanceof e.type))throw new Error(`${t} is not of type ${e.type}`)})),t),me=new b,fe=t=>{me.attachEvent("CustomCSSChange",t)},_e={},we=t=>Array.isArray(t)?ye(t.filter((t=>!!t))).join(" "):t,ye=t=>t.reduce(((t,e)=>t.concat(Array.isArray(e)?ye(e):e)),[]),ve=new Map;fe((t=>{ve.delete(t+"_normal")}));const be=(t,e=!1)=>{const s=t.getMetadata().getTag(),n=`${s}_${e?"static":"normal"}`;if(!ve.has(n)){let i;if(e)i=we(t.staticAreaStyles);else{const e=(t=>_e[t]?_e[t].join(""):"")(s)||"";i=`${we(t.styles)} ${e}`}ve.set(n,i)}return ve.get(n)},Se=new Map;fe((t=>{Se.delete(t+"_normal")}));const Ae=()=>!!window.ShadyDOM,Ee=(t,e=!1)=>{let s;const n=e?"staticAreaTemplate":"template",i=e?t.staticAreaItem.shadowRoot:t.shadowRoot,a=((t,e)=>{const s=e.constructor.getUniqueDependencies().map((t=>t.getMetadata().getPureTag())).filter(de);return t(e,s,void 0)})(t.constructor[n],t);document.adoptedStyleSheets?i.adoptedStyleSheets=((t,e=!1)=>{const s=`${t.getMetadata().getTag()}_${e?"static":"normal"}`;if(!Se.has(s)){const n=be(t,e),i=new CSSStyleSheet;i.replaceSync(n),Se.set(s,[i])}return Se.get(s)})(t.constructor,e):Ae()||(s=be(t.constructor,e)),t.constructor.render(a,i,s,{eventContext:t})};class Ce extends HTMLElement{constructor(){super(),this._rendered=!1,this.attachShadow({mode:"open"})}setOwnerElement(t){this.ownerElement=t,this.classList.add(this.ownerElement._id)}update(){this._rendered&&(this._updateContentDensity(),Ee(this.ownerElement,!0))}_updateContentDensity(){var t;"compact"===(t=this.ownerElement,getComputedStyle(t).getPropertyValue("--_ui5_content_density"))?(this.classList.add("sapUiSizeCompact"),this.classList.add("ui5-content-density-compact")):(this.classList.remove("sapUiSizeCompact"),this.classList.remove("ui5-content-density-compact"))}async getDomRef(){return this._updateContentDensity(),this._rendered||(this._rendered=!0,Ee(this.ownerElement,!0)),await F(),this.shadowRoot}getStableDomRef(t){return this.shadowRoot.querySelector(`[data-ui5-stable=${t}]`)}static getTag(){const t="ui5-static-area-item",e=he(t);return e?`${t}-${e}`:t}static createInstance(){return customElements.get(Ce.getTag())||customElements.define(Ce.getTag(),Ce),document.createElement(this.getTag())}}const xe=new WeakMap;const Oe=(t,e,s)=>{const n=((t,e,s)=>{const n=new MutationObserver(e);return n.observe(t,s),n})(t,e,s);xe.set(t,n)},Me=["value-changed"];let Pe;const Le=()=>(void 0===Pe&&(v(),Pe=w.noConflict),Pe),Te=t=>{const e=Le();return!(t=>Me.includes(t))(t)&&(!0===e||!(t=>{const e=Le();return!(e.events&&e.events.includes&&e.events.includes(t))})(t))};const Ne={iw:"he",ji:"yi",in:"id",sh:"sr"},Ie=(t=>{const e=/\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(t);return e&&e[2]?e[2].split(/,/):null})("$cldr-rtl-locales:ar,fa,he$")||[],Re=()=>{const t=(v(),w.rtl);return null!==t?!!t:(t=>(t=t&&Ne[t]||t,Ie.indexOf(t)>=0))(z()||a())};class $e extends te{static isValid(t){return Number.isInteger(t)}}class ke extends te{static isValid(t){return Number(t)===t}}const De=["disabled","title","hidden","role","draggable"],Ve=t=>{if(De.includes(t)||t.startsWith("aria"))return!0;return![HTMLElement,Element,Node].some((e=>e.prototype.hasOwnProperty(t)))},je=(t,e)=>{if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0};let Ue=0;const Fe=new Map,Be=new Map;function He(t){this._suppressInvalidation||(this.onInvalidation(t),this._changedState.push(t),(async t=>{I.add(t),await j()})(this),this._eventProvider.fireEvent("change",{...t,target:this}))}class Ze extends HTMLElement{constructor(){let t;super(),this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._eventProvider=new b,this._domRefReadyPromise=new Promise((e=>{t=e})),this._domRefReadyPromise._deferredResolve=t,this._initializeState(),this._upgradeAllProperties(),this.constructor._needsShadowDOM()&&this.attachShadow({mode:"open"})}get _id(){return this.__id||(this.__id="ui5wc_"+ ++Ue),this.__id}async connectedCallback(){this.setAttribute(this.constructor.getMetadata().getPureTag(),"");const t=this.constructor._needsShadowDOM(),e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),t&&!this.shadowRoot&&await Promise.resolve(),this._inDOM&&(V(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,"function"==typeof this.onEnterDOM&&this.onEnterDOM())}disconnectedCallback(){const t=this.constructor._needsShadowDOM(),e=this.constructor.getMetadata().slotsAreManaged();var s;this._inDOM=!1,e&&this._stopObservingDOMChildren(),t&&this._fullyConnected&&("function"==typeof this.onExitDOM&&this.onExitDOM(),this._fullyConnected=!1),this.staticAreaItem&&this.staticAreaItem.parentElement&&this.staticAreaItem.parentElement.removeChild(this.staticAreaItem),s=this,I.remove(s),T.delete(s)}_startObservingDOMChildren(){if(!this.constructor.getMetadata().hasSlots())return;const t=this.constructor.getMetadata().canSlotText(),e={childList:!0,subtree:t,characterData:t};Oe(this,this._processChildren.bind(this),e)}_stopObservingDOMChildren(){(t=>{const e=xe.get(t);e&&((t=>{t.disconnect()})(e),xe.delete(t))})(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor.getMetadata().getSlots(),e=this.constructor.getMetadata().canSlotText(),s=Array.from(e?this.childNodes:this.children),n=new Map,i=new Map;for(const[e,s]of Object.entries(t)){const t=s.propertyName||e;i.set(t,e),n.set(t,[...this._state[t]]),this._clearSlot(e,s)}const a=new Map,r=new Map,o=s.map((async(e,s)=>{const n=(t=>{if(!(t instanceof HTMLElement))return"default";const e=t.getAttribute("slot");if(e){const t=e.match(/^(.+?)-\d+$/);return t?t[1]:e}return"default"})(e),i=t[n];if(void 0===i){const s=Object.keys(t).join(", ");return void console.warn(`Unknown slotName: ${n}, ignoring`,e,"Valid values are: "+s)}if(i.individualSlots){const t=(a.get(n)||0)+1;a.set(n,t),e._individualSlot=`${n}-${t}`}if(e instanceof HTMLElement){const t=e.localName;if(t.includes("-")){if(!window.customElements.get(t)){const e=window.customElements.whenDefined(t);let s=Fe.get(t);s||(s=new Promise((t=>setTimeout(t,1e3))),Fe.set(t,s)),await Promise.race([e,s])}window.customElements.upgrade(e)}}(e=this.constructor.getMetadata().constructor.validateSlotValue(e,i)).isUI5Element&&i.invalidateOnChildChange&&e._attachChange(this._getChildChangeListener(n)),re(e)&&this._attachSlotChange(e,n);const o=i.propertyName||n;r.has(o)?r.get(o).push({child:e,idx:s}):r.set(o,[{child:e,idx:s}])}));await Promise.all(o),r.forEach(((t,e)=>{this._state[e]=t.sort(((t,e)=>t.idx-e.idx)).map((t=>t.child))}));let l=!1;for(const[e,s]of Object.entries(t)){const t=s.propertyName||e;je(n.get(t),this._state[t])||(He.call(this,{type:"slot",name:i.get(t),reason:"children"}),l=!0)}l||He.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach((e=>{e&&e.isUI5Element&&e._detachChange(this._getChildChangeListener(t)),re(e)&&this._detachSlotChange(e,t)})),this._state[s]=[]}_attachChange(t){this._eventProvider.attachEvent("change",t)}_detachChange(t){this._eventProvider.detachEvent("change",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&He.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){const n=this.constructor.getMetadata().getProperties(),i=t.replace(/^ui5-/,""),a=ne(i);if(n.hasOwnProperty(a)){const t=n[a].type;t===Boolean&&(s=null!==s),t===$e&&(s=parseInt(s)),t===ke&&(s=parseFloat(s)),this[a]=s}}_updateAttribute(t,e){if(!this.constructor.getMetadata().hasAttribute(t))return;if("object"==typeof e)return;const s=ie(t),n=this.getAttribute(s);"boolean"==typeof e?!0===e&&null===n?this.setAttribute(s,""):!1===e&&null!==n&&this.removeAttribute(s):n!==e&&this.setAttribute(s,e)}_upgradeProperty(t){if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this[t]=e}}_upgradeAllProperties(){this.constructor.getMetadata().getPropertiesList().forEach(this._upgradeProperty,this)}_initializeState(){this._state=Object.assign({},this.constructor.getMetadata().getInitialState())}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e){t.addEventListener("slotchange",this._getSlotChangeListener(e))}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){He.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}_render(){const t=this.constructor.getMetadata().hasIndividualSlots();this._suppressInvalidation=!0,"function"==typeof this.onBeforeRendering&&this.onBeforeRendering(),this._onComponentStateFinalized&&this._onComponentStateFinalized(),this._suppressInvalidation=!1,this._changedState=[],this.constructor._needsShadowDOM()&&Ee(this),this.staticAreaItem&&this.staticAreaItem.update(),t&&this._assignIndividualSlotsToChildren(),"function"==typeof this.onAfterRendering&&this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach((t=>{t._individualSlot&&t.setAttribute("slot",t._individualSlot)}))}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(this.shadowRoot&&0!==this.shadowRoot.children.length)return this._assertShadowRootStructure(),1===this.shadowRoot.children.length?this.shadowRoot.children[0]:this.shadowRoot.children[1]}_assertShadowRootStructure(){const t=document.adoptedStyleSheets||Ae()?1:2;this.shadowRoot.children.length!==t&&console.warn(`The shadow DOM for ${this.constructor.getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`)}getFocusDomRef(){const t=this.getDomRef();if(t){return t.querySelector("[data-sap-focus-ref]")||t}}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}getStableDomRef(t){return this.staticAreaItem&&this.staticAreaItem.getStableDomRef(t)||this.getDomRef().querySelector(`[data-ui5-stable=${t}]`)}async focus(){await this._waitForDomRef();const t=this.getFocusDomRef();t&&"function"==typeof t.focus&&t.focus()}fireEvent(t,e,s=!1,n=!0){const i=this._fireEvent(t,e,s,n),a=ne(t);return a!==t?i&&this._fireEvent(a,e,s):i}_fireEvent(t,e,s=!1,n=!0){const i=new CustomEvent("ui5-"+t,{detail:e,composed:!1,bubbles:n,cancelable:s}),a=this.dispatchEvent(i);if(Te(t))return a;const r=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(r)&&a}getSlottedNodes(t){return this[t].reduce(((t,e)=>t.concat(oe(e))),[])}get effectiveDir(){var t;return t=this.constructor,L.add(t),(t=>{const e=window.document,s=["ltr","rtl"],n=getComputedStyle(t).getPropertyValue("--_ui5_dir");return s.includes(n)?n:s.includes(t.dir)?t.dir:s.includes(e.documentElement.dir)?e.documentElement.dir:s.includes(e.body.dir)?e.body.dir:Re()?"rtl":void 0})(this)}get isUI5Element(){return!0}static get observedAttributes(){return this.getMetadata().getAttributesList()}static _needsShadowDOM(){return!!this.template}static _needsStaticArea(){return!!this.staticAreaTemplate}getStaticAreaItemDomRef(){if(!this.constructor._needsStaticArea())throw new Error("This component does not use the static area");return this.staticAreaItem||(this.staticAreaItem=Ce.createInstance(),this.staticAreaItem.setOwnerElement(this)),this.staticAreaItem.parentElement||Ot("ui5-static-area").appendChild(this.staticAreaItem),this.staticAreaItem.getDomRef()}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[e,n]of Object.entries(s)){if(Ve(e)||console.warn(`"${e}" is not a valid property name. Use a name that does not collide with DOM APIs`),n.type===Boolean&&n.defaultValue)throw new Error(`Cannot set a default value for property "${e}". All booleans are false by default.`);if(n.type===Array)throw new Error(`Wrong type for property "${e}". Properties cannot be of type Array - use "multiple: true" and set "type" to the single value type, such as "String", "Object", etc...`);if(n.type===Object&&n.defaultValue)throw new Error(`Cannot set a default value for property "${e}". All properties of type "Object" are empty objects by default.`);if(n.multiple&&n.defaultValue)throw new Error(`Cannot set a default value for property "${e}". All multiple properties are empty arrays by default.`);Object.defineProperty(t,e,{get(){if(void 0!==this._state[e])return this._state[e];const t=n.defaultValue;return n.type!==Boolean&&(n.type===String?t:n.multiple?[]:t)},set(t){let s;t=this.constructor.getMetadata().constructor.validatePropertyValue(t,n);const i=this._state[e];s=n.multiple&&n.compareValues?!je(i,t):i!==t,s&&(this._state[e]=t,He.call(this,{type:"property",name:e,newValue:t,oldValue:i}),this._updateAttribute(e,t))}})}if(e){const e=this.getMetadata().getSlots();for(const[s,n]of Object.entries(e)){Ve(s)||console.warn(`"${s}" is not a valid property name. Use a name that does not collide with DOM APIs`);const e=n.propertyName||s;Object.defineProperty(t,e,{get(){return void 0!==this._state[e]?this._state[e]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}})}}}static get metadata(){return{}}static get styles(){return""}static get staticAreaStyles(){return""}static get dependencies(){return[]}static getUniqueDependencies(){if(!Be.has(this)){const t=this.dependencies.filter(((t,e,s)=>s.indexOf(t)===e));Be.set(this,t)}return Be.get(this)}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map((t=>t.define())))}static async onDefine(){return Promise.resolve()}static async define(){await Qt(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag(),e=this.getMetadata().getAltTag(),s=(t=>C.has(t))(t),n=customElements.get(t);if(n&&!s)(t=>{x.add(t),O||(O=setTimeout((()=>{P(),O=void 0}),1e3))})(t);else if(!n&&(this._generateAccessors(),M(t),window.customElements.define(t,this),e&&!customElements.get(e))){class t extends(this){}M(e),window.customElements.define(e,t)}return this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==Ze;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=g({},...t);return this._metadata=new ue(s),this._metadata}}
|
|
1
|
+
const t={default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT","de_CH","el","el_CY","en","en_AU","en_GB","en_HK","en_IE","en_IN","en_NZ","en_PG","en_SG","en_ZA","es","es_AR","es_BO","es_CL","es_CO","es_MX","es_PE","es_UY","es_VE","et","fa","fi","fr","fr_BE","fr_CA","fr_CH","fr_LU","he","hi","hr","hu","id","it","it_CH","ja","kk","ko","lt","lv","ms","nb","nl","nl_BE","pl","pt","pt_PT","ro","ru","ru_UA","sk","sl","sr","sv","th","tr","uk","vi","zh_CN","zh_HK","zh_SG","zh_TW"]},e={default:"sap_fiori_3",all:["sap_fiori_3","sap_fiori_3_dark","sap_belize","sap_belize_hcb","sap_belize_hcw","sap_fiori_3_hcb","sap_fiori_3_hcw"]}.default,s={default:"en",all:["ar","bg","ca","cs","da","de","el","en","es","et","fi","fr","hi","hr","hu","it","iw","ja","kk","ko","lt","lv","ms","nl","no","pl","pt","ro","ru","sh","sk","sl","sv","th","tr","uk","vi","zh_CN","zh_TW"]}.default,n=t.default,i=t.all;var a=()=>{const t=navigator.languages;return t&&t[0]||navigator.language||navigator.userLanguage||navigator.browserLanguage||s},r={},o=r.hasOwnProperty,l=r.toString,c=o.toString,d=c.call(Object),h=function(t){var e,s;return!(!t||"[object Object]"!==l.call(t))&&(!(e=Object.getPrototypeOf(t))||"function"==typeof(s=o.call(e,"constructor")&&e.constructor)&&c.call(s)===d)},u=Object.create(null),p=function(){var t,e,s,n,i,a,r=arguments[2]||{},o=3,l=arguments.length,c=arguments[0]||!1,d=arguments[1]?void 0:u;for("object"!=typeof r&&"function"!=typeof r&&(r={});o<l;o++)if(null!=(i=arguments[o]))for(n in i)t=r[n],s=i[n],"__proto__"!==n&&r!==s&&(c&&s&&(h(s)||(e=Array.isArray(s)))?(e?(e=!1,a=t&&Array.isArray(t)?t:[]):a=t&&h(t)?t:{},r[n]=p(c,arguments[1],a,s)):s!==d&&(r[n]=s));return r},g=function(){var t=[!0,!1];return t.push.apply(t,arguments),p.apply(null,t)};const m=new Map,f=t=>m.get(t);let _=!1,w={animationMode:"full",theme:e,rtl:null,language:null,calendarType:null,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1,assetsPath:""};const y=new Map;y.set("true",!0),y.set("false",!1);const v=()=>{_||((()=>{const t=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(t){try{e=JSON.parse(t.innerHTML)}catch(t){console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(w=g(w,e))}})(),new URLSearchParams(window.location.search).forEach(((t,e)=>{if(!e.startsWith("sap-ui"))return;const s=t.toLowerCase(),n=e.split("sap-ui-")[1];y.has(t)&&(t=y.get(s)),w[n]=t})),(()=>{const t=f("OpenUI5Support");if(!t||!t.isLoaded())return;const e=t.getConfigurationSettingsObject();w=g(w,e)})(),_=!0)};class b{constructor(){this._eventRegistry={}}attachEvent(t,e){const s=this._eventRegistry;let n=s[t];Array.isArray(n)||(s[t]=[],n=s[t]),n.push({function:e})}detachEvent(t,e){const s=this._eventRegistry;let n=s[t];n&&(n=n.filter((t=>t.function!==e)),0===n.length&&delete s[t])}fireEvent(t,e){const s=this._eventRegistry[t];return s?s.map((t=>t.function.call(this,e))):[]}fireEventAsync(t,e){return Promise.all(this.fireEvent(t,e))}isHandlerAttached(t,e){const s=this._eventRegistry[t];if(!s)return!1;for(let t=0;t<s.length;t++){if(s[t].function===e)return!0}return!1}hasListeners(t){return!!this._eventRegistry[t]}}const S=new b,A=t=>{S.attachEvent("languageChange",t)};const E=t=>{const e=[];return t.forEach((t=>{e.push(t)})),e},C=new Set,x=new Set;let O;const M=t=>{C.add(t)},P=()=>{console.warn("The following tags have already been defined by a different UI5 Web Components version: "+E(x).join(", ")),x.clear()},L=new Set,T=new Set,N=new b,I=new class{constructor(){this.list=[],this.lookup=new Set}add(t){this.lookup.has(t)||(this.list.push(t),this.lookup.add(t))}remove(t){this.lookup.has(t)&&(this.list=this.list.filter((e=>e!==t)),this.lookup.delete(t))}shift(){const t=this.list.shift();if(t)return this.lookup.delete(t),t}isEmpty(){return 0===this.list.length}isAdded(t){return this.lookup.has(t)}process(t){let e;const s=new Map;for(e=this.shift();e;){const n=s.get(e)||0;if(n>10)throw new Error("Web component processed too many times this task, max allowed is: 10");t(e),s.set(e,n+1),e=this.shift()}}};let R,$,k,D;const V=async t=>{I.add(t),await U()},j=t=>{N.fireEvent("beforeComponentRender",t),T.add(t),t._render()},U=async()=>{D||(D=new Promise((t=>{window.requestAnimationFrame((()=>{I.process(j),D=null,t(),k||(k=setTimeout((()=>{k=void 0,I.isEmpty()&&H()}),200))}))}))),await D},F=()=>{const t=E(C).map((t=>customElements.whenDefined(t)));return Promise.all(t)},B=async()=>{await F(),await(R||(R=new Promise((t=>{$=t,window.requestAnimationFrame((()=>{I.isEmpty()&&(R=void 0,t())}))})),R))},H=()=>{I.isEmpty()&&$&&($(),$=void 0,R=void 0)},Z=async t=>{T.forEach((e=>{const s=e.constructor.getMetadata().getTag(),n=(i=e.constructor,L.has(i));var i;const a=e.constructor.getMetadata().isLanguageAware();(!t||t.tag===s||t.rtlAware&&n||t.languageAware&&a)&&V(e)})),await B()};let z,W;const q=()=>(void 0===z&&(v(),z=w.language),z),G=()=>{var t;return void 0===W&&(v(),t=w.fetchDefaultLanguage,W=t),W},J=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;class X{constructor(t){const e=J.exec(t.replace(/_/g,"-"));if(null===e)throw new Error(`The given language ${t} does not adhere to BCP-47.`);this.sLocaleId=t,this.sLanguage=e[1]||null,this.sScript=e[2]||null,this.sRegion=e[3]||null,this.sVariant=e[4]&&e[4].slice(1)||null,this.sExtension=e[5]&&e[5].slice(1)||null,this.sPrivateUse=e[6]||null,this.sLanguage&&(this.sLanguage=this.sLanguage.toLowerCase()),this.sScript&&(this.sScript=this.sScript.toLowerCase().replace(/^[a-z]/,(t=>t.toUpperCase()))),this.sRegion&&(this.sRegion=this.sRegion.toUpperCase())}getLanguage(){return this.sLanguage}getScript(){return this.sScript}getRegion(){return this.sRegion}getVariant(){return this.sVariant}getVariantSubtags(){return this.sVariant?this.sVariant.split("-"):[]}getExtension(){return this.sExtension}getExtensionSubtags(){return this.sExtension?this.sExtension.slice(2).split("-"):[]}getPrivateUse(){return this.sPrivateUse}getPrivateUseSubtags(){return this.sPrivateUse?this.sPrivateUse.slice(2).split("-"):[]}hasPrivateUseSubtag(t){return this.getPrivateUseSubtags().indexOf(t)>=0}toString(){const t=[this.sLanguage];return this.sScript&&t.push(this.sScript),this.sRegion&&t.push(this.sRegion),this.sVariant&&t.push(this.sVariant),this.sExtension&&t.push(this.sExtension),this.sPrivateUse&&t.push(this.sPrivateUse),t.join("-")}}const Y=new Map,K=t=>(Y.has(t)||Y.set(t,new X(t)),Y.get(t)),Q=t=>{try{if(t&&"string"==typeof t)return K(t)}catch(t){}},tt=t=>t?Q(t):q()?K(q()):Q(a()),et=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i,st=/(?:^|-)(saptrc|sappsd)(?:-|$)/i,nt={he:"iw",yi:"ji",id:"in",sr:"sh"},it=t=>{if(!t)return n;if("zh_HK"===t)return"zh_TW";const e=t.lastIndexOf("_");return e>=0?t.slice(0,e):t!==n?n:""},at=new Set,rt=new Set,ot=new Map,lt=new Map,ct=new Map,dt=(t,e)=>{ot.set(t,e)},ht=(t,e)=>{const s=`${t}/${e}`;return ct.has(s)},ut=async t=>{const e=tt().getLanguage(),i=tt().getRegion();let a=(t=>{let e;if(!t)return n;if("string"==typeof t&&(e=et.exec(t.replace(/_/g,"-")))){let t=e[1].toLowerCase(),s=e[3]?e[3].toUpperCase():void 0;const n=e[2]?e[2].toLowerCase():void 0,i=e[4]?e[4].slice(1):void 0,a=e[6];return t=nt[t]||t,a&&(e=st.exec(a))||i&&(e=st.exec(i))?"en_US_"+e[1].toLowerCase():("zh"!==t||s||("hans"===n?s="CN":"hant"===n&&(s="TW")),t+(s?"_"+s+(i?"_"+i.replace("-","_"):""):""))}})(e+(i?"-"+i:""));for(;a!==s&&!ht(t,a);)a=it(a);const r=G();if(a!==s||r)if(ht(t,a))try{const e=await((t,e)=>{const s=`${t}/${e}`,n=ct.get(s);return lt.get(s)||lt.set(s,n(e)),lt.get(s)})(t,a);dt(t,e)}catch(t){rt.has(t.message)||(rt.add(t.message),console.error(t.message))}else(t=>{at.has(t)||(console.warn(`[${t}]: Message bundle assets are not configured. Falling back to English texts.`,` Add \`import "${t}/dist/Assets.js"\` in your bundle and make sure your build tool supports dynamic imports and JSON imports. See section "Assets" in the documentation for more information.`),at.add(t))})(t);else dt(t,null)};A((()=>{const t=[...ot.keys()];return Promise.all(t.map(ut))}));const pt=new Map,gt=new Map,mt=new Map,ft=new Set,_t={iw:"he",ji:"yi",in:"id",sh:"sr"},wt=(t,e)=>{pt.set(t,e)},yt=async(t,e,s)=>{const a=((t,e,s)=>{"no"===(t=t&&_t[t]||t)&&(t="nb"),"zh"!==t||e||("Hans"===s?e="CN":"Hant"===s&&(e="TW"));let a=`${t}_${e}`;return i.includes(a)||(a=t),i.includes(a)||(a=n),a})(t,e,s),r=f("OpenUI5Support");if(r){const t=r.getLocaleDataObject();if(t)return void wt(a,t)}try{const t=await(t=>{const e=gt.get(t);return mt.get(t)||mt.set(t,e(t)),mt.get(t)})(a);wt(a,t)}catch(t){ft.has(t.message)||(ft.add(t.message),console.error(t.message))}};var vt,bt;vt="en",bt=async t=>(await fetch("https://ui5.sap.com/1.60.2/resources/sap/ui/core/cldr/en.json")).json(),gt.set(vt,bt),A((()=>{const t=tt();return yt(t.getLanguage(),t.getRegion(),t.getScript())}));const St=new Map,At=new Map,Et=new Set,Ct=new Set,xt=(t,e,s)=>{At.set(`${t}/${e}`,s),Et.add(t),Ct.add(e)},Ot=async(t,s)=>{const n=St.get(`${t}_${s}`);if(void 0!==n)return n;if(!Ct.has(s)){const s=[...Ct.values()].join(", ");return console.warn(`You have requested a non-registered theme - falling back to ${e}. Registered themes are: ${s}`),St.get(`${t}_${e}`)}const i=At.get(`${t}/${s}`);if(!i)return void console.error(`Theme [${s}] not registered for package [${t}]`);let a;try{a=await i(s)}catch(e){return void console.error(t,e.message)}const r=a._||a;return St.set(`${t}_${s}`,r),r},Mt=()=>Et,Pt=(t,e=document.body)=>{let s=document.querySelector(t);return s||(s=document.createElement(t),e.insertBefore(s,e.firstChild))},Lt=(t,e)=>{const s=t.split(".");let n=Pt("ui5-shared-resources",document.head);for(let t=0;t<s.length;t++){const i=s[t],a=t===s.length-1;Object.prototype.hasOwnProperty.call(n,i)||(n[i]=a?e:{}),n=n[i]}return n},Tt=new Map,Nt=Lt("SVGIcons.registry",new Map),It=Lt("SVGIcons.promises",new Map),Rt=(t,{pathData:e,ltr:s,accData:n,collection:i,packageName:a}={})=>{i||(i="SAP-icons");const r=`${i}/${t}`;Nt.set(r,{pathData:e,ltr:s,accData:n,packageName:a})},$t=async t=>{const{collection:e,registryKey:s}=(t=>{let e;return t.startsWith("sap-icon://")&&(t=t.replace("sap-icon://","")),[t,e]=t.split("/").reverse(),e=e||"SAP-icons","SAP-icons-TNT"===e&&(e="tnt"),{name:t,collection:e,registryKey:`${e}/${t}`}})(t);let n="ICON_NOT_FOUND";try{n=await(async t=>{if(!It.has(t)){const e=Tt.get(t);It.set(t,e(t))}return It.get(t)})(e)}catch(t){console.error(t.message)}return"ICON_NOT_FOUND"===n?n:(Nt.has(s)||(t=>{Object.keys(t.data).forEach((e=>{const s=t.data[e];Rt(e,{pathData:s.path,ltr:s.ltr,accData:s.acc,collection:t.collection,packageName:t.packageName})}))})(n),Nt.get(s))},kt=(t,e={})=>{const s=document.createElement("style");return s.type="text/css",Object.entries(e).forEach((t=>s.setAttribute(...t))),s.textContent=t,document.head.appendChild(s),s},Dt=(t,e)=>{const s=document.head.querySelector(`style[data-ui5-theme-properties="${e}"]`);if(s)s.textContent=t||"";else{kt(t,{"data-ui5-theme-properties":e})}},Vt=()=>{const t=(()=>{let t=document.querySelector(".sapThemeMetaData-Base-baseLib");if(t)return getComputedStyle(t).backgroundImage;t=document.createElement("span"),t.style.display="none",t.classList.add("sapThemeMetaData-Base-baseLib"),document.body.appendChild(t);const e=getComputedStyle(t).backgroundImage;return document.body.removeChild(t),e})();if(!t||"none"===t)return;return(t=>{let e,s;try{e=t.Path.match(/\.([^.]+)\.css_variables$/)[1],s=t.Extends[0]}catch(e){return void console.warn("Malformed theme metadata Object",t)}return{themeName:e,baseThemeName:s}})((t=>{const e=/\(["']?data:text\/plain;utf-8,(.*?)['"]?\)$/i.exec(t);if(e&&e.length>=2){let t=e[1];if(t=t.replace(/\\"/g,'"'),"{"!==t.charAt(0)&&"}"!==t.charAt(t.length-1))try{t=decodeURIComponent(t)}catch(t){return void console.warn("Malformed theme metadata string, unable to decodeURIComponent")}try{return JSON.parse(t)}catch(t){console.warn("Malformed theme metadata string, unable to parse JSON")}}})(t))},jt=new b,Ut="@ui5/webcomponents-theme-base",Ft=async t=>{if(!Mt().has(Ut))return;const e=await Ot(Ut,t);Dt(e,Ut)},Bt=async t=>{const e=(()=>{const t=Vt();if(t)return t;const e=f("OpenUI5Support");if(e&&e.cssVariablesLoaded())return{themeName:e.getConfigurationSettingsObject().theme}})();e&&t===e.themeName?(()=>{const t=document.head.querySelector(`style[data-ui5-theme-properties="${Ut}"]`);t&&t.parentElement.removeChild(t)})():await Ft(t);const s=(t=>Ct.has(t))(t)?t:e&&e.baseThemeName;await(async t=>{Mt().forEach((async e=>{if(e===Ut)return;const s=await Ot(e,t);Dt(s,e)}))})(s),(t=>{jt.fireEvent("themeLoaded",t)})(t)};let Ht;const Zt=()=>(void 0===Ht&&(v(),Ht=w.theme),Ht),zt=async t=>{Ht!==t&&(Ht=t,await Bt(Ht))},Wt=Lt("PopupUtilsData",{});Wt.currentZIndex=Wt.currentZIndex||100;const qt=()=>Wt.currentZIndex,Gt=()=>{const t=window.sap;return t&&t.ui&&"function"==typeof t.ui.getCore&&t.ui.getCore()};var Jt,Xt;Jt="OpenUI5Support",Xt={isLoaded:()=>!!Gt(),init:()=>{const t=Gt();return t?new Promise((e=>{t.attachInit((()=>{window.sap.ui.require(["sap/ui/core/LocaleData","sap/ui/core/Popup"],((t,s)=>{s.setInitialZIndex(qt()),e()}))}))})):Promise.resolve()},getConfigurationSettingsObject:()=>{const t=Gt();if(!t)return;const e=t.getConfiguration(),s=window.sap.ui.require("sap/ui/core/LocaleData");return{animationMode:e.getAnimationMode(),language:e.getLanguage(),theme:e.getTheme(),rtl:e.getRTL(),calendarType:e.getCalendarType(),formatSettings:{firstDayOfWeek:s?s.getInstance(e.getLocale()).getFirstDayOfWeek():void 0}}},getLocaleDataObject:()=>{const t=Gt();if(!t)return;const e=t.getConfiguration();return window.sap.ui.require("sap/ui/core/LocaleData").getInstance(e.getLocale())._get()},attachListeners:()=>{Gt()&&(()=>{const t=Gt(),e=t.getConfiguration();t.attachThemeChanged((async()=>{await zt(e.getTheme())}))})()},cssVariablesLoaded:()=>{if(!Gt())return;const t=[...document.head.children].find((t=>"sap-ui-theme-sap.ui.core"===t.id));return t?!!t.href.match(/\/css(-|_)variables\.css/):void 0},getNextZIndex:()=>{if(!Gt())return;return window.sap.ui.require("sap/ui/core/Popup").getNextZIndex()},setInitialZIndex:()=>{if(!Gt())return;window.sap.ui.require("sap/ui/core/Popup").setInitialZIndex(qt())}},m.set(Jt,Xt);const Yt=()=>{document.querySelector("head>style[data-ui5-font-face]")||kt('\n\t@font-face {\n\t\tfont-family: "72";\n\t\tfont-style: normal;\n\t\tfont-weight: 400;\n\t\tsrc: local("72"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular.woff?ui5-webcomponents) format("woff");\n\t}\n\t\n\t@font-face {\n\t\tfont-family: "72full";\n\t\tfont-style: normal;\n\t\tfont-weight: 400;\n\t\tsrc: local(\'72-full\'),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular-full.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Regular-full.woff?ui5-webcomponents) format("woff");\n\t\t\n\t}\n\t\n\t@font-face {\n\t\tfont-family: "72";\n\t\tfont-style: normal;\n\t\tfont-weight: 700;\n\t\tsrc: local(\'72-Bold\'),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold.woff?ui5-webcomponents) format("woff");\n\t}\n\t\n\t@font-face {\n\t\tfont-family: "72full";\n\t\tfont-style: normal;\n\t\tfont-weight: 700;\n\t\tsrc: local(\'72-Bold-full\'),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff2?ui5-webcomponents) format("woff2"),\n\t\t\turl(https://ui5.sap.com/sdk/resources/sap/ui/core/themes/sap_fiori_3/fonts/72-Bold-full.woff?ui5-webcomponents) format("woff");\n\t}\n',{"data-ui5-font-face":""})},Kt=()=>{document.querySelector("head>style[data-ui5-font-face-override]")||kt("\n\t@font-face {\n\t\tfont-family: '72override';\n\t\tunicode-range: U+0102-0103, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EB7, U+1EB8-1EC7, U+1EC8-1ECB, U+1ECC-1EE3, U+1EE4-1EF1, U+1EF4-1EF7;\n\t\tsrc: local('Arial'), local('Helvetica'), local('sans-serif');\n\t}\n",{"data-ui5-font-face-override":""})};let Qt;const te=new b,ee=()=>Qt||(Qt=new Promise((async t=>{const e=f("OpenUI5Support");e&&await e.init(),await new Promise((t=>{document.body?t():document.addEventListener("DOMContentLoaded",(()=>{t()}))})),await Bt(Zt()),e&&e.attachListeners(),(()=>{const t=f("OpenUI5Support");t&&t.isLoaded()||Yt(),Kt()})(),document.querySelector("head>style[data-ui5-system-css-vars]")||kt('\n\t:root {\n\t\t--_ui5_content_density:cozy;\n\t}\n\t\n\t[data-ui5-compact-size],\n\t.ui5-content-density-compact,\n\t.sapUiSizeCompact {\n\t\t--_ui5_content_density:compact;\n\t}\n\t\n\t[dir="rtl"] {\n\t\t--_ui5_dir:rtl;\n\t}\n\t\n\t[dir="ltr"] {\n\t\t--_ui5_dir:ltr;\n\t}\n',{"data-ui5-system-css-vars":""}),await te.fireEventAsync("boot"),t()})),Qt);class se{static isValid(t){}static generateTypeAccessors(t){Object.keys(t).forEach((e=>{Object.defineProperty(this,e,{get:()=>t[e]})}))}}const ne=new Map,ie=new Map,ae=t=>{if(!ne.has(t)){const e=oe(t.split("-"));ne.set(t,e)}return ne.get(t)},re=t=>{if(!ie.has(t)){const e=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();ie.set(t,e)}return ie.get(t)},oe=t=>t.map(((t,e)=>0===e?t.toLowerCase():t.charAt(0).toUpperCase()+t.slice(1).toLowerCase())).join(""),le=t=>t&&t instanceof HTMLElement&&"slot"===t.localName,ce=t=>le(t)?t.assignedNodes({flatten:!0}).filter((t=>t instanceof HTMLElement)):[t];let de={include:[/^ui5-/],exclude:[]};const he=new Map,ue=t=>{if(!he.has(t)){const e=de.include.some((e=>t.match(e)))&&!de.exclude.some((e=>t.match(e)));he.set(t,e)}return he.get(t)},pe=t=>{ue(t)};class ge{constructor(t){this.metadata=t}getInitialState(){if(Object.prototype.hasOwnProperty.call(this,"_initialState"))return this._initialState;const t={},e=this.slotsAreManaged(),s=this.getProperties();for(const e in s){const n=s[e].type,i=s[e].defaultValue;n===Boolean?(t[e]=!1,void 0!==i&&console.warn("The 'defaultValue' metadata key is ignored for all booleans properties, they would be initialized with 'false' by default")):s[e].multiple?t[e]=[]:t[e]=n===Object?"defaultValue"in s[e]?s[e].defaultValue:{}:n===String?"defaultValue"in s[e]?s[e].defaultValue:"":i}if(e){const e=this.getSlots();for(const[s,n]of Object.entries(e)){t[n.propertyName||s]=[]}}return this._initialState=t,t}static validatePropertyValue(t,e){return e.multiple?t.map((t=>me(t,e))):me(t,e)}static validateSlotValue(t,e){return fe(t,e)}getPureTag(){return this.metadata.tag}getTag(){const t=this.metadata.tag,e=pe(t);return e?`${t}-${e}`:t}getAltTag(){const t=this.metadata.altTag;if(!t)return;const e=pe(t);return e?`${t}-${e}`:t}hasAttribute(t){const e=this.getProperties()[t];return e.type!==Object&&!e.noAttribute}getPropertiesList(){return Object.keys(this.getProperties())}getAttributesList(){return this.getPropertiesList().filter(this.hasAttribute,this).map(re)}getSlots(){return this.metadata.slots||{}}canSlotText(){const t=this.getSlots().default;return t&&t.type===Node}hasSlots(){return!!Object.entries(this.getSlots()).length}hasIndividualSlots(){return this.slotsAreManaged()&&Object.entries(this.getSlots()).some((([t,e])=>e.individualSlots))}slotsAreManaged(){return!!this.metadata.managedSlots}getProperties(){return this.metadata.properties||{}}getEvents(){return this.metadata.events||{}}isLanguageAware(){return!!this.metadata.languageAware}shouldInvalidateOnChildChange(t,e,s){const n=this.getSlots()[t].invalidateOnChildChange;if(void 0===n)return!1;if("boolean"==typeof n)return n;if("object"==typeof n){if("property"===e){if(void 0===n.properties)return!1;if("boolean"==typeof n.properties)return n.properties;if(Array.isArray(n.properties))return n.properties.includes(s);throw new Error("Wrong format for invalidateOnChildChange.properties: boolean or array is expected")}if("slot"===e){if(void 0===n.slots)return!1;if("boolean"==typeof n.slots)return n.slots;if(Array.isArray(n.slots))return n.slots.includes(s);throw new Error("Wrong format for invalidateOnChildChange.slots: boolean or array is expected")}}throw new Error("Wrong format for invalidateOnChildChange: boolean or object is expected")}}const me=(t,e)=>{const s=e.type;return s===Boolean?"boolean"==typeof t&&t:s===String?"string"==typeof t||null==t?t:t.toString():s===Object?"object"==typeof t?t:e.defaultValue:((t,e,s=!1)=>{if("function"!=typeof t||"function"!=typeof e)return!1;if(s&&t===e)return!0;let n=t;do{n=Object.getPrototypeOf(n)}while(null!==n&&n!==e);return n===e})(s,se)?s.isValid(t)?t:e.defaultValue:void 0},fe=(t,e)=>(t&&ce(t).forEach((t=>{if(!(t instanceof e.type))throw new Error(`${t} is not of type ${e.type}`)})),t),_e=Lt("CustomStyle.eventProvider",new b),we=t=>{_e.attachEvent("CustomCSSChange",t)},ye=Lt("CustomStyle.customCSSFor",{});we((t=>{Z({tag:t})}));const ve=t=>Array.isArray(t)?be(t.filter((t=>!!t))).join(" "):t,be=t=>t.reduce(((t,e)=>t.concat(Array.isArray(e)?be(e):e)),[]),Se=new Map;we((t=>{Se.delete(t+"_normal")}));const Ae=(t,e=!1)=>{const s=t.getMetadata().getTag(),n=`${s}_${e?"static":"normal"}`;if(!Se.has(n)){let i;if(e)i=ve(t.staticAreaStyles);else{const e=(t=>ye[t]?ye[t].join(""):"")(s)||"";i=`${ve(t.styles)} ${e}`}Se.set(n,i)}return Se.get(n)},Ee=new Map;we((t=>{Ee.delete(t+"_normal")}));const Ce=()=>!!window.ShadyDOM,xe=(t,e=!1)=>{let s;const n=e?"staticAreaTemplate":"template",i=e?t.staticAreaItem.shadowRoot:t.shadowRoot,a=((t,e)=>{const s=e.constructor.getUniqueDependencies().map((t=>t.getMetadata().getPureTag())).filter(ue);return t(e,s,void 0)})(t.constructor[n],t);document.adoptedStyleSheets?i.adoptedStyleSheets=((t,e=!1)=>{const s=`${t.getMetadata().getTag()}_${e?"static":"normal"}`;if(!Ee.has(s)){const n=Ae(t,e),i=new CSSStyleSheet;i.replaceSync(n),Ee.set(s,[i])}return Ee.get(s)})(t.constructor,e):Ce()||(s=Ae(t.constructor,e)),t.constructor.render(a,i,s,{eventContext:t})};class Oe extends HTMLElement{constructor(){super(),this._rendered=!1,this.attachShadow({mode:"open"})}setOwnerElement(t){this.ownerElement=t,this.classList.add(this.ownerElement._id)}update(){this._rendered&&(this._updateContentDensity(),xe(this.ownerElement,!0))}_updateContentDensity(){var t;"compact"===(t=this.ownerElement,getComputedStyle(t).getPropertyValue("--_ui5_content_density"))?(this.classList.add("sapUiSizeCompact"),this.classList.add("ui5-content-density-compact")):(this.classList.remove("sapUiSizeCompact"),this.classList.remove("ui5-content-density-compact"))}async getDomRef(){return this._updateContentDensity(),this._rendered||(this._rendered=!0,xe(this.ownerElement,!0)),await B(),this.shadowRoot}getStableDomRef(t){return this.shadowRoot.querySelector(`[data-ui5-stable=${t}]`)}static getTag(){const t="ui5-static-area-item",e=pe(t);return e?`${t}-${e}`:t}static createInstance(){return customElements.get(Oe.getTag())||customElements.define(Oe.getTag(),Oe),document.createElement(this.getTag())}}const Me=new WeakMap;const Pe=(t,e,s)=>{const n=((t,e,s)=>{const n=new MutationObserver(e);return n.observe(t,s),n})(t,e,s);Me.set(t,n)},Le=["value-changed"];let Te;const Ne=()=>(void 0===Te&&(v(),Te=w.noConflict),Te),Ie=t=>{const e=Ne();return!(t=>Le.includes(t))(t)&&(!0===e||!(t=>{const e=Ne();return!(e.events&&e.events.includes&&e.events.includes(t))})(t))};const Re={iw:"he",ji:"yi",in:"id",sh:"sr"},$e=(t=>{const e=/\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(t);return e&&e[2]?e[2].split(/,/):null})("$cldr-rtl-locales:ar,fa,he$")||[],ke=()=>{const t=(v(),w.rtl);return null!==t?!!t:(t=>(t=t&&Re[t]||t,$e.indexOf(t)>=0))(q()||a())};class De extends se{static isValid(t){return Number.isInteger(t)}}class Ve extends se{static isValid(t){return Number(t)===t}}const je=["disabled","title","hidden","role","draggable"],Ue=t=>{if(je.includes(t)||t.startsWith("aria"))return!0;return![HTMLElement,Element,Node].some((e=>e.prototype.hasOwnProperty(t)))},Fe=(t,e)=>{if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0};let Be=0;const He=new Map,Ze=new Map;function ze(t){this._suppressInvalidation||(this.onInvalidation(t),this._changedState.push(t),V(this),this._eventProvider.fireEvent("change",{...t,target:this}))}class We extends HTMLElement{constructor(){let t;super(),this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._eventProvider=new b,this._domRefReadyPromise=new Promise((e=>{t=e})),this._domRefReadyPromise._deferredResolve=t,this._initializeState(),this._upgradeAllProperties(),this.constructor._needsShadowDOM()&&this.attachShadow({mode:"open"})}get _id(){return this.__id||(this.__id="ui5wc_"+ ++Be),this.__id}async connectedCallback(){this.setAttribute(this.constructor.getMetadata().getPureTag(),"");const t=this.constructor._needsShadowDOM(),e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),t&&!this.shadowRoot&&await Promise.resolve(),this._inDOM&&(j(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,"function"==typeof this.onEnterDOM&&this.onEnterDOM())}disconnectedCallback(){const t=this.constructor._needsShadowDOM(),e=this.constructor.getMetadata().slotsAreManaged();var s;this._inDOM=!1,e&&this._stopObservingDOMChildren(),t&&this._fullyConnected&&("function"==typeof this.onExitDOM&&this.onExitDOM(),this._fullyConnected=!1),this.staticAreaItem&&this.staticAreaItem.parentElement&&this.staticAreaItem.parentElement.removeChild(this.staticAreaItem),s=this,I.remove(s),T.delete(s)}_startObservingDOMChildren(){if(!this.constructor.getMetadata().hasSlots())return;const t=this.constructor.getMetadata().canSlotText(),e={childList:!0,subtree:t,characterData:t};Pe(this,this._processChildren.bind(this),e)}_stopObservingDOMChildren(){(t=>{const e=Me.get(t);e&&((t=>{t.disconnect()})(e),Me.delete(t))})(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor.getMetadata().getSlots(),e=this.constructor.getMetadata().canSlotText(),s=Array.from(e?this.childNodes:this.children),n=new Map,i=new Map;for(const[e,s]of Object.entries(t)){const t=s.propertyName||e;i.set(t,e),n.set(t,[...this._state[t]]),this._clearSlot(e,s)}const a=new Map,r=new Map,o=s.map((async(e,s)=>{const n=(t=>{if(!(t instanceof HTMLElement))return"default";const e=t.getAttribute("slot");if(e){const t=e.match(/^(.+?)-\d+$/);return t?t[1]:e}return"default"})(e),i=t[n];if(void 0===i){const s=Object.keys(t).join(", ");return void console.warn(`Unknown slotName: ${n}, ignoring`,e,"Valid values are: "+s)}if(i.individualSlots){const t=(a.get(n)||0)+1;a.set(n,t),e._individualSlot=`${n}-${t}`}if(e instanceof HTMLElement){const t=e.localName;if(t.includes("-")){if(!window.customElements.get(t)){const e=window.customElements.whenDefined(t);let s=He.get(t);s||(s=new Promise((t=>setTimeout(t,1e3))),He.set(t,s)),await Promise.race([e,s])}window.customElements.upgrade(e)}}(e=this.constructor.getMetadata().constructor.validateSlotValue(e,i)).isUI5Element&&i.invalidateOnChildChange&&e._attachChange(this._getChildChangeListener(n)),le(e)&&this._attachSlotChange(e,n);const o=i.propertyName||n;r.has(o)?r.get(o).push({child:e,idx:s}):r.set(o,[{child:e,idx:s}])}));await Promise.all(o),r.forEach(((t,e)=>{this._state[e]=t.sort(((t,e)=>t.idx-e.idx)).map((t=>t.child))}));let l=!1;for(const[e,s]of Object.entries(t)){const t=s.propertyName||e;Fe(n.get(t),this._state[t])||(ze.call(this,{type:"slot",name:i.get(t),reason:"children"}),l=!0)}l||ze.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach((e=>{e&&e.isUI5Element&&e._detachChange(this._getChildChangeListener(t)),le(e)&&this._detachSlotChange(e,t)})),this._state[s]=[]}_attachChange(t){this._eventProvider.attachEvent("change",t)}_detachChange(t){this._eventProvider.detachEvent("change",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&ze.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){const n=this.constructor.getMetadata().getProperties(),i=t.replace(/^ui5-/,""),a=ae(i);if(n.hasOwnProperty(a)){const t=n[a].type;t===Boolean&&(s=null!==s),t===De&&(s=parseInt(s)),t===Ve&&(s=parseFloat(s)),this[a]=s}}_updateAttribute(t,e){if(!this.constructor.getMetadata().hasAttribute(t))return;if("object"==typeof e)return;const s=re(t),n=this.getAttribute(s);"boolean"==typeof e?!0===e&&null===n?this.setAttribute(s,""):!1===e&&null!==n&&this.removeAttribute(s):n!==e&&this.setAttribute(s,e)}_upgradeProperty(t){if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this[t]=e}}_upgradeAllProperties(){this.constructor.getMetadata().getPropertiesList().forEach(this._upgradeProperty,this)}_initializeState(){this._state=Object.assign({},this.constructor.getMetadata().getInitialState())}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e){t.addEventListener("slotchange",this._getSlotChangeListener(e))}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){ze.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}_render(){const t=this.constructor.getMetadata().hasIndividualSlots();this._suppressInvalidation=!0,"function"==typeof this.onBeforeRendering&&this.onBeforeRendering(),this._onComponentStateFinalized&&this._onComponentStateFinalized(),this._suppressInvalidation=!1,this._changedState=[],this.constructor._needsShadowDOM()&&xe(this),this.staticAreaItem&&this.staticAreaItem.update(),t&&this._assignIndividualSlotsToChildren(),"function"==typeof this.onAfterRendering&&this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach((t=>{t._individualSlot&&t.setAttribute("slot",t._individualSlot)}))}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(this.shadowRoot&&0!==this.shadowRoot.children.length)return this._assertShadowRootStructure(),1===this.shadowRoot.children.length?this.shadowRoot.children[0]:this.shadowRoot.children[1]}_assertShadowRootStructure(){const t=document.adoptedStyleSheets||Ce()?1:2;this.shadowRoot.children.length!==t&&console.warn(`The shadow DOM for ${this.constructor.getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`)}getFocusDomRef(){const t=this.getDomRef();if(t){return t.querySelector("[data-sap-focus-ref]")||t}}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}getStableDomRef(t){return this.staticAreaItem&&this.staticAreaItem.getStableDomRef(t)||this.getDomRef().querySelector(`[data-ui5-stable=${t}]`)}async focus(){await this._waitForDomRef();const t=this.getFocusDomRef();t&&"function"==typeof t.focus&&t.focus()}fireEvent(t,e,s=!1,n=!0){const i=this._fireEvent(t,e,s,n),a=ae(t);return a!==t?i&&this._fireEvent(a,e,s):i}_fireEvent(t,e,s=!1,n=!0){const i=new CustomEvent("ui5-"+t,{detail:e,composed:!1,bubbles:n,cancelable:s}),a=this.dispatchEvent(i);if(Ie(t))return a;const r=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(r)&&a}getSlottedNodes(t){return this[t].reduce(((t,e)=>t.concat(ce(e))),[])}get effectiveDir(){var t;return t=this.constructor,L.add(t),(t=>{const e=window.document,s=["ltr","rtl"],n=getComputedStyle(t).getPropertyValue("--_ui5_dir");return s.includes(n)?n:s.includes(t.dir)?t.dir:s.includes(e.documentElement.dir)?e.documentElement.dir:s.includes(e.body.dir)?e.body.dir:ke()?"rtl":void 0})(this)}get isUI5Element(){return!0}static get observedAttributes(){return this.getMetadata().getAttributesList()}static _needsShadowDOM(){return!!this.template}static _needsStaticArea(){return!!this.staticAreaTemplate}getStaticAreaItemDomRef(){if(!this.constructor._needsStaticArea())throw new Error("This component does not use the static area");return this.staticAreaItem||(this.staticAreaItem=Oe.createInstance(),this.staticAreaItem.setOwnerElement(this)),this.staticAreaItem.parentElement||Pt("ui5-static-area").appendChild(this.staticAreaItem),this.staticAreaItem.getDomRef()}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[e,n]of Object.entries(s)){if(Ue(e)||console.warn(`"${e}" is not a valid property name. Use a name that does not collide with DOM APIs`),n.type===Boolean&&n.defaultValue)throw new Error(`Cannot set a default value for property "${e}". All booleans are false by default.`);if(n.type===Array)throw new Error(`Wrong type for property "${e}". Properties cannot be of type Array - use "multiple: true" and set "type" to the single value type, such as "String", "Object", etc...`);if(n.type===Object&&n.defaultValue)throw new Error(`Cannot set a default value for property "${e}". All properties of type "Object" are empty objects by default.`);if(n.multiple&&n.defaultValue)throw new Error(`Cannot set a default value for property "${e}". All multiple properties are empty arrays by default.`);Object.defineProperty(t,e,{get(){if(void 0!==this._state[e])return this._state[e];const t=n.defaultValue;return n.type!==Boolean&&(n.type===String?t:n.multiple?[]:t)},set(t){let s;t=this.constructor.getMetadata().constructor.validatePropertyValue(t,n);const i=this._state[e];s=n.multiple&&n.compareValues?!Fe(i,t):i!==t,s&&(this._state[e]=t,ze.call(this,{type:"property",name:e,newValue:t,oldValue:i}),this._updateAttribute(e,t))}})}if(e){const e=this.getMetadata().getSlots();for(const[s,n]of Object.entries(e)){Ue(s)||console.warn(`"${s}" is not a valid property name. Use a name that does not collide with DOM APIs`);const e=n.propertyName||s;Object.defineProperty(t,e,{get(){return void 0!==this._state[e]?this._state[e]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}})}}}static get metadata(){return{}}static get styles(){return""}static get staticAreaStyles(){return""}static get dependencies(){return[]}static getUniqueDependencies(){if(!Ze.has(this)){const t=this.dependencies.filter(((t,e,s)=>s.indexOf(t)===e));Ze.set(this,t)}return Ze.get(this)}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map((t=>t.define())))}static async onDefine(){return Promise.resolve()}static async define(){await ee(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag(),e=this.getMetadata().getAltTag(),s=(t=>C.has(t))(t),n=customElements.get(t);if(n&&!s)(t=>{x.add(t),O||(O=setTimeout((()=>{P(),O=void 0}),1e3))})(t);else if(!n&&(this._generateAccessors(),M(t),window.customElements.define(t,this),e&&!customElements.get(e))){class t extends(this){}M(e),window.customElements.define(e,t)}return this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==We;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=g({},...t);return this._metadata=new ge(s),this._metadata}}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -11,7 +11,7 @@ const t={default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT"
|
|
|
11
11
|
* Code distributed by Google as part of the polymer project is also
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
|
-
*/const
|
|
14
|
+
*/const qe=new WeakMap,Ge=t=>"function"==typeof t&&qe.has(t),Je=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,Xe=(t,e,s=null)=>{for(;e!==s;){const s=e.nextSibling;t.removeChild(e),e=s}},Ye={},Ke={},Qe=`{{lit-${String(Math.random()).slice(2)}}}`,ts=`\x3c!--${Qe}--\x3e`,es=new RegExp(`${Qe}|${ts}`);class ss{constructor(t,e){this.parts=[],this.element=e;const s=[],n=[],i=document.createTreeWalker(e.content,133,null,!1);let a=0,r=-1,o=0;const{strings:l,values:{length:c}}=t;for(;o<c;){const t=i.nextNode();if(null!==t){if(r++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:s}=e;let n=0;for(let t=0;t<s;t++)ns(e[t].name,"$lit$")&&n++;for(;n-- >0;){const e=l[o],s=rs.exec(e)[2],n=s.toLowerCase()+"$lit$",i=t.getAttribute(n);t.removeAttribute(n);const a=i.split(es);this.parts.push({type:"attribute",index:r,name:s,strings:a}),o+=a.length-1}}"TEMPLATE"===t.tagName&&(n.push(t),i.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(Qe)>=0){const n=t.parentNode,i=e.split(es),a=i.length-1;for(let e=0;e<a;e++){let s,a=i[e];if(""===a)s=as();else{const t=rs.exec(a);null!==t&&ns(t[2],"$lit$")&&(a=a.slice(0,t.index)+t[1]+t[2].slice(0,-"$lit$".length)+t[3]),s=document.createTextNode(a)}n.insertBefore(s,t),this.parts.push({type:"node",index:++r})}""===i[a]?(n.insertBefore(as(),t),s.push(t)):t.data=i[a],o+=a}}else if(8===t.nodeType)if(t.data===Qe){const e=t.parentNode;null!==t.previousSibling&&r!==a||(r++,e.insertBefore(as(),t)),a=r,this.parts.push({type:"node",index:r}),null===t.nextSibling?t.data="":(s.push(t),r--),o++}else{let e=-1;for(;-1!==(e=t.data.indexOf(Qe,e+1));)this.parts.push({type:"node",index:-1}),o++}}else i.currentNode=n.pop()}for(const t of s)t.parentNode.removeChild(t)}}const ns=(t,e)=>{const s=t.length-e.length;return s>=0&&t.slice(s)===e},is=t=>-1!==t.index,as=()=>document.createComment(""),rs=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -25,7 +25,7 @@ const t={default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT"
|
|
|
25
25
|
* subject to an additional IP rights grant found at
|
|
26
26
|
* http://polymer.github.io/PATENTS.txt
|
|
27
27
|
*/
|
|
28
|
-
class
|
|
28
|
+
class os{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this.__parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=Je?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],s=this.template.parts,n=document.createTreeWalker(t,133,null,!1);let i,a=0,r=0,o=n.nextNode();for(;a<s.length;)if(i=s[a],is(i)){for(;r<i.index;)r++,"TEMPLATE"===o.nodeName&&(e.push(o),n.currentNode=o.content),null===(o=n.nextNode())&&(n.currentNode=e.pop(),o=n.nextNode());if("node"===i.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(o.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(o,i.name,i.strings,this.options));a++}else this.__parts.push(void 0),a++;return Je&&(document.adoptNode(t),customElements.upgrade(t)),t}}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -38,7 +38,7 @@ class as{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,thi
|
|
|
38
38
|
* Code distributed by Google as part of the polymer project is also
|
|
39
39
|
* subject to an additional IP rights grant found at
|
|
40
40
|
* http://polymer.github.io/PATENTS.txt
|
|
41
|
-
*/const
|
|
41
|
+
*/const ls=` ${Qe} `;class cs{constructor(t,e,s,n){this.strings=t,this.values=e,this.type=s,this.processor=n}getHTML(){const t=this.strings.length-1;let e="",s=!1;for(let n=0;n<t;n++){const t=this.strings[n],i=t.lastIndexOf("\x3c!--");s=(i>-1||s)&&-1===t.indexOf("--\x3e",i+1);const a=rs.exec(t);e+=null===a?t+(s?ls:ts):t.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+Qe}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -51,7 +51,7 @@ class as{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,thi
|
|
|
51
51
|
* Code distributed by Google as part of the polymer project is also
|
|
52
52
|
* subject to an additional IP rights grant found at
|
|
53
53
|
* http://polymer.github.io/PATENTS.txt
|
|
54
|
-
*/const
|
|
54
|
+
*/const ds=t=>null===t||!("object"==typeof t||"function"==typeof t),hs=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class us{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;t<s.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new ps(this)}_getValue(){const t=this.strings,e=t.length-1;let s="";for(let n=0;n<e;n++){s+=t[n];const e=this.parts[n];if(void 0!==e){const t=e.value;if(ds(t)||!hs(t))s+="string"==typeof t?t:String(t);else for(const e of t)s+="string"==typeof e?e:String(e)}}return s+=t[e],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class ps{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===Ye||ds(t)&&t===this.value||(this.value=t,Ge(t)||(this.committer.dirty=!0))}commit(){for(;Ge(this.value);){const t=this.value;this.value=Ye,t(this)}this.value!==Ye&&this.committer.commit()}}class gs{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(as()),this.endNode=t.appendChild(as())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=as()),t.__insert(this.endNode=as())}insertAfterPart(t){t.__insert(this.startNode=as()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){for(;Ge(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=Ye,t(this)}const t=this.__pendingValue;t!==Ye&&(ds(t)?t!==this.value&&this.__commitText(t):t instanceof cs?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):hs(t)?this.__commitIterable(t):t===Ke?(this.value=Ke,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,s="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=s:this.__commitNode(document.createTextNode(s)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof os&&this.value.template===e)this.value.update(t.values);else{const s=new os(e,t.processor,this.options),n=s._clone();s.update(t.values),this.__commitNode(n),this.value=s}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let s,n=0;for(const i of t)s=e[n],void 0===s&&(s=new gs(this.options),e.push(s),0===n?s.appendIntoPart(this):s.insertAfterPart(e[n-1])),s.setValue(i),s.commit(),n++;n<e.length&&(e.length=n,this.clear(s&&s.endNode))}clear(t=this.startNode){Xe(this.startNode.parentNode,t.nextSibling,this.endNode)}}class ms{constructor(t,e,s){if(this.value=void 0,this.__pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}setValue(t){this.__pendingValue=t}commit(){for(;Ge(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=Ye,t(this)}if(this.__pendingValue===Ye)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=Ye}}class fs extends us{constructor(t,e,s){super(t,e,s),this.single=2===s.length&&""===s[0]&&""===s[1]}_createPart(){return new _s(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class _s extends ps{}let ws=!1;try{const t={get capture(){return ws=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}class ys{constructor(t,e,s){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;Ge(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=Ye,t(this)}if(this.__pendingValue===Ye)return;const t=this.__pendingValue,e=this.value,s=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),n=null!=t&&(null==e||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),n&&(this.__options=vs(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=Ye}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const vs=t=>t&&(ws?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -64,7 +64,7 @@ class as{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,thi
|
|
|
64
64
|
* Code distributed by Google as part of the polymer project is also
|
|
65
65
|
* subject to an additional IP rights grant found at
|
|
66
66
|
* http://polymer.github.io/PATENTS.txt
|
|
67
|
-
*/;const
|
|
67
|
+
*/;const bs=new class{handleAttributeExpressions(t,e,s,n){const i=e[0];if("."===i){return new fs(t,e.slice(1),s).parts}if("@"===i)return[new ys(t,e.slice(1),n.eventContext)];if("?"===i)return[new ms(t,e.slice(1),s)];return new us(t,e,s).parts}handleTextExpression(t){return new gs(t)}};
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -77,7 +77,7 @@ class as{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,thi
|
|
|
77
77
|
* Code distributed by Google as part of the polymer project is also
|
|
78
78
|
* subject to an additional IP rights grant found at
|
|
79
79
|
* http://polymer.github.io/PATENTS.txt
|
|
80
|
-
*/function
|
|
80
|
+
*/function Ss(t){let e=As.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},As.set(t.type,e));let s=e.stringsArray.get(t.strings);if(void 0!==s)return s;const n=t.strings.join(Qe);return s=e.keyString.get(n),void 0===s&&(s=new ss(t,t.getTemplateElement()),e.keyString.set(n,s)),e.stringsArray.set(t.strings,s),s}const As=new Map,Es=new WeakMap;
|
|
81
81
|
/**
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -104,18 +104,18 @@ class as{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,thi
|
|
|
104
104
|
* subject to an additional IP rights grant found at
|
|
105
105
|
* http://polymer.github.io/PATENTS.txt
|
|
106
106
|
*/
|
|
107
|
-
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const
|
|
107
|
+
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const Cs=(t,...e)=>new cs(t,e,"html",bs),xs=new Map;const Os=(t,e,s,{eventContext:n}={})=>{s&&(t=Cs`<style>${s}</style>${t}`),((t,e,s)=>{let n=Es.get(e);void 0===n&&(Xe(e,e.firstChild),Es.set(e,n=new gs(Object.assign({templateFactory:Ss},s))),n.appendInto(e)),n.setValue(t),n.commit()})(t,e,{eventContext:n})},Ms=(t,...e)=>Cs(((t,e,s)=>(s&&e&&e.length&&(t=t.map((t=>{if(xs.has(t))return xs.get(t);let n=t;return e.forEach((t=>{n=n.replace(new RegExp(`(</?)(${t})(/?[> \t\n])`,"g"),`$1$2-${s}$3`)})),xs.set(t,n),n}))),t))(t,undefined,undefined),...e),Ps={tag:"ui5-test-generic",properties:{strProp:{type:String},boolProp:{type:Boolean},objectProp:{type:Object},noAttributeProp:{type:String,noAttribute:!0},multiProp:{type:String,multiple:!0},defaultValueProp:{type:String,defaultValue:"Hello"}},managedSlots:!0,slots:{default:{type:Node},other:{type:HTMLElement},individual:{type:HTMLElement,individualSlots:!0},named:{type:HTMLElement,propertyName:"items"}}};class Ls extends We{static get metadata(){return Ps}static get render(){return Os}static get template(){return t=>Ms`<div><p>
|
|
108
108
|
<slot></slot>
|
|
109
109
|
<slot name="other"></slot>
|
|
110
110
|
<slot name="individual-1"></slot>
|
|
111
111
|
<slot name="individual-2"></slot>
|
|
112
|
-
</p></div>`}static get styles(){return":host {\n display: inline-block;\n border: 1px solid black;\n color: var(--var1);\n }"}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}
|
|
112
|
+
</p></div>`}static get styles(){return":host {\n display: inline-block;\n border: 1px solid black;\n color: var(--var1);\n }"}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}Ls.define();const Ts={tag:"ui5-test-no-shadow"};(class extends We{static get metadata(){return Ts}}).define();const Ns={tag:"ui5-test-parent",managedSlots:!0,slots:{default:{type:Node,invalidateOnChildChange:{properties:["prop1"]}},items:{type:HTMLElement,invalidateOnChildChange:{properties:!0}}}};(class extends We{static get metadata(){return Ns}static get render(){return Os}static get template(){return t=>Ms`<div>
|
|
113
113
|
<slot></slot>
|
|
114
|
-
</div>`}}).define();const
|
|
114
|
+
</div>`}}).define();const Is={tag:"ui5-test-child",properties:{prop1:{type:String},prop2:{type:String},prop3:{type:String}}};(class extends We{static get metadata(){return Is}static get render(){return Os}static get template(){return t=>Ms`<div></div>`}}).define();const Rs={tag:"ui5-with-static-area",properties:{staticContent:{type:Boolean}},slots:{}};(class extends We{static get metadata(){return Rs}static get render(){return Os}static get template(){return t=>Ms`
|
|
115
115
|
<div>
|
|
116
116
|
WithStaticArea works!
|
|
117
|
-
</div>`}static get staticAreaTemplate(){return t=>
|
|
117
|
+
</div>`}static get staticAreaTemplate(){return t=>Ms`
|
|
118
118
|
<div class="ui5-with-static-area-content">
|
|
119
119
|
Static area content.
|
|
120
|
-
</div>`}static get styles(){return"\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tborder: 1px solid black;\n\t\t\t\tcolor: red;\n\t\t\t}"}async addStaticArea(){if(!this.staticContent)return;const t=await this.getStaticAreaItemDomRef();return this.responsivePopover=t.querySelector(".ui5-with-static-area-content"),this.responsivePopover}onBeforeRendering(){this.addStaticArea()}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}).define();const
|
|
120
|
+
</div>`}static get styles(){return"\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tborder: 1px solid black;\n\t\t\t\tcolor: red;\n\t\t\t}"}async addStaticArea(){if(!this.staticContent)return;const t=await this.getStaticAreaItemDomRef();return this.responsivePopover=t.querySelector(".ui5-with-static-area-content"),this.responsivePopover}onBeforeRendering(){this.addStaticArea()}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}}).define();const $s={tag:"ui5-test-generic-ext",properties:{extProp:{type:String},strProp:{defaultValue:"Ext"}},slots:{extSlot:{type:HTMLElement}}};(class extends Ls{static get metadata(){return $s}}).define();xt("@ui5/webcomponents-base-test","sap_fiori_3",(()=>":root{ --var1: red; }")),xt("@ui5/webcomponents-base-test","sap_fiori_3_dark",(()=>":root{ --var1: green; }")),xt("@ui5/webcomponents-base-test","sap_belize",(()=>":root{ --var1: blue; }")),xt("@ui5/webcomponents-base-test","sap_belize_hcb",(()=>":root{ --var1: orange; }")),xt("@ui5/webcomponents-base-test","sap_belize_hcw",(()=>":root{ --var1: orange; }")),xt("@ui5/webcomponents-base-test","sap_fiori_3_hcb",(()=>":root{ --var1: yellow; }")),xt("@ui5/webcomponents-base-test","sap_fiori_3_hcw",(()=>":root{ --var1: yellow; }"));const ks={},Ds={INTERNET_EXPLORER:"ie",EDGE:"ed",FIREFOX:"ff",CHROME:"cr",SAFARI:"sf",ANDROID:"an"},Vs=()=>{const t=(()=>{const t=navigator.userAgent.toLowerCase(),e=/(edge)[ /]([\w.]+)/.exec(t)||/(trident)\/[\w.]+;.*rv:([\w.]+)/.exec(t)||/(webkit)[ /]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(t)||[],s={browser:e[1]||"",version:e[2]||"0"};return s[s.browser]=!0,s})(),e=navigator.userAgent,s=window.navigator;let n,i,a;if(t.mozilla)n=/Mobile/,e.match(/Firefox\/(\d+\.\d+)/)?(a=parseFloat(RegExp.$1),i={name:Ds.FIREFOX,versionStr:""+a,version:a,mozilla:!0,mobile:n.test(e)}):i={mobile:n.test(e),mozilla:!0,version:-1};else if(t.webkit){const t=e.toLowerCase().match(/webkit[/]([\d.]+)/);let r;t&&(r=t[1]),n=/Mobile/;const o=e.match(/(Chrome|CriOS)\/(\d+\.\d+).\d+/),l=e.match(/FxiOS\/(\d+\.\d+)/),c=e.match(/Android .+ Version\/(\d+\.\d+)/);if(o||l||c){let t,s,a;o?(t=Ds.CHROME,a=n.test(e),s=parseFloat(o[2])):l?(t=Ds.FIREFOX,a=!0,s=parseFloat(l[1])):c&&(t=Ds.ANDROID,a=n.test(e),s=parseFloat(c[1])),i={name:t,mobile:a,versionStr:""+s,version:s,webkit:!0,webkitVersion:r}}else{const t=/(Version|PhantomJS)\/(\d+\.\d+).*Safari/,o=s.standalone;if(t.test(e)){const s=t.exec(e);a=parseFloat(s[2]),i={name:Ds.SAFARI,versionStr:""+a,fullscreen:!1,webview:!1,version:a,mobile:n.test(e),webkit:!0,webkitVersion:r,phantomJS:"PhantomJS"===s[1]}}else i=!/iPhone|iPad|iPod/.test(e)||/CriOS/.test(e)||/FxiOS/.test(e)||!0!==o&&!1!==o?{mobile:n.test(e),webkit:!0,webkitVersion:r,version:-1}:{name:Ds.SAFARI,version:-1,fullscreen:o,webview:!o,mobile:n.test(e),webkit:!0,webkitVersion:r}}}else t.msie||t.trident?(a=parseFloat(t.version),i={name:Ds.INTERNET_EXPLORER,versionStr:""+a,version:a,msie:!0,mobile:!1}):t.edge?(a=parseFloat(t.version),i={name:Ds.EDGE,versionStr:""+a,version:a,edge:!0}):i={name:"",versionStr:"",version:-1,mobile:!1};return i},js=/('')|'([^']+(?:''[^']*)*)(?:'|$)|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g,Us=new Map;class Fs{constructor(t){this.packageName=t}getText(t,...e){if("string"==typeof t&&(t={key:t,defaultText:t}),!t||!t.key)return"";const s=(n=this.packageName,ot.get(n));var n;const i=s&&s[t.key]?s[t.key]:t.defaultText||t.key;return a=(a=e)||[],i.replace(js,((t,e,s,n,i)=>{if(e)return"'";if(s)return s.replace(/''/g,"'");if(n)return String(a[parseInt(n)]);throw new Error("[i18n]: pattern syntax error at pos "+i)}));var a}}let Bs;const Hs={Gregorian:"Gregorian",Islamic:"Islamic",Japanese:"Japanese",Buddhist:"Buddhist",Persian:"Persian"};class Zs extends se{static isValid(t){return!!Hs[t]}}let zs;Zs.generateTypeAccessors(Hs);let Ws;const qs={Polite:"Polite",Assertive:"Assertive"};let Gs,Js;var Xs;(class extends se{static isValid(t){return!!qs[t]}}).generateTypeAccessors(qs),Xs=()=>{if(Gs&&Js)return;const t="position: absolute;\n\tclip: rect(1px,1px,1px,1px);\n\tuser-select: none;\n\tleft: -1000px;\n\ttop: -1000px;\n\tpointer-events: none;";Gs=document.createElement("span"),Js=document.createElement("span"),Gs.classList.add("ui5-invisiblemessage-polite"),Js.classList.add("ui5-invisiblemessage-assertive"),Gs.setAttribute("aria-live","polite"),Js.setAttribute("aria-live","assertive"),Gs.setAttribute("role","alert"),Js.setAttribute("role","alert"),Gs.style.cssText=t,Js.style.cssText=t,Pt("ui5-static-area").appendChild(Gs),Pt("ui5-static-area").appendChild(Js)},te.attachEvent("boot",Xs);window.isIE=()=>(ks.browser||(ks.browser=Vs(),ks.browser.BROWSER=Ds,ks.browser.name&&Object.keys(Ds).forEach((t=>{Ds[t]===ks.browser.name&&(ks.browser[t.toLowerCase()]=!0)}))),!!ks.browser.msie),window.registerThemePropertiesLoader=xt,window["sap-ui-webcomponents-bundle"]={configuration:{getAnimationMode:()=>(void 0===Bs&&(v(),Bs=w.animationMode),Bs),getLanguage:q,getTheme:Zt,setTheme:zt,getNoConflict:Ne,setNoConflict:t=>{Te=t},getCalendarType:()=>(void 0===zs&&(v(),zs=w.calendarType),Zs.isValid(zs)?zs:Zs.Gregorian),getRTL:ke,getFirstDayOfWeek:()=>(void 0===Ws&&(v(),Ws=w.formatSettings),Ws.firstDayOfWeek)},invisibleMessage:{announce:(t,e)=>{const s=e===qs.Assertive?Js:Gs;s.textContent="",s.textContent=t,e!==qs.Assertive&&e!==qs.Polite&&console.warn('You have entered an invalid mode. Valid values are: "Polite" and "Assertive". The framework will automatically set the mode to "Polite".')}},getIconNames:async()=>(await $t("edit"),await $t("tnt/arrow"),Array.from(Nt.keys())),registerI18nLoader:(t,e,s)=>{const n=`${t}/${e}`;ct.set(n,s)},fetchI18nBundle:ut,getI18nBundle:t=>{if(Us.has(t))return Us.get(t);const e=new Fs(t);return Us.set(t,e),e},renderFinished:B};
|
|
121
121
|
//# sourceMappingURL=bundle.esm.js.map
|