@pictogrammers/components 0.4.6 → 0.4.7
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/package.json +1 -1
- package/pg/buttonMenu/README.md +5 -12
- package/pg/tree/README.md +11 -3
- package/pg/tree/__examples__/basic/basic.ts +3 -9
- package/pg/tree/tree.ts +12 -2
- package/pgAnnoy.js +1 -1
- package/pgApp.js +1 -1
- package/pgAvatar.js +1 -1
- package/pgButton.js +1 -1
- package/pgButtonGroup.js +1 -1
- package/pgButtonLink.js +1 -1
- package/pgButtonMenu.js +1 -1
- package/pgButtonToggle.js +1 -1
- package/pgCard.js +1 -1
- package/pgCardUser.js +1 -1
- package/pgColor.js +1 -1
- package/pgDatabase.js +1 -1
- package/pgDropdown.js +1 -1
- package/pgGrid.js +1 -1
- package/pgHeader.js +1 -1
- package/pgIcon.js +1 -1
- package/pgInputCheck.js +1 -1
- package/pgInputCheckList.js +1 -1
- package/pgInputFileLocal.js +1 -1
- package/pgInputHexRgb.js +1 -1
- package/pgInputPixelEditor.js +1 -1
- package/pgInputRange.js +1 -1
- package/pgInputSelect.js +1 -1
- package/pgInputText.js +1 -1
- package/pgInputTextIcon.js +1 -1
- package/pgInputUserSelect.js +1 -1
- package/pgListTag.js +1 -1
- package/pgMarkdown.js +1 -1
- package/pgMenu.js +1 -1
- package/pgMenuDivider.js +1 -1
- package/pgMenuIcon.js +1 -1
- package/pgMenuItem.js +1 -1
- package/pgMenuItemIcon.js +1 -1
- package/pgModalAlert.js +1 -1
- package/pgModification.js +1 -1
- package/pgNav.js +1 -1
- package/pgOverlay.js +1 -1
- package/pgOverlayContextMenu.js +1 -1
- package/pgOverlayMenu.js +1 -1
- package/pgOverlaySelectMenu.js +1 -1
- package/pgOverlaySubMenu.js +1 -1
- package/pgPicker.js +1 -1
- package/pgPreview.js +1 -1
- package/pgScroll.js +1 -1
- package/pgSearch.js +1 -1
- package/pgTab.js +1 -1
- package/pgTabs.js +1 -1
- package/pgToast.js +1 -1
- package/pgToasts.js +1 -1
- package/pgTooltip.js +1 -1
- package/pgTree.js +1 -1
- package/pgTreeButtonIcon.js +1 -1
- package/pgTreeItem.js +1 -1
package/pgMenuItemIcon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={209:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z%27 fill=%27rgb%2869, 60, 79, 0.5%29%27 /></svg>"},217:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(601),i=n.n(r),a=n(314),o=n.n(a)()(i());o.push([e.id,':host {\n display: contents;\n}\n\n[part="overlay"] {\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n overflow: visible;\n --pg-menu-box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.25);\n top: calc(anchor(top) - 0.25rem);\n left: calc(anchor(right) - 0.25rem);\n translate: var(--pg-overlay-menu-_x, 0) var(--pg-overlay-menu-_y, 0);\n position-try-fallbacks: --custom-right, --custom-left;\n}\n\n@position-try --custom-right {\n top: calc(anchor(top) - 0.25rem);\n left: calc(anchor(right) - 0.25rem);\n}\n\n@position-try --custom-left {\n top: calc(anchor(top) - 0.25rem);\n left: calc(anchor(left) - anchor-size(width) + 0.25rem);\n}\n',""]);var s=new CSSStyleSheet;s.replaceSync(o.toString());const l=s},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&o[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},374:(e,t,n)=>{n.d(t,{A:()=>S});var r=n(601),i=n.n(r),a=n(314),o=n.n(a),s=n(417),l=n.n(s),c=new URL(n(662),n.b),d=new URL(n(708),n.b),u=new URL(n(383),n.b),h=new URL(n(544),n.b),p=new URL(n(570),n.b),m=new URL(n(209),n.b),f=o()(i()),v=l()(c),b=l()(d),g=l()(u),y=l()(h),w=l()(p),x=l()(m);f.push([e.id,`:host {\n display: contents;\n}\n\n[part=button] {\n outline: none;\n display: flex;\n align-items: center;\n font-family: var(--pg-font-family);\n text-align: var(--pg-menu-item-text-align, left);\n background: var(--pg-menu-item-background, transparent);\n padding: var(--pg-menu-item-padding, 0.25rem 0.5rem 0.25rem 0.5rem);\n border-color: transparent;\n border-width: 0;\n border-style: solid;\n border-top-left-radius: var(--pg-menu-item-border-radius-top, 0.25rem);\n border-top-right-radius: var(--pg-menu-item-border-radius-top, 0.25rem);\n border-bottom-left-radius: var(--pg-menu-item-border-radius-bottom, 0.25rem);\n border-bottom-right-radius: var(--pg-menu-item-border-radius-bottom, 0.25rem);\n color: var(--pg-menu-item-color, #453C4F);\n}\n\n[part=button]:not(:disabled):active,\n[part=button]:not(:disabled):hover {\n background: var(--pg-menu-item-selected-background, #453C4F);\n color: #FFFFFF;\n --pg-icon-color: #FFFFFF;\n}\n\n[part=button]:not(:disabled):active {\n background: var(--pg-menu-item-active-background, #5f516e);\n}\n\n[part=button]:disabled {\n color: var(--pg-menu-item-disabled-color, rgb(69, 60, 79, 0.75));\n --pg-icon-color: var(--pg-menu-item-disabled-color, rgb(69, 60, 79, 0.75));\n}\n\n@container style(--pg-menu-_has-check: true) {\n [part=button] {\n padding-inline-start: 1.5rem;\n }\n\n [part=button].checked::before {\n position: absolute;\n translate: -1.5rem 0;\n content: var(--pg-menu-item-check, url(${v}));\n width: 1.5rem;\n height: 1.5rem;\n }\n\n [part=button].checked:active::before,\n [part=button].checked:hover::before {\n content: var(--pg-menu-item-hover-check, url(${b}));\n }\n\n [part=button].checked:disabled::before {\n content: var(--pg-menu-item-disabled-check, url(${g}));\n }\n}\n\n[part=button]:focus-visible {\n position: relative;\n}\n\n[part=button]:focus-visible::after {\n pointer-events: none;\n content: '';\n position: absolute;\n top: -1px;\n right: -1px;\n bottom: -1px;\n left: -1px;\n border-radius: 0.25rem;\n box-shadow: 0 0 0 3px var(--pg-focus-color, rgb(79, 143, 249, 0.5));\n}\n\n[part=button]:focus-visible:not(:hover)::after {\n background: var(--pg-focus-background-color, rgb(79, 143, 249, 0.1));\n}\n\n[part=icon] {\n margin-inline-end: 0.5rem;\n}\n\n[part=button].more [part=label]::after {\n content: var(--pg-menu-item-check, url(${y}));\n width: 1.5rem;\n height: 1.5rem;\n vertical-align: middle;\n translate: 0.25rem 0;\n}\n\n[part=button].more:active [part=label]::after,\n[part=button].more:hover [part=label]::after {\n content: var(--pg-menu-item-hover-check, url(${w}));\n}\n\n[part=button].more:disabled [part=label]::after {\n content: var(--pg-menu-item-disabled-check, url(${x}));\n}\n\n[part=label] {\n display: flex;\n align-items: center;\n}\n`,""]);var k=new CSSStyleSheet;k.replaceSync(f.toString());const S=k},383:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M 17.5,10.2501L 10.5,17.25L 6.5,13.25L 7.9,11.8L 10.5,14.4L 16.0857,8.8L 17.5,10.25Z%27 fill=%27rgb%2869, 60, 79, 0.5%29%27 /></svg>"},417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},544:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z%27 fill=%27rgb%2869, 60, 79%29%27 /></svg>"},570:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z%27 fill=%27white%27 /></svg>"},601:e=>{e.exports=function(e){return e[1]}},662:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M 17.5,10.2501L 10.5,17.25L 6.5,13.25L 7.9,11.8L 10.5,14.4L 16.0857,8.8L 17.5,10.25Z%27 fill=%27rgb%2869, 60, 79%29%27 /></svg>"},708:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M 17.5,10.2501L 10.5,17.25L 6.5,13.25L 7.9,11.8L 10.5,14.4L 16.0857,8.8L 17.5,10.25Z%27 fill=%27white%27 /></svg>"}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.b="undefined"!=typeof document&&document.baseURI||self.location.href;const r=Symbol("addObserver"),i=Symbol("removeObserver"),a=Symbol("getObservers"),o=Symbol("isProxy"),s=Symbol("getTarget"),l=["fill","pop","push","reverse","shift","sort","splice","unshift"],c=new Map;function d(e){return new Proxy(e,{get(t,n){if("symbol"==typeof n){switch(n){case o:return!0;case s:return t;case a:return c.has(e);case r:return(t,n)=>{c.has(e)?c.get(e).has(t)?c.get(e).get(t).push(n):c.get(e).set(t,[n]):c.set(e,new Map([[t,[n]]]))};case i:return t=>{c.has(e)&&(c.get(e).delete(t),0===c.get(e).size&&c.delete(e))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(t,n)}throw new Error("Unsupported symbol")}if(n in t){if(!Number.isNaN(Number(n)))return"object"==typeof t[n]?d(t[n]):t[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(l.includes(n))return c.has(t)?function(){const e=Array.prototype[n].apply(t,arguments);return c.get(t).forEach(((e,r)=>{e.forEach((e=>{e(t,n,arguments)}))})),e}:Reflect.get(t,n);if(t[n]instanceof Array)return d(t[n])}return Reflect.get(t,n)},set(e,t,n){if("symbol"==typeof t)throw new Error("Setting symbols not allowed.");if(Array.isArray(e))return Reflect.set(e,t,n);if(c.has(e)){c.get(e).forEach(((e,r)=>{e.forEach((e=>{e(t,n)}))}))}return Reflect.set(e,t,n)}})}window.observers=c;class PropError extends Error{constructor(e,t){super(e),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}}Symbol("index");const u=Symbol("init"),h=Symbol("template"),p=Symbol("style"),m=Symbol("parent");function f(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function v(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function b(e={}){return function(t,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,i;Reflect.defineProperty(t,"name",{value:e.selector,writable:!1,configurable:!1}),!t.prototype[m]||t.prototype[m][t.prototype[m].length-1]instanceof Object.getPrototypeOf(t)?t.prototype instanceof HTMLElement&&(t.prototype[m]=[t.prototype],t.prototype[p]=e.style?[e.style]:[],t.prototype[h]=e.template||""):(t.prototype[m].push(t.prototype),t.prototype[p].push(e.style),t.prototype[h]=(r=t.prototype[h],(i=e.template||null)&&i.match(/<parent\/>/)?i.replace(/<parent\/>/,r):`${r}${i||""}`));const a=t.prototype.connectedCallback||(()=>{}),o=t.prototype.disconnectedCallback||(()=>{});t.prototype.connectedCallback=function(){if(this[u]||void 0!==e.template||void 0!==e.style)if(this[u]){if(this[u]&&e.style);else if(this[u]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=t.prototype[h]||"";const n=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=t.prototype[p].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(n)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&n.add(e.localName);const r=Array.from(n.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),i=()=>{this[m].map((e=>{e.render&&e.render.call(this,t.observedAttributes?t.observedAttributes.reduce(((e,t)=>(e[v(t)]=!0,e)),{}):{})}))};0===r.length?(this[u]=!0,a.call(this),i()):Promise.all(r).then((()=>{this[u]=!0,a.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));i()}))},t.prototype.disconnectedCallback=function(){o.call(this)},t.prototype.attributeChangedCallback=function(e,t,n){this[v(e)]=n},n.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${n.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,t)}}))}}Symbol("transmute");function g(e){return!!e&&e.constructor===Array}function y(e,t){e[u]&&e[m].map((n=>{n.render&&n.render.call(e,{[t]:!0})}))}function w(e){return null===e?"null":g(e)?"array":typeof e}function x(e){return function(t,n){const r=n.name,i=Symbol(r),l=Symbol(`${r}:type`),c=Symbol(`${r}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[l]||"array"===this[l]?this[i][o]?this[i]:d(this[i]):this[i],set:t=>{const n=w(e?e(t):t);if("index"!==r&&this[l]!==n&&"null"!==this[l]&&"null"!==n)throw new Error(`@Prop() ${r} with type '${this[l]}' cannot be set to ${n}.`);if("array"===this[l]){if(!g(t))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[i]===t)throw new Error("Setting an array to itself is not allowed.");const e=d(this[i]);if(e[a]){const n=t[o]?(c=t)[o]&&c[s]:t;e.splice(0,this[i].length,...n)}else this[i]=t}else this[i]=e?e(t):t,y(this,r);var c}})})),function(t){if(void 0===t&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==t&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,n=f(r);t[r]||(e.observedAttributes.push(n),t[r]=i)}return this[l]=w(t),"array"===this[l]?(this[i]=t,new Proxy(t,{get:(e,t)=>t===S?this[c]:(console.log("errr???"),Reflect.get(this[i],t)),set:(e,t,n)=>{if(t===S)return this[c]=n,!0;const a=Reflect.set(e,t,n);return"length"===t&&this[i].length===n||y(this,r),this[i]=n,a}})):(this[i]=e?e(this.getAttribute(r)??t):this.getAttribute(r)??t,this[i])}}}function k(){return function(e,t){const n=t.name,r=n.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,n,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}}Symbol("hasProxy");const S=Symbol("meta");var E=function(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),h=!1,p=n.length-1;p>=0;p--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(e||null))};var v=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=o(v.get))&&(u.get=s),(s=o(v.set))&&(u.set=s),(s=o(v.init))&&i.unshift(s)}else(s=o(v))&&("field"===l?i.unshift(s):u[c]=s)}d&&Object.defineProperty(d,r.name,u),h=!0},$=function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0};const L=new Set,C=new Map;const P=(()=>{let e,t,n=[b()],r=[],i=HTMLElement;(class extends i{static{t=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;E(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,r),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),$(t,r)}static open(e={}){var t=document.createElement(this.name);return Object.assign(t,e),document.body.appendChild(t),L.add(t),new Promise((e=>{C.set(t,e)}))}close(e){this.remove(),L.delete(this);const t=C.get(this);t&&t(e),C.delete(this)}});return t})();var O=n(217),A=function(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),h=!1,p=n.length-1;p>=0;p--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(e||null))};var v=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=o(v.get))&&(u.get=s),(s=o(v.set))&&(u.set=s),(s=o(v.init))&&i.unshift(s)}else(s=o(v))&&("field"===l?i.unshift(s):u[c]=s)}d&&Object.defineProperty(d,r.name,u),h=!0},j=function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0};const R=[],F=[];const M=(()=>{let e,t,n,r,i,a,o,s,l,c,d=[b({selector:"pg-overlay-sub-menu",template:'<div part="overlay"> <pg-menu part="menu"></pg-menu> </div>',style:O.A})],u=[],h=P,p=[],m=[],f=[],v=[],g=[],y=[],w=[],S=[],E=[],$=[],L=[],C=[],M=[],T=[],z=[],D=[];(class extends h{static{t=this}static{const b="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;n=[k()],r=[k()],i=[x()],a=[x()],o=[x()],s=[x()],l=[x()],c=[x()],A(null,null,n,{kind:"field",name:"$overlay",static:!1,private:!1,access:{has:e=>"$overlay"in e,get:e=>e.$overlay,set:(e,t)=>{e.$overlay=t}},metadata:b},p,m),A(null,null,r,{kind:"field",name:"$menu",static:!1,private:!1,access:{has:e=>"$menu"in e,get:e=>e.$menu,set:(e,t)=>{e.$menu=t}},metadata:b},f,v),A(null,null,i,{kind:"field",name:"source",static:!1,private:!1,access:{has:e=>"source"in e,get:e=>e.source,set:(e,t)=>{e.source=t}},metadata:b},g,y),A(null,null,a,{kind:"field",name:"x",static:!1,private:!1,access:{has:e=>"x"in e,get:e=>e.x,set:(e,t)=>{e.x=t}},metadata:b},w,S),A(null,null,o,{kind:"field",name:"y",static:!1,private:!1,access:{has:e=>"y"in e,get:e=>e.y,set:(e,t)=>{e.y=t}},metadata:b},E,$),A(null,null,s,{kind:"field",name:"default",static:!1,private:!1,access:{has:e=>"default"in e,get:e=>e.default,set:(e,t)=>{e.default=t}},metadata:b},L,C),A(null,null,l,{kind:"field",name:"items",static:!1,private:!1,access:{has:e=>"items"in e,get:e=>e.items,set:(e,t)=>{e.items=t}},metadata:b},M,T),A(null,null,c,{kind:"field",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:b},z,D),A(null,e={value:t},d,{kind:"class",name:t.name,metadata:b},null,u),t=e.value,b&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b}),j(t,u)}$overlay=j(this,p,void 0);$menu=(j(this,m),j(this,f,void 0));source=(j(this,v),j(this,g,null));x=(j(this,y),j(this,w,0));y=(j(this,S),j(this,E,0));default=(j(this,$),j(this,L,null));items=(j(this,C),j(this,M,[]));value=(j(this,T),j(this,z,null));render(e){e.items&&(this.$menu.items=this.items)}connectedCallback(){R.pop()?.close(),R.push(this),F.push(this),this.$menu.addEventListener("select",this.#e.bind(this)),this.$menu.addEventListener("close",this.#t.bind(this)),this.$overlay.popover="auto",null!==this.source&&this.$overlay.showPopover({source:this.source}),this.$overlay.addEventListener("toggle",this.#n.bind(this));this.source?.getBoundingClientRect();this.$overlay.style.setProperty("--pg-overlay-menu-_x","0px"),this.$overlay.style.setProperty("--pg-overlay-menu-_y","0px"),this.$menu.focus(0),this.#r=this.#i.bind(this),document.addEventListener("pointerdown",this.#r)}#a=(j(this,D),!1);#r;#i(e){this.#a=e.composedPath().includes(this.source)}#n(e){"closed"===e.newState&&0===F.length&&this.#a&&(console.log(e),this.source?.focus())}disconnectedCallback(){F.pop(),document.removeEventListener("pointerdown",this.#r)}#t(e){const{depth:t}=e.detail;console.log("close",t),1===t?this.close(null):this.close()}#e(e){e.detail.item.index=e.detail.index,this.close(e.detail.item),this.source?.focus()}});return t})();var T=n(374),z=function(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),h=!1,p=n.length-1;p>=0;p--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(e||null))};var v=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=o(v.get))&&(u.get=s),(s=o(v.set))&&(u.set=s),(s=o(v.init))&&i.unshift(s)}else(s=o(v))&&("field"===l?i.unshift(s):u[c]=s)}d&&Object.defineProperty(d,r.name,u),h=!0},D=function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0};(()=>{let e,t,n,r,i,a,o,s,l,c,d,u=[b({selector:"pg-menu-item-icon",style:T.A,template:'<button part="button"> <pg-icon part="icon"></pg-icon> <span part="label"></span> </button>'})],h=[],p=HTMLElement,m=[],f=[],v=[],g=[],y=[],w=[],S=[],E=[],$=[],L=[],C=[],P=[],O=[],A=[],j=[],R=[],F=[],U=[];(class extends p{static{t=this}static{const b="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0;n=[x()],r=[x()],i=[x()],a=[x()],o=[x()],s=[x()],l=[k()],c=[k()],d=[k()],z(null,null,n,{kind:"field",name:"index",static:!1,private:!1,access:{has:e=>"index"in e,get:e=>e.index,set:(e,t)=>{e.index=t}},metadata:b},m,f),z(null,null,r,{kind:"field",name:"icon",static:!1,private:!1,access:{has:e=>"icon"in e,get:e=>e.icon,set:(e,t)=>{e.icon=t}},metadata:b},v,g),z(null,null,i,{kind:"field",name:"label",static:!1,private:!1,access:{has:e=>"label"in e,get:e=>e.label,set:(e,t)=>{e.label=t}},metadata:b},y,w),z(null,null,a,{kind:"field",name:"checked",static:!1,private:!1,access:{has:e=>"checked"in e,get:e=>e.checked,set:(e,t)=>{e.checked=t}},metadata:b},S,E),z(null,null,o,{kind:"field",name:"disabled",static:!1,private:!1,access:{has:e=>"disabled"in e,get:e=>e.disabled,set:(e,t)=>{e.disabled=t}},metadata:b},$,L),z(null,null,s,{kind:"field",name:"items",static:!1,private:!1,access:{has:e=>"items"in e,get:e=>e.items,set:(e,t)=>{e.items=t}},metadata:b},C,P),z(null,null,l,{kind:"field",name:"$icon",static:!1,private:!1,access:{has:e=>"$icon"in e,get:e=>e.$icon,set:(e,t)=>{e.$icon=t}},metadata:b},O,A),z(null,null,c,{kind:"field",name:"$button",static:!1,private:!1,access:{has:e=>"$button"in e,get:e=>e.$button,set:(e,t)=>{e.$button=t}},metadata:b},j,R),z(null,null,d,{kind:"field",name:"$label",static:!1,private:!1,access:{has:e=>"$label"in e,get:e=>e.$label,set:(e,t)=>{e.$label=t}},metadata:b},F,U),z(null,e={value:t},u,{kind:"class",name:t.name,metadata:b},null,h),t=e.value,b&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b})}static delegatesFocus=!0;index=D(this,m,void 0);icon=(D(this,f),D(this,v,"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"));label=(D(this,g),D(this,y,""));checked=(D(this,w),D(this,S,!1));disabled=(D(this,E),D(this,$,!1));items=(D(this,L),D(this,C,[]));$icon=(D(this,P),D(this,O,void 0));$button=(D(this,A),D(this,j,void 0));$label=(D(this,R),D(this,F,void 0));render(e){e.icon&&(this.$icon.path=this.icon),e.label&&(this.$label.textContent=this.label),e.disabled&&(this.$button.disabled=this.disabled),e.checked&&this.$button.classList.toggle("checked",this.checked),e.items&&this.$button.classList.toggle("more",this.items.length>0),e.checked&&!0===this.checked&&this.dispatchEvent(new CustomEvent("hasCheck",{bubbles:!0}))}connectedCallback(){this.$button.addEventListener("click",(async()=>{if(this.items.length>0){const e=await M.open({source:this.$button,x:0,y:0,value:this.items[0],items:this.items});null===e?this.focus():e?this.dispatchEvent(new CustomEvent("select",{detail:{item:e}})):this.dispatchEvent(new CustomEvent("close",{detail:{depth:-1}}))}else this.dispatchEvent(new CustomEvent("select",{detail:{index:this.index,item:this.items[this.index]}}))})),this.$button.addEventListener("keydown",(async e=>{switch(e.key){case"ArrowDown":this.dispatchEvent(new CustomEvent("down",{detail:{index:this.index}})),e.preventDefault();break;case"ArrowUp":this.dispatchEvent(new CustomEvent("up",{detail:{index:this.index}})),e.preventDefault();break;case"ArrowLeft":this.dispatchEvent(new CustomEvent("close",{detail:{depth:1}})),e.preventDefault();break;case"ArrowRight":if(this.items.length>0){const e=await M.open({source:this.$button,x:0,y:0,value:this.items[0],items:this.items});null===e?this.focus():e?this.dispatchEvent(new CustomEvent("select",{detail:{item:e}})):this.dispatchEvent(new CustomEvent("close",{detail:{depth:-1}}))}e.preventDefault();break;case"Escape":this.dispatchEvent(new CustomEvent("close",{detail:{depth:-1}})),e.preventDefault()}}))}focus(){this.$button.focus()}getHeight(){return this.$label.getBoundingClientRect().height}constructor(){super(...arguments),D(this,U)}static{D(t,h)}})})()})();
|
|
1
|
+
(()=>{"use strict";var e={209:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z%27 fill=%27rgb%2869, 60, 79, 0.5%29%27 /></svg>"},217:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(601),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([e.id,':host {\n display: contents;\n}\n\n[part="overlay"] {\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n overflow: visible;\n --pg-menu-box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.25);\n top: calc(anchor(top) - 0.25rem);\n left: calc(anchor(right) - 0.25rem);\n translate: var(--pg-overlay-menu-_x, 0) var(--pg-overlay-menu-_y, 0);\n position-try-fallbacks: --custom-right, --custom-left;\n}\n\n@position-try --custom-right {\n top: calc(anchor(top) - 0.25rem);\n left: calc(anchor(right) - 0.25rem);\n}\n\n@position-try --custom-left {\n top: calc(anchor(top) - 0.25rem);\n left: calc(anchor(left) - anchor-size(width) + 0.25rem);\n}\n',""]);var a=new CSSStyleSheet;a.replaceSync(s.toString());const l=a},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&s[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},374:(e,t,n)=>{n.d(t,{A:()=>k});var r=n(601),o=n.n(r),i=n(314),s=n.n(i),a=n(417),l=n.n(a),c=new URL(n(662),n.b),d=new URL(n(708),n.b),u=new URL(n(383),n.b),h=new URL(n(544),n.b),p=new URL(n(570),n.b),m=new URL(n(209),n.b),f=s()(o()),g=l()(c),v=l()(d),b=l()(u),y=l()(h),w=l()(p),x=l()(m);f.push([e.id,`:host {\n display: contents;\n}\n\n[part=button] {\n outline: none;\n display: flex;\n align-items: center;\n font-family: var(--pg-font-family);\n text-align: var(--pg-menu-item-text-align, left);\n background: var(--pg-menu-item-background, transparent);\n padding: var(--pg-menu-item-padding, 0.25rem 0.5rem 0.25rem 0.5rem);\n border-color: transparent;\n border-width: 0;\n border-style: solid;\n border-top-left-radius: var(--pg-menu-item-border-radius-top, 0.25rem);\n border-top-right-radius: var(--pg-menu-item-border-radius-top, 0.25rem);\n border-bottom-left-radius: var(--pg-menu-item-border-radius-bottom, 0.25rem);\n border-bottom-right-radius: var(--pg-menu-item-border-radius-bottom, 0.25rem);\n color: var(--pg-menu-item-color, #453C4F);\n}\n\n[part=button]:not(:disabled):active,\n[part=button]:not(:disabled):hover {\n background: var(--pg-menu-item-selected-background, #453C4F);\n color: #FFFFFF;\n --pg-icon-color: #FFFFFF;\n}\n\n[part=button]:not(:disabled):active {\n background: var(--pg-menu-item-active-background, #5f516e);\n}\n\n[part=button]:disabled {\n color: var(--pg-menu-item-disabled-color, rgb(69, 60, 79, 0.75));\n --pg-icon-color: var(--pg-menu-item-disabled-color, rgb(69, 60, 79, 0.75));\n}\n\n@container style(--pg-menu-_has-check: true) {\n [part=button] {\n padding-inline-start: 1.5rem;\n }\n\n [part=button].checked::before {\n position: absolute;\n translate: -1.5rem 0;\n content: var(--pg-menu-item-check, url(${g}));\n width: 1.5rem;\n height: 1.5rem;\n }\n\n [part=button].checked:active::before,\n [part=button].checked:hover::before {\n content: var(--pg-menu-item-hover-check, url(${v}));\n }\n\n [part=button].checked:disabled::before {\n content: var(--pg-menu-item-disabled-check, url(${b}));\n }\n}\n\n[part=button]:focus-visible {\n position: relative;\n}\n\n[part=button]:focus-visible::after {\n pointer-events: none;\n content: '';\n position: absolute;\n top: -1px;\n right: -1px;\n bottom: -1px;\n left: -1px;\n border-radius: 0.25rem;\n box-shadow: 0 0 0 3px var(--pg-focus-color, rgb(79, 143, 249, 0.5));\n}\n\n[part=button]:focus-visible:not(:hover)::after {\n background: var(--pg-focus-background-color, rgb(79, 143, 249, 0.1));\n}\n\n[part=icon] {\n margin-inline-end: 0.5rem;\n}\n\n[part=button].more [part=label]::after {\n content: var(--pg-menu-item-check, url(${y}));\n width: 1.5rem;\n height: 1.5rem;\n vertical-align: middle;\n translate: 0.25rem 0;\n}\n\n[part=button].more:active [part=label]::after,\n[part=button].more:hover [part=label]::after {\n content: var(--pg-menu-item-hover-check, url(${w}));\n}\n\n[part=button].more:disabled [part=label]::after {\n content: var(--pg-menu-item-disabled-check, url(${x}));\n}\n\n[part=label] {\n display: flex;\n align-items: center;\n}\n`,""]);var S=new CSSStyleSheet;S.replaceSync(f.toString());const k=S},383:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M 17.5,10.2501L 10.5,17.25L 6.5,13.25L 7.9,11.8L 10.5,14.4L 16.0857,8.8L 17.5,10.25Z%27 fill=%27rgb%2869, 60, 79, 0.5%29%27 /></svg>"},417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},544:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z%27 fill=%27rgb%2869, 60, 79%29%27 /></svg>"},570:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z%27 fill=%27white%27 /></svg>"},601:e=>{e.exports=function(e){return e[1]}},662:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M 17.5,10.2501L 10.5,17.25L 6.5,13.25L 7.9,11.8L 10.5,14.4L 16.0857,8.8L 17.5,10.25Z%27 fill=%27rgb%2869, 60, 79%29%27 /></svg>"},708:e=>{e.exports="data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27><path d=%27M 17.5,10.2501L 10.5,17.25L 6.5,13.25L 7.9,11.8L 10.5,14.4L 16.0857,8.8L 17.5,10.25Z%27 fill=%27white%27 /></svg>"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.b="undefined"!=typeof document&&document.baseURI||self.location.href;const r=Symbol("addObserver"),o=Symbol("removeObserver"),i=Symbol("getObservers"),s=Symbol("swapObserver"),a=Symbol("isProxy"),l=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],d=new Map;function u(e){return new Proxy(e,{get(t,n){if("symbol"==typeof n){switch(n){case a:return!0;case l:return t;case i:return d.has(e);case s:return(t,n)=>{const r=d.get(e);r.forEach(((o,i)=>{if(i.getRootNode().host===t){const t=r.get(i);d.has(n)?d.get(n).has(i)?d.get(n).get(i).push(r.get(i)):d.get(n).set(i,r.get(i)):d.set(n,new Map([[i,t]])),d.delete(e),t.forEach((e=>{e(null,h.swap,[n])}))}}))};case r:return(t,n)=>{d.has(e)?d.get(e).has(t)?d.get(e).get(t).push(n):d.get(e).set(t,[n]):d.set(e,new Map([[t,[n]]]))};case o:return t=>{d.has(e)&&(d.get(e).delete(t),0===d.get(e).size&&d.delete(e))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(t,n)}throw new Error("Unsupported symbol")}if(n in t){if(!Number.isNaN(Number(n)))return"object"==typeof t[n]?u(t[n]):t[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(c.includes(n))return d.has(t)?function(){const e=Array.prototype[n].apply(t,arguments);return d.get(t).forEach(((e,r)=>{e.forEach((e=>{e(t,n,arguments)}))})),e}:Reflect.get(t,n);if(t[n]instanceof Array)return u(t[n])}return Reflect.get(t,n)},set(e,t,n){if("symbol"==typeof t)throw new Error("Setting symbols not allowed.");if(Array.isArray(e))return Reflect.set(e,t,n);if(d.has(e)){d.get(e).forEach(((e,r)=>{e.forEach((e=>{e(t,n)}))}))}return Reflect.set(e,t,n)}})}window.observers=d;const h={fill:"fill",pop:"pop",push:"push",reverse:"reverse",shift:"shift",sort:"sort",splice:"splice",unshift:"unshift",swap:"swap"};class PropError extends Error{constructor(e,t){super(e),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}}Symbol("index");const p=Symbol("init"),m=Symbol("template"),f=Symbol("style"),g=Symbol("parent");function v(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function b(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function y(e={}){return function(t,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,o;Reflect.defineProperty(t,"name",{value:e.selector,writable:!1,configurable:!1}),!t.prototype[g]||t.prototype[g][t.prototype[g].length-1]instanceof Object.getPrototypeOf(t)?t.prototype instanceof HTMLElement&&(t.prototype[g]=[t.prototype],t.prototype[f]=e.style?[e.style]:[],t.prototype[m]=e.template||""):(t.prototype[g].push(t.prototype),t.prototype[f].push(e.style),t.prototype[m]=(r=t.prototype[m],(o=e.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,r):`${r}${o||""}`));const i=t.prototype.connectedCallback||(()=>{}),s=t.prototype.disconnectedCallback||(()=>{});t.prototype.connectedCallback=function(){if(this[p]||void 0!==e.template||void 0!==e.style)if(this[p]){if(this[p]&&e.style);else if(this[p]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=t.prototype[m]||"";const n=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=t.prototype[f].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(n)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&n.add(e.localName);const r=Array.from(n.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),o=()=>{this[g].map((e=>{e.render&&e.render.call(this,t.observedAttributes?t.observedAttributes.reduce(((e,t)=>(e[b(t)]=!0,e)),{}):{})}))};0===r.length?(this[p]=!0,i.call(this),o()):Promise.all(r).then((()=>{this[p]=!0,i.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));o()}))},t.prototype.disconnectedCallback=function(){s.call(this)},t.prototype.attributeChangedCallback=function(e,t,n){this[b(e)]=n},n.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${n.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,t)}}))}}Symbol("transmute");function w(e){return!!e&&e.constructor===Array}function x(e,t){e[p]&&e[g].map((n=>{n.render&&n.render.call(e,{[t]:!0})}))}function S(e){return null===e?"null":w(e)?"array":typeof e}function k(e){return function(t,n){const r=n.name,o=Symbol(r),c=Symbol(`${r}:type`),d=Symbol(`${r}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[c]||"array"===this[c]?this[o][a]?this[o]:u(this[o]):this[o],set:t=>{const n=S(e?e(t):t);if("index"!==r&&this[c]!==n&&"null"!==this[c]&&"null"!==n)throw new Error(`@Prop() ${r} with type '${this[c]}' cannot be set to ${n}.`);if("array"===this[c]){if(!w(t))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===t)throw new Error("Setting an array to itself is not allowed.");const e=u(this[o]);if(e[i]){const n=t[a]?t[l]:t;e[s](this,n),this[o]=t,console.log(">>> trigger render???",this,r)}else this[o]=t}else this[o]=e?e(t):t,x(this,r)}})})),function(t){if(void 0===t&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==t&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,n=v(r);t[r]||(e.observedAttributes.push(n),t[r]=o)}return this[c]=S(t),"array"===this[c]?(this[o]=t,new Proxy(t,{get:(e,t)=>t===$?this[d]:(console.log("errr???"),Reflect.get(this[o],t)),set:(e,t,n)=>{if(t===$)return this[d]=n,!0;const i=Reflect.set(e,t,n);return"length"===t&&this[o].length===n||x(this,r),this[o]=n,i}})):(this[o]=e?e(this.getAttribute(r)??t):this.getAttribute(r)??t,this[o])}}}function E(){return function(e,t){const n=t.name,r=n.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,n,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}}Symbol("hasProxy");const $=Symbol("meta");var L=function(e,t,n,r,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),h=!1,p=n.length-1;p>=0;p--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var g=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=s(g.get))&&(u.get=a),(a=s(g.set))&&(u.set=a),(a=s(g.init))&&o.unshift(a)}else(a=s(g))&&("field"===l?o.unshift(a):u[c]=a)}d&&Object.defineProperty(d,r.name,u),h=!0},C=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const P=new Set,O=new Map;const A=(()=>{let e,t,n=[y()],r=[],o=HTMLElement;(class extends o{static{t=this}static{const i="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;L(null,e={value:t},n,{kind:"class",name:t.name,metadata:i},null,r),t=e.value,i&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i}),C(t,r)}static open(e={}){var t=document.createElement(this.name);return Object.assign(t,e),document.body.appendChild(t),P.add(t),new Promise((e=>{O.set(t,e)}))}close(e){this.remove(),P.delete(this);const t=O.get(this);t&&t(e),O.delete(this)}});return t})();var j=n(217),R=function(e,t,n,r,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),h=!1,p=n.length-1;p>=0;p--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var g=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=s(g.get))&&(u.get=a),(a=s(g.set))&&(u.set=a),(a=s(g.init))&&o.unshift(a)}else(a=s(g))&&("field"===l?o.unshift(a):u[c]=a)}d&&Object.defineProperty(d,r.name,u),h=!0},F=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const M=[],T=[];const z=(()=>{let e,t,n,r,o,i,s,a,l,c,d=[y({selector:"pg-overlay-sub-menu",template:'<div part="overlay"> <pg-menu part="menu"></pg-menu> </div>',style:j.A})],u=[],h=A,p=[],m=[],f=[],g=[],v=[],b=[],w=[],x=[],S=[],$=[],L=[],C=[],P=[],O=[],z=[],D=[];(class extends h{static{t=this}static{const y="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;n=[E()],r=[E()],o=[k()],i=[k()],s=[k()],a=[k()],l=[k()],c=[k()],R(null,null,n,{kind:"field",name:"$overlay",static:!1,private:!1,access:{has:e=>"$overlay"in e,get:e=>e.$overlay,set:(e,t)=>{e.$overlay=t}},metadata:y},p,m),R(null,null,r,{kind:"field",name:"$menu",static:!1,private:!1,access:{has:e=>"$menu"in e,get:e=>e.$menu,set:(e,t)=>{e.$menu=t}},metadata:y},f,g),R(null,null,o,{kind:"field",name:"source",static:!1,private:!1,access:{has:e=>"source"in e,get:e=>e.source,set:(e,t)=>{e.source=t}},metadata:y},v,b),R(null,null,i,{kind:"field",name:"x",static:!1,private:!1,access:{has:e=>"x"in e,get:e=>e.x,set:(e,t)=>{e.x=t}},metadata:y},w,x),R(null,null,s,{kind:"field",name:"y",static:!1,private:!1,access:{has:e=>"y"in e,get:e=>e.y,set:(e,t)=>{e.y=t}},metadata:y},S,$),R(null,null,a,{kind:"field",name:"default",static:!1,private:!1,access:{has:e=>"default"in e,get:e=>e.default,set:(e,t)=>{e.default=t}},metadata:y},L,C),R(null,null,l,{kind:"field",name:"items",static:!1,private:!1,access:{has:e=>"items"in e,get:e=>e.items,set:(e,t)=>{e.items=t}},metadata:y},P,O),R(null,null,c,{kind:"field",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:y},z,D),R(null,e={value:t},d,{kind:"class",name:t.name,metadata:y},null,u),t=e.value,y&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y}),F(t,u)}$overlay=F(this,p,void 0);$menu=(F(this,m),F(this,f,void 0));source=(F(this,g),F(this,v,null));x=(F(this,b),F(this,w,0));y=(F(this,x),F(this,S,0));default=(F(this,$),F(this,L,null));items=(F(this,C),F(this,P,[]));value=(F(this,O),F(this,z,null));render(e){e.items&&(this.$menu.items=this.items)}connectedCallback(){M.pop()?.close(),M.push(this),T.push(this),this.$menu.addEventListener("select",this.#e.bind(this)),this.$menu.addEventListener("close",this.#t.bind(this)),this.$overlay.popover="auto",null!==this.source&&this.$overlay.showPopover({source:this.source}),this.$overlay.addEventListener("toggle",this.#n.bind(this));this.source?.getBoundingClientRect();this.$overlay.style.setProperty("--pg-overlay-menu-_x","0px"),this.$overlay.style.setProperty("--pg-overlay-menu-_y","0px"),this.$menu.focus(0),this.#r=this.#o.bind(this),document.addEventListener("pointerdown",this.#r)}#i=(F(this,D),!1);#r;#o(e){this.#i=e.composedPath().includes(this.source)}#n(e){"closed"===e.newState&&0===T.length&&this.#i&&(console.log(e),this.source?.focus())}disconnectedCallback(){T.pop(),document.removeEventListener("pointerdown",this.#r)}#t(e){const{depth:t}=e.detail;console.log("close",t),1===t?this.close(null):this.close()}#e(e){e.detail.item.index=e.detail.index,this.close(e.detail.item),this.source?.focus()}});return t})();var D=n(374),U=function(e,t,n,r,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),h=!1,p=n.length-1;p>=0;p--){var m={};for(var f in r)m[f]="access"===f?{}:r[f];for(var f in r.access)m.access[f]=r.access[f];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var g=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],m);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=s(g.get))&&(u.get=a),(a=s(g.set))&&(u.set=a),(a=s(g.init))&&o.unshift(a)}else(a=s(g))&&("field"===l?o.unshift(a):u[c]=a)}d&&Object.defineProperty(d,r.name,u),h=!0},Z=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};(()=>{let e,t,n,r,o,i,s,a,l,c,d,u=[y({selector:"pg-menu-item-icon",style:D.A,template:'<button part="button"> <pg-icon part="icon"></pg-icon> <span part="label"></span> </button>'})],h=[],p=HTMLElement,m=[],f=[],g=[],v=[],b=[],w=[],x=[],S=[],$=[],L=[],C=[],P=[],O=[],A=[],j=[],R=[],F=[],M=[];(class extends p{static{t=this}static{const y="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0;n=[k()],r=[k()],o=[k()],i=[k()],s=[k()],a=[k()],l=[E()],c=[E()],d=[E()],U(null,null,n,{kind:"field",name:"index",static:!1,private:!1,access:{has:e=>"index"in e,get:e=>e.index,set:(e,t)=>{e.index=t}},metadata:y},m,f),U(null,null,r,{kind:"field",name:"icon",static:!1,private:!1,access:{has:e=>"icon"in e,get:e=>e.icon,set:(e,t)=>{e.icon=t}},metadata:y},g,v),U(null,null,o,{kind:"field",name:"label",static:!1,private:!1,access:{has:e=>"label"in e,get:e=>e.label,set:(e,t)=>{e.label=t}},metadata:y},b,w),U(null,null,i,{kind:"field",name:"checked",static:!1,private:!1,access:{has:e=>"checked"in e,get:e=>e.checked,set:(e,t)=>{e.checked=t}},metadata:y},x,S),U(null,null,s,{kind:"field",name:"disabled",static:!1,private:!1,access:{has:e=>"disabled"in e,get:e=>e.disabled,set:(e,t)=>{e.disabled=t}},metadata:y},$,L),U(null,null,a,{kind:"field",name:"items",static:!1,private:!1,access:{has:e=>"items"in e,get:e=>e.items,set:(e,t)=>{e.items=t}},metadata:y},C,P),U(null,null,l,{kind:"field",name:"$icon",static:!1,private:!1,access:{has:e=>"$icon"in e,get:e=>e.$icon,set:(e,t)=>{e.$icon=t}},metadata:y},O,A),U(null,null,c,{kind:"field",name:"$button",static:!1,private:!1,access:{has:e=>"$button"in e,get:e=>e.$button,set:(e,t)=>{e.$button=t}},metadata:y},j,R),U(null,null,d,{kind:"field",name:"$label",static:!1,private:!1,access:{has:e=>"$label"in e,get:e=>e.$label,set:(e,t)=>{e.$label=t}},metadata:y},F,M),U(null,e={value:t},u,{kind:"class",name:t.name,metadata:y},null,h),t=e.value,y&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y})}static delegatesFocus=!0;index=Z(this,m,void 0);icon=(Z(this,f),Z(this,g,"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"));label=(Z(this,v),Z(this,b,""));checked=(Z(this,w),Z(this,x,!1));disabled=(Z(this,S),Z(this,$,!1));items=(Z(this,L),Z(this,C,[]));$icon=(Z(this,P),Z(this,O,void 0));$button=(Z(this,A),Z(this,j,void 0));$label=(Z(this,R),Z(this,F,void 0));render(e){e.icon&&(this.$icon.path=this.icon),e.label&&(this.$label.textContent=this.label),e.disabled&&(this.$button.disabled=this.disabled),e.checked&&this.$button.classList.toggle("checked",this.checked),e.items&&this.$button.classList.toggle("more",this.items.length>0),e.checked&&!0===this.checked&&this.dispatchEvent(new CustomEvent("hasCheck",{bubbles:!0}))}connectedCallback(){this.$button.addEventListener("click",(async()=>{if(this.items.length>0){const e=await z.open({source:this.$button,x:0,y:0,value:this.items[0],items:this.items});null===e?this.focus():e?this.dispatchEvent(new CustomEvent("select",{detail:{item:e}})):this.dispatchEvent(new CustomEvent("close",{detail:{depth:-1}}))}else this.dispatchEvent(new CustomEvent("select",{detail:{index:this.index,item:this.items[this.index]}}))})),this.$button.addEventListener("keydown",(async e=>{switch(e.key){case"ArrowDown":this.dispatchEvent(new CustomEvent("down",{detail:{index:this.index}})),e.preventDefault();break;case"ArrowUp":this.dispatchEvent(new CustomEvent("up",{detail:{index:this.index}})),e.preventDefault();break;case"ArrowLeft":this.dispatchEvent(new CustomEvent("close",{detail:{depth:1}})),e.preventDefault();break;case"ArrowRight":if(this.items.length>0){const e=await z.open({source:this.$button,x:0,y:0,value:this.items[0],items:this.items});null===e?this.focus():e?this.dispatchEvent(new CustomEvent("select",{detail:{item:e}})):this.dispatchEvent(new CustomEvent("close",{detail:{depth:-1}}))}e.preventDefault();break;case"Escape":this.dispatchEvent(new CustomEvent("close",{detail:{depth:-1}})),e.preventDefault()}}))}focus(){this.$button.focus()}getHeight(){return this.$label.getBoundingClientRect().height}constructor(){super(...arguments),Z(this,M)}static{Z(t,h)}})})()})();
|
package/pgModalAlert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&s[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},521:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(601),o=n.n(r),a=n(314),s=n.n(a)()(o());s.push([e.id,".backdrop {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.6);\n justify-content: center;\n align-items: center;\n}\n.dialog {\n background: #fff;\n border-radius: 0.5rem;\n box-shadow: 0 1px 1rem rgba(0, 0, 0, 0.5);\n overflow: hidden;\n min-width: 15rem;\n}\nheader {\n border-bottom: 1px solid #ccc;\n background: #f1f1f1;\n padding: 0.75rem 1rem;\n}\nheader h2 {\n font-size: 1.25rem;\n margin: 0;\n font-weight: normal;\n}\nmain {\n padding: 0.5rem 1rem;\n}\nfooter {\n display: flex;\n flex-direction: row;\n padding: 0.75rem 1rem;\n border-top: 1px solid #ccc;\n background: #f1f1f1;\n justify-content: flex-end;\n gap: 0.5rem;\n}",""]);var i=new CSSStyleSheet;i.replaceSync(s.toString());const l=i},601:e=>{e.exports=function(e){return e[1]}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=Symbol("addObserver"),o=Symbol("removeObserver"),a=Symbol("getObservers"),s=Symbol("isProxy"),i=Symbol("getTarget"),l=["fill","pop","push","reverse","shift","sort","splice","unshift"],c=new Map;function d(e){return new Proxy(e,{get(t,n){if("symbol"==typeof n){switch(n){case s:return!0;case i:return t;case a:return c.has(e);case r:return(t,n)=>{c.has(e)?c.get(e).has(t)?c.get(e).get(t).push(n):c.get(e).set(t,[n]):c.set(e,new Map([[t,[n]]]))};case o:return t=>{c.has(e)&&(c.get(e).delete(t),0===c.get(e).size&&c.delete(e))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(t,n)}throw new Error("Unsupported symbol")}if(n in t){if(!Number.isNaN(Number(n)))return"object"==typeof t[n]?d(t[n]):t[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(l.includes(n))return c.has(t)?function(){const e=Array.prototype[n].apply(t,arguments);return c.get(t).forEach(((e,r)=>{e.forEach((e=>{e(t,n,arguments)}))})),e}:Reflect.get(t,n);if(t[n]instanceof Array)return d(t[n])}return Reflect.get(t,n)},set(e,t,n){if("symbol"==typeof t)throw new Error("Setting symbols not allowed.");if(Array.isArray(e))return Reflect.set(e,t,n);if(c.has(e)){c.get(e).forEach(((e,r)=>{e.forEach((e=>{e(t,n)}))}))}return Reflect.set(e,t,n)}})}window.observers=c;class PropError extends Error{constructor(e,t){super(e),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}}Symbol("index");const h=Symbol("init"),u=Symbol("template"),p=Symbol("style"),f=Symbol("parent");function m(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function y(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function g(e={}){return function(t,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,o;Reflect.defineProperty(t,"name",{value:e.selector,writable:!1,configurable:!1}),!t.prototype[f]||t.prototype[f][t.prototype[f].length-1]instanceof Object.getPrototypeOf(t)?t.prototype instanceof HTMLElement&&(t.prototype[f]=[t.prototype],t.prototype[p]=e.style?[e.style]:[],t.prototype[u]=e.template||""):(t.prototype[f].push(t.prototype),t.prototype[p].push(e.style),t.prototype[u]=(r=t.prototype[u],(o=e.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,r):`${r}${o||""}`));const a=t.prototype.connectedCallback||(()=>{}),s=t.prototype.disconnectedCallback||(()=>{});t.prototype.connectedCallback=function(){if(this[h]||void 0!==e.template||void 0!==e.style)if(this[h]){if(this[h]&&e.style);else if(this[h]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=t.prototype[u]||"";const n=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=t.prototype[p].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(n)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&n.add(e.localName);const r=Array.from(n.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),o=()=>{this[f].map((e=>{e.render&&e.render.call(this,t.observedAttributes?t.observedAttributes.reduce(((e,t)=>(e[y(t)]=!0,e)),{}):{})}))};0===r.length?(this[h]=!0,a.call(this),o()):Promise.all(r).then((()=>{this[h]=!0,a.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));o()}))},t.prototype.disconnectedCallback=function(){s.call(this)},t.prototype.attributeChangedCallback=function(e,t,n){this[y(e)]=n},n.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${n.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,t)}}))}}Symbol("transmute");function b(e){return!!e&&e.constructor===Array}function v(e,t){e[h]&&e[f].map((n=>{n.render&&n.render.call(e,{[t]:!0})}))}function w(e){return null===e?"null":b(e)?"array":typeof e}function S(e){return function(t,n){const r=n.name,o=Symbol(r),l=Symbol(`${r}:type`),c=Symbol(`${r}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[l]||"array"===this[l]?this[o][s]?this[o]:d(this[o]):this[o],set:t=>{const n=w(e?e(t):t);if("index"!==r&&this[l]!==n&&"null"!==this[l]&&"null"!==n)throw new Error(`@Prop() ${r} with type '${this[l]}' cannot be set to ${n}.`);if("array"===this[l]){if(!b(t))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===t)throw new Error("Setting an array to itself is not allowed.");const e=d(this[o]);if(e[a]){const n=t[s]?(c=t)[s]&&c[i]:t;e.splice(0,this[o].length,...n)}else this[o]=t}else this[o]=e?e(t):t,v(this,r);var c}})})),function(t){if(void 0===t&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==t&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,n=m(r);t[r]||(e.observedAttributes.push(n),t[r]=o)}return this[l]=w(t),"array"===this[l]?(this[o]=t,new Proxy(t,{get:(e,t)=>t===E?this[c]:(console.log("errr???"),Reflect.get(this[o],t)),set:(e,t,n)=>{if(t===E)return this[c]=n,!0;const a=Reflect.set(e,t,n);return"length"===t&&this[o].length===n||v(this,r),this[o]=n,a}})):(this[o]=e?e(this.getAttribute(r)??t):this.getAttribute(r)??t,this[o])}}}function $(){return function(e,t){const n=t.name,r=n.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,n,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}}Symbol("hasProxy");const E=Symbol("meta");var x=n(521),k=function(e,t,n,r,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),u=!1,p=n.length-1;p>=0;p--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var y=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(i=s(y.get))&&(h.get=i),(i=s(y.set))&&(h.set=i),(i=s(y.init))&&o.unshift(i)}else(i=s(y))&&("field"===l?o.unshift(i):h[c]=i)}d&&Object.defineProperty(d,r.name,h),u=!0},P=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const O=new Set,A=new Map;const j=(()=>{let e,t,n=[g()],r=[],o=HTMLElement;(class extends o{static{t=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;k(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,r),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),P(t,r)}static open(e={}){var t=document.createElement(this.name);return Object.assign(t,e),document.body.appendChild(t),O.add(t),new Promise((e=>{A.set(t,e)}))}close(e){this.remove(),O.delete(this);const t=A.get(this);t&&t(e),A.delete(this)}});return t})();var T=function(e,t,n,r,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),u=!1,p=n.length-1;p>=0;p--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var y=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(i=s(y.get))&&(h.get=i),(i=s(y.set))&&(h.set=i),(i=s(y.init))&&o.unshift(i)}else(i=s(y))&&("field"===l?o.unshift(i):h[c]=i)}d&&Object.defineProperty(d,r.name,h),u=!0},C=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};(()=>{let e,t,n,r,o,a,s,i,l,c=[g({selector:"pg-modal-alert",template:'<div class="backdrop"> <div class="dialog" role="dialog" id="dialog1" aria-labelledby="dialog1_label" aria-modal="true"> <header part="header"> <h2 id="dialog1_label" class="dialog_label" part="headerText"> Add Delivery Address </h2> </header> <main> <p part="message"></p> </main> <footer> <pg-button part="no">No</pg-button> <pg-button part="yes">Yes</pg-button> </footer> </div> </div>',style:x.A})],d=[],h=j,u=[],p=[],f=[],m=[],y=[],b=[],v=[],w=[],E=[],k=[],P=[],O=[],A=[],R=[];(class extends h{static{t=this}static{const g="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;n=[S()],r=[S()],o=[$()],a=[$()],s=[$()],i=[$()],l=[$()],T(null,null,n,{kind:"field",name:"header",static:!1,private:!1,access:{has:e=>"header"in e,get:e=>e.header,set:(e,t)=>{e.header=t}},metadata:g},u,p),T(null,null,r,{kind:"field",name:"message",static:!1,private:!1,access:{has:e=>"message"in e,get:e=>e.message,set:(e,t)=>{e.message=t}},metadata:g},f,m),T(null,null,o,{kind:"field",name:"$header",static:!1,private:!1,access:{has:e=>"$header"in e,get:e=>e.$header,set:(e,t)=>{e.$header=t}},metadata:g},y,b),T(null,null,a,{kind:"field",name:"$headerText",static:!1,private:!1,access:{has:e=>"$headerText"in e,get:e=>e.$headerText,set:(e,t)=>{e.$headerText=t}},metadata:g},v,w),T(null,null,s,{kind:"field",name:"$message",static:!1,private:!1,access:{has:e=>"$message"in e,get:e=>e.$message,set:(e,t)=>{e.$message=t}},metadata:g},E,k),T(null,null,i,{kind:"field",name:"$yes",static:!1,private:!1,access:{has:e=>"$yes"in e,get:e=>e.$yes,set:(e,t)=>{e.$yes=t}},metadata:g},P,O),T(null,null,l,{kind:"field",name:"$no",static:!1,private:!1,access:{has:e=>"$no"in e,get:e=>e.$no,set:(e,t)=>{e.$no=t}},metadata:g},A,R),T(null,e={value:t},c,{kind:"class",name:t.name,metadata:g},null,d),t=e.value,g&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g}),C(t,d)}header=C(this,u,"Are you sure?");message=(C(this,p),C(this,f,"Are you sure?"));$header=(C(this,m),C(this,y,void 0));$headerText=(C(this,b),C(this,v,void 0));$message=(C(this,w),C(this,E,void 0));$yes=(C(this,k),C(this,P,void 0));$no=(C(this,O),C(this,A,void 0));#e=C(this,R);connectedCallback(){this.$yes.addEventListener("click",this.#t.bind(this)),this.$no.addEventListener("click",this.#n.bind(this)),this.#e??=this.#r.bind(this),document.addEventListener("keydown",this.#e)}disconnectedCallback(){document.removeEventListener("keydown",this.#e)}#r(e){"Escape"===e.key&&this.close(null)}#t(){this.close(!0)}#n(){this.close(!1)}render(e){e.header&&(this.$headerText.innerText=this.header),e.message&&(this.$message.innerText=this.message)}})})()})();
|
|
1
|
+
(()=>{"use strict";var e={314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);r&&s[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},521:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(601),o=n.n(r),a=n(314),s=n.n(a)()(o());s.push([e.id,".backdrop {\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.6);\n justify-content: center;\n align-items: center;\n}\n.dialog {\n background: #fff;\n border-radius: 0.5rem;\n box-shadow: 0 1px 1rem rgba(0, 0, 0, 0.5);\n overflow: hidden;\n min-width: 15rem;\n}\nheader {\n border-bottom: 1px solid #ccc;\n background: #f1f1f1;\n padding: 0.75rem 1rem;\n}\nheader h2 {\n font-size: 1.25rem;\n margin: 0;\n font-weight: normal;\n}\nmain {\n padding: 0.5rem 1rem;\n}\nfooter {\n display: flex;\n flex-direction: row;\n padding: 0.75rem 1rem;\n border-top: 1px solid #ccc;\n background: #f1f1f1;\n justify-content: flex-end;\n gap: 0.5rem;\n}",""]);var i=new CSSStyleSheet;i.replaceSync(s.toString());const l=i},601:e=>{e.exports=function(e){return e[1]}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={id:r,exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=Symbol("addObserver"),o=Symbol("removeObserver"),a=Symbol("getObservers"),s=Symbol("swapObserver"),i=Symbol("isProxy"),l=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],d=new Map;function h(e){return new Proxy(e,{get(t,n){if("symbol"==typeof n){switch(n){case i:return!0;case l:return t;case a:return d.has(e);case s:return(t,n)=>{const r=d.get(e);r.forEach(((o,a)=>{if(a.getRootNode().host===t){const t=r.get(a);d.has(n)?d.get(n).has(a)?d.get(n).get(a).push(r.get(a)):d.get(n).set(a,r.get(a)):d.set(n,new Map([[a,t]])),d.delete(e),t.forEach((e=>{e(null,p.swap,[n])}))}}))};case r:return(t,n)=>{d.has(e)?d.get(e).has(t)?d.get(e).get(t).push(n):d.get(e).set(t,[n]):d.set(e,new Map([[t,[n]]]))};case o:return t=>{d.has(e)&&(d.get(e).delete(t),0===d.get(e).size&&d.delete(e))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(t,n)}throw new Error("Unsupported symbol")}if(n in t){if(!Number.isNaN(Number(n)))return"object"==typeof t[n]?h(t[n]):t[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(c.includes(n))return d.has(t)?function(){const e=Array.prototype[n].apply(t,arguments);return d.get(t).forEach(((e,r)=>{e.forEach((e=>{e(t,n,arguments)}))})),e}:Reflect.get(t,n);if(t[n]instanceof Array)return h(t[n])}return Reflect.get(t,n)},set(e,t,n){if("symbol"==typeof t)throw new Error("Setting symbols not allowed.");if(Array.isArray(e))return Reflect.set(e,t,n);if(d.has(e)){d.get(e).forEach(((e,r)=>{e.forEach((e=>{e(t,n)}))}))}return Reflect.set(e,t,n)}})}window.observers=d;const p={fill:"fill",pop:"pop",push:"push",reverse:"reverse",shift:"shift",sort:"sort",splice:"splice",unshift:"unshift",swap:"swap"};class PropError extends Error{constructor(e,t){super(e),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}}Symbol("index");const u=Symbol("init"),f=Symbol("template"),m=Symbol("style"),y=Symbol("parent");function g(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function b(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function v(e={}){return function(t,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,o;Reflect.defineProperty(t,"name",{value:e.selector,writable:!1,configurable:!1}),!t.prototype[y]||t.prototype[y][t.prototype[y].length-1]instanceof Object.getPrototypeOf(t)?t.prototype instanceof HTMLElement&&(t.prototype[y]=[t.prototype],t.prototype[m]=e.style?[e.style]:[],t.prototype[f]=e.template||""):(t.prototype[y].push(t.prototype),t.prototype[m].push(e.style),t.prototype[f]=(r=t.prototype[f],(o=e.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,r):`${r}${o||""}`));const a=t.prototype.connectedCallback||(()=>{}),s=t.prototype.disconnectedCallback||(()=>{});t.prototype.connectedCallback=function(){if(this[u]||void 0!==e.template||void 0!==e.style)if(this[u]){if(this[u]&&e.style);else if(this[u]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=t.prototype[f]||"";const n=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=t.prototype[m].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(n)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&n.add(e.localName);const r=Array.from(n.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),o=()=>{this[y].map((e=>{e.render&&e.render.call(this,t.observedAttributes?t.observedAttributes.reduce(((e,t)=>(e[b(t)]=!0,e)),{}):{})}))};0===r.length?(this[u]=!0,a.call(this),o()):Promise.all(r).then((()=>{this[u]=!0,a.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));o()}))},t.prototype.disconnectedCallback=function(){s.call(this)},t.prototype.attributeChangedCallback=function(e,t,n){this[b(e)]=n},n.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${n.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,t)}}))}}Symbol("transmute");function w(e){return!!e&&e.constructor===Array}function S(e,t){e[u]&&e[y].map((n=>{n.render&&n.render.call(e,{[t]:!0})}))}function E(e){return null===e?"null":w(e)?"array":typeof e}function $(e){return function(t,n){const r=n.name,o=Symbol(r),c=Symbol(`${r}:type`),d=Symbol(`${r}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[c]||"array"===this[c]?this[o][i]?this[o]:h(this[o]):this[o],set:t=>{const n=E(e?e(t):t);if("index"!==r&&this[c]!==n&&"null"!==this[c]&&"null"!==n)throw new Error(`@Prop() ${r} with type '${this[c]}' cannot be set to ${n}.`);if("array"===this[c]){if(!w(t))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===t)throw new Error("Setting an array to itself is not allowed.");const e=h(this[o]);if(e[a]){const n=t[i]?t[l]:t;e[s](this,n),this[o]=t,console.log(">>> trigger render???",this,r)}else this[o]=t}else this[o]=e?e(t):t,S(this,r)}})})),function(t){if(void 0===t&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==t&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,n=g(r);t[r]||(e.observedAttributes.push(n),t[r]=o)}return this[c]=E(t),"array"===this[c]?(this[o]=t,new Proxy(t,{get:(e,t)=>t===k?this[d]:(console.log("errr???"),Reflect.get(this[o],t)),set:(e,t,n)=>{if(t===k)return this[d]=n,!0;const a=Reflect.set(e,t,n);return"length"===t&&this[o].length===n||S(this,r),this[o]=n,a}})):(this[o]=e?e(this.getAttribute(r)??t):this.getAttribute(r)??t,this[o])}}}function x(){return function(e,t){const n=t.name,r=n.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,n,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}}Symbol("hasProxy");const k=Symbol("meta");var P=n(521),O=function(e,t,n,r,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p=!1,u=n.length-1;u>=0;u--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var y=(0,n[u])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(i=s(y.get))&&(h.get=i),(i=s(y.set))&&(h.set=i),(i=s(y.init))&&o.unshift(i)}else(i=s(y))&&("field"===l?o.unshift(i):h[c]=i)}d&&Object.defineProperty(d,r.name,h),p=!0},A=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const j=new Set,T=new Map;const C=(()=>{let e,t,n=[v()],r=[],o=HTMLElement;(class extends o{static{t=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;O(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,r),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),A(t,r)}static open(e={}){var t=document.createElement(this.name);return Object.assign(t,e),document.body.appendChild(t),j.add(t),new Promise((e=>{T.set(t,e)}))}close(e){this.remove(),j.delete(this);const t=T.get(this);t&&t(e),T.delete(this)}});return t})();var R=function(e,t,n,r,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?r.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),p=!1,u=n.length-1;u>=0;u--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var y=(0,n[u])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(i=s(y.get))&&(h.get=i),(i=s(y.set))&&(h.set=i),(i=s(y.init))&&o.unshift(i)}else(i=s(y))&&("field"===l?o.unshift(i):h[c]=i)}d&&Object.defineProperty(d,r.name,h),p=!0},z=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};(()=>{let e,t,n,r,o,a,s,i,l,c=[v({selector:"pg-modal-alert",template:'<div class="backdrop"> <div class="dialog" role="dialog" id="dialog1" aria-labelledby="dialog1_label" aria-modal="true"> <header part="header"> <h2 id="dialog1_label" class="dialog_label" part="headerText"> Add Delivery Address </h2> </header> <main> <p part="message"></p> </main> <footer> <pg-button part="no">No</pg-button> <pg-button part="yes">Yes</pg-button> </footer> </div> </div>',style:P.A})],d=[],h=C,p=[],u=[],f=[],m=[],y=[],g=[],b=[],w=[],S=[],E=[],k=[],O=[],A=[],j=[];(class extends h{static{t=this}static{const v="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;n=[$()],r=[$()],o=[x()],a=[x()],s=[x()],i=[x()],l=[x()],R(null,null,n,{kind:"field",name:"header",static:!1,private:!1,access:{has:e=>"header"in e,get:e=>e.header,set:(e,t)=>{e.header=t}},metadata:v},p,u),R(null,null,r,{kind:"field",name:"message",static:!1,private:!1,access:{has:e=>"message"in e,get:e=>e.message,set:(e,t)=>{e.message=t}},metadata:v},f,m),R(null,null,o,{kind:"field",name:"$header",static:!1,private:!1,access:{has:e=>"$header"in e,get:e=>e.$header,set:(e,t)=>{e.$header=t}},metadata:v},y,g),R(null,null,a,{kind:"field",name:"$headerText",static:!1,private:!1,access:{has:e=>"$headerText"in e,get:e=>e.$headerText,set:(e,t)=>{e.$headerText=t}},metadata:v},b,w),R(null,null,s,{kind:"field",name:"$message",static:!1,private:!1,access:{has:e=>"$message"in e,get:e=>e.$message,set:(e,t)=>{e.$message=t}},metadata:v},S,E),R(null,null,i,{kind:"field",name:"$yes",static:!1,private:!1,access:{has:e=>"$yes"in e,get:e=>e.$yes,set:(e,t)=>{e.$yes=t}},metadata:v},k,O),R(null,null,l,{kind:"field",name:"$no",static:!1,private:!1,access:{has:e=>"$no"in e,get:e=>e.$no,set:(e,t)=>{e.$no=t}},metadata:v},A,j),R(null,e={value:t},c,{kind:"class",name:t.name,metadata:v},null,d),t=e.value,v&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:v}),z(t,d)}header=z(this,p,"Are you sure?");message=(z(this,u),z(this,f,"Are you sure?"));$header=(z(this,m),z(this,y,void 0));$headerText=(z(this,g),z(this,b,void 0));$message=(z(this,w),z(this,S,void 0));$yes=(z(this,E),z(this,k,void 0));$no=(z(this,O),z(this,A,void 0));#e=z(this,j);connectedCallback(){this.$yes.addEventListener("click",this.#t.bind(this)),this.$no.addEventListener("click",this.#n.bind(this)),this.#e??=this.#r.bind(this),document.addEventListener("keydown",this.#e)}disconnectedCallback(){document.removeEventListener("keydown",this.#e)}#r(e){"Escape"===e.key&&this.close(null)}#t(){this.close(!0)}#n(){this.close(!1)}render(e){e.header&&(this.$headerText.innerText=this.header),e.message&&(this.$message.innerText=this.message)}})})()})();
|
package/pgModification.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(a[s]=!0)}for(var p=0;p<t.length;p++){var d=[].concat(t[p]);o&&a[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),e.push(d))}},e}},601:t=>{t.exports=function(t){return t[1]}},857:(t,e,n)=>{n.d(e,{A:()=>s});var o=n(601),i=n.n(o),r=n(314),a=n.n(r)()(i());a.push([t.id,":host {\n pointer-events: none;\n}\n\n[part~=tooltip] {\n position: relative;\n}\n\n[part~=tooltipText] {\n position: absolute;\n background: #737E9E;\n border-radius: 0.25rem;\n color: #FFF;\n padding: 0.15rem 0.5rem 0.3rem 0.5rem;\n white-space: nowrap;\n left: 0;\n top: 0;\n}\n\n[part~=tooltipArrow] {\n left: 16px;\n top: -7px;\n}\n\n[part~=tooltipArrow],\n[part~=tooltipArrow]::before {\n position: absolute;\n width: 10px;\n height: 10px;\n}\n\n[part~=tooltipArrow]::before {\n content: '';\n transform: rotate(45deg);\n background: #737E9E;\n}",""]);var c=new CSSStyleSheet;c.replaceSync(a.toString());const s=c},947:(t,e,n)=>{n.d(e,{A:()=>s});var o=n(601),i=n.n(o),r=n(314),a=n.n(r)()(i());a.push([t.id,':host {\n display: flex;\n flex-direction: column;\n color: #453C4F;\n}\n\n.invalid {\n color: #721c24;\n background-color: #f8d7da;\n border-color: #f5c6cb;\n}\n\nh2 {\n font-weight: normal;\n font-size: 1.25rem;\n margin: 0.5rem 0 0.5rem 0;\n}\n\n/* Individual Templates */\n\n[part="news"] {\n display: grid;\n grid-template-columns: 3.5rem 1fr;\n grid-template-rows: 3.25rem auto;\n padding: 0.25rem;\n}\n[part="news"] [part="avatar"] {\n grid-column: 1;\n}\n[part="news"] [part="label"] {\n grid-column: 1;\n grid-row: 2;\n text-align: center;\n padding-right: 0.5rem;\n}\n[part="news"] [part="markdown"] {\n grid-column: 2;\n grid-row: 1 / span 2;\n border: 1px solid #DDD;\n padding: 0 1rem;\n background: #fff;\n border-radius: 0.25rem;\n}\n\n[part="iconCreated"],\n[part="iconRenamed"],\n[part="iconDeleted"],\n[part="iconAliasCreated"],\n[part="iconAliasDeleted"],\n[part="iconTagCreated"],\n[part="iconTagDeleted"],\n[part="iconAuthorModified"],\n[part="iconDeprecated"] {\n display: grid;\n grid-template-columns: 3.5rem 3.5rem 1fr auto auto;\n padding: 0.25rem;\n}\n[part="iconCreated"] [part="avatar"],\n[part="iconModified"] [part="avatar"],\n[part="iconRenamed"] [part="avatar"],\n[part="iconDeleted"] [part="avatar"],\n[part="iconAliasCreated"] [part="avatar"],\n[part="iconAliasDeleted"] [part="avatar"],\n[part="iconTagCreated"] [part="avatar"],\n[part="iconTagDeleted"] [part="avatar"],\n[part="iconAuthorModified"] [part="avatar"],\n[part="iconDeprecated"] [part="avatar"] {\n grid-column: 1;\n}\n[part="iconCreated"] [part="icon"],\n[part="iconModified"] [part="iconDataBefore"],\n[part="iconModified"] [part="iconDataAfter"],\n[part="iconRenamed"] [part="icon"],\n[part="iconDeleted"] [part="icon"],\n[part="iconAliasCreated"] [part="icon"],\n[part="iconAliasDeleted"] [part="icon"],\n[part="iconTagCreated"] [part="icon"],\n[part="iconTagDeleted"] [part="icon"],\n[part="iconAuthorModified"] [part="icon"],\n[part="iconDeprecated"] [part="icon"] {\n grid-column: 2;\n --pg-icon-width: 3rem;\n --pg-icon-height: 3rem;\n width: 3rem;\n border: 1px solid #ddd;\n background: #fff;\n border-radius: 0.25rem;\n align-self: flex-start;\n}\n[part="iconCreated"] [part="content"],\n[part="iconModified"] [part="content"],\n[part="iconRenamed"] [part="content"],\n[part="iconDeleted"] [part="content"],\n[part="iconAliasCreated"] [part="content"],\n[part="iconAliasDeleted"] [part="content"],\n[part="iconTagCreated"] [part="content"],\n[part="iconTagDeleted"] [part="content"],\n[part="iconAuthorModified"] [part="content"],\n[part="iconDeprecated"] [part="content"] {\n grid-column: 3;\n align-content: center;\n display: flex;\n align-items: center;\n}\n[part="iconCreated"] [part="content"] code,\n[part="iconModified"] [part="content"] code,\n[part="iconRenamed"] [part="content"] code,\n[part="iconDeleted"] [part="content"] code,\n[part="iconAliasCreated"] [part="content"] code,\n[part="iconAliasDeleted"] [part="content"] code,\n[part="iconTagCreated"] [part="content"] code,\n[part="iconTagDeleted"] [part="content"] code,\n[part="iconAuthorModified"] [part="content"] code,\n[part="iconDeprecated"] [part="content"] code {\n display: inline-block;\n background: rgba(0, 0, 0, 0.05);\n padding: 0.125rem 0.25rem;\n border-radius: 0.125rem;\n text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);\n border: 1px solid rgba(69, 60, 79, 0.2);\n line-height: 1.125rem;\n}\n[part="iconCreated"] [part="issue"],\n[part="iconModified"] [part="issue"],\n[part="iconRenamed"] [part="issue"],\n[part="iconDeleted"] [part="issue"],\n[part="iconAliasCreated"] [part="issue"],\n[part="iconAliasDeleted"] [part="issue"],\n[part="iconTagCreated"] [part="issue"],\n[part="iconTagDeleted"] [part="issue"],\n[part="iconDescriptionModified"] [part="issue"],\n[part="iconAuthorModified"] [part="issue"],\n[part="iconDeprecated"] [part="issue"] {\n grid-column: 4;\n display: flex;\n align-self: center;\n text-decoration: none;\n padding: 0.25rem 0.5rem;\n border: 1px solid #453C4F;\n color: #453C4F;\n border-radius: 0.25rem;\n}\n[part="iconCreated"] [part="issue"]:hover,\n[part="iconModified"] [part="issue"]:hover,\n[part="iconRenamed"] [part="issue"]:hover,\n[part="iconDeleted"] [part="issue"]:hover,\n[part="iconAliasCreated"] [part="issue"]:hover,\n[part="iconAliasDeleted"] [part="issue"]:hover,\n[part="iconTagCreated"] [part="issue"]:hover,\n[part="iconTagDeleted"] [part="issue"]:hover,\n[part="iconDescriptionModified"] [part="issue"]:hover,\n[part="iconAuthorModified"] [part="issue"]:hover,\n[part="iconDeprecated"] [part="issue"]:hover {\n background: #453C4F;\n color: #fff;\n}\n.edit [part="iconCreated"] [part="edit"],\n.edit [part="iconModified"] [part="edit"],\n.edit [part="iconRenamed"] [part="edit"],\n.edit [part="iconDeleted"] [part="edit"],\n.edit [part="iconAliasCreated"] [part="edit"],\n.edit [part="iconAliasDeleted"] [part="edit"],\n.edit [part="iconTagCreated"] [part="edit"],\n.edit [part="iconTagDeleted"] [part="edit"],\n.edit [part="iconDescriptionModified"] [part="edit"],\n.edit [part="iconAuthorModified"] [part="edit"],\n.edit [part="iconDeprecated"] [part="edit"] {\n display: flex;\n}\n[part="iconCreated"] [part="edit"],\n[part="iconModified"] [part="edit"],\n[part="iconRenamed"] [part="edit"],\n[part="iconDeleted"] [part="edit"],\n[part="iconAliasCreated"] [part="edit"],\n[part="iconAliasDeleted"] [part="edit"],\n[part="iconTagCreated"] [part="edit"],\n[part="iconTagDeleted"] [part="edit"],\n[part="iconDescriptionModified"] [part="edit"],\n[part="iconAuthorModified"] [part="edit"],\n[part="iconDeprecated"] [part="edit"] {\n display: none;\n grid-column: 5;\n align-self: center;\n padding: 0.25rem;\n border: 0;\n border-radius: 0.25rem;\n margin-left: 0.5rem;\n cursor: pointer;\n}\n[part="iconCreated"] [part="edit"]:hover,\n[part="iconModified"] [part="edit"]:hover,\n[part="iconRenamed"] [part="edit"]:hover,\n[part="iconDeleted"] [part="edit"]:hover,\n[part="iconAliasCreated"] [part="edit"]:hover,\n[part="iconAliasDeleted"] [part="edit"]:hover,\n[part="iconTagCreated"] [part="edit"]:hover,\n[part="iconTagDeleted"] [part="edit"]:hover,\n[part="iconDescriptionModified"] [part="edit"]:hover,\n[part="iconAuthorModified"] [part="edit"]:hover,\n[part="iconDeprecated"] [part="edit"]:hover {\n background: #453C4F;\n --pg-icon-color: #fff;\n}\n\n/* Individiual Tweaks */\n[part="iconCreated"] [part="icon"] {\n background: #d1e7dd;\n border-color: #badbcc;\n}\n\n[part="iconRenamed"] [part="icon"] {\n background-color: #fff3cd;\n border-color: #ffecb5;\n}\n\n[part="iconDeleted"] [part="icon"] {\n background: #f5c6cb;\n border-color: #d06e78;\n}\n\n[part="iconModified"] {\n display: grid;\n grid-template-columns: 3.5rem 3.5rem 3.5rem 1fr auto auto;\n padding: 0.25rem;\n}\n[part="iconModified"] [part="iconDataBefore"] {\n opacity: 0.4;\n}\n[part="iconModified"] [part="iconDataAfter"] {\n grid-column: 3;\n}\n[part="iconModified"] [part="content"] {\n grid-column: 4;\n}\n[part="iconModified"] [part="issue"] {\n grid-column: 5;\n}\n[part="iconModified"] [part="edit"] {\n grid-column: 6;\n}\n\n[part="iconAliasCreated"] [part="icon"],\n[part="iconAliasDeleted"] [part="icon"] {\n background-color: #DDC6E7;\n border-color: 1px solid #DBBDE5;\n}\n\n[part="iconTagCreated"] [part="icon"],\n[part="iconTagDeleted"] [part="icon"] {\n background-color: #cff4fc;\n border-color: #b6effb;\n}\n\n[part="iconDescriptionModified"] {\n display: grid;\n grid-template-columns: 3.5rem 3.5rem 1fr 0.5rem 1fr auto;\n grid-template-rows: auto auto;\n padding: 0.25rem;\n}\n[part="iconDescriptionModified"] [part="avatar"] {\n grid-column: 1;\n grid-row: 1 / span 2;\n}\n[part="iconDescriptionModified"] [part="icon"] {\n grid-column: 2;\n grid-row: 1 / span 2;\n --pg-icon-width: 3rem;\n --pg-icon-height: 3rem;\n width: 3rem;\n border: 1px solid #ddd;\n background: #fff;\n border-radius: 0.25rem;\n align-self: flex-start;\n}\n[part="iconDescriptionModified"] [part="iconDescriptionBefore"] {\n grid-column: 3;\n grid-row: 1 / span 2;\n border: 1px solid #DDD;\n padding: 0 1rem;\n background: #fff;\n border-radius: 0.25rem;\n}\n[part="iconDescriptionModified"] [part="iconDescriptionAfter"] {\n grid-column: 5;\n grid-row: 1 / span 2;\n border: 1px solid #DDD;\n padding: 0 1rem;\n background: #fff;\n border-radius: 0.25rem;\n}\n[part="iconDescriptionModified"] [part="issue"] {\n grid-column: 6;\n grid-row: 1;\n margin-left: 0.5rem;\n}\n[part="iconDescriptionModified"] [part="edit"] {\n grid-column: 6;\n grid-row: 2;\n justify-content: center;\n margin-top: 0.25rem;\n}\n\n.added,\n.created {\n border-bottom: 3px solid #badbcc;\n}\n\n.removed,\n.deleted {\n border-bottom: 3px solid #f5c6cb;\n}',""]);var c=new CSSStyleSheet;c.replaceSync(a.toString());const s=c}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const o=Symbol("addObserver"),i=Symbol("removeObserver"),r=Symbol("getObservers"),a=Symbol("isProxy"),c=Symbol("getTarget"),s=["fill","pop","push","reverse","shift","sort","splice","unshift"],p=new Map;function d(t){return new Proxy(t,{get(e,n){if("symbol"==typeof n){switch(n){case a:return!0;case c:return e;case r:return p.has(t);case o:return(e,n)=>{p.has(t)?p.get(t).has(e)?p.get(t).get(e).push(n):p.get(t).set(e,[n]):p.set(t,new Map([[e,[n]]]))};case i:return e=>{p.has(t)&&(p.get(t).delete(e),0===p.get(t).size&&p.delete(t))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(e,n)}throw new Error("Unsupported symbol")}if(n in e){if(!Number.isNaN(Number(n)))return"object"==typeof e[n]?d(e[n]):e[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(s.includes(n))return p.has(e)?function(){const t=Array.prototype[n].apply(e,arguments);return p.get(e).forEach(((t,o)=>{t.forEach((t=>{t(e,n,arguments)}))})),t}:Reflect.get(e,n);if(e[n]instanceof Array)return d(e[n])}return Reflect.get(e,n)},set(t,e,n){if("symbol"==typeof e)throw new Error("Setting symbols not allowed.");if(Array.isArray(t))return Reflect.set(t,e,n);if(p.has(t)){p.get(t).forEach(((t,o)=>{t.forEach((t=>{t(e,n)}))}))}return Reflect.set(t,e,n)}})}window.observers=p;class PropError extends Error{constructor(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const l=Symbol("init"),u=Symbol("template"),f=Symbol("style"),h=Symbol("parent");function m(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function g(t){return t.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))}function v(t={}){return function(e,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var o,i;Reflect.defineProperty(e,"name",{value:t.selector,writable:!1,configurable:!1}),!e.prototype[h]||e.prototype[h][e.prototype[h].length-1]instanceof Object.getPrototypeOf(e)?e.prototype instanceof HTMLElement&&(e.prototype[h]=[e.prototype],e.prototype[f]=t.style?[t.style]:[],e.prototype[u]=t.template||""):(e.prototype[h].push(e.prototype),e.prototype[f].push(t.style),e.prototype[u]=(o=e.prototype[u],(i=t.template||null)&&i.match(/<parent\/>/)?i.replace(/<parent\/>/,o):`${o}${i||""}`));const r=e.prototype.connectedCallback||(()=>{}),a=e.prototype.disconnectedCallback||(()=>{});e.prototype.connectedCallback=function(){if(this[l]||void 0!==t.template||void 0!==t.style)if(this[l]){if(this[l]&&t.style);else if(this[l]&&t.selector&&!t.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===t.useShadow)throw new Error("unsupported");{const t=document.createElement("template");t.innerHTML=e.prototype[u]||"";const n=document.importNode(t.content,!0),o=this.attachShadow({mode:"open"});o.adoptedStyleSheets=e.prototype[f].map((t=>{if(t instanceof CSSStyleSheet)return t;var e=new CSSStyleSheet;return e.replaceSync(t.toString()),e})),o.appendChild(n)}}else!1===t.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const t of this.shadowRoot.querySelectorAll("*"))-1!==t.localName.indexOf("-")&&n.add(t.localName);const o=Array.from(n.values()).map((t=>customElements.get(t)?Promise.resolve():customElements.whenDefined(t))),i=()=>{this[h].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[g(e)]=!0,t)),{}):{})}))};0===o.length?(this[l]=!0,r.call(this),i()):Promise.all(o).then((()=>{this[l]=!0,r.call(this);for(const t of this.shadowRoot.querySelectorAll("slot"))t.dispatchEvent(new CustomEvent("slotchange"));i()}))},e.prototype.disconnectedCallback=function(){a.call(this)},e.prototype.attributeChangedCallback=function(t,e,n){this[g(t)]=n},n.addInitializer((function(){if(t.selector){if(window.customElements.get(t.selector))throw new Error(`@Component() ${n.name} duplicate selector '${t.selector}'`);window.customElements.define(t.selector,e)}}))}}Symbol("transmute");function b(t){return!!t&&t.constructor===Array}function w(t,e){t[l]&&t[h].map((n=>{n.render&&n.render.call(t,{[e]:!0})}))}function y(t){return null===t?"null":b(t)?"array":typeof t}function D(t){return function(e,n){const o=n.name,i=Symbol(o),s=Symbol(`${o}:type`),p=Symbol(`${o}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,o,{get:()=>"object"===this[s]||"array"===this[s]?this[i][a]?this[i]:d(this[i]):this[i],set:e=>{const n=y(t?t(e):e);if("index"!==o&&this[s]!==n&&"null"!==this[s]&&"null"!==n)throw new Error(`@Prop() ${o} with type '${this[s]}' cannot be set to ${n}.`);if("array"===this[s]){if(!b(e))throw new PropError(`Array "${o}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,o)?.set);if(this[i]===e)throw new Error("Setting an array to itself is not allowed.");const t=d(this[i]);if(t[r]){const n=e[a]?(p=e)[a]&&p[c]:e;t.splice(0,this[i].length,...n)}else this[i]=e}else this[i]=t?t(e):e,w(this,o);var p}})})),function(e){if(void 0===e&&"index"!==o)throw new Error(`@Prop() ${o} must have an initial value defined.`);if(void 0!==e&&"index"===o)throw new Error("@Prop() index must not have an initial value defined.");if(!0===e)throw new Error(`@Prop() ${o} boolean must initialize to false.`);if(!n.private){const{constructor:t}=this;t.observedAttributes??=[],t.symbols||(t.symbols={});const{symbols:e}=t,n=m(o);e[o]||(t.observedAttributes.push(n),e[o]=i)}return this[s]=y(e),"array"===this[s]?(this[i]=e,new Proxy(e,{get:(t,e)=>e===x?this[p]:(console.log("errr???"),Reflect.get(this[i],e)),set:(t,e,n)=>{if(e===x)return this[p]=n,!0;const r=Reflect.set(t,e,n);return"length"===e&&this[i].length===n||w(this,o),this[i]=n,r}})):(this[i]=t?t(this.getAttribute(o)??e):this.getAttribute(o)??e,this[i])}}}function A(){return function(t,e){const n=e.name,o=n.replace(/^\$/,"");e.addInitializer((function(){let t=null;Reflect.defineProperty(this,n,{get(){return t??(t=this.shadowRoot?.querySelector(`[part~=${o}]`))}})}))}}Symbol("hasProxy");const x=Symbol("meta");var I=n(947);class Alias{id;name;match=!1;constructor(t,e){void 0!==t&&(this.id=t),void 0!==e&&(this.name=e)}from(t){return void 0!==t.id&&(this.id=t.id),void 0!==t.name&&(this.name=t.name),this}to(){return{name:this.name}}}class User{id=null;github=null;name=null;base64=null;iconCount=null;description=null;website=null;sponsored=!1;sponsorship="";core=!1;from(t){return this.id=t.id,this.github=t.github,this.name=t.name,"string"==typeof t.base64&&(t.base64.match(/^data/)?this.base64=t.base64:this.base64=`data:image/png;base64,${t.base64}`),this.iconCount=t.iconCount,this.description=t.description,this.website=t.website,this.sponsored=t.sponsored,this.sponsorship=`https://github.com/users/${t.github}/sponsorship`,this.core=t.core,this}}class Tag{id;name;url;count;from(t){return void 0!==t.id&&(this.id=t.id),void 0!==t.name&&(this.name=t.name),void 0!==t.url&&(this.url=t.url),void 0!==t.count&&(this.count=t.count),this}to(){return{name:this.name,url:this.url,count:this.count}}}class Style{id;name;count=null;from(t){return this.id=t.id,this.name=t.name,this.count=t.count,this}}class FontIcon{id;codepoint;font;version;from(t){return this.id=t.id,this.codepoint=t.codepoint,this.font=t.font,this.version=t.version,this}to(){return{id:this.id,codepoint:this.codepoint,font:this.font,version:this.version}}}class Icon{id=null;packageId=null;baseIconId=null;name=null;description=null;data=null;user=null;version=null;aliases=[];tags=[];styles=[];published=!0;deprecated=!1;codepoint=null;fontIcons=[];fontIcon=null;constructor(t,e){this.name=t||null,this.data=e||null}from(t){return this.id=t.id,this.packageId=t.packageId,this.baseIconId=t.baseIconId,this.name=t.name,this.description=t.description,this.data=t.data,t.version&&(this.version=t.version),t.fontIcon&&(this.fontIcon=t.fontIcon),t.user&&(this.user=(new User).from(t.user)),t.aliases&&(this.aliases=t.aliases.map((t=>(new Alias).from(t)))),t.tags&&(this.tags=t.tags.map((t=>(new Tag).from(t)))),t.styles&&(this.styles=t.styles.map((t=>(new Style).from(t)))),"boolean"==typeof t.published&&(this.published=t.published),"boolean"==typeof t.deprecated&&(this.deprecated=t.deprecated),t.codepoint&&(this.codepoint=t.codepoint),t.fontIcons&&(this.fontIcons=t.fontIcons.map((t=>(new FontIcon).from(t)))),this}to(){const{id:t,name:e,description:n,data:o,version:i,fontIcon:r,packageId:a,baseIconId:c,aliases:s,tags:p}=this;return{id:t,name:e,description:n,data:o,version:i,fontIcon:r,packageId:a,baseIconId:c,aliases:s.map((t=>t.to())),tags:p.map((t=>t.to()))}}}class Modification{id;modificationId;packageId;user;icon;iconNameBefore;iconNameAfter;iconDescriptionBefore;iconDescriptionAfter;iconDataBefore;iconDataAfter;text;date;issue;isVisible;constructor(){}from(t){return this.id=t.id,this.modificationId=t.modificationId,this.packageId=t.packageId,this.user=(new User).from(t.user),this.icon=(new Icon).from(t.icon),this.iconNameBefore=t.iconNameBefore,this.iconNameAfter=t.iconNameAfter,this.iconDescriptionBefore=t.iconDescriptionBefore,this.iconDescriptionAfter=t.iconDescriptionAfter,this.iconDataBefore=t.iconDataBefore,this.iconDataAfter=t.iconDataAfter,this.text=t.text,this.date=t.date,this.issue=t.issue,this.isVisible=t.isVisible,this}}var C;!function(t){t.IconAliasCreated="691c8829-b1e7-11e7-bf5c-94188269ec50",t.IconAliasDeleted="f1f70a76-b975-11e9-8ca0-94188269ec50",t.IconCreated="AFFE875E-01BC-4A34-9BE3-27625A155B28",t.IconDeleted="B1CE1713-A18A-4E9D-9E26-D0B4E44A1FAC",t.IconModified="1506F66B-CC2A-4575-A20A-DC138628977A",t.IconRenamed="F7B6D49B-A86F-49AC-AF92-6B9D0DF6188B",t.IconTagCreated="a185a9e8-c192-11e7-bf5c-94188269ec50",t.IconTagDeleted="ffe6b5f6-b975-11e9-8ca0-94188269ec50",t.IconDescriptionModified="3c638179-c4ca-11e8-9f27-94188269ec50",t.IconAuthorModified="254591d0-b28e-11e9-8ca0-94188269ec50",t.WebfontPublished="66B9FA99-1FAA-4D8F-B87F-B6F3CA444624",t.News="B4DEB3A8-A146-4086-9D7B-B67842A9CCB8",t.IconDeprecated="f92f310f-bfed-11e9-8ca0-94188269ec50",t.IconWorkInProgress="e262be80-bfed-11e9-8ca0-94188269ec50",t.IconLive="f92f2ba6-bfed-11e9-8ca0-94188269ec50",t.IconPublished="e262b92e-bfed-11e9-8ca0-94188269ec50",t.Date="date"}(C||(C={}));var M=n(857);const T="top",S="top-start",E="top-end",k="right",$="right-start",B="right-end",N="bottom",R="bottom-start",L="bottom-end",P="left",F="left-start",O="left-end";var j=function(t,e,n,o,i,r){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var c,s=o.kind,p="getter"===s?"get":"setter"===s?"set":"value",d=!e&&t?o.static?t:t.prototype:null,l=e||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,f=n.length-1;f>=0;f--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(t){if(u)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(t||null))};var g=(0,n[f])("accessor"===s?{get:l.get,set:l.set}:l[p],h);if("accessor"===s){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(c=a(g.get))&&(l.get=c),(c=a(g.set))&&(l.set=c),(c=a(g.init))&&i.unshift(c)}else(c=a(g))&&("field"===s?i.unshift(c):l[p]=c)}d&&Object.defineProperty(d,o.name,l),u=!0},z=function(t,e,n){for(var o=arguments.length>2,i=0;i<e.length;i++)n=o?e[i].call(t,n):e[i].call(t);return o?n:void 0};const U={[S]:(t,e,n)=>({arrowTop:e-5,arrowLeft:n.width>t?Math.floor(t/2)-5:Math.floor(n.width/2)-5,left:n.left,top:n.top-e-10}),[T]:(t,e,n)=>({arrowTop:e-5,arrowLeft:Math.floor(t/2)-5,left:n.left-Math.floor((t-n.width)/2),top:n.top-e-10}),[E]:(t,e,n)=>({arrowTop:e-5,arrowLeft:n.width>t?t-Math.floor(t/2)-5:t-Math.floor(n.width/2)-5,left:n.left-t+n.width,top:n.top-e-10}),[$]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:-5,left:n.left+n.width+10,top:n.top}),[k]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:-5,left:n.left+n.width+10,top:n.top+Math.floor(n.height/2)-Math.floor(e/2)}),[B]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:-5,left:n.left+n.width+10,top:n.top+n.height-e}),[R]:(t,e,n)=>({arrowTop:-5,arrowLeft:n.width>t?Math.floor(t/2)-5:Math.floor(n.width/2)-5,left:n.left,top:n.top+n.height+e-20}),[N]:(t,e,n)=>({arrowTop:-5,arrowLeft:Math.floor(t/2)-5,left:n.left-Math.floor((t-n.width)/2),top:n.top+n.height+e-20}),[L]:(t,e,n)=>({arrowTop:-5,arrowLeft:n.width>t?t-Math.floor(t/2)-5:t-Math.floor(n.width/2)-5,left:n.left-t+n.width,top:n.top+n.height+e-20}),[F]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:t-5,left:n.left-t-10,top:n.top}),[P]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:t-5,left:n.left-t-10,top:n.top+Math.floor(n.height/2)-Math.floor(e/2)}),[O]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:t-5,left:n.left-t-10,top:n.top+n.height-e})};(()=>{let t,e,n,o,i,r,a,c,s,p=[v({selector:"pg-tooltip",style:M.A,template:'<div part="tooltip"> <span part="tooltipText"></span> <div part="tooltipArrow"></div> </div>'})],d=[],l=HTMLElement,u=[],f=[],h=[],m=[],g=[],b=[],w=[],y=[],x=[],I=[],C=[],T=[],S=[],E=[];(class extends l{static{e=this}static{const v="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;n=[D()],o=[D()],i=[D()],r=[D()],a=[A()],c=[A()],s=[A()],j(null,null,n,{kind:"field",name:"visible",static:!1,private:!1,access:{has:t=>"visible"in t,get:t=>t.visible,set:(t,e)=>{t.visible=e}},metadata:v},u,f),j(null,null,o,{kind:"field",name:"rect",static:!1,private:!1,access:{has:t=>"rect"in t,get:t=>t.rect,set:(t,e)=>{t.rect=e}},metadata:v},h,m),j(null,null,i,{kind:"field",name:"text",static:!1,private:!1,access:{has:t=>"text"in t,get:t=>t.text,set:(t,e)=>{t.text=e}},metadata:v},g,b),j(null,null,r,{kind:"field",name:"position",static:!1,private:!1,access:{has:t=>"position"in t,get:t=>t.position,set:(t,e)=>{t.position=e}},metadata:v},w,y),j(null,null,a,{kind:"field",name:"$tooltip",static:!1,private:!1,access:{has:t=>"$tooltip"in t,get:t=>t.$tooltip,set:(t,e)=>{t.$tooltip=e}},metadata:v},x,I),j(null,null,c,{kind:"field",name:"$tooltipText",static:!1,private:!1,access:{has:t=>"$tooltipText"in t,get:t=>t.$tooltipText,set:(t,e)=>{t.$tooltipText=e}},metadata:v},C,T),j(null,null,s,{kind:"field",name:"$tooltipArrow",static:!1,private:!1,access:{has:t=>"$tooltipArrow"in t,get:t=>t.$tooltipArrow,set:(t,e)=>{t.$tooltipArrow=e}},metadata:v},S,E),j(null,t={value:e},p,{kind:"class",name:e.name,metadata:v},null,d),e=t.value,v&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:v}),z(e,d)}visible=z(this,u,!1);rect=(z(this,f),z(this,h,null));text=(z(this,m),z(this,g,""));position=(z(this,b),z(this,w,N));$tooltip=(z(this,y),z(this,x,void 0));$tooltipText=(z(this,I),z(this,C,void 0));$tooltipArrow=(z(this,T),z(this,S,void 0));render(t){this.$tooltipText.textContent=this.text,this.style.position="absolute",t.visible&&(this.style.display=this.visible?"block":"none");const{width:e,height:n}=this.$tooltipText.getBoundingClientRect();let o=this.position;if(o in U||(o=N),this.rect){const{arrowLeft:t,arrowTop:i,left:r,top:a}=U[o](e,n,this.rect);this.style.left=`${r+window.scrollX}px`,this.style.top=`${a+window.scrollY}px`,this.$tooltipArrow.style.left=`${t}px`,this.$tooltipArrow.style.top=`${i}px`}}constructor(){super(...arguments),z(this,E)}})})();function q(t,e,n){t.addEventListener("mouseenter",(function(){t.dispatchEvent(new CustomEvent("tooltip",{detail:{visible:!0,rect:t.getBoundingClientRect(),text:e(),position:n??N},bubbles:!0,composed:!0}))})),t.addEventListener("mouseleave",(function(){t.dispatchEvent(new CustomEvent("tooltip",{detail:{visible:!1},bubbles:!0,composed:!0}))}))}var H=function(t,e,n,o,i,r){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var c,s=o.kind,p="getter"===s?"get":"setter"===s?"set":"value",d=!e&&t?o.static?t:t.prototype:null,l=e||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,f=n.length-1;f>=0;f--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(t){if(u)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(t||null))};var g=(0,n[f])("accessor"===s?{get:l.get,set:l.set}:l[p],h);if("accessor"===s){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(c=a(g.get))&&(l.get=c),(c=a(g.set))&&(l.set=c),(c=a(g.init))&&i.unshift(c)}else(c=a(g))&&("field"===s?i.unshift(c):l[p]=c)}d&&Object.defineProperty(d,o.name,l),u=!0},V=function(t,e,n){for(var o=arguments.length>2,i=0;i<e.length;i++)n=o?e[i].call(t,n):e[i].call(t);return o?n:void 0};const W={[C.News]:'<div part="news"> <pg-avatar part="avatar"></pg-avatar> <span part="label">News</span> <pg-markdown part="markdown"></pg-markdown> </div>',[C.IconCreated]:'<div part="iconCreated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Icon <code part="iconName"></code> <span class="created">created</span>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconModified]:'<div part="iconModified"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="iconDataBefore"></pg-icon> <pg-icon part="iconDataAfter"></pg-icon> <span part="content"> <span> Icon <code part="iconName"></code> modified. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconRenamed]:'<div part="iconRenamed"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Icon <code part="iconNameBefore"></code> renamed to <code part="iconNameAfter"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconDeleted]:'<div part="iconDeleted"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Icon <code part="iconName"></code> <span class="deleted">deleted</span>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconAliasCreated]:'<div part="iconAliasCreated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="added">Added</span> alias <code part="text"></code> to <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconAliasDeleted]:'<div part="iconAliasDeleted"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="removed">Removed</span> alias <code part="text"></code> from <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconTagCreated]:'<div part="iconTagCreated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="added">Added</span> tag <code part="text"></code> to <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconTagDeleted]:'<div part="iconTagDeleted"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="removed">Removed</span> tag <code part="text"></code> from <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconDescriptionModified]:'<div part="iconDescriptionModified"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <pg-markdown part="iconDescriptionBefore"></pg-markdown> <pg-markdown part="iconDescriptionAfter"></pg-markdown> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconAuthorModified]:'<div part="iconAuthorModified"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Author modified. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.IconDeprecated]:'<div part="iconDeprecated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Deprecated. Warning this icon will be removed in a future release. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[C.Date]:'<h2 part="text"></h2>'},Y=["January","February","March","April","May","June","July","August","September","October","November","December"];function J(t){const e=new Date(t),n=Y[e.getMonth()];return`${e.getFullYear()}-${n}-${e.getDate()}`}function Z(t){const e=[];let n="";return t.forEach(((t,o)=>{const i=function(t){const e=new Date(t);return`${Y[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}(t.date);n!==i&&(e.push((new Modification).from({id:`date-${J(t.date)}`,modificationId:C.Date,text:i,user:new User,icon:new Icon})),n=i),e.push(t)})),e}(()=>{let t,e,n,o,i,r,a=[v({selector:"pg-modification",style:I.A,template:'<div part="items"></div>'})],c=[],s=HTMLElement,p=[],d=[],l=[],u=[],f=[],h=[],m=[],g=[];(class extends s{static{e=this}static{const v="function"==typeof Symbol&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;n=[D()],o=[D()],i=[D()],r=[A()],H(null,null,n,{kind:"field",name:"modifications",static:!1,private:!1,access:{has:t=>"modifications"in t,get:t=>t.modifications,set:(t,e)=>{t.modifications=e}},metadata:v},p,d),H(null,null,o,{kind:"field",name:"edit",static:!1,private:!1,access:{has:t=>"edit"in t,get:t=>t.edit,set:(t,e)=>{t.edit=e}},metadata:v},l,u),H(null,null,i,{kind:"field",name:"github",static:!1,private:!1,access:{has:t=>"github"in t,get:t=>t.github,set:(t,e)=>{t.github=e}},metadata:v},f,h),H(null,null,r,{kind:"field",name:"$items",static:!1,private:!1,access:{has:t=>"$items"in t,get:t=>t.$items,set:(t,e)=>{t.$items=e}},metadata:v},m,g),H(null,t={value:e},a,{kind:"class",name:e.name,metadata:v},null,c),e=t.value,v&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:v}),V(e,c)}modifications=V(this,p,[]);edit=(V(this,d),V(this,l,!1));github=(V(this,u),V(this,f,""));$items=(V(this,h),V(this,m,void 0));render(t){t.modifications&&this.modifications&&function(t,e,n,o,i){const r=Array.from(t.children),a=r.map((t=>t.dataset.key)),c=e.map((t=>t[n]));e.forEach((e=>{if(!a.includes(e[n])){const i=o(e);return i instanceof DocumentFragment?i.children[0].dataset.key=e[n]:i.dataset.key=e[n],void t.appendChild(i)}{const t=r.find((t=>t.dataset.key===a[n]));if(e[n]===a[n])return void i(e,t)}})),r.forEach((t=>{c.includes(t.dataset.key)||t.remove()}))}(this.$items,Z(this.modifications),"id",(t=>{if(t.modificationId in W){const e=function(t,e){const n=document.createElement("template");n.innerHTML=t;const o=document.importNode(n.content,!0);for(const[t,n]of Object.entries(e)){const e=o.querySelector(`[part~="${t}"]`);if(e)for(const[t,o]of Object.entries(n))o instanceof Function?null===o()?e.removeAttribute(t):e.setAttribute(t,o()):e[t]=o}return o}(W[t.modificationId],{text:{innerText:t.text},markdown:{text:t.text},icon:{path:t.icon&&t.icon.data},iconName:{innerText:t.icon&&t.icon.name},iconNameBefore:{innerText:t.iconNameBefore},iconNameAfter:{innerText:t.iconNameAfter},iconDescriptionBefore:{text:t.iconDescriptionBefore},iconDescriptionAfter:{text:t.iconDescriptionAfter},iconDataBefore:{path:t.iconDataBefore},iconDataAfter:{path:t.iconDataAfter},avatar:{user:t.user},editIcon:{path:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"},issue:{style:t.issue?"":"display:none",innerText:t.issue?`#${t.issue}`:"",href:`https://github.com/${this.github}/issues/${t.issue}`}}),n=e.querySelector('[part="issue"]');n&&q(n,(()=>"View on GitHub"),L);const o=e.querySelector('[part="avatar"]');o&&q(o,(()=>t.user.name),R);const i=e.querySelector('[part="edit"]');return i&&i.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("edit",{detail:{modification:t}}))})),e}const e=document.createElement("div");return e.classList.add("invalid"),e.innerText=`Error: Unsupported modificationId with text: "${t.text}"`,e}),((t,e)=>{})),t.edit&&this.$items.classList.toggle("edit",this.edit)}addItem(t){const e=document.createElement("div");this.$items.appendChild(e)}constructor(){super(...arguments),V(this,g)}})})()})();
|
|
1
|
+
(()=>{"use strict";var t={314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var p=0;p<t.length;p++){var d=[].concat(t[p]);o&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),e.push(d))}},e}},601:t=>{t.exports=function(t){return t[1]}},857:(t,e,n)=>{n.d(e,{A:()=>c});var o=n(601),r=n.n(o),i=n(314),a=n.n(i)()(r());a.push([t.id,":host {\n pointer-events: none;\n}\n\n[part~=tooltip] {\n position: relative;\n}\n\n[part~=tooltipText] {\n position: absolute;\n background: #737E9E;\n border-radius: 0.25rem;\n color: #FFF;\n padding: 0.15rem 0.5rem 0.3rem 0.5rem;\n white-space: nowrap;\n left: 0;\n top: 0;\n}\n\n[part~=tooltipArrow] {\n left: 16px;\n top: -7px;\n}\n\n[part~=tooltipArrow],\n[part~=tooltipArrow]::before {\n position: absolute;\n width: 10px;\n height: 10px;\n}\n\n[part~=tooltipArrow]::before {\n content: '';\n transform: rotate(45deg);\n background: #737E9E;\n}",""]);var s=new CSSStyleSheet;s.replaceSync(a.toString());const c=s},947:(t,e,n)=>{n.d(e,{A:()=>c});var o=n(601),r=n.n(o),i=n(314),a=n.n(i)()(r());a.push([t.id,':host {\n display: flex;\n flex-direction: column;\n color: #453C4F;\n}\n\n.invalid {\n color: #721c24;\n background-color: #f8d7da;\n border-color: #f5c6cb;\n}\n\nh2 {\n font-weight: normal;\n font-size: 1.25rem;\n margin: 0.5rem 0 0.5rem 0;\n}\n\n/* Individual Templates */\n\n[part="news"] {\n display: grid;\n grid-template-columns: 3.5rem 1fr;\n grid-template-rows: 3.25rem auto;\n padding: 0.25rem;\n}\n[part="news"] [part="avatar"] {\n grid-column: 1;\n}\n[part="news"] [part="label"] {\n grid-column: 1;\n grid-row: 2;\n text-align: center;\n padding-right: 0.5rem;\n}\n[part="news"] [part="markdown"] {\n grid-column: 2;\n grid-row: 1 / span 2;\n border: 1px solid #DDD;\n padding: 0 1rem;\n background: #fff;\n border-radius: 0.25rem;\n}\n\n[part="iconCreated"],\n[part="iconRenamed"],\n[part="iconDeleted"],\n[part="iconAliasCreated"],\n[part="iconAliasDeleted"],\n[part="iconTagCreated"],\n[part="iconTagDeleted"],\n[part="iconAuthorModified"],\n[part="iconDeprecated"] {\n display: grid;\n grid-template-columns: 3.5rem 3.5rem 1fr auto auto;\n padding: 0.25rem;\n}\n[part="iconCreated"] [part="avatar"],\n[part="iconModified"] [part="avatar"],\n[part="iconRenamed"] [part="avatar"],\n[part="iconDeleted"] [part="avatar"],\n[part="iconAliasCreated"] [part="avatar"],\n[part="iconAliasDeleted"] [part="avatar"],\n[part="iconTagCreated"] [part="avatar"],\n[part="iconTagDeleted"] [part="avatar"],\n[part="iconAuthorModified"] [part="avatar"],\n[part="iconDeprecated"] [part="avatar"] {\n grid-column: 1;\n}\n[part="iconCreated"] [part="icon"],\n[part="iconModified"] [part="iconDataBefore"],\n[part="iconModified"] [part="iconDataAfter"],\n[part="iconRenamed"] [part="icon"],\n[part="iconDeleted"] [part="icon"],\n[part="iconAliasCreated"] [part="icon"],\n[part="iconAliasDeleted"] [part="icon"],\n[part="iconTagCreated"] [part="icon"],\n[part="iconTagDeleted"] [part="icon"],\n[part="iconAuthorModified"] [part="icon"],\n[part="iconDeprecated"] [part="icon"] {\n grid-column: 2;\n --pg-icon-width: 3rem;\n --pg-icon-height: 3rem;\n width: 3rem;\n border: 1px solid #ddd;\n background: #fff;\n border-radius: 0.25rem;\n align-self: flex-start;\n}\n[part="iconCreated"] [part="content"],\n[part="iconModified"] [part="content"],\n[part="iconRenamed"] [part="content"],\n[part="iconDeleted"] [part="content"],\n[part="iconAliasCreated"] [part="content"],\n[part="iconAliasDeleted"] [part="content"],\n[part="iconTagCreated"] [part="content"],\n[part="iconTagDeleted"] [part="content"],\n[part="iconAuthorModified"] [part="content"],\n[part="iconDeprecated"] [part="content"] {\n grid-column: 3;\n align-content: center;\n display: flex;\n align-items: center;\n}\n[part="iconCreated"] [part="content"] code,\n[part="iconModified"] [part="content"] code,\n[part="iconRenamed"] [part="content"] code,\n[part="iconDeleted"] [part="content"] code,\n[part="iconAliasCreated"] [part="content"] code,\n[part="iconAliasDeleted"] [part="content"] code,\n[part="iconTagCreated"] [part="content"] code,\n[part="iconTagDeleted"] [part="content"] code,\n[part="iconAuthorModified"] [part="content"] code,\n[part="iconDeprecated"] [part="content"] code {\n display: inline-block;\n background: rgba(0, 0, 0, 0.05);\n padding: 0.125rem 0.25rem;\n border-radius: 0.125rem;\n text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);\n border: 1px solid rgba(69, 60, 79, 0.2);\n line-height: 1.125rem;\n}\n[part="iconCreated"] [part="issue"],\n[part="iconModified"] [part="issue"],\n[part="iconRenamed"] [part="issue"],\n[part="iconDeleted"] [part="issue"],\n[part="iconAliasCreated"] [part="issue"],\n[part="iconAliasDeleted"] [part="issue"],\n[part="iconTagCreated"] [part="issue"],\n[part="iconTagDeleted"] [part="issue"],\n[part="iconDescriptionModified"] [part="issue"],\n[part="iconAuthorModified"] [part="issue"],\n[part="iconDeprecated"] [part="issue"] {\n grid-column: 4;\n display: flex;\n align-self: center;\n text-decoration: none;\n padding: 0.25rem 0.5rem;\n border: 1px solid #453C4F;\n color: #453C4F;\n border-radius: 0.25rem;\n}\n[part="iconCreated"] [part="issue"]:hover,\n[part="iconModified"] [part="issue"]:hover,\n[part="iconRenamed"] [part="issue"]:hover,\n[part="iconDeleted"] [part="issue"]:hover,\n[part="iconAliasCreated"] [part="issue"]:hover,\n[part="iconAliasDeleted"] [part="issue"]:hover,\n[part="iconTagCreated"] [part="issue"]:hover,\n[part="iconTagDeleted"] [part="issue"]:hover,\n[part="iconDescriptionModified"] [part="issue"]:hover,\n[part="iconAuthorModified"] [part="issue"]:hover,\n[part="iconDeprecated"] [part="issue"]:hover {\n background: #453C4F;\n color: #fff;\n}\n.edit [part="iconCreated"] [part="edit"],\n.edit [part="iconModified"] [part="edit"],\n.edit [part="iconRenamed"] [part="edit"],\n.edit [part="iconDeleted"] [part="edit"],\n.edit [part="iconAliasCreated"] [part="edit"],\n.edit [part="iconAliasDeleted"] [part="edit"],\n.edit [part="iconTagCreated"] [part="edit"],\n.edit [part="iconTagDeleted"] [part="edit"],\n.edit [part="iconDescriptionModified"] [part="edit"],\n.edit [part="iconAuthorModified"] [part="edit"],\n.edit [part="iconDeprecated"] [part="edit"] {\n display: flex;\n}\n[part="iconCreated"] [part="edit"],\n[part="iconModified"] [part="edit"],\n[part="iconRenamed"] [part="edit"],\n[part="iconDeleted"] [part="edit"],\n[part="iconAliasCreated"] [part="edit"],\n[part="iconAliasDeleted"] [part="edit"],\n[part="iconTagCreated"] [part="edit"],\n[part="iconTagDeleted"] [part="edit"],\n[part="iconDescriptionModified"] [part="edit"],\n[part="iconAuthorModified"] [part="edit"],\n[part="iconDeprecated"] [part="edit"] {\n display: none;\n grid-column: 5;\n align-self: center;\n padding: 0.25rem;\n border: 0;\n border-radius: 0.25rem;\n margin-left: 0.5rem;\n cursor: pointer;\n}\n[part="iconCreated"] [part="edit"]:hover,\n[part="iconModified"] [part="edit"]:hover,\n[part="iconRenamed"] [part="edit"]:hover,\n[part="iconDeleted"] [part="edit"]:hover,\n[part="iconAliasCreated"] [part="edit"]:hover,\n[part="iconAliasDeleted"] [part="edit"]:hover,\n[part="iconTagCreated"] [part="edit"]:hover,\n[part="iconTagDeleted"] [part="edit"]:hover,\n[part="iconDescriptionModified"] [part="edit"]:hover,\n[part="iconAuthorModified"] [part="edit"]:hover,\n[part="iconDeprecated"] [part="edit"]:hover {\n background: #453C4F;\n --pg-icon-color: #fff;\n}\n\n/* Individiual Tweaks */\n[part="iconCreated"] [part="icon"] {\n background: #d1e7dd;\n border-color: #badbcc;\n}\n\n[part="iconRenamed"] [part="icon"] {\n background-color: #fff3cd;\n border-color: #ffecb5;\n}\n\n[part="iconDeleted"] [part="icon"] {\n background: #f5c6cb;\n border-color: #d06e78;\n}\n\n[part="iconModified"] {\n display: grid;\n grid-template-columns: 3.5rem 3.5rem 3.5rem 1fr auto auto;\n padding: 0.25rem;\n}\n[part="iconModified"] [part="iconDataBefore"] {\n opacity: 0.4;\n}\n[part="iconModified"] [part="iconDataAfter"] {\n grid-column: 3;\n}\n[part="iconModified"] [part="content"] {\n grid-column: 4;\n}\n[part="iconModified"] [part="issue"] {\n grid-column: 5;\n}\n[part="iconModified"] [part="edit"] {\n grid-column: 6;\n}\n\n[part="iconAliasCreated"] [part="icon"],\n[part="iconAliasDeleted"] [part="icon"] {\n background-color: #DDC6E7;\n border-color: 1px solid #DBBDE5;\n}\n\n[part="iconTagCreated"] [part="icon"],\n[part="iconTagDeleted"] [part="icon"] {\n background-color: #cff4fc;\n border-color: #b6effb;\n}\n\n[part="iconDescriptionModified"] {\n display: grid;\n grid-template-columns: 3.5rem 3.5rem 1fr 0.5rem 1fr auto;\n grid-template-rows: auto auto;\n padding: 0.25rem;\n}\n[part="iconDescriptionModified"] [part="avatar"] {\n grid-column: 1;\n grid-row: 1 / span 2;\n}\n[part="iconDescriptionModified"] [part="icon"] {\n grid-column: 2;\n grid-row: 1 / span 2;\n --pg-icon-width: 3rem;\n --pg-icon-height: 3rem;\n width: 3rem;\n border: 1px solid #ddd;\n background: #fff;\n border-radius: 0.25rem;\n align-self: flex-start;\n}\n[part="iconDescriptionModified"] [part="iconDescriptionBefore"] {\n grid-column: 3;\n grid-row: 1 / span 2;\n border: 1px solid #DDD;\n padding: 0 1rem;\n background: #fff;\n border-radius: 0.25rem;\n}\n[part="iconDescriptionModified"] [part="iconDescriptionAfter"] {\n grid-column: 5;\n grid-row: 1 / span 2;\n border: 1px solid #DDD;\n padding: 0 1rem;\n background: #fff;\n border-radius: 0.25rem;\n}\n[part="iconDescriptionModified"] [part="issue"] {\n grid-column: 6;\n grid-row: 1;\n margin-left: 0.5rem;\n}\n[part="iconDescriptionModified"] [part="edit"] {\n grid-column: 6;\n grid-row: 2;\n justify-content: center;\n margin-top: 0.25rem;\n}\n\n.added,\n.created {\n border-bottom: 3px solid #badbcc;\n}\n\n.removed,\n.deleted {\n border-bottom: 3px solid #f5c6cb;\n}',""]);var s=new CSSStyleSheet;s.replaceSync(a.toString());const c=s}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const o=Symbol("addObserver"),r=Symbol("removeObserver"),i=Symbol("getObservers"),a=Symbol("swapObserver"),s=Symbol("isProxy"),c=Symbol("getTarget"),p=["fill","pop","push","reverse","shift","sort","splice","unshift"],d=new Map;function l(t){return new Proxy(t,{get(e,n){if("symbol"==typeof n){switch(n){case s:return!0;case c:return e;case i:return d.has(t);case a:return(e,n)=>{const o=d.get(t);o.forEach(((r,i)=>{if(i.getRootNode().host===e){const e=o.get(i);d.has(n)?d.get(n).has(i)?d.get(n).get(i).push(o.get(i)):d.get(n).set(i,o.get(i)):d.set(n,new Map([[i,e]])),d.delete(t),e.forEach((t=>{t(null,u.swap,[n])}))}}))};case o:return(e,n)=>{d.has(t)?d.get(t).has(e)?d.get(t).get(e).push(n):d.get(t).set(e,[n]):d.set(t,new Map([[e,[n]]]))};case r:return e=>{d.has(t)&&(d.get(t).delete(e),0===d.get(t).size&&d.delete(t))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(e,n)}throw new Error("Unsupported symbol")}if(n in e){if(!Number.isNaN(Number(n)))return"object"==typeof e[n]?l(e[n]):e[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(p.includes(n))return d.has(e)?function(){const t=Array.prototype[n].apply(e,arguments);return d.get(e).forEach(((t,o)=>{t.forEach((t=>{t(e,n,arguments)}))})),t}:Reflect.get(e,n);if(e[n]instanceof Array)return l(e[n])}return Reflect.get(e,n)},set(t,e,n){if("symbol"==typeof e)throw new Error("Setting symbols not allowed.");if(Array.isArray(t))return Reflect.set(t,e,n);if(d.has(t)){d.get(t).forEach(((t,o)=>{t.forEach((t=>{t(e,n)}))}))}return Reflect.set(t,e,n)}})}window.observers=d;const u={fill:"fill",pop:"pop",push:"push",reverse:"reverse",shift:"shift",sort:"sort",splice:"splice",unshift:"unshift",swap:"swap"};class PropError extends Error{constructor(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const f=Symbol("init"),h=Symbol("template"),m=Symbol("style"),g=Symbol("parent");function v(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function b(t){return t.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))}function w(t={}){return function(e,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var o,r;Reflect.defineProperty(e,"name",{value:t.selector,writable:!1,configurable:!1}),!e.prototype[g]||e.prototype[g][e.prototype[g].length-1]instanceof Object.getPrototypeOf(e)?e.prototype instanceof HTMLElement&&(e.prototype[g]=[e.prototype],e.prototype[m]=t.style?[t.style]:[],e.prototype[h]=t.template||""):(e.prototype[g].push(e.prototype),e.prototype[m].push(t.style),e.prototype[h]=(o=e.prototype[h],(r=t.template||null)&&r.match(/<parent\/>/)?r.replace(/<parent\/>/,o):`${o}${r||""}`));const i=e.prototype.connectedCallback||(()=>{}),a=e.prototype.disconnectedCallback||(()=>{});e.prototype.connectedCallback=function(){if(this[f]||void 0!==t.template||void 0!==t.style)if(this[f]){if(this[f]&&t.style);else if(this[f]&&t.selector&&!t.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===t.useShadow)throw new Error("unsupported");{const t=document.createElement("template");t.innerHTML=e.prototype[h]||"";const n=document.importNode(t.content,!0),o=this.attachShadow({mode:"open"});o.adoptedStyleSheets=e.prototype[m].map((t=>{if(t instanceof CSSStyleSheet)return t;var e=new CSSStyleSheet;return e.replaceSync(t.toString()),e})),o.appendChild(n)}}else!1===t.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const t of this.shadowRoot.querySelectorAll("*"))-1!==t.localName.indexOf("-")&&n.add(t.localName);const o=Array.from(n.values()).map((t=>customElements.get(t)?Promise.resolve():customElements.whenDefined(t))),r=()=>{this[g].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[b(e)]=!0,t)),{}):{})}))};0===o.length?(this[f]=!0,i.call(this),r()):Promise.all(o).then((()=>{this[f]=!0,i.call(this);for(const t of this.shadowRoot.querySelectorAll("slot"))t.dispatchEvent(new CustomEvent("slotchange"));r()}))},e.prototype.disconnectedCallback=function(){a.call(this)},e.prototype.attributeChangedCallback=function(t,e,n){this[b(t)]=n},n.addInitializer((function(){if(t.selector){if(window.customElements.get(t.selector))throw new Error(`@Component() ${n.name} duplicate selector '${t.selector}'`);window.customElements.define(t.selector,e)}}))}}Symbol("transmute");function y(t){return!!t&&t.constructor===Array}function D(t,e){t[f]&&t[g].map((n=>{n.render&&n.render.call(t,{[e]:!0})}))}function A(t){return null===t?"null":y(t)?"array":typeof t}function x(t){return function(e,n){const o=n.name,r=Symbol(o),p=Symbol(`${o}:type`),d=Symbol(`${o}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,o,{get:()=>"object"===this[p]||"array"===this[p]?this[r][s]?this[r]:l(this[r]):this[r],set:e=>{const n=A(t?t(e):e);if("index"!==o&&this[p]!==n&&"null"!==this[p]&&"null"!==n)throw new Error(`@Prop() ${o} with type '${this[p]}' cannot be set to ${n}.`);if("array"===this[p]){if(!y(e))throw new PropError(`Array "${o}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,o)?.set);if(this[r]===e)throw new Error("Setting an array to itself is not allowed.");const t=l(this[r]);if(t[i]){const n=e[s]?e[c]:e;t[a](this,n),this[r]=e,console.log(">>> trigger render???",this,o)}else this[r]=e}else this[r]=t?t(e):e,D(this,o)}})})),function(e){if(void 0===e&&"index"!==o)throw new Error(`@Prop() ${o} must have an initial value defined.`);if(void 0!==e&&"index"===o)throw new Error("@Prop() index must not have an initial value defined.");if(!0===e)throw new Error(`@Prop() ${o} boolean must initialize to false.`);if(!n.private){const{constructor:t}=this;t.observedAttributes??=[],t.symbols||(t.symbols={});const{symbols:e}=t,n=v(o);e[o]||(t.observedAttributes.push(n),e[o]=r)}return this[p]=A(e),"array"===this[p]?(this[r]=e,new Proxy(e,{get:(t,e)=>e===C?this[d]:(console.log("errr???"),Reflect.get(this[r],e)),set:(t,e,n)=>{if(e===C)return this[d]=n,!0;const i=Reflect.set(t,e,n);return"length"===e&&this[r].length===n||D(this,o),this[r]=n,i}})):(this[r]=t?t(this.getAttribute(o)??e):this.getAttribute(o)??e,this[r])}}}function I(){return function(t,e){const n=e.name,o=n.replace(/^\$/,"");e.addInitializer((function(){let t=null;Reflect.defineProperty(this,n,{get(){return t??(t=this.shadowRoot?.querySelector(`[part~=${o}]`))}})}))}}Symbol("hasProxy");const C=Symbol("meta");var M=n(947);class Alias{id;name;match=!1;constructor(t,e){void 0!==t&&(this.id=t),void 0!==e&&(this.name=e)}from(t){return void 0!==t.id&&(this.id=t.id),void 0!==t.name&&(this.name=t.name),this}to(){return{name:this.name}}}class User{id=null;github=null;name=null;base64=null;iconCount=null;description=null;website=null;sponsored=!1;sponsorship="";core=!1;from(t){return this.id=t.id,this.github=t.github,this.name=t.name,"string"==typeof t.base64&&(t.base64.match(/^data/)?this.base64=t.base64:this.base64=`data:image/png;base64,${t.base64}`),this.iconCount=t.iconCount,this.description=t.description,this.website=t.website,this.sponsored=t.sponsored,this.sponsorship=`https://github.com/users/${t.github}/sponsorship`,this.core=t.core,this}}class Tag{id;name;url;count;from(t){return void 0!==t.id&&(this.id=t.id),void 0!==t.name&&(this.name=t.name),void 0!==t.url&&(this.url=t.url),void 0!==t.count&&(this.count=t.count),this}to(){return{name:this.name,url:this.url,count:this.count}}}class Style{id;name;count=null;from(t){return this.id=t.id,this.name=t.name,this.count=t.count,this}}class FontIcon{id;codepoint;font;version;from(t){return this.id=t.id,this.codepoint=t.codepoint,this.font=t.font,this.version=t.version,this}to(){return{id:this.id,codepoint:this.codepoint,font:this.font,version:this.version}}}class Icon{id=null;packageId=null;baseIconId=null;name=null;description=null;data=null;user=null;version=null;aliases=[];tags=[];styles=[];published=!0;deprecated=!1;codepoint=null;fontIcons=[];fontIcon=null;constructor(t,e){this.name=t||null,this.data=e||null}from(t){return this.id=t.id,this.packageId=t.packageId,this.baseIconId=t.baseIconId,this.name=t.name,this.description=t.description,this.data=t.data,t.version&&(this.version=t.version),t.fontIcon&&(this.fontIcon=t.fontIcon),t.user&&(this.user=(new User).from(t.user)),t.aliases&&(this.aliases=t.aliases.map((t=>(new Alias).from(t)))),t.tags&&(this.tags=t.tags.map((t=>(new Tag).from(t)))),t.styles&&(this.styles=t.styles.map((t=>(new Style).from(t)))),"boolean"==typeof t.published&&(this.published=t.published),"boolean"==typeof t.deprecated&&(this.deprecated=t.deprecated),t.codepoint&&(this.codepoint=t.codepoint),t.fontIcons&&(this.fontIcons=t.fontIcons.map((t=>(new FontIcon).from(t)))),this}to(){const{id:t,name:e,description:n,data:o,version:r,fontIcon:i,packageId:a,baseIconId:s,aliases:c,tags:p}=this;return{id:t,name:e,description:n,data:o,version:r,fontIcon:i,packageId:a,baseIconId:s,aliases:c.map((t=>t.to())),tags:p.map((t=>t.to()))}}}class Modification{id;modificationId;packageId;user;icon;iconNameBefore;iconNameAfter;iconDescriptionBefore;iconDescriptionAfter;iconDataBefore;iconDataAfter;text;date;issue;isVisible;constructor(){}from(t){return this.id=t.id,this.modificationId=t.modificationId,this.packageId=t.packageId,this.user=(new User).from(t.user),this.icon=(new Icon).from(t.icon),this.iconNameBefore=t.iconNameBefore,this.iconNameAfter=t.iconNameAfter,this.iconDescriptionBefore=t.iconDescriptionBefore,this.iconDescriptionAfter=t.iconDescriptionAfter,this.iconDataBefore=t.iconDataBefore,this.iconDataAfter=t.iconDataAfter,this.text=t.text,this.date=t.date,this.issue=t.issue,this.isVisible=t.isVisible,this}}var T;!function(t){t.IconAliasCreated="691c8829-b1e7-11e7-bf5c-94188269ec50",t.IconAliasDeleted="f1f70a76-b975-11e9-8ca0-94188269ec50",t.IconCreated="AFFE875E-01BC-4A34-9BE3-27625A155B28",t.IconDeleted="B1CE1713-A18A-4E9D-9E26-D0B4E44A1FAC",t.IconModified="1506F66B-CC2A-4575-A20A-DC138628977A",t.IconRenamed="F7B6D49B-A86F-49AC-AF92-6B9D0DF6188B",t.IconTagCreated="a185a9e8-c192-11e7-bf5c-94188269ec50",t.IconTagDeleted="ffe6b5f6-b975-11e9-8ca0-94188269ec50",t.IconDescriptionModified="3c638179-c4ca-11e8-9f27-94188269ec50",t.IconAuthorModified="254591d0-b28e-11e9-8ca0-94188269ec50",t.WebfontPublished="66B9FA99-1FAA-4D8F-B87F-B6F3CA444624",t.News="B4DEB3A8-A146-4086-9D7B-B67842A9CCB8",t.IconDeprecated="f92f310f-bfed-11e9-8ca0-94188269ec50",t.IconWorkInProgress="e262be80-bfed-11e9-8ca0-94188269ec50",t.IconLive="f92f2ba6-bfed-11e9-8ca0-94188269ec50",t.IconPublished="e262b92e-bfed-11e9-8ca0-94188269ec50",t.Date="date"}(T||(T={}));var S=n(857);const E="top",k="top-start",$="top-end",B="right",N="right-start",R="right-end",L="bottom",P="bottom-start",F="bottom-end",O="left",j="left-start",z="left-end";var U=function(t,e,n,o,r,i){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,c=o.kind,p="getter"===c?"get":"setter"===c?"set":"value",d=!e&&t?o.static?t:t.prototype:null,l=e||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,f=n.length-1;f>=0;f--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(t){if(u)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(t||null))};var g=(0,n[f])("accessor"===c?{get:l.get,set:l.set}:l[p],h);if("accessor"===c){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(l.get=s),(s=a(g.set))&&(l.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===c?r.unshift(s):l[p]=s)}d&&Object.defineProperty(d,o.name,l),u=!0},q=function(t,e,n){for(var o=arguments.length>2,r=0;r<e.length;r++)n=o?e[r].call(t,n):e[r].call(t);return o?n:void 0};const H={[k]:(t,e,n)=>({arrowTop:e-5,arrowLeft:n.width>t?Math.floor(t/2)-5:Math.floor(n.width/2)-5,left:n.left,top:n.top-e-10}),[E]:(t,e,n)=>({arrowTop:e-5,arrowLeft:Math.floor(t/2)-5,left:n.left-Math.floor((t-n.width)/2),top:n.top-e-10}),[$]:(t,e,n)=>({arrowTop:e-5,arrowLeft:n.width>t?t-Math.floor(t/2)-5:t-Math.floor(n.width/2)-5,left:n.left-t+n.width,top:n.top-e-10}),[N]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:-5,left:n.left+n.width+10,top:n.top}),[B]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:-5,left:n.left+n.width+10,top:n.top+Math.floor(n.height/2)-Math.floor(e/2)}),[R]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:-5,left:n.left+n.width+10,top:n.top+n.height-e}),[P]:(t,e,n)=>({arrowTop:-5,arrowLeft:n.width>t?Math.floor(t/2)-5:Math.floor(n.width/2)-5,left:n.left,top:n.top+n.height+e-20}),[L]:(t,e,n)=>({arrowTop:-5,arrowLeft:Math.floor(t/2)-5,left:n.left-Math.floor((t-n.width)/2),top:n.top+n.height+e-20}),[F]:(t,e,n)=>({arrowTop:-5,arrowLeft:n.width>t?t-Math.floor(t/2)-5:t-Math.floor(n.width/2)-5,left:n.left-t+n.width,top:n.top+n.height+e-20}),[j]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:t-5,left:n.left-t-10,top:n.top}),[O]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:t-5,left:n.left-t-10,top:n.top+Math.floor(n.height/2)-Math.floor(e/2)}),[z]:(t,e,n)=>({arrowTop:Math.floor(e/2)-5,arrowLeft:t-5,left:n.left-t-10,top:n.top+n.height-e})};(()=>{let t,e,n,o,r,i,a,s,c,p=[w({selector:"pg-tooltip",style:S.A,template:'<div part="tooltip"> <span part="tooltipText"></span> <div part="tooltipArrow"></div> </div>'})],d=[],l=HTMLElement,u=[],f=[],h=[],m=[],g=[],v=[],b=[],y=[],D=[],A=[],C=[],M=[],T=[],E=[];(class extends l{static{e=this}static{const w="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;n=[x()],o=[x()],r=[x()],i=[x()],a=[I()],s=[I()],c=[I()],U(null,null,n,{kind:"field",name:"visible",static:!1,private:!1,access:{has:t=>"visible"in t,get:t=>t.visible,set:(t,e)=>{t.visible=e}},metadata:w},u,f),U(null,null,o,{kind:"field",name:"rect",static:!1,private:!1,access:{has:t=>"rect"in t,get:t=>t.rect,set:(t,e)=>{t.rect=e}},metadata:w},h,m),U(null,null,r,{kind:"field",name:"text",static:!1,private:!1,access:{has:t=>"text"in t,get:t=>t.text,set:(t,e)=>{t.text=e}},metadata:w},g,v),U(null,null,i,{kind:"field",name:"position",static:!1,private:!1,access:{has:t=>"position"in t,get:t=>t.position,set:(t,e)=>{t.position=e}},metadata:w},b,y),U(null,null,a,{kind:"field",name:"$tooltip",static:!1,private:!1,access:{has:t=>"$tooltip"in t,get:t=>t.$tooltip,set:(t,e)=>{t.$tooltip=e}},metadata:w},D,A),U(null,null,s,{kind:"field",name:"$tooltipText",static:!1,private:!1,access:{has:t=>"$tooltipText"in t,get:t=>t.$tooltipText,set:(t,e)=>{t.$tooltipText=e}},metadata:w},C,M),U(null,null,c,{kind:"field",name:"$tooltipArrow",static:!1,private:!1,access:{has:t=>"$tooltipArrow"in t,get:t=>t.$tooltipArrow,set:(t,e)=>{t.$tooltipArrow=e}},metadata:w},T,E),U(null,t={value:e},p,{kind:"class",name:e.name,metadata:w},null,d),e=t.value,w&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:w}),q(e,d)}visible=q(this,u,!1);rect=(q(this,f),q(this,h,null));text=(q(this,m),q(this,g,""));position=(q(this,v),q(this,b,L));$tooltip=(q(this,y),q(this,D,void 0));$tooltipText=(q(this,A),q(this,C,void 0));$tooltipArrow=(q(this,M),q(this,T,void 0));render(t){this.$tooltipText.textContent=this.text,this.style.position="absolute",t.visible&&(this.style.display=this.visible?"block":"none");const{width:e,height:n}=this.$tooltipText.getBoundingClientRect();let o=this.position;if(o in H||(o=L),this.rect){const{arrowLeft:t,arrowTop:r,left:i,top:a}=H[o](e,n,this.rect);this.style.left=`${i+window.scrollX}px`,this.style.top=`${a+window.scrollY}px`,this.$tooltipArrow.style.left=`${t}px`,this.$tooltipArrow.style.top=`${r}px`}}constructor(){super(...arguments),q(this,E)}})})();function V(t,e,n){t.addEventListener("mouseenter",(function(){t.dispatchEvent(new CustomEvent("tooltip",{detail:{visible:!0,rect:t.getBoundingClientRect(),text:e(),position:n??L},bubbles:!0,composed:!0}))})),t.addEventListener("mouseleave",(function(){t.dispatchEvent(new CustomEvent("tooltip",{detail:{visible:!1},bubbles:!0,composed:!0}))}))}var W=function(t,e,n,o,r,i){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,c=o.kind,p="getter"===c?"get":"setter"===c?"set":"value",d=!e&&t?o.static?t:t.prototype:null,l=e||(d?Object.getOwnPropertyDescriptor(d,o.name):{}),u=!1,f=n.length-1;f>=0;f--){var h={};for(var m in o)h[m]="access"===m?{}:o[m];for(var m in o.access)h.access[m]=o.access[m];h.addInitializer=function(t){if(u)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(t||null))};var g=(0,n[f])("accessor"===c?{get:l.get,set:l.set}:l[p],h);if("accessor"===c){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(l.get=s),(s=a(g.set))&&(l.set=s),(s=a(g.init))&&r.unshift(s)}else(s=a(g))&&("field"===c?r.unshift(s):l[p]=s)}d&&Object.defineProperty(d,o.name,l),u=!0},Y=function(t,e,n){for(var o=arguments.length>2,r=0;r<e.length;r++)n=o?e[r].call(t,n):e[r].call(t);return o?n:void 0};const J={[T.News]:'<div part="news"> <pg-avatar part="avatar"></pg-avatar> <span part="label">News</span> <pg-markdown part="markdown"></pg-markdown> </div>',[T.IconCreated]:'<div part="iconCreated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Icon <code part="iconName"></code> <span class="created">created</span>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconModified]:'<div part="iconModified"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="iconDataBefore"></pg-icon> <pg-icon part="iconDataAfter"></pg-icon> <span part="content"> <span> Icon <code part="iconName"></code> modified. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconRenamed]:'<div part="iconRenamed"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Icon <code part="iconNameBefore"></code> renamed to <code part="iconNameAfter"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconDeleted]:'<div part="iconDeleted"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Icon <code part="iconName"></code> <span class="deleted">deleted</span>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconAliasCreated]:'<div part="iconAliasCreated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="added">Added</span> alias <code part="text"></code> to <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconAliasDeleted]:'<div part="iconAliasDeleted"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="removed">Removed</span> alias <code part="text"></code> from <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconTagCreated]:'<div part="iconTagCreated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="added">Added</span> tag <code part="text"></code> to <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconTagDeleted]:'<div part="iconTagDeleted"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> <span class="removed">Removed</span> tag <code part="text"></code> from <code part="iconName"></code>. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconDescriptionModified]:'<div part="iconDescriptionModified"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <pg-markdown part="iconDescriptionBefore"></pg-markdown> <pg-markdown part="iconDescriptionAfter"></pg-markdown> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconAuthorModified]:'<div part="iconAuthorModified"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Author modified. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.IconDeprecated]:'<div part="iconDeprecated"> <pg-avatar part="avatar"></pg-avatar> <pg-icon part="icon"></pg-icon> <span part="content"> <span> Deprecated. Warning this icon will be removed in a future release. </span> </span> <a part="issue"></a> <button part="edit"> <pg-icon part="editIcon"></pg-icon> </button> </div>',[T.Date]:'<h2 part="text"></h2>'},Z=["January","February","March","April","May","June","July","August","September","October","November","December"];function _(t){const e=new Date(t),n=Z[e.getMonth()];return`${e.getFullYear()}-${n}-${e.getDate()}`}function G(t){const e=[];let n="";return t.forEach(((t,o)=>{const r=function(t){const e=new Date(t);return`${Z[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}(t.date);n!==r&&(e.push((new Modification).from({id:`date-${_(t.date)}`,modificationId:T.Date,text:r,user:new User,icon:new Icon})),n=r),e.push(t)})),e}(()=>{let t,e,n,o,r,i,a=[w({selector:"pg-modification",style:M.A,template:'<div part="items"></div>'})],s=[],c=HTMLElement,p=[],d=[],l=[],u=[],f=[],h=[],m=[],g=[];(class extends c{static{e=this}static{const v="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;n=[x()],o=[x()],r=[x()],i=[I()],W(null,null,n,{kind:"field",name:"modifications",static:!1,private:!1,access:{has:t=>"modifications"in t,get:t=>t.modifications,set:(t,e)=>{t.modifications=e}},metadata:v},p,d),W(null,null,o,{kind:"field",name:"edit",static:!1,private:!1,access:{has:t=>"edit"in t,get:t=>t.edit,set:(t,e)=>{t.edit=e}},metadata:v},l,u),W(null,null,r,{kind:"field",name:"github",static:!1,private:!1,access:{has:t=>"github"in t,get:t=>t.github,set:(t,e)=>{t.github=e}},metadata:v},f,h),W(null,null,i,{kind:"field",name:"$items",static:!1,private:!1,access:{has:t=>"$items"in t,get:t=>t.$items,set:(t,e)=>{t.$items=e}},metadata:v},m,g),W(null,t={value:e},a,{kind:"class",name:e.name,metadata:v},null,s),e=t.value,v&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:v}),Y(e,s)}modifications=Y(this,p,[]);edit=(Y(this,d),Y(this,l,!1));github=(Y(this,u),Y(this,f,""));$items=(Y(this,h),Y(this,m,void 0));render(t){t.modifications&&this.modifications&&function(t,e,n,o,r){const i=Array.from(t.children),a=i.map((t=>t.dataset.key)),s=e.map((t=>t[n]));e.forEach((e=>{if(!a.includes(e[n])){const r=o(e);return r instanceof DocumentFragment?r.children[0].dataset.key=e[n]:r.dataset.key=e[n],void t.appendChild(r)}{const t=i.find((t=>t.dataset.key===a[n]));if(e[n]===a[n])return void r(e,t)}})),i.forEach((t=>{s.includes(t.dataset.key)||t.remove()}))}(this.$items,G(this.modifications),"id",(t=>{if(t.modificationId in J){const e=function(t,e){const n=document.createElement("template");n.innerHTML=t;const o=document.importNode(n.content,!0);for(const[t,n]of Object.entries(e)){const e=o.querySelector(`[part~="${t}"]`);if(e)for(const[t,o]of Object.entries(n))o instanceof Function?null===o()?e.removeAttribute(t):e.setAttribute(t,o()):e[t]=o}return o}(J[t.modificationId],{text:{innerText:t.text},markdown:{text:t.text},icon:{path:t.icon&&t.icon.data},iconName:{innerText:t.icon&&t.icon.name},iconNameBefore:{innerText:t.iconNameBefore},iconNameAfter:{innerText:t.iconNameAfter},iconDescriptionBefore:{text:t.iconDescriptionBefore},iconDescriptionAfter:{text:t.iconDescriptionAfter},iconDataBefore:{path:t.iconDataBefore},iconDataAfter:{path:t.iconDataAfter},avatar:{user:t.user},editIcon:{path:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"},issue:{style:t.issue?"":"display:none",innerText:t.issue?`#${t.issue}`:"",href:`https://github.com/${this.github}/issues/${t.issue}`}}),n=e.querySelector('[part="issue"]');n&&V(n,(()=>"View on GitHub"),F);const o=e.querySelector('[part="avatar"]');o&&V(o,(()=>t.user.name),P);const r=e.querySelector('[part="edit"]');return r&&r.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("edit",{detail:{modification:t}}))})),e}const e=document.createElement("div");return e.classList.add("invalid"),e.innerText=`Error: Unsupported modificationId with text: "${t.text}"`,e}),((t,e)=>{})),t.edit&&this.$items.classList.toggle("edit",this.edit)}addItem(t){const e=document.createElement("div");this.$items.appendChild(e)}constructor(){super(...arguments),Y(this,g)}})})()})();
|
package/pgNav.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",o=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),o&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),o&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,o,n,a){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(s[c]=!0)}for(var l=0;l<t.length;l++){var p=[].concat(t[l]);o&&s[p[0]]||(void 0!==a&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=a),r&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=r):p[2]=r),n&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=n):p[4]="".concat(n)),e.push(p))}},e}},601:t=>{t.exports=function(t){return t[1]}},689:(t,e,r)=>{r.d(e,{A:()=>c});var o=r(601),n=r.n(o),a=r(314),s=r.n(a)()(n());s.push([t.id,":host {\n align-self: center;\n}\nsvg {\n width: 1.5rem;\n height: 1.5rem;\n}\nbutton {\n border: 0;\n background: transparent;\n}\nbutton > svg {\n fill: #fff;\n}",""]);var i=new CSSStyleSheet;i.replaceSync(s.toString());const c=i}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var a=e[o]={id:o,exports:{}};return t[o](a,a.exports,r),a.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const o=Symbol("addObserver"),n=Symbol("removeObserver"),a=Symbol("getObservers"),s=Symbol("isProxy"),i=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],l=new Map;function p(t){return new Proxy(t,{get(e,r){if("symbol"==typeof r){switch(r){case s:return!0;case i:return e;case a:return l.has(t);case o:return(e,r)=>{l.has(t)?l.get(t).has(e)?l.get(t).get(e).push(r):l.get(t).set(e,[r]):l.set(t,new Map([[e,[r]]]))};case n:return e=>{l.has(t)&&(l.get(t).delete(e),0===l.get(t).size&&l.delete(t))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(e,r)}throw new Error("Unsupported symbol")}if(r in e){if(!Number.isNaN(Number(r)))return"object"==typeof e[r]?p(e[r]):e[r];if("copyWithin"===r)throw new Error("Unsupported array method copyWithin");if(c.includes(r))return l.has(e)?function(){const t=Array.prototype[r].apply(e,arguments);return l.get(e).forEach(((t,o)=>{t.forEach((t=>{t(e,r,arguments)}))})),t}:Reflect.get(e,r);if(e[r]instanceof Array)return p(e[r])}return Reflect.get(e,r)},set(t,e,r){if("symbol"==typeof e)throw new Error("Setting symbols not allowed.");if(Array.isArray(t))return Reflect.set(t,e,r);if(l.has(t)){l.get(t).forEach(((t,o)=>{t.forEach((t=>{t(e,r)}))}))}return Reflect.set(t,e,r)}})}window.observers=l;class PropError extends Error{constructor(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const u=Symbol("init"),h=Symbol("template"),f=Symbol("style"),d=Symbol("parent");function y(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function m(t){return t.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))}function v(t={}){return function(e,r){if("class"!==r.kind)throw new Error("@Component() can only decorate a class");var o,n;Reflect.defineProperty(e,"name",{value:t.selector,writable:!1,configurable:!1}),!e.prototype[d]||e.prototype[d][e.prototype[d].length-1]instanceof Object.getPrototypeOf(e)?e.prototype instanceof HTMLElement&&(e.prototype[d]=[e.prototype],e.prototype[f]=t.style?[t.style]:[],e.prototype[h]=t.template||""):(e.prototype[d].push(e.prototype),e.prototype[f].push(t.style),e.prototype[h]=(o=e.prototype[h],(n=t.template||null)&&n.match(/<parent\/>/)?n.replace(/<parent\/>/,o):`${o}${n||""}`));const a=e.prototype.connectedCallback||(()=>{}),s=e.prototype.disconnectedCallback||(()=>{});e.prototype.connectedCallback=function(){if(this[u]||void 0!==t.template||void 0!==t.style)if(this[u]){if(this[u]&&t.style);else if(this[u]&&t.selector&&!t.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===t.useShadow)throw new Error("unsupported");{const t=document.createElement("template");t.innerHTML=e.prototype[h]||"";const r=document.importNode(t.content,!0),o=this.attachShadow({mode:"open"});o.adoptedStyleSheets=e.prototype[f].map((t=>{if(t instanceof CSSStyleSheet)return t;var e=new CSSStyleSheet;return e.replaceSync(t.toString()),e})),o.appendChild(r)}}else!1===t.useShadow||this.attachShadow({mode:"open"});const r=new Set;for(const t of this.shadowRoot.querySelectorAll("*"))-1!==t.localName.indexOf("-")&&r.add(t.localName);const o=Array.from(r.values()).map((t=>customElements.get(t)?Promise.resolve():customElements.whenDefined(t))),n=()=>{this[d].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[m(e)]=!0,t)),{}):{})}))};0===o.length?(this[u]=!0,a.call(this),n()):Promise.all(o).then((()=>{this[u]=!0,a.call(this);for(const t of this.shadowRoot.querySelectorAll("slot"))t.dispatchEvent(new CustomEvent("slotchange"));n()}))},e.prototype.disconnectedCallback=function(){s.call(this)},e.prototype.attributeChangedCallback=function(t,e,r){this[m(t)]=r},r.addInitializer((function(){if(t.selector){if(window.customElements.get(t.selector))throw new Error(`@Component() ${r.name} duplicate selector '${t.selector}'`);window.customElements.define(t.selector,e)}}))}}Symbol("transmute");function b(t){return!!t&&t.constructor===Array}function g(t,e){t[u]&&t[d].map((r=>{r.render&&r.render.call(t,{[e]:!0})}))}function w(t){return null===t?"null":b(t)?"array":typeof t}function S(t){return function(e,r){const o=r.name,n=Symbol(o),c=Symbol(`${o}:type`),l=Symbol(`${o}:meta`);return r.addInitializer((function(){Reflect.defineProperty(this,o,{get:()=>"object"===this[c]||"array"===this[c]?this[n][s]?this[n]:p(this[n]):this[n],set:e=>{const r=w(t?t(e):e);if("index"!==o&&this[c]!==r&&"null"!==this[c]&&"null"!==r)throw new Error(`@Prop() ${o} with type '${this[c]}' cannot be set to ${r}.`);if("array"===this[c]){if(!b(e))throw new PropError(`Array "${o}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,o)?.set);if(this[n]===e)throw new Error("Setting an array to itself is not allowed.");const t=p(this[n]);if(t[a]){const r=e[s]?(l=e)[s]&&l[i]:e;t.splice(0,this[n].length,...r)}else this[n]=e}else this[n]=t?t(e):e,g(this,o);var l}})})),function(e){if(void 0===e&&"index"!==o)throw new Error(`@Prop() ${o} must have an initial value defined.`);if(void 0!==e&&"index"===o)throw new Error("@Prop() index must not have an initial value defined.");if(!0===e)throw new Error(`@Prop() ${o} boolean must initialize to false.`);if(!r.private){const{constructor:t}=this;t.observedAttributes??=[],t.symbols||(t.symbols={});const{symbols:e}=t,r=y(o);e[o]||(t.observedAttributes.push(r),e[o]=n)}return this[c]=w(e),"array"===this[c]?(this[n]=e,new Proxy(e,{get:(t,e)=>e===E?this[l]:(console.log("errr???"),Reflect.get(this[n],e)),set:(t,e,r)=>{if(e===E)return this[l]=r,!0;const a=Reflect.set(t,e,r);return"length"===e&&this[n].length===r||g(this,o),this[n]=r,a}})):(this[n]=t?t(this.getAttribute(o)??e):this.getAttribute(o)??e,this[n])}}}Symbol("hasProxy");const E=Symbol("meta");var P=r(689),x=function(t,e,r,o,n,a){function s(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var i,c=o.kind,l="getter"===c?"get":"setter"===c?"set":"value",p=!e&&t?o.static?t:t.prototype:null,u=e||(p?Object.getOwnPropertyDescriptor(p,o.name):{}),h=!1,f=r.length-1;f>=0;f--){var d={};for(var y in o)d[y]="access"===y?{}:o[y];for(var y in o.access)d.access[y]=o.access[y];d.addInitializer=function(t){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(t||null))};var m=(0,r[f])("accessor"===c?{get:u.get,set:u.set}:u[l],d);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(i=s(m.get))&&(u.get=i),(i=s(m.set))&&(u.set=i),(i=s(m.init))&&n.unshift(i)}else(i=s(m))&&("field"===c?n.unshift(i):u[l]=i)}p&&Object.defineProperty(p,o.name,u),h=!0},$=function(t,e,r){for(var o=arguments.length>2,n=0;n<e.length;n++)r=o?e[n].call(t,r):e[n].call(t);return o?r:void 0};(()=>{let t,e,r,o,n=[v({selector:"pg-nav",style:P.A,template:'<nav part="nav"> <a href="/"> <span part="name"></span> </a> <a href="/icons"> Icons </a> <a href="/icons"> Docs </a> <button part="menu"> <svg viewBox="0 0 24 24"> <path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"/> </svg> </button> </nav>'})],a=[],s=HTMLElement,i=[],c=[],l=[],p=[];(class extends s{static{e=this}static{const u="function"==typeof Symbol&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;r=[S()],o=[function(t,e){const r=e.name,o=r.replace(/^\$/,"");e.addInitializer((function(){let t=null;Reflect.defineProperty(this,r,{get(){return t??(t=this.shadowRoot?.querySelector(`[part~=${o}]`))}})}))}],x(null,null,r,{kind:"field",name:"nav",static:!1,private:!1,access:{has:t=>"nav"in t,get:t=>t.nav,set:(t,e)=>{t.nav=e}},metadata:u},i,c),x(null,null,o,{kind:"field",name:"$path",static:!1,private:!1,access:{has:t=>"$path"in t,get:t=>t.$path,set:(t,e)=>{t.$path=e}},metadata:u},l,p),x(null,t={value:e},n,{kind:"class",name:e.name,metadata:u},null,a),e=t.value,u&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:u}),$(e,a)}nav=$(this,i,"M0 0h24v24H0V0zm2 2v20h20V2H2z");$path=($(this,c),$(this,l,void 0));render(){}constructor(){super(...arguments),$(this,p)}})})()})();
|
|
1
|
+
(()=>{"use strict";var t={314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",o=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),o&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),o&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,o,n,s){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(o)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var p=[].concat(t[c]);o&&a[p[0]]||(void 0!==s&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=s),r&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=r):p[2]=r),n&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=n):p[4]="".concat(n)),e.push(p))}},e}},601:t=>{t.exports=function(t){return t[1]}},689:(t,e,r)=>{r.d(e,{A:()=>l});var o=r(601),n=r.n(o),s=r(314),a=r.n(s)()(n());a.push([t.id,":host {\n align-self: center;\n}\nsvg {\n width: 1.5rem;\n height: 1.5rem;\n}\nbutton {\n border: 0;\n background: transparent;\n}\nbutton > svg {\n fill: #fff;\n}",""]);var i=new CSSStyleSheet;i.replaceSync(a.toString());const l=i}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const o=Symbol("addObserver"),n=Symbol("removeObserver"),s=Symbol("getObservers"),a=Symbol("swapObserver"),i=Symbol("isProxy"),l=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],p=new Map;function h(t){return new Proxy(t,{get(e,r){if("symbol"==typeof r){switch(r){case i:return!0;case l:return e;case s:return p.has(t);case a:return(e,r)=>{const o=p.get(t);o.forEach(((n,s)=>{if(s.getRootNode().host===e){const e=o.get(s);p.has(r)?p.get(r).has(s)?p.get(r).get(s).push(o.get(s)):p.get(r).set(s,o.get(s)):p.set(r,new Map([[s,e]])),p.delete(t),e.forEach((t=>{t(null,u.swap,[r])}))}}))};case o:return(e,r)=>{p.has(t)?p.get(t).has(e)?p.get(t).get(e).push(r):p.get(t).set(e,[r]):p.set(t,new Map([[e,[r]]]))};case n:return e=>{p.has(t)&&(p.get(t).delete(e),0===p.get(t).size&&p.delete(t))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(e,r)}throw new Error("Unsupported symbol")}if(r in e){if(!Number.isNaN(Number(r)))return"object"==typeof e[r]?h(e[r]):e[r];if("copyWithin"===r)throw new Error("Unsupported array method copyWithin");if(c.includes(r))return p.has(e)?function(){const t=Array.prototype[r].apply(e,arguments);return p.get(e).forEach(((t,o)=>{t.forEach((t=>{t(e,r,arguments)}))})),t}:Reflect.get(e,r);if(e[r]instanceof Array)return h(e[r])}return Reflect.get(e,r)},set(t,e,r){if("symbol"==typeof e)throw new Error("Setting symbols not allowed.");if(Array.isArray(t))return Reflect.set(t,e,r);if(p.has(t)){p.get(t).forEach(((t,o)=>{t.forEach((t=>{t(e,r)}))}))}return Reflect.set(t,e,r)}})}window.observers=p;const u={fill:"fill",pop:"pop",push:"push",reverse:"reverse",shift:"shift",sort:"sort",splice:"splice",unshift:"unshift",swap:"swap"};class PropError extends Error{constructor(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const f=Symbol("init"),d=Symbol("template"),y=Symbol("style"),m=Symbol("parent");function v(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function g(t){return t.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))}function b(t={}){return function(e,r){if("class"!==r.kind)throw new Error("@Component() can only decorate a class");var o,n;Reflect.defineProperty(e,"name",{value:t.selector,writable:!1,configurable:!1}),!e.prototype[m]||e.prototype[m][e.prototype[m].length-1]instanceof Object.getPrototypeOf(e)?e.prototype instanceof HTMLElement&&(e.prototype[m]=[e.prototype],e.prototype[y]=t.style?[t.style]:[],e.prototype[d]=t.template||""):(e.prototype[m].push(e.prototype),e.prototype[y].push(t.style),e.prototype[d]=(o=e.prototype[d],(n=t.template||null)&&n.match(/<parent\/>/)?n.replace(/<parent\/>/,o):`${o}${n||""}`));const s=e.prototype.connectedCallback||(()=>{}),a=e.prototype.disconnectedCallback||(()=>{});e.prototype.connectedCallback=function(){if(this[f]||void 0!==t.template||void 0!==t.style)if(this[f]){if(this[f]&&t.style);else if(this[f]&&t.selector&&!t.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===t.useShadow)throw new Error("unsupported");{const t=document.createElement("template");t.innerHTML=e.prototype[d]||"";const r=document.importNode(t.content,!0),o=this.attachShadow({mode:"open"});o.adoptedStyleSheets=e.prototype[y].map((t=>{if(t instanceof CSSStyleSheet)return t;var e=new CSSStyleSheet;return e.replaceSync(t.toString()),e})),o.appendChild(r)}}else!1===t.useShadow||this.attachShadow({mode:"open"});const r=new Set;for(const t of this.shadowRoot.querySelectorAll("*"))-1!==t.localName.indexOf("-")&&r.add(t.localName);const o=Array.from(r.values()).map((t=>customElements.get(t)?Promise.resolve():customElements.whenDefined(t))),n=()=>{this[m].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[g(e)]=!0,t)),{}):{})}))};0===o.length?(this[f]=!0,s.call(this),n()):Promise.all(o).then((()=>{this[f]=!0,s.call(this);for(const t of this.shadowRoot.querySelectorAll("slot"))t.dispatchEvent(new CustomEvent("slotchange"));n()}))},e.prototype.disconnectedCallback=function(){a.call(this)},e.prototype.attributeChangedCallback=function(t,e,r){this[g(t)]=r},r.addInitializer((function(){if(t.selector){if(window.customElements.get(t.selector))throw new Error(`@Component() ${r.name} duplicate selector '${t.selector}'`);window.customElements.define(t.selector,e)}}))}}Symbol("transmute");function w(t){return!!t&&t.constructor===Array}function S(t,e){t[f]&&t[m].map((r=>{r.render&&r.render.call(t,{[e]:!0})}))}function E(t){return null===t?"null":w(t)?"array":typeof t}Symbol("hasProxy");const P=Symbol("meta");var x=r(689),$=function(t,e,r,o,n,s){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var i,l=o.kind,c="getter"===l?"get":"setter"===l?"set":"value",p=!e&&t?o.static?t:t.prototype:null,h=e||(p?Object.getOwnPropertyDescriptor(p,o.name):{}),u=!1,f=r.length-1;f>=0;f--){var d={};for(var y in o)d[y]="access"===y?{}:o[y];for(var y in o.access)d.access[y]=o.access[y];d.addInitializer=function(t){if(u)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(t||null))};var m=(0,r[f])("accessor"===l?{get:h.get,set:h.set}:h[c],d);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(i=a(m.get))&&(h.get=i),(i=a(m.set))&&(h.set=i),(i=a(m.init))&&n.unshift(i)}else(i=a(m))&&("field"===l?n.unshift(i):h[c]=i)}p&&Object.defineProperty(p,o.name,h),u=!0},A=function(t,e,r){for(var o=arguments.length>2,n=0;n<e.length;n++)r=o?e[n].call(t,r):e[n].call(t);return o?r:void 0};(()=>{let t,e,r,o,n=[b({selector:"pg-nav",style:x.A,template:'<nav part="nav"> <a href="/"> <span part="name"></span> </a> <a href="/icons"> Icons </a> <a href="/icons"> Docs </a> <button part="menu"> <svg viewBox="0 0 24 24"> <path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"/> </svg> </button> </nav>'})],c=[],p=HTMLElement,u=[],f=[],d=[],y=[];(class extends p{static{e=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0;var g;r=[function(t,e){const r=e.name,o=Symbol(r),n=Symbol(`${r}:type`),c=Symbol(`${r}:meta`);return e.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[n]||"array"===this[n]?this[o][i]?this[o]:h(this[o]):this[o],set:t=>{const e=E(g?g(t):t);if("index"!==r&&this[n]!==e&&"null"!==this[n]&&"null"!==e)throw new Error(`@Prop() ${r} with type '${this[n]}' cannot be set to ${e}.`);if("array"===this[n]){if(!w(t))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===t)throw new Error("Setting an array to itself is not allowed.");const e=h(this[o]);if(e[s]){const n=t[i]?t[l]:t;e[a](this,n),this[o]=t,console.log(">>> trigger render???",this,r)}else this[o]=t}else this[o]=g?g(t):t,S(this,r)}})})),function(t){if(void 0===t&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==t&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!e.private){const{constructor:t}=this;t.observedAttributes??=[],t.symbols||(t.symbols={});const{symbols:e}=t,n=v(r);e[r]||(t.observedAttributes.push(n),e[r]=o)}return this[n]=E(t),"array"===this[n]?(this[o]=t,new Proxy(t,{get:(t,e)=>e===P?this[c]:(console.log("errr???"),Reflect.get(this[o],e)),set:(t,e,n)=>{if(e===P)return this[c]=n,!0;const s=Reflect.set(t,e,n);return"length"===e&&this[o].length===n||S(this,r),this[o]=n,s}})):(this[o]=g?g(this.getAttribute(r)??t):this.getAttribute(r)??t,this[o])}}],o=[function(t,e){const r=e.name,o=r.replace(/^\$/,"");e.addInitializer((function(){let t=null;Reflect.defineProperty(this,r,{get(){return t??(t=this.shadowRoot?.querySelector(`[part~=${o}]`))}})}))}],$(null,null,r,{kind:"field",name:"nav",static:!1,private:!1,access:{has:t=>"nav"in t,get:t=>t.nav,set:(t,e)=>{t.nav=e}},metadata:m},u,f),$(null,null,o,{kind:"field",name:"$path",static:!1,private:!1,access:{has:t=>"$path"in t,get:t=>t.$path,set:(t,e)=>{t.$path=e}},metadata:m},d,y),$(null,t={value:e},n,{kind:"class",name:e.name,metadata:m},null,c),e=t.value,m&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),A(e,c)}nav=A(this,u,"M0 0h24v24H0V0zm2 2v20h20V2H2z");$path=(A(this,f),A(this,d,void 0));render(){}constructor(){super(...arguments),A(this,y)}})})()})();
|
package/pgOverlay.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";Symbol("addObserver"),Symbol("removeObserver"),Symbol("getObservers"),Symbol("isProxy"),Symbol("getTarget");const e=new Map;window.observers=e;Error;Symbol("index");const t=Symbol("init"),o=Symbol("template"),n=Symbol("style"),r=Symbol("parent");function a(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function l(e={}){return function(l,s){if("class"!==s.kind)throw new Error("@Component() can only decorate a class");var c,i;Reflect.defineProperty(l,"name",{value:e.selector,writable:!1,configurable:!1}),!l.prototype[r]||l.prototype[r][l.prototype[r].length-1]instanceof Object.getPrototypeOf(l)?l.prototype instanceof HTMLElement&&(l.prototype[r]=[l.prototype],l.prototype[n]=e.style?[e.style]:[],l.prototype[o]=e.template||""):(l.prototype[r].push(l.prototype),l.prototype[n].push(e.style),l.prototype[o]=(c=l.prototype[o],(i=e.template||null)&&i.match(/<parent\/>/)?i.replace(/<parent\/>/,c):`${c}${i||""}`));const p=l.prototype.connectedCallback||(()=>{}),d=l.prototype.disconnectedCallback||(()=>{});l.prototype.connectedCallback=function(){if(this[t]||void 0!==e.template||void 0!==e.style)if(this[t]){if(this[t]&&e.style);else if(this[t]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=l.prototype[o]||"";const t=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=l.prototype[n].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(t)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const s=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&s.add(e.localName);const c=Array.from(s.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),i=()=>{this[r].map((e=>{e.render&&e.render.call(this,l.observedAttributes?l.observedAttributes.reduce(((e,t)=>(e[a(t)]=!0,e)),{}):{})}))};0===c.length?(this[t]=!0,p.call(this),i()):Promise.all(c).then((()=>{this[t]=!0,p.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));i()}))},l.prototype.disconnectedCallback=function(){d.call(this)},l.prototype.attributeChangedCallback=function(e,t,o){this[a(e)]=o},s.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${s.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,l)}}))}}Symbol("transmute");Symbol("hasProxy");Symbol("meta");var s=function(e,t,o,n,r,a){function l(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,i="getter"===c?"get":"setter"===c?"set":"value",p=!t&&e?n.static?e:e.prototype:null,d=t||(p?Object.getOwnPropertyDescriptor(p,n.name):{}),m=!1,
|
|
1
|
+
(()=>{"use strict";Symbol("addObserver"),Symbol("removeObserver"),Symbol("getObservers"),Symbol("swapObserver"),Symbol("isProxy"),Symbol("getTarget");const e=new Map;window.observers=e;Error;Symbol("index");const t=Symbol("init"),o=Symbol("template"),n=Symbol("style"),r=Symbol("parent");function a(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function l(e={}){return function(l,s){if("class"!==s.kind)throw new Error("@Component() can only decorate a class");var c,i;Reflect.defineProperty(l,"name",{value:e.selector,writable:!1,configurable:!1}),!l.prototype[r]||l.prototype[r][l.prototype[r].length-1]instanceof Object.getPrototypeOf(l)?l.prototype instanceof HTMLElement&&(l.prototype[r]=[l.prototype],l.prototype[n]=e.style?[e.style]:[],l.prototype[o]=e.template||""):(l.prototype[r].push(l.prototype),l.prototype[n].push(e.style),l.prototype[o]=(c=l.prototype[o],(i=e.template||null)&&i.match(/<parent\/>/)?i.replace(/<parent\/>/,c):`${c}${i||""}`));const p=l.prototype.connectedCallback||(()=>{}),d=l.prototype.disconnectedCallback||(()=>{});l.prototype.connectedCallback=function(){if(this[t]||void 0!==e.template||void 0!==e.style)if(this[t]){if(this[t]&&e.style);else if(this[t]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=l.prototype[o]||"";const t=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=l.prototype[n].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(t)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const s=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&s.add(e.localName);const c=Array.from(s.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),i=()=>{this[r].map((e=>{e.render&&e.render.call(this,l.observedAttributes?l.observedAttributes.reduce(((e,t)=>(e[a(t)]=!0,e)),{}):{})}))};0===c.length?(this[t]=!0,p.call(this),i()):Promise.all(c).then((()=>{this[t]=!0,p.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));i()}))},l.prototype.disconnectedCallback=function(){d.call(this)},l.prototype.attributeChangedCallback=function(e,t,o){this[a(e)]=o},s.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${s.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,l)}}))}}Symbol("transmute");Symbol("hasProxy");Symbol("meta");var s=function(e,t,o,n,r,a){function l(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,i="getter"===c?"get":"setter"===c?"set":"value",p=!t&&e?n.static?e:e.prototype:null,d=t||(p?Object.getOwnPropertyDescriptor(p,n.name):{}),m=!1,y=o.length-1;y>=0;y--){var u={};for(var h in n)u[h]="access"===h?{}:n[h];for(var h in n.access)u.access[h]=n.access[h];u.addInitializer=function(e){if(m)throw new TypeError("Cannot add initializers after decoration has completed");a.push(l(e||null))};var f=(0,o[y])("accessor"===c?{get:d.get,set:d.set}:d[i],u);if("accessor"===c){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(s=l(f.get))&&(d.get=s),(s=l(f.set))&&(d.set=s),(s=l(f.init))&&r.unshift(s)}else(s=l(f))&&("field"===c?r.unshift(s):d[i]=s)}p&&Object.defineProperty(p,n.name,d),m=!0},c=function(e,t,o){for(var n=arguments.length>2,r=0;r<t.length;r++)o=n?t[r].call(e,o):t[r].call(e);return n?o:void 0};const i=new Set,p=new Map;(()=>{let e,t,o=[l()],n=[],r=HTMLElement;(class extends r{static{t=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;s(null,e={value:t},o,{kind:"class",name:t.name,metadata:a},null,n),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),c(t,n)}static open(e={}){var t=document.createElement(this.name);return Object.assign(t,e),document.body.appendChild(t),i.add(t),new Promise((e=>{p.set(t,e)}))}close(e){this.remove(),i.delete(this);const t=p.get(this);t&&t(e),p.delete(this)}})})()})();
|
package/pgOverlayContextMenu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(i[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},601:e=>{e.exports=function(e){return e[1]}},891:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(601),o=n.n(r),s=n(314),i=n.n(s)()(o());i.push([e.id,':host {\n display: contents;\n}\n\n[part="overlay"] {\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n overflow: visible;\n --pg-menu-box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.25);\n top: anchor(top);\n left: anchor(left);\n min-width: 10rem;\n margin: var(--pg-overlay-menu-_y, 0) 0 0 var(--pg-overlay-menu-_x, 0);\n}',""]);var a=new CSSStyleSheet;a.replaceSync(i.toString());const l=a}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=Symbol("addObserver"),o=Symbol("removeObserver"),s=Symbol("getObservers"),i=Symbol("isProxy"),a=Symbol("getTarget"),l=["fill","pop","push","reverse","shift","sort","splice","unshift"],c=new Map;function u(e){return new Proxy(e,{get(t,n){if("symbol"==typeof n){switch(n){case i:return!0;case a:return t;case s:return c.has(e);case r:return(t,n)=>{c.has(e)?c.get(e).has(t)?c.get(e).get(t).push(n):c.get(e).set(t,[n]):c.set(e,new Map([[t,[n]]]))};case o:return t=>{c.has(e)&&(c.get(e).delete(t),0===c.get(e).size&&c.delete(e))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(t,n)}throw new Error("Unsupported symbol")}if(n in t){if(!Number.isNaN(Number(n)))return"object"==typeof t[n]?u(t[n]):t[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(l.includes(n))return c.has(t)?function(){const e=Array.prototype[n].apply(t,arguments);return c.get(t).forEach(((e,r)=>{e.forEach((e=>{e(t,n,arguments)}))})),e}:Reflect.get(t,n);if(t[n]instanceof Array)return u(t[n])}return Reflect.get(t,n)},set(e,t,n){if("symbol"==typeof t)throw new Error("Setting symbols not allowed.");if(Array.isArray(e))return Reflect.set(e,t,n);if(c.has(e)){c.get(e).forEach(((e,r)=>{e.forEach((e=>{e(t,n)}))}))}return Reflect.set(e,t,n)}})}window.observers=c;class PropError extends Error{constructor(e,t){super(e),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}}Symbol("index");const h=Symbol("init"),d=Symbol("template"),p=Symbol("style"),f=Symbol("parent");function m(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function y(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function v(e={}){return function(t,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,o;Reflect.defineProperty(t,"name",{value:e.selector,writable:!1,configurable:!1}),!t.prototype[f]||t.prototype[f][t.prototype[f].length-1]instanceof Object.getPrototypeOf(t)?t.prototype instanceof HTMLElement&&(t.prototype[f]=[t.prototype],t.prototype[p]=e.style?[e.style]:[],t.prototype[d]=e.template||""):(t.prototype[f].push(t.prototype),t.prototype[p].push(e.style),t.prototype[d]=(r=t.prototype[d],(o=e.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,r):`${r}${o||""}`));const s=t.prototype.connectedCallback||(()=>{}),i=t.prototype.disconnectedCallback||(()=>{});t.prototype.connectedCallback=function(){if(this[h]||void 0!==e.template||void 0!==e.style)if(this[h]){if(this[h]&&e.style);else if(this[h]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=t.prototype[d]||"";const n=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=t.prototype[p].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(n)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&n.add(e.localName);const r=Array.from(n.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),o=()=>{this[f].map((e=>{e.render&&e.render.call(this,t.observedAttributes?t.observedAttributes.reduce(((e,t)=>(e[y(t)]=!0,e)),{}):{})}))};0===r.length?(this[h]=!0,s.call(this),o()):Promise.all(r).then((()=>{this[h]=!0,s.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));o()}))},t.prototype.disconnectedCallback=function(){i.call(this)},t.prototype.attributeChangedCallback=function(e,t,n){this[y(e)]=n},n.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${n.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,t)}}))}}Symbol("transmute");function g(e){return!!e&&e.constructor===Array}function b(e,t){e[h]&&e[f].map((n=>{n.render&&n.render.call(e,{[t]:!0})}))}function w(e){return null===e?"null":g(e)?"array":typeof e}function S(e){return function(t,n){const r=n.name,o=Symbol(r),l=Symbol(`${r}:type`),c=Symbol(`${r}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[l]||"array"===this[l]?this[o][i]?this[o]:u(this[o]):this[o],set:t=>{const n=w(e?e(t):t);if("index"!==r&&this[l]!==n&&"null"!==this[l]&&"null"!==n)throw new Error(`@Prop() ${r} with type '${this[l]}' cannot be set to ${n}.`);if("array"===this[l]){if(!g(t))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===t)throw new Error("Setting an array to itself is not allowed.");const e=u(this[o]);if(e[s]){const n=t[i]?(c=t)[i]&&c[a]:t;e.splice(0,this[o].length,...n)}else this[o]=t}else this[o]=e?e(t):t,b(this,r);var c}})})),function(t){if(void 0===t&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==t&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,n=m(r);t[r]||(e.observedAttributes.push(n),t[r]=o)}return this[l]=w(t),"array"===this[l]?(this[o]=t,new Proxy(t,{get:(e,t)=>t===x?this[c]:(console.log("errr???"),Reflect.get(this[o],t)),set:(e,t,n)=>{if(t===x)return this[c]=n,!0;const s=Reflect.set(e,t,n);return"length"===t&&this[o].length===n||b(this,r),this[o]=n,s}})):(this[o]=e?e(this.getAttribute(r)??t):this.getAttribute(r)??t,this[o])}}}function E(){return function(e,t){const n=t.name,r=n.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,n,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}}Symbol("hasProxy");const x=Symbol("meta");var $=function(e,t,n,r,o,s){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,p=n.length-1;p>=0;p--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(e||null))};var y=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=i(y.get))&&(h.get=a),(a=i(y.set))&&(h.set=a),(a=i(y.init))&&o.unshift(a)}else(a=i(y))&&("field"===l?o.unshift(a):h[c]=a)}u&&Object.defineProperty(u,r.name,h),d=!0},P=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const O=new Set,k=new Map;const C=(()=>{let e,t,n=[v()],r=[],o=HTMLElement;(class extends o{static{t=this}static{const s="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;$(null,e={value:t},n,{kind:"class",name:t.name,metadata:s},null,r),t=e.value,s&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),P(t,r)}static open(e={}){var t=document.createElement(this.name);return Object.assign(t,e),document.body.appendChild(t),O.add(t),new Promise((e=>{k.set(t,e)}))}close(e){this.remove(),O.delete(this);const t=k.get(this);t&&t(e),k.delete(this)}});return t})();var j=n(891),A=function(e,t,n,r,o,s){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,p=n.length-1;p>=0;p--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(e||null))};var y=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=i(y.get))&&(h.get=a),(a=i(y.set))&&(h.set=a),(a=i(y.init))&&o.unshift(a)}else(a=i(y))&&("field"===l?o.unshift(a):h[c]=a)}u&&Object.defineProperty(u,r.name,h),d=!0},R=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const T=[],z=[];(()=>{let e,t,n,r,o,s,i,a,l,c,u=[v({selector:"pg-overlay-context-menu",template:'<div part="overlay"> <pg-menu part="menu"></pg-menu> </div>',style:j.A})],h=[],d=C,p=[],f=[],m=[],y=[],g=[],b=[],w=[],x=[],$=[],P=[],O=[],k=[],L=[],D=[],M=[],N=[];(class extends d{static{t=this}static{const v="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;n=[E()],r=[E()],o=[S()],s=[S()],i=[S()],a=[S()],l=[S()],c=[S()],A(null,null,n,{kind:"field",name:"$overlay",static:!1,private:!1,access:{has:e=>"$overlay"in e,get:e=>e.$overlay,set:(e,t)=>{e.$overlay=t}},metadata:v},p,f),A(null,null,r,{kind:"field",name:"$menu",static:!1,private:!1,access:{has:e=>"$menu"in e,get:e=>e.$menu,set:(e,t)=>{e.$menu=t}},metadata:v},m,y),A(null,null,o,{kind:"field",name:"source",static:!1,private:!1,access:{has:e=>"source"in e,get:e=>e.source,set:(e,t)=>{e.source=t}},metadata:v},g,b),A(null,null,s,{kind:"field",name:"x",static:!1,private:!1,access:{has:e=>"x"in e,get:e=>e.x,set:(e,t)=>{e.x=t}},metadata:v},w,x),A(null,null,i,{kind:"field",name:"y",static:!1,private:!1,access:{has:e=>"y"in e,get:e=>e.y,set:(e,t)=>{e.y=t}},metadata:v},$,P),A(null,null,a,{kind:"field",name:"default",static:!1,private:!1,access:{has:e=>"default"in e,get:e=>e.default,set:(e,t)=>{e.default=t}},metadata:v},O,k),A(null,null,l,{kind:"field",name:"items",static:!1,private:!1,access:{has:e=>"items"in e,get:e=>e.items,set:(e,t)=>{e.items=t}},metadata:v},L,D),A(null,null,c,{kind:"field",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:v},M,N),A(null,e={value:t},u,{kind:"class",name:t.name,metadata:v},null,h),t=e.value,v&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:v}),R(t,h)}$overlay=R(this,p,void 0);$menu=(R(this,f),R(this,m,void 0));source=(R(this,y),R(this,g,null));x=(R(this,b),R(this,w,0));y=(R(this,x),R(this,$,0));default=(R(this,P),R(this,O,null));items=(R(this,k),R(this,L,[]));value=(R(this,D),R(this,M,null));render(e){e.items&&(this.$menu.items=this.items)}connectedCallback(){T.pop()?.close(),T.push(this),z.push(this),this.$menu.addEventListener("select",this.#e.bind(this)),this.$menu.addEventListener("close",this.#t.bind(this)),this.$overlay.popover="auto",null!==this.source&&this.$overlay.showPopover({source:this.source}),this.$overlay.addEventListener("toggle",this.#n.bind(this));const e=this.source?.getBoundingClientRect(),t=this.x-(e?.left||0),n=this.y-(e?.top||0);this.$overlay.style.setProperty("--pg-overlay-menu-_x",`${t}px`),this.$overlay.style.setProperty("--pg-overlay-menu-_y",`${n}px`),this.$menu.focus(0),this.#r=this.#o.bind(this),document.addEventListener("pointerdown",this.#r)}#s=(R(this,N),!1);#r;#o(e){this.#s=e.composedPath().includes(this.source)}#n(e){"closed"===e.newState&&(this.close(),0===z.length&&this.#s&&(console.log(e),this.source?.focus()))}disconnectedCallback(){z.pop(),document.removeEventListener("pointerdown",this.#r)}#t(e){this.close(),this.source?.focus()}#e(e){e.detail.item.index=e.detail.index,this.close(e.detail.item),this.source?.focus()}})})()})();
|
|
1
|
+
(()=>{"use strict";var e={314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(i[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},601:e=>{e.exports=function(e){return e[1]}},891:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(601),o=n.n(r),s=n(314),i=n.n(s)()(o());i.push([e.id,':host {\n display: contents;\n}\n\n[part="overlay"] {\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n overflow: visible;\n --pg-menu-box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.25);\n top: anchor(top);\n left: anchor(left);\n min-width: 10rem;\n margin: var(--pg-overlay-menu-_y, 0) 0 0 var(--pg-overlay-menu-_x, 0);\n}',""]);var a=new CSSStyleSheet;a.replaceSync(i.toString());const l=a}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=Symbol("addObserver"),o=Symbol("removeObserver"),s=Symbol("getObservers"),i=Symbol("swapObserver"),a=Symbol("isProxy"),l=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],u=new Map;function h(e){return new Proxy(e,{get(t,n){if("symbol"==typeof n){switch(n){case a:return!0;case l:return t;case s:return u.has(e);case i:return(t,n)=>{const r=u.get(e);r.forEach(((o,s)=>{if(s.getRootNode().host===t){const t=r.get(s);u.has(n)?u.get(n).has(s)?u.get(n).get(s).push(r.get(s)):u.get(n).set(s,r.get(s)):u.set(n,new Map([[s,t]])),u.delete(e),t.forEach((e=>{e(null,d.swap,[n])}))}}))};case r:return(t,n)=>{u.has(e)?u.get(e).has(t)?u.get(e).get(t).push(n):u.get(e).set(t,[n]):u.set(e,new Map([[t,[n]]]))};case o:return t=>{u.has(e)&&(u.get(e).delete(t),0===u.get(e).size&&u.delete(e))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(t,n)}throw new Error("Unsupported symbol")}if(n in t){if(!Number.isNaN(Number(n)))return"object"==typeof t[n]?h(t[n]):t[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(c.includes(n))return u.has(t)?function(){const e=Array.prototype[n].apply(t,arguments);return u.get(t).forEach(((e,r)=>{e.forEach((e=>{e(t,n,arguments)}))})),e}:Reflect.get(t,n);if(t[n]instanceof Array)return h(t[n])}return Reflect.get(t,n)},set(e,t,n){if("symbol"==typeof t)throw new Error("Setting symbols not allowed.");if(Array.isArray(e))return Reflect.set(e,t,n);if(u.has(e)){u.get(e).forEach(((e,r)=>{e.forEach((e=>{e(t,n)}))}))}return Reflect.set(e,t,n)}})}window.observers=u;const d={fill:"fill",pop:"pop",push:"push",reverse:"reverse",shift:"shift",sort:"sort",splice:"splice",unshift:"unshift",swap:"swap"};class PropError extends Error{constructor(e,t){super(e),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}}Symbol("index");const p=Symbol("init"),f=Symbol("template"),m=Symbol("style"),y=Symbol("parent");function v(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function g(e){return e.replace(/-([a-z])/g,(e=>e[1].toUpperCase()))}function b(e={}){return function(t,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,o;Reflect.defineProperty(t,"name",{value:e.selector,writable:!1,configurable:!1}),!t.prototype[y]||t.prototype[y][t.prototype[y].length-1]instanceof Object.getPrototypeOf(t)?t.prototype instanceof HTMLElement&&(t.prototype[y]=[t.prototype],t.prototype[m]=e.style?[e.style]:[],t.prototype[f]=e.template||""):(t.prototype[y].push(t.prototype),t.prototype[m].push(e.style),t.prototype[f]=(r=t.prototype[f],(o=e.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,r):`${r}${o||""}`));const s=t.prototype.connectedCallback||(()=>{}),i=t.prototype.disconnectedCallback||(()=>{});t.prototype.connectedCallback=function(){if(this[p]||void 0!==e.template||void 0!==e.style)if(this[p]){if(this[p]&&e.style);else if(this[p]&&e.selector&&!e.template)throw new Error("You need to pass a template for an extended element.")}else{if(!1===e.useShadow)throw new Error("unsupported");{const e=document.createElement("template");e.innerHTML=t.prototype[f]||"";const n=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=t.prototype[m].map((e=>{if(e instanceof CSSStyleSheet)return e;var t=new CSSStyleSheet;return t.replaceSync(e.toString()),t})),r.appendChild(n)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const n=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&n.add(e.localName);const r=Array.from(n.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),o=()=>{this[y].map((e=>{e.render&&e.render.call(this,t.observedAttributes?t.observedAttributes.reduce(((e,t)=>(e[g(t)]=!0,e)),{}):{})}))};0===r.length?(this[p]=!0,s.call(this),o()):Promise.all(r).then((()=>{this[p]=!0,s.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));o()}))},t.prototype.disconnectedCallback=function(){i.call(this)},t.prototype.attributeChangedCallback=function(e,t,n){this[g(e)]=n},n.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${n.name} duplicate selector '${e.selector}'`);window.customElements.define(e.selector,t)}}))}}Symbol("transmute");function w(e){return!!e&&e.constructor===Array}function S(e,t){e[p]&&e[y].map((n=>{n.render&&n.render.call(e,{[t]:!0})}))}function E(e){return null===e?"null":w(e)?"array":typeof e}function x(e){return function(t,n){const r=n.name,o=Symbol(r),c=Symbol(`${r}:type`),u=Symbol(`${r}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[c]||"array"===this[c]?this[o][a]?this[o]:h(this[o]):this[o],set:t=>{const n=E(e?e(t):t);if("index"!==r&&this[c]!==n&&"null"!==this[c]&&"null"!==n)throw new Error(`@Prop() ${r} with type '${this[c]}' cannot be set to ${n}.`);if("array"===this[c]){if(!w(t))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===t)throw new Error("Setting an array to itself is not allowed.");const e=h(this[o]);if(e[s]){const n=t[a]?t[l]:t;e[i](this,n),this[o]=t,console.log(">>> trigger render???",this,r)}else this[o]=t}else this[o]=e?e(t):t,S(this,r)}})})),function(t){if(void 0===t&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==t&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,n=v(r);t[r]||(e.observedAttributes.push(n),t[r]=o)}return this[c]=E(t),"array"===this[c]?(this[o]=t,new Proxy(t,{get:(e,t)=>t===P?this[u]:(console.log("errr???"),Reflect.get(this[o],t)),set:(e,t,n)=>{if(t===P)return this[u]=n,!0;const s=Reflect.set(e,t,n);return"length"===t&&this[o].length===n||S(this,r),this[o]=n,s}})):(this[o]=e?e(this.getAttribute(r)??t):this.getAttribute(r)??t,this[o])}}}function $(){return function(e,t){const n=t.name,r=n.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,n,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}}Symbol("hasProxy");const P=Symbol("meta");var O=function(e,t,n,r,o,s){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,p=n.length-1;p>=0;p--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(e||null))};var y=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=i(y.get))&&(h.get=a),(a=i(y.set))&&(h.set=a),(a=i(y.init))&&o.unshift(a)}else(a=i(y))&&("field"===l?o.unshift(a):h[c]=a)}u&&Object.defineProperty(u,r.name,h),d=!0},k=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const C=new Set,j=new Map;const A=(()=>{let e,t,n=[b()],r=[],o=HTMLElement;(class extends o{static{t=this}static{const s="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;O(null,e={value:t},n,{kind:"class",name:t.name,metadata:s},null,r),t=e.value,s&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),k(t,r)}static open(e={}){var t=document.createElement(this.name);return Object.assign(t,e),document.body.appendChild(t),C.add(t),new Promise((e=>{j.set(t,e)}))}close(e){this.remove(),C.delete(this);const t=j.get(this);t&&t(e),j.delete(this)}});return t})();var R=n(891),T=function(e,t,n,r,o,s){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,p=n.length-1;p>=0;p--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(e||null))};var y=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=i(y.get))&&(h.get=a),(a=i(y.set))&&(h.set=a),(a=i(y.init))&&o.unshift(a)}else(a=i(y))&&("field"===l?o.unshift(a):h[c]=a)}u&&Object.defineProperty(u,r.name,h),d=!0},z=function(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0};const L=[],D=[];(()=>{let e,t,n,r,o,s,i,a,l,c,u=[b({selector:"pg-overlay-context-menu",template:'<div part="overlay"> <pg-menu part="menu"></pg-menu> </div>',style:R.A})],h=[],d=A,p=[],f=[],m=[],y=[],v=[],g=[],w=[],S=[],E=[],P=[],O=[],k=[],C=[],j=[],M=[],N=[];(class extends d{static{t=this}static{const b="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;n=[$()],r=[$()],o=[x()],s=[x()],i=[x()],a=[x()],l=[x()],c=[x()],T(null,null,n,{kind:"field",name:"$overlay",static:!1,private:!1,access:{has:e=>"$overlay"in e,get:e=>e.$overlay,set:(e,t)=>{e.$overlay=t}},metadata:b},p,f),T(null,null,r,{kind:"field",name:"$menu",static:!1,private:!1,access:{has:e=>"$menu"in e,get:e=>e.$menu,set:(e,t)=>{e.$menu=t}},metadata:b},m,y),T(null,null,o,{kind:"field",name:"source",static:!1,private:!1,access:{has:e=>"source"in e,get:e=>e.source,set:(e,t)=>{e.source=t}},metadata:b},v,g),T(null,null,s,{kind:"field",name:"x",static:!1,private:!1,access:{has:e=>"x"in e,get:e=>e.x,set:(e,t)=>{e.x=t}},metadata:b},w,S),T(null,null,i,{kind:"field",name:"y",static:!1,private:!1,access:{has:e=>"y"in e,get:e=>e.y,set:(e,t)=>{e.y=t}},metadata:b},E,P),T(null,null,a,{kind:"field",name:"default",static:!1,private:!1,access:{has:e=>"default"in e,get:e=>e.default,set:(e,t)=>{e.default=t}},metadata:b},O,k),T(null,null,l,{kind:"field",name:"items",static:!1,private:!1,access:{has:e=>"items"in e,get:e=>e.items,set:(e,t)=>{e.items=t}},metadata:b},C,j),T(null,null,c,{kind:"field",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:b},M,N),T(null,e={value:t},u,{kind:"class",name:t.name,metadata:b},null,h),t=e.value,b&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b}),z(t,h)}$overlay=z(this,p,void 0);$menu=(z(this,f),z(this,m,void 0));source=(z(this,y),z(this,v,null));x=(z(this,g),z(this,w,0));y=(z(this,S),z(this,E,0));default=(z(this,P),z(this,O,null));items=(z(this,k),z(this,C,[]));value=(z(this,j),z(this,M,null));render(e){e.items&&(this.$menu.items=this.items)}connectedCallback(){L.pop()?.close(),L.push(this),D.push(this),this.$menu.addEventListener("select",this.#e.bind(this)),this.$menu.addEventListener("close",this.#t.bind(this)),this.$overlay.popover="auto",null!==this.source&&this.$overlay.showPopover({source:this.source}),this.$overlay.addEventListener("toggle",this.#n.bind(this));const e=this.source?.getBoundingClientRect(),t=this.x-(e?.left||0),n=this.y-(e?.top||0);this.$overlay.style.setProperty("--pg-overlay-menu-_x",`${t}px`),this.$overlay.style.setProperty("--pg-overlay-menu-_y",`${n}px`),this.$menu.focus(0),this.#r=this.#o.bind(this),document.addEventListener("pointerdown",this.#r)}#s=(z(this,N),!1);#r;#o(e){this.#s=e.composedPath().includes(this.source)}#n(e){"closed"===e.newState&&(this.close(),0===D.length&&this.#s&&(console.log(e),this.source?.focus()))}disconnectedCallback(){D.pop(),document.removeEventListener("pointerdown",this.#r)}#t(e){this.close(),this.source?.focus()}#e(e){e.detail.item.index=e.detail.index,this.close(e.detail.item),this.source?.focus()}})})()})();
|