@pictogrammers/components 0.4.9 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/package.json +1 -1
  2. package/pg/annoy/annoy.css +1 -1
  3. package/pg/button/button.css +5 -4
  4. package/pg/buttonLink/buttonLink.css +1 -1
  5. package/pg/buttonMenu/__examples__/basic/basic.ts +2 -2
  6. package/pg/buttonMenu/buttonMenu.ts +4 -1
  7. package/pg/cardUser/cardUser.css +1 -1
  8. package/pg/database/__examples__/basic/basic.ts +0 -1
  9. package/pg/grid/__examples__/basic/basic.ts +1 -4
  10. package/pg/grid/grid.css +1 -1
  11. package/pg/header/header.css +1 -1
  12. package/pg/icon/__examples__/basic/basic.ts +1 -1
  13. package/pg/inputCheck/__examples__/basic/basic.ts +1 -1
  14. package/pg/inputCheck/inputCheck.css +5 -0
  15. package/pg/inputCheck/inputCheck.ts +4 -0
  16. package/pg/inputCheckList/__examples__/basic/basic.ts +1 -1
  17. package/pg/inputFileLocal/inputFileLocal.css +1 -1
  18. package/pg/inputNumber/README.md +27 -0
  19. package/pg/inputNumber/__examples__/basic/basic.html +9 -0
  20. package/pg/inputNumber/__examples__/basic/basic.ts +30 -0
  21. package/pg/inputNumber/inputNumber.css +34 -0
  22. package/pg/inputNumber/inputNumber.html +1 -0
  23. package/pg/inputNumber/inputNumber.spec.ts +59 -0
  24. package/pg/inputNumber/inputNumber.ts +63 -0
  25. package/pg/inputPixelEditor/README.md +211 -29
  26. package/pg/inputPixelEditor/__examples__/basic/basic.css +8 -0
  27. package/pg/inputPixelEditor/__examples__/basic/basic.html +29 -7
  28. package/pg/inputPixelEditor/__examples__/basic/basic.ts +274 -13
  29. package/pg/inputPixelEditor/__examples__/basic/constants.ts +62 -0
  30. package/pg/inputPixelEditor/inputPixelEditor.css +37 -2
  31. package/pg/inputPixelEditor/inputPixelEditor.html +22 -0
  32. package/pg/inputPixelEditor/inputPixelEditor.ts +819 -80
  33. package/pg/inputPixelEditor/utils/bitmapToMask.ts +22 -8
  34. package/pg/inputPixelEditor/utils/blobToImage.ts +11 -0
  35. package/pg/inputPixelEditor/utils/canvasToPngBuffer.ts +12 -0
  36. package/pg/inputPixelEditor/utils/constants.ts +55 -1
  37. package/pg/inputPixelEditor/utils/crc32.ts +116 -0
  38. package/pg/inputPixelEditor/utils/diffMap.ts +32 -0
  39. package/pg/inputPixelEditor/utils/generateGradient.ts +112 -0
  40. package/pg/inputPixelEditor/utils/getFloodFill.ts +83 -0
  41. package/pg/inputPixelEditor/utils/getGridColorIndexes.ts +13 -0
  42. package/pg/inputPixelEditor/utils/getOutline.ts +92 -0
  43. package/pg/inputPixelEditor/utils/inputMode.ts +7 -1
  44. package/pg/inputPixelEditor/utils/pixelSizes.ts +47 -0
  45. package/pg/inputPixelEditor/utils/pngMetadata.ts +487 -0
  46. package/pg/inputSelect/inputSelect.css +4 -4
  47. package/pg/inputText/inputText.css +14 -7
  48. package/pg/inputText/inputText.ts +5 -1
  49. package/pg/json/README.md +59 -0
  50. package/pg/json/__examples__/basic/basic.html +4 -0
  51. package/pg/json/__examples__/basic/basic.ts +31 -0
  52. package/pg/json/json.css +9 -0
  53. package/pg/json/json.html +1 -0
  54. package/pg/json/json.ts +124 -0
  55. package/pg/jsonArray/README.md +3 -0
  56. package/pg/jsonArray/jsonArray.css +15 -0
  57. package/pg/jsonArray/jsonArray.html +7 -0
  58. package/pg/jsonArray/jsonArray.ts +55 -0
  59. package/pg/jsonBoolean/README.md +3 -0
  60. package/pg/jsonBoolean/jsonBoolean.css +27 -0
  61. package/pg/jsonBoolean/jsonBoolean.html +5 -0
  62. package/pg/jsonBoolean/jsonBoolean.ts +69 -0
  63. package/pg/jsonNumber/README.md +3 -0
  64. package/pg/jsonNumber/jsonNumber.css +21 -0
  65. package/pg/jsonNumber/jsonNumber.html +5 -0
  66. package/pg/jsonNumber/jsonNumber.ts +42 -0
  67. package/pg/jsonObject/README.md +3 -0
  68. package/pg/jsonObject/jsonObject.css +11 -0
  69. package/pg/jsonObject/jsonObject.html +5 -0
  70. package/pg/jsonObject/jsonObject.ts +55 -0
  71. package/pg/jsonString/README.md +3 -0
  72. package/pg/jsonString/jsonString.css +21 -0
  73. package/pg/jsonString/jsonString.html +5 -0
  74. package/pg/jsonString/jsonString.ts +42 -0
  75. package/pg/menu/menu.ts +6 -5
  76. package/pg/menuItem/README.md +13 -2
  77. package/pg/menuItem/menuItem.css +17 -22
  78. package/pg/menuItem/menuItem.ts +8 -3
  79. package/pg/menuItemIcon/__examples__/basic/basic.html +1 -1
  80. package/pg/menuItemIcon/__examples__/basic/basic.ts +7 -0
  81. package/pg/menuItemIcon/menuItemIcon.css +18 -15
  82. package/pg/menuItemIcon/menuItemIcon.ts +8 -4
  83. package/pg/modification/__examples__/basic/basic.ts +1 -1
  84. package/pg/overlayMenu/overlayMenu.ts +6 -2
  85. package/pg/overlaySelectMenu/overlaySelectMenu.ts +6 -0
  86. package/pg/overlaySubMenu/overlaySubMenu.ts +6 -2
  87. package/pg/scroll/__examples__/basic/basic.ts +1 -1
  88. package/pg/search/search.css +1 -1
  89. package/pg/table/README.md +108 -0
  90. package/pg/table/__examples__/basic/basic.css +0 -0
  91. package/pg/table/__examples__/basic/basic.html +10 -0
  92. package/pg/table/__examples__/basic/basic.ts +111 -0
  93. package/pg/table/table.css +20 -0
  94. package/pg/table/table.html +6 -0
  95. package/pg/table/table.ts +86 -0
  96. package/pg/tableCellButtonIcon/README.md +3 -0
  97. package/pg/tableCellButtonIcon/tableCellButtonIcon.css +16 -0
  98. package/pg/tableCellButtonIcon/tableCellButtonIcon.html +5 -0
  99. package/pg/tableCellButtonIcon/tableCellButtonIcon.ts +34 -0
  100. package/pg/tableCellCheck/README.md +3 -0
  101. package/pg/tableCellCheck/tableCellCheck.css +15 -0
  102. package/pg/tableCellCheck/tableCellCheck.html +3 -0
  103. package/pg/tableCellCheck/tableCellCheck.ts +43 -0
  104. package/pg/tableCellNumber/README.md +3 -0
  105. package/pg/tableCellNumber/tableCellNumber.css +11 -0
  106. package/pg/tableCellNumber/tableCellNumber.html +3 -0
  107. package/pg/tableCellNumber/tableCellNumber.ts +40 -0
  108. package/pg/tableCellText/README.md +3 -0
  109. package/pg/tableCellText/tableCellText.css +11 -0
  110. package/pg/tableCellText/tableCellText.html +3 -0
  111. package/pg/tableCellText/tableCellText.ts +62 -0
  112. package/pg/tableColumn/README.md +3 -0
  113. package/pg/tableColumn/tableColumn.css +12 -0
  114. package/pg/tableColumn/tableColumn.html +1 -0
  115. package/pg/tableColumn/tableColumn.ts +29 -0
  116. package/pg/tableRow/README.md +3 -0
  117. package/pg/tableRow/tableRow.css +11 -0
  118. package/pg/tableRow/tableRow.html +1 -0
  119. package/pg/tableRow/tableRow.ts +77 -0
  120. package/pg/tabs/tabs.css +1 -1
  121. package/pg/tree/README.md +0 -3
  122. package/pg/tree/__examples__/basic/basic.ts +0 -1
  123. package/pg/treeItem/treeItem.css +3 -3
  124. package/favicon.svg +0 -20
  125. package/index.html +0 -321
  126. package/main.js +0 -2
  127. package/main.js.LICENSE.txt +0 -10
  128. package/pgAnnoy.js +0 -1
  129. package/pgApp.js +0 -1
  130. package/pgAvatar.js +0 -1
  131. package/pgButton.js +0 -1
  132. package/pgButtonGroup.js +0 -1
  133. package/pgButtonLink.js +0 -1
  134. package/pgButtonMenu.js +0 -1
  135. package/pgButtonToggle.js +0 -1
  136. package/pgCard.js +0 -1
  137. package/pgCardUser.js +0 -1
  138. package/pgColor.js +0 -1
  139. package/pgDatabase.js +0 -1
  140. package/pgDropdown.js +0 -1
  141. package/pgGrid.js +0 -1
  142. package/pgHeader.js +0 -1
  143. package/pgIcon.js +0 -1
  144. package/pgInputCheck.js +0 -1
  145. package/pgInputCheckList.js +0 -1
  146. package/pgInputFileLocal.js +0 -1
  147. package/pgInputHexRgb.js +0 -1
  148. package/pgInputPixelEditor.js +0 -1
  149. package/pgInputRange.js +0 -1
  150. package/pgInputSelect.js +0 -1
  151. package/pgInputText.js +0 -1
  152. package/pgInputTextIcon.js +0 -1
  153. package/pgInputUserSelect.js +0 -1
  154. package/pgListTag.js +0 -1
  155. package/pgMarkdown.js +0 -2
  156. package/pgMarkdown.js.LICENSE.txt +0 -10
  157. package/pgMenu.js +0 -1
  158. package/pgMenuDivider.js +0 -1
  159. package/pgMenuIcon.js +0 -1
  160. package/pgMenuItem.js +0 -1
  161. package/pgMenuItemIcon.js +0 -1
  162. package/pgModal.js +0 -1
  163. package/pgModalAlert.js +0 -1
  164. package/pgModification.js +0 -1
  165. package/pgNav.js +0 -1
  166. package/pgOverlay.js +0 -1
  167. package/pgOverlayContextMenu.js +0 -1
  168. package/pgOverlayMenu.js +0 -1
  169. package/pgOverlaySelectMenu.js +0 -1
  170. package/pgOverlaySubMenu.js +0 -1
  171. package/pgPicker.js +0 -1
  172. package/pgPreview.js +0 -1
  173. package/pgScroll.js +0 -1
  174. package/pgSearch.js +0 -1
  175. package/pgTab.js +0 -1
  176. package/pgTabs.js +0 -1
  177. package/pgToast.js +0 -1
  178. package/pgToasts.js +0 -1
  179. package/pgTooltip.js +0 -1
  180. package/pgTree.js +0 -1
  181. package/pgTreeButtonIcon.js +0 -1
  182. package/pgTreeItem.js +0 -1
@@ -1 +0,0 @@
1
- (()=>{"use strict";var t={314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",s=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),s&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),s&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,s,n,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(s)for(var o=0;o<this.length;o++){var h=this[o][0];null!=h&&(a[h]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);s&&a[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),e.push(c))}},e}},601:t=>{t.exports=function(t){return t[1]}},713:(t,e,i)=>{i.d(e,{A:()=>h});var s=i(601),n=i.n(s),r=i(314),a=i.n(r)()(n());a.push([t.id,':host {\n display: inline-flex;\n}\n\n[part="wrapper"] {\n display: flex;\n position: relative;\n outline: 0;\n}\n\n[part="wrapper"]:focus-visible::before {\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.125rem;\n box-shadow: 0 0 0 3px var(--pg-focus-color, rgb(79, 143, 249, 0.5));\n}\n\ncanvas {\n touch-action: none;\n user-select: none;\n outline: 0;\n}',""]);var o=new CSSStyleSheet;o.replaceSync(a.toString());const h=o}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={id:s,exports:{}};return t[s](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const s=Symbol("addObserver"),n=Symbol("removeObserver"),r=Symbol("getObservers"),a=Symbol("swapObserver"),o=Symbol("isProxy"),h=Symbol("getTarget"),l=["fill","pop","push","reverse","shift","sort","splice","unshift"],c=new Map;function d(t){return new Proxy(t,{get(e,i){if("symbol"==typeof i){switch(i){case o:return!0;case h:return e;case r:return e=>{const i=c.get(t);return i?.has(e)};case a:return(e,i)=>{const s=c.get(t);if(s){const t=s.get(e);t&&t.forEach(((s,n)=>{if(!s)throw new Error("Unreachable");{const t=c.get(i);if(t){const i=t.get(e);i?i.set(n,s):t.set(e,new Map([[n,s]]))}else c.set(i,new Map([[e,new Map([[n,s]])]]))}t.delete(n),s.forEach((t=>{t(null,p.swap,[i])}))}))}};case s:return(e,i)=>{const s=e.getRootNode().host,n=c.get(t);if(n){const t=n.get(s);if(t){const s=t.get(e);s?s.push(i):t.set(e,[i])}else n.set(s,new Map([[e,[i]]]))}else c.set(t,new Map([[s,new Map([[e,[i]]])]]))};case n:return e=>{const i=e.getRootNode().host,s=c.get(t);s&&(s.delete(i),0===s.size&&c.delete(t))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(e,i)}throw new Error("Unsupported symbol")}if(i in e){if(!Number.isNaN(Number(i)))return"object"==typeof e[i]?d(e[i]):e[i];if("copyWithin"===i)throw new Error("Unsupported array method copyWithin");if(l.includes(i))return c.has(e)?function(){const t=Array.prototype[i].apply(e,arguments),s=c.get(e);return s?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,i,arguments)}))}))})),t}:Reflect.get(e,i);if(e[i]instanceof Array)return d(e[i])}return Reflect.get(e,i)},set(t,e,i){if("symbol"==typeof e)throw new Error("Setting symbols not allowed.");if(Array.isArray(t))return Reflect.set(t,e,i);if(c.has(t)){const s=c.get(t);s?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,i)}))}))}))}return Reflect.set(t,e,i)}})}window.observers=c;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(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const u=Symbol("init"),y=Symbol("template"),f=Symbol("style"),g=Symbol("parent");function m(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function x(t){return t.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))}function w(t={}){return function(e,i){if("class"!==i.kind)throw new Error("@Component() can only decorate a class");var s,n;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[f]=t.style?[t.style]:[],e.prototype[y]=t.template||""):(e.prototype[g].push(e.prototype),e.prototype[f].push(t.style),e.prototype[y]=(s=e.prototype[y],(n=t.template||null)&&n.match(/<parent\/>/)?n.replace(/<parent\/>/,s):s.match(/<child\/>/)?s.replace(/<child\/>/,n||""):`${s}${n||""}`));const r=e.prototype.connectedCallback||(()=>{}),a=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[y]||"";const i=document.importNode(t.content,!0),s=this.attachShadow({mode:"open"});s.adoptedStyleSheets=e.prototype[f].reduce(((t,e)=>{if(!e)return t;if(e instanceof CSSStyleSheet)return t.push(e),t;var i=new CSSStyleSheet;return i.replaceSync(e.toString()),t.push(i),t}),[]),s.appendChild(i)}}else!1===t.useShadow||this.attachShadow({mode:"open"});const i=new Set;for(const t of this.shadowRoot.querySelectorAll("*"))-1!==t.localName.indexOf("-")&&i.add(t.localName);const s=Array.from(i.values()).map((t=>customElements.get(t)?Promise.resolve():customElements.whenDefined(t))),n=()=>{this[g].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[x(e)]=!0,t)),{}):{})}))};0===s.length?(this[u]=!0,r.call(this),n()):Promise.all(s).then((()=>{this[u]=!0,r.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,i){this[x(t)]=i},i.addInitializer((function(){if(t.selector){if(window.customElements.get(t.selector))throw new Error(`@Component() ${i.name} duplicate selector '${t.selector}'`);window.customElements.define(t.selector,e)}}))}}Symbol("transmute");function v(t){return!!t&&t.constructor===Array}function b(t,e){t[u]&&t[g].map((i=>{i.render&&i.render.call(t,{[e]:!0})}))}function L(t){return null===t?"null":v(t)?"array":typeof t}function E(t){return function(e,i){const s=i.name,n=Symbol(s),l=Symbol(`${s}:type`),c=Symbol(`${s}:meta`);return i.addInitializer((function(){Reflect.defineProperty(this,s,{get:()=>"object"===this[l]||"array"===this[l]?this[n][o]?this[n]:d(this[n]):this[n],set:e=>{const i=L(t?t(e):e);if("index"!==s&&this[l]!==i&&"null"!==this[l]&&"null"!==i)throw new Error(`@Prop() ${s} with type '${this[l]}' cannot be set to ${i}.`);if("array"===this[l]){if(!v(e))throw new PropError(`Array "${s}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,s)?.set);if(this[n]===e)throw new Error("Setting an array to itself is not allowed.");const t=d(this[n]);if(t[r](this)){const i=e[o]?e[h]:e;t[a](this,i),this[n]=e}else this[n]=e}else this[n]=t?t(e):e,b(this,s)}})})),function(e){if(void 0===e&&"index"!==s)throw new Error(`@Prop() ${s} must have an initial value defined.`);if(void 0!==e&&"index"===s)throw new Error("@Prop() index must not have an initial value defined.");if(!0===e)throw new Error(`@Prop() ${s} boolean must initialize to false.`);if(!i.private){const{constructor:t}=this;t.observedAttributes??=[],t.symbols||(t.symbols={});const{symbols:e}=t,i=m(s);e[s]||(t.observedAttributes.push(i),e[s]=n)}return this[l]=L(e),"array"===this[l]?(this[n]=e,new Proxy(e,{get:(t,e)=>e===S?this[c]:(console.log("errr???"),Reflect.get(this[n],e)),set:(t,e,i)=>{if(e===S)return this[c]=i,!0;const r=Reflect.set(t,e,i);return"length"===e&&this[n].length===i||b(this,s),this[n]=i,r}})):(this[n]=t?t(this.getAttribute(s)??e):this.getAttribute(s)??e,this[n])}}}function M(t){return parseInt(`${t}`,10)}function C(t){return""===t||!0===t||null!==t&&!1!==t&&(t||!0)}Symbol("hasProxy");const S=Symbol("meta");var P=i(713);function z(t){const e=[];for(let i=0;i<t.length;i++){e.push([]);for(let s=0;s<t[0].length;s++)e[i].push(t[i][s])}return e}function $(t,e,i,s){return function(t,e,i){return Math.sqrt(Math.pow(e*i,2)+Math.pow(t,2))}(t,e,s)<=i}function k(t,e,i,s){return Math.abs(t-i)===Math.abs(e-s)&&Math.abs(t-i)?(console.log("circle",Math.abs(t-i),Math.abs(e-s)),function(t,e,i,s){const n=Math.abs(t-i),r=Math.abs(e-s),a=Math.min(t,i),o=Math.min(e,s),h=[];for(let t=0;t<r;t++)for(let e=0;e<n;e++)$(-.5*(n-2*(e+.5)),-.5*(r-2*(t+.5)),n/2,n/r)&&h.push({x:e+a,y:t+o});return h}(t,e,i+1,s+1)):function(t,e,i,s){const n=[];let r,a=Math.abs(i-t),o=Math.abs(s-e),h=1&o,l=4*(1-a)*o*o,c=4*(h+1)*a*a,d=l+c+h*a*a;t>i&&(t=i,i+=a),e>s&&(e=s),s=(e+=o+1>>1)-h,a*=8*a,h=8*o*o;do{n.push({x:i,y:e}),n.push({x:t,y:e}),n.push({x:t,y:s}),n.push({x:i,y:s}),r=2*d,r<=c&&(e++,s--,d+=c+=a),(r>=l||2*d>c)&&(t++,i--,d+=l+=h)}while(t<=i);for(;e-s<=o;)n.push({x:t-1,y:e}),n.push({x:i+1,y:e++}),n.push({x:t-1,y:s}),n.push({x:i+1,y:s--});const p={};for(const t of n)t.y in p?(p[t.y].minX=Math.min(p[t.y].minX,t.x),p[t.y].maxX=Math.max(p[t.y].maxX,t.x)):p[t.y]={minX:t.x,maxX:t.x};const u=[...n];for(const t in p){const{minX:e,maxX:i}=p[t];for(let s=e;s<=i;s++)u.push({x:s,y:parseInt(t)})}return u}(t,e,i,s)}function R(t,e,i,s){return function(t,e,i){return Math.sqrt(Math.pow(e*i,2)+Math.pow(t,2))}(t,e,s)<=i}function A(t,e,i,s){return function(t,e,i,s){return R(t,e,i,s)&&!(R(t+1,e,i,s)&&R(t-1,e,i,s)&&R(t,e+1,i,s)&&R(t,e-1,i,s))}(t=-.5*(i-2*(t+.5)),e=-.5*(s-2*(e+.5)),i/2,i/s)}function O(t,e,i,s){return Math.abs(t-i)===Math.abs(e-s)&&Math.abs(t-i)?(console.log("circle",Math.abs(t-i),Math.abs(e-s)),function(t,e,i,s){const n=Math.abs(t-i),r=Math.abs(e-s),a=Math.min(t,i),o=Math.min(e,s),h=[];for(let t=0;t<r;t++)for(let e=0;e<n;e++)A(e,t,n,r)&&h.push({x:e+a,y:t+o});return h}(t,e,i+1,s+1)):function(t,e,i,s){const n=[];var r,a=Math.abs(i-t),o=Math.abs(s-e),h=1&o,l=4*(1-a)*o*o,c=4*(h+1)*a*a,d=l+c+h*a*a;t>i&&(t=i,i+=a),e>s&&(e=s),s=(e+=o+1>>1)-h,a*=8*a,h=8*o*o;do{n.push({x:i,y:e}),n.push({x:t,y:e}),n.push({x:t,y:s}),n.push({x:i,y:s}),(r=2*d)<=c&&(e++,s--,d+=c+=a),(r>=l||2*d>c)&&(t++,i--,d+=l+=h)}while(t<=i);for(;e-s<=o;)n.push({x:t-1,y:e}),n.push({x:i+1,y:e++}),n.push({x:t-1,y:s}),n.push({x:i+1,y:s--});return n}(t,e,i,s)}const X="#FFFFFF";function I(t,e,i,s){const n=[],r=Math.abs(i-t),a=Math.abs(s-e),o=t<i?1:-1,h=e<s?1:-1;let l=r-a;for(;n.push({x:t,y:e}),t!==i||e!==s;){var c=2*l;c>-a&&(l-=a,t+=o),c<r&&(l+=r,e+=h)}return n}function H(t,e,i,s){const n=[],r=Math.min(t,i),a=Math.min(e,s);for(var o=Math.abs(i-t)+1,h=Math.abs(s-e)+1,l=a;l<a+h;l++)for(var c=r;c<r+o;c++)n.push({x:c,y:l});return n}function Y(t,e,i,s){const n=[],r=Math.min(t,i),a=Math.min(e,s);for(var o=Math.abs(i-t),h=Math.abs(s-e),l=a;l<=a+h;l++)n.push({x:r,y:l}),n.push({x:r+o,y:l});for(var c=r+1;c<=r+o-1;c++)n.push({x:c,y:a}),n.push({x:c,y:a+h});return n}function j(t,e){let i=[];for(let s=0;s<e;s++){const e=[];for(let i=0;i<t;i++)e.push(0);i.push(e)}return i}function D(t,e){for(let i=0;i<t.length;i++)for(let s=0;s<t[0].length;s++)e(s,i,t[i][s])}function T(t,e,i){return e*i+t}function U(t,e){const i=document.createElement("canvas");return i.width=t,i.height=e,[i,i.getContext("2d")]}const K=[{name:"Circle Outer",width:22,height:22,color:"#F00",opacity:1,lines:[[7,1],[15,1],[15,2],[17,2],[17,3],[18,3],[18,4],[19,4],[19,5],[20,5],[20,7],[21,7],[21,15],[20,15],[20,17],[19,17],[19,18],[18,18],[18,19],[17,19],[17,20],[15,20],[15,21],[7,21],[7,20],[5,20],[5,19],[4,19],[4,18],[3,18],[3,17],[2,17],[2,15],[1,15],[1,7],[2,7],[2,5],[3,5],[3,4],[4,4],[4,3],[5,3],[5,2],[7,2],[7,1]]},{name:"Circle Inner",width:22,height:22,color:"#00F",opacity:1,lines:[[8,3],[14,3],[14,4],[16,4],[16,5],[17,5],[17,6],[18,6],[18,8],[19,8],[19,14],[18,14],[18,16],[17,16],[17,17],[16,17],[16,18],[14,18],[14,19],[8,19],[8,18],[6,18],[6,17],[5,17],[5,16],[4,16],[4,14],[3,14],[3,8],[4,8],[4,6],[5,6],[5,5],[6,5],[6,4],[8,4],[8,3]]},{name:"Square",width:22,height:22,color:"#9932cc",opacity:1,dashed:[4,4],lines:[[2,2],[20,2],[20,20],[2,20],[2,2]]},{name:"Square",width:22,height:22,color:"#9932cc",opacity:.1,dashed:[4,4],dashOffset:4,lines:[[2,2],[20,2],[20,20],[2,20],[2,2]]}],N=new Map;function F(t,e,i,s){const n=`${t}:${e}:${i}:${s}`;if(N.has(n))return N.get(n);let r=K.filter((i=>i.width===t&&i.height===e));0===r.length&&t%2==0&&e%2==0&&(r=[{name:"Horizontal",color:"#00F",opacity:1,lines:[[0,e/2],[t,e/2]]},{name:"Vertical",color:"#00F",opacity:1,lines:[[t/2,0],[t/2,e]]}]);const a=i+s,o=t*a-s,h=e*a-s,l=document.createElement("canvas"),c=l.getContext("2d");if(l.width=o,l.height=h,0!==s){c.fillStyle="#BBB";for(let e=1;e<t;e++)c.fillRect(e*a-s,0,1,h);for(let t=1;t<e;t++)c.fillRect(0,t*a-s,o,1)}return r.forEach((t=>{c.lineDashOffset=t.dashOffset||0,c.setLineDash(t.dashed||[1]),c.strokeStyle=t.color,c.globalAlpha=t.opacity,c.lineWidth=1,c.fillStyle="transparent",c.beginPath(),t.lines.forEach(((t,e)=>{0===e?c.moveTo(t[0]*(i+s)-.5,t[1]*(i+s)-.5):c.lineTo(t[0]*(i+s)-.5,t[1]*(i+s)-.5)})),c.stroke()})),N.set(n,l),l}var G,q=function(t,e,i,s,n,r){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var o,h=s.kind,l="getter"===h?"get":"setter"===h?"set":"value",c=!e&&t?s.static?t:t.prototype:null,d=e||(c?Object.getOwnPropertyDescriptor(c,s.name):{}),p=!1,u=i.length-1;u>=0;u--){var y={};for(var f in s)y[f]="access"===f?{}:s[f];for(var f in s.access)y.access[f]=s.access[f];y.addInitializer=function(t){if(p)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(t||null))};var g=(0,i[u])("accessor"===h?{get:d.get,set:d.set}:d[l],y);if("accessor"===h){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(o=a(g.get))&&(d.get=o),(o=a(g.set))&&(d.set=o),(o=a(g.init))&&n.unshift(o)}else(o=a(g))&&("field"===h?n.unshift(o):d[l]=o)}c&&Object.defineProperty(c,s.name,d),p=!0},B=function(t,e,i){for(var s=arguments.length>2,n=0;n<e.length;n++)i=s?e[n].call(t,i):e[n].call(t);return s?i:void 0};function V([t,e,i,s]){return`rgba(${t}, ${e}, ${i}, ${s})`}!function(t){t[t.Group=0]="Group",t[t.Pixel=1]="Pixel",t[t.ColorUpdate=2]="ColorUpdate",t[t.ColorAdd=3]="ColorAdd",t[t.ColorRemove=4]="ColorRemove",t[t.LayerAdd=5]="LayerAdd",t[t.LayerRemove=6]="LayerRemove",t[t.LayerName=7]="LayerName",t[t.LayerLock=8]="LayerLock",t[t.LayerUnlock=9]="LayerUnlock",t[t.LayerExport=10]="LayerExport",t[t.LayerVisible=11]="LayerVisible",t[t.LayerOpacity=12]="LayerOpacity"}(G||(G={}));(()=>{let t,e,i,s,n,r,a,o,h,l=[w({selector:"pg-input-pixel-editor",style:P.A,template:'<div part="wrapper" tabindex="0"> <canvas part="canvas" draggable="false"></canvas> </div>'})],c=[],d=HTMLElement,p=[],u=[],y=[],f=[],g=[],m=[],x=[],v=[],b=[],L=[],S=[],$=[],R=[],A=[];(class extends d{static{e=this}static{const w="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;i=[E(M)],s=[E(M)],n=[E(M)],r=[E(M)],a=[E(C)],o=[E()],h=[function(t,e){const i=e.name,s=i.replace(/^\$/,"");e.addInitializer((function(){let t=null;Reflect.defineProperty(this,i,{get(){return t??(t=this.shadowRoot?.querySelector(`[part~=${s}]`))}})}))}],q(null,null,i,{kind:"field",name:"width",static:!1,private:!1,access:{has:t=>"width"in t,get:t=>t.width,set:(t,e)=>{t.width=e}},metadata:w},p,u),q(null,null,s,{kind:"field",name:"height",static:!1,private:!1,access:{has:t=>"height"in t,get:t=>t.height,set:(t,e)=>{t.height=e}},metadata:w},y,f),q(null,null,n,{kind:"field",name:"size",static:!1,private:!1,access:{has:t=>"size"in t,get:t=>t.size,set:(t,e)=>{t.size=e}},metadata:w},g,m),q(null,null,r,{kind:"field",name:"gridSize",static:!1,private:!1,access:{has:t=>"gridSize"in t,get:t=>t.gridSize,set:(t,e)=>{t.gridSize=e}},metadata:w},x,v),q(null,null,a,{kind:"field",name:"transparent",static:!1,private:!1,access:{has:t=>"transparent"in t,get:t=>t.transparent,set:(t,e)=>{t.transparent=e}},metadata:w},b,L),q(null,null,o,{kind:"field",name:"placeholder",static:!1,private:!1,access:{has:t=>"placeholder"in t,get:t=>t.placeholder,set:(t,e)=>{t.placeholder=e}},metadata:w},S,$),q(null,null,h,{kind:"field",name:"$canvas",static:!1,private:!1,access:{has:t=>"$canvas"in t,get:t=>t.$canvas,set:(t,e)=>{t.$canvas=e}},metadata:w},R,A),q(null,t={value:e},l,{kind:"class",name:e.name,metadata:w},null,c),e=t.value,w&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:w}),B(e,c)}width=B(this,p,10);height=(B(this,u),B(this,y,10));size=(B(this,f),B(this,g,10));gridSize=(B(this,m),B(this,x,1));transparent=(B(this,v),B(this,b,!1));placeholder=(B(this,L),B(this,S,""));$canvas=(B(this,$),B(this,R,void 0));#t=(B(this,A),0);#e=!1;#i=!1;#s=-1;#n=-1;#r=-1;#a=-1;#o=-1;#h=0;#l=[];#c=!1;#d=!1;#p=!1;#u=[];#y=[];#f=[];#g;#m=[[0,0,0,0],[0,0,0,1]];#x;#w;#v;#b;#L;#E;#M;#C;connectedCallback(){const t=this.$canvas.getContext("2d");null!==t&&(this.#g=t,this.$canvas.addEventListener("contextmenu",this.handleContextMenu.bind(this)),this.$canvas.addEventListener("doubleclick",this.handleDoubleClick.bind(this)),this.$canvas.addEventListener("pointerdown",this.handlePointerDown.bind(this)),this.$canvas.addEventListener("pointerenter",this.handlePointerEnter.bind(this)),this.$canvas.addEventListener("pointerleave",this.handlePointerLeave.bind(this)),this.$canvas.addEventListener("keydown",this.handleKeyDown.bind(this)),this.$canvas.addEventListener("keyup",this.handleKeyUp.bind(this)))}render(t){(t.width||t.height||t.size||t.transparent)&&this.#S()}#P=!0;#S(){const t=this.size+this.gridSize,e=this.width*t-this.gridSize,i=this.height*t-this.gridSize;if(this.$canvas.width=e,this.$canvas.height=i,this.#g.clearRect(0,0,e,i),[this.#x,this.#w]=U(e,i),[this.#v,this.#b]=U(e,i),[this.#L,this.#E]=U(e,i),[this.#M,this.#C]=U(e,i),this.transparent)for(let e=0;e<this.height;e++)for(let i=0;i<this.width;i++)this.#w.fillStyle=X,this.#w.fillRect(i*t,e*t,this.size+1,this.size+1),this.#w.fillStyle="#DDD",this.#w.fillRect(i*t+Math.ceil(this.size/2),e*t,Math.floor(this.size/2),Math.floor(this.size/2)),this.#w.fillRect(i*t,e*t+Math.floor(this.size/2),Math.ceil(this.size/2),Math.ceil(this.size/2));else this.#w.clearRect(0,0,e,i);this.#P?(this.#h=0,this.#l=[{name:"Layer 1",export:!0,locked:!1,visible:!0,opacity:1}],this.#u=[j(this.width,this.height)],this.#P=!1,this.#y=[],this.#f=[]):this.#z(),this.#$()}#z(){const t=this.#u.toReversed(),e=t.length;for(let i=0;i<this.height;i++){if(i>=t[0].length)for(let i=0;i<e;i++)t[i].push(new Array(this.width).fill(0));for(let s=0;s<this.width;s++){if(s>=t[0][i].length)for(let s=0;s<e;s++)t[s][i].push(0);for(let n=0;n<e;n++)if(0!==t[n][i][s]){this.#k(s,i,t[n][i][s]);break}}}}#R(){const t=this.#u.map((t=>function(t,e={}){let i,s,n,r=1,a=0,o=0;if(e.width){if(i=t,s=e.width,n=i.length/s,n%1!=0)throw new Error(`Invalid bitmask width. ${n} = ${i.length} / ${s}`)}else{if(!(t[0]instanceof Array))throw new Error("options.width is required for 1 dimensional array.");i=t.flat(),s=t[0].length,n=t.length}e.scale&&(r=e.scale),e.offsetX&&(a=e.offsetX),e.offsetY&&(o=e.offsetY);const h=s+2,l=Array(h*(n+2)).fill(0);function c(t,e){return(e+1)*h+(t+1)}for(let t=0;t<n;++t)for(let e=0;e<s;++e)l[c(e,t)]=i[T(e,t,s)];const d=s*(n+1),p=Array(d+(s+1)*n).fill(0).map((()=>({x:0,y:0,next:void 0})));function u(t,e){return e*s+t}function y(t,e){return d+e*(s+1)+t}const f=new Set;function g(t,e,i){t.x=e,t.y=i,f.add(t)}function m(t){for(var e=t.next;void 0!==e&&e!==t;e=e.next)f.delete(e);void 0!==e&&f.add(t)}for(let t=0;t<n;++t)for(let e=0;e<s;++e)if(1==l[c(e,t)]){if(0==l[c(e-1,t)]){const i=p[y(e,t)];g(i,e,t+1),l[c(e-1,t-1)]?i.next=p[u(e-1,t)]:l[c(e,t-1)]?i.next=p[y(e,t-1)]:i.next=p[u(e,t)],m(i)}if(0==l[c(e+1,t)]){const i=p[y(e+1,t)];g(i,e+1,t),l[c(e+1,t+1)]?i.next=p[u(e+1,t+1)]:l[c(e,t+1)]?i.next=p[y(e+1,t+1)]:i.next=p[u(e,t+1)],m(i)}if(0==l[c(e,t-1)]){const i=p[u(e,t)];g(i,e,t),l[c(e+1,t-1)]?i.next=p[y(e+1,t-1)]:l[c(e+1,t)]?i.next=p[u(e+1,t)]:i.next=p[y(e+1,t)],m(i)}if(0==l[c(e,t+1)]){const i=p[u(e,t+1)];g(i,e+1,t+1),l[c(e-1,t+1)]?i.next=p[y(e,t+1)]:l[c(e-1,t)]?i.next=p[u(e-1,t+1)]:i.next=p[y(e,t)],m(i)}}for(const t of f){let e=t;do{e.next&&(e.next.type=e.x==e?.next?.x?"V":"H",e=e.next)}while(e!==t)}for(let t of f){let e=t;do{if(e.type!=e.next?.type)for(;e.next?.type==e.next?.next?.type;)e.next===t&&(f.delete(t),t=e.next.next,f.add(t)),e.next=e.next?.next;e=e.next}while(e!==t)}let x="";for(const t of f){x+=`M${t.x*r},${t.y*r}`;for(var w=t.next;w!=t;w=w?.next)"H"==w?.type?x+=`H${w?.x*r+a}`:"V"==w?.type&&(x+=`V${w?.y*r+o}`);x+="Z"}return x}(t,{scale:1})));console.log("change:",t),this.dispatchEvent(new CustomEvent("change",{detail:{value:t}}))}#A=0;#O(){clearInterval(this.#A),this.#A=window.setTimeout(this.#R.bind(this),1e3)}#k(t,e,i){if(t>=this.width||t<0)return;if(e>=this.height||e<0)return;const s=this.size+this.gridSize;this.#g.clearRect(t*s,e*s,this.size,this.size),this.#b.clearRect(t*s,e*s,this.size,this.size),this.#E.clearRect(t*s,e*s,this.size,this.size),0!==this.#m[i][3]&&(this.#b.fillStyle=X,this.#b.fillRect(t*s-this.gridSize+1,e*s-this.gridSize+1,this.size+2*this.gridSize-2,this.size+2*this.gridSize-2),this.#b.fillStyle=V(this.#m[i]),this.#b.fillRect(t*s+1,e*s+1,this.size-2,this.size-2)),0!==this.#m[i][3]&&(this.#E.fillStyle=V(this.#m[i]),this.#E.fillRect(t*s,e*s,this.size,this.size)),this.#g.drawImage(this.#x,t*s,e*s,this.size+2,this.size+2,t*s,e*s,this.size+2,this.size+2),this.#g.drawImage(this.#i?this.#v:this.#L,t*s,e*s,this.size+2,this.size+2,t*s,e*s,this.size+2,this.size+2),this.#u[this.#h][e][t]=i,this.#O()}#X(){for(let t=0;t<this.height;t++)for(let e=0;e<this.width;e++)this.#k(e,t,this.#u[this.#h][t][e])}#I(t,e,i){const s=this.size+this.gridSize,n=this.width*s-this.gridSize,r=this.height*s-this.gridSize,{minX:a,maxX:o,minY:h,maxY:l}=t.reduce(((t,s)=>({minX:Math.min(t.minX,s.x,e),maxX:Math.max(t.maxX,s.x,e),minY:Math.min(t.minY,s.y,i),maxY:Math.max(t.maxY,s.y,i)})),{minX:this.width,maxX:0,minY:this.height,maxY:0}),c=a*s,d=h*s,p=(o-a+1)*s,u=(l-h+1)*s;this.#g.clearRect(c,d,p,u),this.#g.drawImage(this.#x,c,d,p,u,c,d,p,u),this.#g.drawImage(this.#v,c,d,p,u,c,d,p,u),this.#C.clearRect(0,0,n,r),t.forEach((({x:t,y:e})=>{this.#C.fillStyle=X,this.#C.beginPath(),this.#C.arc(t*s+5,e*s+5,3,0,2*Math.PI),this.#C.closePath(),this.#C.fill(),this.#C.fillStyle="#1B79C8",this.#C.beginPath(),this.#C.arc(t*s+5,e*s+5,2,0,2*Math.PI),this.#C.closePath(),this.#C.fill()})),this.#g.drawImage(this.#M,c,d,p,u,c,d,p,u),this.dispatchEvent(new CustomEvent("debug",{detail:{x:c,y:d,width:p,height:u,canvas:this.$canvas,context:this.#g,editLayer:this.#v,noEditLayer:this.#L,baseLayer:this.#x,previewLayer:this.#M}}))}handleKeyDown(t){switch(console.log(t.shiftKey,t.ctrlKey,t.altKey,t.key),t.key){case" ":console.log("space");break;case"Escape":console.log("escape")}}handleKeyUp(t){}handleContextMenu(t){t?.preventDefault()}handleDoubleClick(t){t?.preventDefault()}#H;#Y;handlePointerDown(t){if(1!==t.buttons&&32!==t.buttons)return t.preventDefault(),void t.stopPropagation();this.#p=t.altKey,this.#c=t.ctrlKey,this.#d=t.shiftKey;const e=this.$canvas.getBoundingClientRect(),i=this.size+this.gridSize;let s=Math.floor((t.clientX-e.left)/i),n=Math.floor((t.clientY-e.top)/i);if(s===this.#a&&n===this.#o)return;s>=this.width&&(s=this.width-1),n>=this.height&&(n=this.height-1),this.#e=!0,this.#s=this.#u[this.#h][n][s],this.#n=s,this.#r=n,this.#a=s,this.#o=n;const r=32===t.buttons?0:1;if(0===this.#t)this.#k(s,n,r);console.log(this.#t,s,n),this.#H=this.handlePointerMove.bind(this),document.addEventListener("pointermove",this.#H),this.#Y=this.handlePointerUp.bind(this),document.addEventListener("pointerup",this.#Y)}#j=!1;cleanupPointerGlobal(){document.removeEventListener("pointermove",this.#H),document.removeEventListener("pointerup",this.#Y)}handlePointerUp(t){const e=this.$canvas.getBoundingClientRect(),i=this.size+this.gridSize;let s=Math.floor((t.clientX-e.left)/i),n=Math.floor((t.clientY-e.top)/i);if(s===this.#n&&n===this.#r&&1===this.#s){if(0===this.#t)this.#k(s,n,0),this.#u[this.#h][n][s]=0}else switch(this.#t){case 1:I(this.#n,this.#r,s,n).forEach((({x:t,y:e})=>{this.#k(t,e,1)}));break;case 2:H(this.#n,this.#r,s,n).forEach((({x:t,y:e})=>{this.#k(t,e,1)}));break;case 3:Y(this.#n,this.#r,s,n).forEach((({x:t,y:e})=>{this.#k(t,e,1)}));break;case 4:k(this.#n,this.#r,s,n).forEach((({x:t,y:e})=>{this.#k(t,e,1)}));break;case 5:O(this.#n,this.#r,s,n).forEach((({x:t,y:e})=>{this.#k(t,e,1)}))}this.#a=-1,this.#o=-1,this.#e=!1,this.cleanupPointerGlobal(),this.#j&&(this.#i=!1,this.#g.drawImage(this.#x,0,0),this.#g.drawImage(this.#i?this.#v:this.#L,0,0))}handlePointerMove(t){const e=this.$canvas;if(this.#e){this.#p=t.altKey,this.#c=t.ctrlKey,this.#d=t.shiftKey;this.#u;const s=e.getBoundingClientRect(),n=this.size+this.gridSize,r=[],a=this.#n,o=this.#r,h=this.#a,l=this.#o;if("function"==typeof t.getCoalescedEvents){const e=t.getCoalescedEvents();for(const t of e){let e=Math.floor((t.clientX-s.left)/n),i=Math.floor((t.clientY-s.top)/n);e===h&&i===l||r.push([e,i])}}else{let e=Math.floor((t.clientX-s.left)/n),i=Math.floor((t.clientY-s.top)/n);if(e===h&&i===l)return;r.push([e,i])}const c=32===t.buttons?0:1;if(0===r.length)return;const[d,p]=r.at(-1);switch(this.#a=d,this.#o=p,this.#t){case 0:for(var i of r)this.#k(i[0],i[1],c);break;case 1:this.#I(I(a,o,d,p),h,l);break;case 2:this.#I(H(a,o,d,p),h,l);break;case 3:this.#I(Y(a,o,d,p),h,l);break;case 4:this.#I(k(a,o,d,p),h,l);break;case 5:this.#I(O(a,o,d,p),h,l)}}}handlePointerEnter(t){this.#e||this.#i||(this.#i=!0,this.#g.drawImage(this.#x,0,0),this.#g.drawImage(this.#i?this.#v:this.#L,0,0)),this.#j=!1}handlePointerLeave(t){this.#e?this.#i&&(this.#j=!0):(this.#i=!1,this.#g.drawImage(this.#x,0,0),this.#g.drawImage(this.#i?this.#v:this.#L,0,0))}#$(){this.#g.drawImage(this.#x,0,0),this.#g.drawImage(this.#L,0,0)}mergeColor(t,e){}clear(){const t=j(this.width,this.height);!function(t,e){const i=[],s=t[0].length,n=t.length,r=e[0].length,a=e.length,o=Math.max(s,r),h=Math.max(n,a);for(let s=0;s<h;s++)for(let n=0;n<o;n++){const r=e&&e[s]&&e[s][n],a=t&&t[s]&&t[s][n];r!==a&&i.push([n,s,a,r])}}(this.#u[this.#h],t);this.#y.push({type:G.Group,data:{name:"Clear"}}),this.#y.push({type:G.Pixel,data:{pixels:[],layer:this.#h}}),this.#u=[j(this.width,this.height)],this.#$()}reset(){this.#P=!0,this.#S()}clearHistory(){this.#y=[],this.#f=[]}applyTemplate(t){this.#u=[t],this.#X()}flipHorizontal(){const t=z(this.#u[this.#h]),e=t[0].length-1;D(this.#u[this.#h],((i,s)=>{t[s][i]=this.#u[this.#h][s][e-i]})),this.#u[this.#h]=t}flipVertical(){const t=z(this.#u[this.#h]),e=t.length-1;D(this.#u[this.#h],((i,s)=>{t[this.#h][s][i]=this.#u[e-s][i]})),this.#u[this.#h]=t}move(t,e){const i=j(this.width,this.height);for(let t=0;t<this.height;t++)i[t].fill(0);D(this.#u[this.#h],((s,n)=>{n-e<0||s-t<0||n-e>=this.height||s-t>=this.width||(i[n][s]=this.#u[this.#h][n-e][s-t])})),this.#u[this.#h]=i}invert(){this.#m.length>2||(D(this.#u[this.#h],((t,e)=>{this.#u[this.#h][e][t]=0===this.#u[this.#h][e][t]?1:0})),this.#X())}applyGuides(){const t=F(this.width,this.height,this.size,this.gridSize);this.#w.drawImage(t,0,0)}clearGuides(){}undo(){const t=this.#y.pop();if(t&&t.type===G.Pixel)this.#f.push(t),t.data.pixels.forEach((t=>{const[e,i]=t;this.#u[this.#h][i][e]=t[2]}))}redo(){}rotateClockwise(){this.#D(!1)}rotateCounterclockwise(){this.#D(!0)}#D(t=!1){const e=z(this.#u[this.#h]);if(t){const t=this.#u[0].map(((t,e)=>this.#u.map((t=>t[t.length-1-e]))));for(let i=0;i<this.height;i++)for(let s=0;s<this.width;s++)e[i][s]=t[this.#h][i][s]}else{const t=this.#u[0].map(((t,e)=>this.#u.map((t=>t[e])).reverse()));for(let i=0;i<this.height;i++)for(let s=0;s<this.width;s++)e[i][s]=t[this.#h][i][s]}this.#u[this.#h]=e}hasUndo(){return 0!==this.#y.length}hasRedo(){return 0!==this.#f.length}inputModePixel(){this.#t=0}inputModeLine(){this.#t=1}inputModeRectangle(){this.#t=2}inputModeRectangleOutline(){this.#t=3}inputModeEllipse(){this.#t=4}inputModeEllipseOutline(){this.#t=5}async save(t={}){const e={width:this.width,height:this.height,transparent:this.transparent,colors:this.#m,layers:this.#l,data:this.#u};!0===t.history&&(e.undo=this.#y,e.redo=this.#f);for(let t=0;t<e.data.length;t++)for(let i=e.data[t].length-1;i>=0;i--)if(i>=this.height)e.data[t].pop();else for(let s=e.data[t][i].length-1;s>=0;s--)s>=this.width&&e.data[t][i].pop();return e}async open(t){if("object"!=typeof t)return["json must be type object"];const e=[],i=Object.keys(t);["width","height","transparent","colors","layers","data"].forEach((t=>{i.includes(t)||e.push(`JSON key '${t}' required.`)})),this.width=t.width,this.height=t.height,this.transparent=t.transparent,this.#m=t.colors,this.#l=t.layers,this.#u=t.data,t.undo&&(this.#y=t.undo),t.redo&&(this.#f=t.redo),this.#S()}})})()})();
package/pgInputRange.js DELETED
@@ -1 +0,0 @@
1
- (()=>{"use strict";var t={314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,s){"string"==typeof t&&(t=[[null,t,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<t.length;c++){var p=[].concat(t[c]);r&&i[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),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),o&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=o):p[4]="".concat(o)),e.push(p))}},e}},593:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(601),o=n.n(r),s=n(314),i=n.n(s)()(o());i.push([t.id,"",""]);var a=new CSSStyleSheet;a.replaceSync(i.toString());const l=a},601:t=>{t.exports=function(t){return t[1]}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.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 r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);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"],p=new Map;function u(t){return new Proxy(t,{get(e,n){if("symbol"==typeof n){switch(n){case a:return!0;case l:return e;case s:return e=>{const n=p.get(t);return n?.has(e)};case i:return(e,n)=>{const r=p.get(t);if(r){const t=r.get(e);t&&t.forEach(((r,o)=>{if(!r)throw new Error("Unreachable");{const t=p.get(n);if(t){const n=t.get(e);n?n.set(o,r):t.set(e,new Map([[o,r]]))}else p.set(n,new Map([[e,new Map([[o,r]])]]))}t.delete(o),r.forEach((t=>{t(null,h.swap,[n])}))}))}};case r:return(e,n)=>{const r=e.getRootNode().host,o=p.get(t);if(o){const t=o.get(r);if(t){const r=t.get(e);r?r.push(n):t.set(e,[n])}else o.set(r,new Map([[e,[n]]]))}else p.set(t,new Map([[r,new Map([[e,[n]]])]]))};case o:return e=>{const n=e.getRootNode().host,r=p.get(t);r&&(r.delete(n),0===r.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]?u(e[n]):e[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(c.includes(n))return p.has(e)?function(){const t=Array.prototype[n].apply(e,arguments),r=p.get(e);return r?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,n,arguments)}))}))})),t}:Reflect.get(e,n);if(e[n]instanceof Array)return u(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)){const r=p.get(t);r?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,n)}))}))}))}return Reflect.set(t,e,n)}})}window.observers=p;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(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const d=Symbol("init"),f=Symbol("template"),m=Symbol("style"),y=Symbol("parent");function g(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function v(t){return t.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))}function b(t={}){return function(e,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,o;Reflect.defineProperty(e,"name",{value:t.selector,writable:!1,configurable:!1}),!e.prototype[y]||e.prototype[y][e.prototype[y].length-1]instanceof Object.getPrototypeOf(e)?e.prototype instanceof HTMLElement&&(e.prototype[y]=[e.prototype],e.prototype[m]=t.style?[t.style]:[],e.prototype[f]=t.template||""):(e.prototype[y].push(e.prototype),e.prototype[m].push(t.style),e.prototype[f]=(r=e.prototype[f],(o=t.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,r):r.match(/<child\/>/)?r.replace(/<child\/>/,o||""):`${r}${o||""}`));const s=e.prototype.connectedCallback||(()=>{}),i=e.prototype.disconnectedCallback||(()=>{});e.prototype.connectedCallback=function(){if(this[d]||void 0!==t.template||void 0!==t.style)if(this[d]){if(this[d]&&t.style);else if(this[d]&&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[f]||"";const n=document.importNode(t.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=e.prototype[m].reduce(((t,e)=>{if(!e)return t;if(e instanceof CSSStyleSheet)return t.push(e),t;var n=new CSSStyleSheet;return n.replaceSync(e.toString()),t.push(n),t}),[]),r.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 r=Array.from(n.values()).map((t=>customElements.get(t)?Promise.resolve():customElements.whenDefined(t))),o=()=>{this[y].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[v(e)]=!0,t)),{}):{})}))};0===r.length?(this[d]=!0,s.call(this),o()):Promise.all(r).then((()=>{this[d]=!0,s.call(this);for(const t of this.shadowRoot.querySelectorAll("slot"))t.dispatchEvent(new CustomEvent("slotchange"));o()}))},e.prototype.disconnectedCallback=function(){i.call(this)},e.prototype.attributeChangedCallback=function(t,e,n){this[v(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 w(t){return!!t&&t.constructor===Array}function S(t,e){t[d]&&t[y].map((n=>{n.render&&n.render.call(t,{[e]:!0})}))}function E(t){return null===t?"null":w(t)?"array":typeof t}function x(t){return function(e,n){const r=n.name,o=Symbol(r),c=Symbol(`${r}:type`),p=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:e=>{const n=E(t?t(e):e);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(e))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===e)throw new Error("Setting an array to itself is not allowed.");const t=u(this[o]);if(t[s](this)){const n=e[a]?e[l]:e;t[i](this,n),this[o]=e}else this[o]=e}else this[o]=t?t(e):e,S(this,r)}})})),function(e){if(void 0===e&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==e&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===e)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.private){const{constructor:t}=this;t.observedAttributes??=[],t.symbols||(t.symbols={});const{symbols:e}=t,n=g(r);e[r]||(t.observedAttributes.push(n),e[r]=o)}return this[c]=E(e),"array"===this[c]?(this[o]=e,new Proxy(e,{get:(t,e)=>e===P?this[p]:(console.log("errr???"),Reflect.get(this[o],e)),set:(t,e,n)=>{if(e===P)return this[p]=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]=t?t(this.getAttribute(r)??e):this.getAttribute(r)??e,this[o])}}}Symbol("hasProxy");const P=Symbol("meta");var $=n(593),C=function(t,e,n,r,o,s){function i(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var a,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",p=!e&&t?r.static?t:t.prototype:null,u=e||(p?Object.getOwnPropertyDescriptor(p,r.name):{}),h=!1,d=n.length-1;d>=0;d--){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(t){if(h)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(t||null))};var y=(0,n[d])("accessor"===l?{get:u.get,set:u.set}:u[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))&&(u.get=a),(a=i(y.set))&&(u.set=a),(a=i(y.init))&&o.unshift(a)}else(a=i(y))&&("field"===l?o.unshift(a):u[c]=a)}p&&Object.defineProperty(p,r.name,u),h=!0},A=function(t,e,n){for(var r=arguments.length>2,o=0;o<e.length;o++)n=r?e[o].call(t,n):e[o].call(t);return r?n:void 0};(()=>{let t,e,n,r,o,s,i,a=[b({selector:"pg-input-range",style:$.A,template:'<input part="input" type="range"/>'})],l=[],c=HTMLElement,p=[],u=[],h=[],d=[],f=[],m=[],y=[],g=[],v=[],w=[];(class extends c{static{e=this}static{const b="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;n=[x()],r=[x()],o=[x()],s=[x()],i=[function(t,e){const n=e.name,r=n.replace(/^\$/,"");e.addInitializer((function(){let t=null;Reflect.defineProperty(this,n,{get(){return t??(t=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}],C(null,null,n,{kind:"field",name:"min",static:!1,private:!1,access:{has:t=>"min"in t,get:t=>t.min,set:(t,e)=>{t.min=e}},metadata:b},p,u),C(null,null,r,{kind:"field",name:"max",static:!1,private:!1,access:{has:t=>"max"in t,get:t=>t.max,set:(t,e)=>{t.max=e}},metadata:b},h,d),C(null,null,o,{kind:"field",name:"step",static:!1,private:!1,access:{has:t=>"step"in t,get:t=>t.step,set:(t,e)=>{t.step=e}},metadata:b},f,m),C(null,null,s,{kind:"field",name:"name",static:!1,private:!1,access:{has:t=>"name"in t,get:t=>t.name,set:(t,e)=>{t.name=e}},metadata:b},y,g),C(null,null,i,{kind:"field",name:"$input",static:!1,private:!1,access:{has:t=>"$input"in t,get:t=>t.$input,set:(t,e)=>{t.$input=e}},metadata:b},v,w),C(null,t={value:e},a,{kind:"class",name:e.name,metadata:b},null,l),e=t.value,b&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b}),A(e,l)}min=A(this,p,"0");max=(A(this,u),A(this,h,"100"));step=(A(this,d),A(this,f,"1"));name=(A(this,m),A(this,y,""));$input=(A(this,g),A(this,v,void 0));render(){this.$input.min=this.min,this.$input.max=this.max,this.$input.step=this.step}connectedCallback(){this.$input.addEventListener("change",this.#t.bind(this)),this.$input.addEventListener("input",this.#e.bind(this))}#t(t){t.stopPropagation();const{value:e}=t.target;this.dispatchEvent(new CustomEvent("change",{detail:{value:e,name:this.name}}))}#e(t){t.stopPropagation();const{value:e}=t.target;this.dispatchEvent(new CustomEvent("input",{detail:{value:e,name:this.name}}))}constructor(){super(...arguments),A(this,w)}})})()})();
package/pgInputSelect.js DELETED
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e={97:(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,':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: calc(anchor-size(width) + calc(2 * var(--pg-menu-padding, 0.25rem)));\n margin: var(--pg-overlay-menu-_y, 0) 0 0 var(--pg-overlay-menu-_x, 0);\n overflow: visible;\n}\n',""]);var i=new CSSStyleSheet;i.replaceSync(s.toString());const l=i},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 u=[].concat(e[c]);r&&s[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),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}},529:(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,":host {\n display: contents;\n}\n\n[part=button] {\n font-family: var(--pg-font-family);\n background: var(--pg-input-select-background, #FFFFFF);\n text-align: left;\n display: grid;\n grid-template-rows: auto;\n grid-template-columns: 100% 0;\n border: 1px solid var(--pg-input-select-border-color, #453C4F);\n border-radius: 0.25rem;\n padding: 0;\n width: 100%;\n font-size: 1rem;\n outline: 0;\n}\n\n[part=button]:focus {\n box-shadow: 0 0 0 3px rgba(79, 143, 249, 0.5);\n}\n\n[part=label] {\n grid-row: 1;\n grid-column: 1;\n padding: 0.5rem 0.75rem;\n font-size: var(--pg-input-select-font-size, 1rem);\n}\n\n[part=chevron] {\n grid-row: 1;\n grid-column: 2;\n pointer-events: none;\n width: 1.5rem;\n height: 1.5rem;\n align-self: center;\n transform: translate(-2rem, 0);\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"],u=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 t=>{const n=u.get(e);return n?.has(t)};case s:return(t,n)=>{const r=u.get(e);if(r){const e=r.get(t);e&&e.forEach(((r,o)=>{if(!r)throw new Error("Unreachable");{const e=u.get(n);if(e){const n=e.get(t);n?n.set(o,r):e.set(t,new Map([[o,r]]))}else u.set(n,new Map([[t,new Map([[o,r]])]]))}e.delete(o),r.forEach((e=>{e(null,d.swap,[n])}))}))}};case r:return(t,n)=>{const r=t.getRootNode().host,o=u.get(e);if(o){const e=o.get(r);if(e){const r=e.get(t);r?r.push(n):e.set(t,[n])}else o.set(r,new Map([[t,[n]]]))}else u.set(e,new Map([[r,new Map([[t,[n]]])]]))};case o:return t=>{const n=t.getRootNode().host,r=u.get(e);r&&(r.delete(n),0===r.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),r=u.get(t);return r?.forEach((e=>{e.forEach((e=>{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)){const r=u.get(e);r?.forEach((e=>{e.forEach((e=>{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"),v=Symbol("parent");function y(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[v]||t.prototype[v][t.prototype[v].length-1]instanceof Object.getPrototypeOf(t)?t.prototype instanceof HTMLElement&&(t.prototype[v]=[t.prototype],t.prototype[m]=e.style?[e.style]:[],t.prototype[f]=e.template||""):(t.prototype[v].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.match(/<child\/>/)?r.replace(/<child\/>/,o||""):`${r}${o||""}`));const a=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[f]||"";const n=document.importNode(e.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=t.prototype[m].reduce(((e,t)=>{if(!t)return e;if(t instanceof CSSStyleSheet)return e.push(t),e;var n=new CSSStyleSheet;return n.replaceSync(t.toString()),e.push(n),e}),[]),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[v].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,a.call(this),o()):Promise.all(r).then((()=>{this[p]=!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[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[v].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`),u=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](this)){const n=t[i]?t[l]:t;e[s](this,n),this[o]=t}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=y(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[u]:(console.log("errr???"),Reflect.get(this[o],t)),set:(e,t,n)=>{if(t===k)return this[u]=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 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",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");a.push(s(e||null))};var v=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(i=s(v.get))&&(h.get=i),(i=s(v.set))&&(h.set=i),(i=s(v.init))&&o.unshift(i)}else(i=s(v))&&("field"===l?o.unshift(i):h[c]=i)}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 C=new Set,j=new Map;const A=(()=>{let e,t,n=[b()],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}),P(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 z=n(97),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",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");a.push(s(e||null))};var v=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(i=s(v.get))&&(h.get=i),(i=s(v.set))&&(h.set=i),(i=s(v.init))&&o.unshift(i)}else(i=s(v))&&("field"===l?o.unshift(i):h[c]=i)}u&&Object.defineProperty(u,r.name,h),d=!0},T=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 L=(()=>{let e,t,n,r,o,a,s,i,l=[b({selector:"pg-overlay-select-menu",template:'<div part="overlay"> <pg-menu part="menu"></pg-menu> </div>',style:z.A})],c=[],u=A,h=[],d=[],p=[],f=[],m=[],v=[],y=[],g=[],w=[],S=[],E=[],k=[];(class extends u{static{t=this}static{const b="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;n=[x()],r=[x()],o=[$()],a=[$()],s=[$()],i=[$()],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:b},h,d),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:b},p,f),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:b},m,v),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:b},y,g),R(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},w,S),R(null,null,i,{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},E,k),R(null,e={value:t},l,{kind:"class",name:t.name,metadata:b},null,c),t=e.value,b&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b}),T(t,c)}$overlay=T(this,h,void 0);$menu=(T(this,d),T(this,p,void 0));source=(T(this,f),T(this,m,null));default=(T(this,v),T(this,y,null));items=(T(this,g),T(this,w,[]));value=(T(this,S),T(this,E,null));render(e){e.items&&null!==this.value&&(this.items.forEach((e=>e.checked=!1)),this.items.find((e=>e.value===this.value.value)).checked=!0)}connectedCallback(){this.$menu.items=this.items,this.$menu.addEventListener("select",this.#e.bind(this)),this.$overlay.popover="auto",null!==this.source&&this.$overlay.showPopover({source:this.source}),this.$overlay.addEventListener("toggle",this.#t.bind(this));const e=this.source?.getBoundingClientRect();let t=0;const n=null===this.value||"object"!=typeof this.value?this.value:this.value.value,r=null===this.value?-1:this.items.findIndex((e=>e.value===n));if(-1!==r){const n=this.$menu.getItemHeight(r);t-=this.$menu.getItemOffset(0,r),e?.height!==n&&e?.height&&(t+=(e.height-n)/2)}else if(this.items.length>0){this.default&&(this.default.checked=!0,this.$menu.items.unshift(this.default));const n=this.$menu.getItemHeight(0);t-=this.$menu.getItemOffset(0,0),e?.height!==n&&e?.height&&(t+=(e.height-n)/2)}this.$overlay.style.setProperty("--pg-overlay-menu-_x","0px"),this.$overlay.style.setProperty("--pg-overlay-menu-_y",`${t}px`),this.$menu.focus(r)}#t(e){"closed"===e.newState&&(this.close(),this.source?.focus())}disconnectedCallback(){}#e(e){e.detail.item.index=e.detail.index,this.close(e.detail.item),this.source?.focus()}constructor(){super(...arguments),T(this,k)}});return t})();const M=L;var I=n(529),F=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",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");a.push(s(e||null))};var v=(0,n[p])("accessor"===l?{get:h.get,set:h.set}:h[c],f);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(i=s(v.get))&&(h.get=i),(i=s(v.set))&&(h.set=i),(i=s(v.init))&&o.unshift(i)}else(i=s(v))&&("field"===l?o.unshift(i):h[c]=i)}u&&Object.defineProperty(u,r.name,h),d=!0},N=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=[b({selector:"pg-input-select",style:I.A,template:'<button part="button"> <span part="label"></span> <svg part="chevron" viewBox="0 0 24 24"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"/></svg> </button>'})],c=[],u=HTMLElement,h=[],d=[],p=[],f=[],m=[],v=[],y=[],g=[],w=[],S=[],E=[],k=[];(class extends u{static{t=this}static{const b="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;n=[$()],r=[$()],o=[$()],a=[$()],s=[x()],i=[x()],F(null,null,n,{kind:"field",name:"options",static:!1,private:!1,access:{has:e=>"options"in e,get:e=>e.options,set:(e,t)=>{e.options=t}},metadata:b},h,d),F(null,null,r,{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},p,f),F(null,null,o,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:b},m,v),F(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},y,g),F(null,null,s,{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},w,S),F(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},E,k),F(null,e={value:t},l,{kind:"class",name:t.name,metadata:b},null,c),t=e.value,b&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b}),N(t,c)}options=N(this,h,[]);value=(N(this,d),N(this,p,""));name=(N(this,f),N(this,m,""));default=(N(this,v),N(this,y,null));$button=(N(this,g),N(this,w,void 0));$label=(N(this,S),N(this,E,void 0));connectedCallback(){this.$button.addEventListener("click",this.#n.bind(this))}render(e){(e.value||e.default)&&(this.$label.textContent=this.value?this.value:this.default?this.default.label:" ")}#r=(N(this,k),!1);async#n(){if(this.#r)return;this.#r=!0;const e=await M.open({source:this.$button,default:this.default,value:this.options.find((e=>e.value===this.value))??null,items:this.options});void 0!==e&&(this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value}})),this.$label.textContent=e.label),this.#r=!1}})})()})();
package/pgInputText.js DELETED
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e={314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(i[l]=!0)}for(var c=0;c<e.length;c++){var p=[].concat(e[c]);n&&i[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),o&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=o):p[4]="".concat(o)),t.push(p))}},t}},569:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(601),o=r.n(n),a=r(314),i=r.n(a)()(o());i.push([e.id,':host {\n display: block;\n font-family: var(--pg-font-family);\n}\n\n[part="input"] {\n border: 1px solid var(--pg-input-text-border-color, #453C4F);\n border-radius: 0.125rem;\n padding: calc(0.5rem - 1px) 0.75rem;\n font-family: var(--pg-font-family);\n font-size: 1rem;\n outline: none;\n width: calc(100% - 1.5rem - 2px);\n}\n\n[part="input"]:active {\n box-shadow: 0 0 0 3px var(--pg-input-text-active-glow, rgb(79, 143, 249, 0.6));\n}\n[part="input"]:focus {\n box-shadow: 0 0 0 3px var(--pg-input-text-focus-glow, rgb(79, 143, 249, 0.5));\n}',""]);var s=new CSSStyleSheet;s.replaceSync(i.toString());const l=s},601:e=>{e.exports=function(e){return e[1]}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={id:n,exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const n=Symbol("addObserver"),o=Symbol("removeObserver"),a=Symbol("getObservers"),i=Symbol("swapObserver"),s=Symbol("isProxy"),l=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],p=new Map;function u(e){return new Proxy(e,{get(t,r){if("symbol"==typeof r){switch(r){case s:return!0;case l:return t;case a:return t=>{const r=p.get(e);return r?.has(t)};case i:return(t,r)=>{const n=p.get(e);if(n){const e=n.get(t);e&&e.forEach(((n,o)=>{if(!n)throw new Error("Unreachable");{const e=p.get(r);if(e){const r=e.get(t);r?r.set(o,n):e.set(t,new Map([[o,n]]))}else p.set(r,new Map([[t,new Map([[o,n]])]]))}e.delete(o),n.forEach((e=>{e(null,h.swap,[r])}))}))}};case n:return(t,r)=>{const n=t.getRootNode().host,o=p.get(e);if(o){const e=o.get(n);if(e){const n=e.get(t);n?n.push(r):e.set(t,[r])}else o.set(n,new Map([[t,[r]]]))}else p.set(e,new Map([[n,new Map([[t,[r]]])]]))};case o:return t=>{const r=t.getRootNode().host,n=p.get(e);n&&(n.delete(r),0===n.size&&p.delete(e))};case Symbol.toPrimitive:case Symbol.toStringTag:return Reflect.get(t,r)}throw new Error("Unsupported symbol")}if(r in t){if(!Number.isNaN(Number(r)))return"object"==typeof t[r]?u(t[r]):t[r];if("copyWithin"===r)throw new Error("Unsupported array method copyWithin");if(c.includes(r))return p.has(t)?function(){const e=Array.prototype[r].apply(t,arguments),n=p.get(t);return n?.forEach((e=>{e.forEach((e=>{e.forEach((e=>{e(t,r,arguments)}))}))})),e}:Reflect.get(t,r);if(t[r]instanceof Array)return u(t[r])}return Reflect.get(t,r)},set(e,t,r){if("symbol"==typeof t)throw new Error("Setting symbols not allowed.");if(Array.isArray(e))return Reflect.set(e,t,r);if(p.has(e)){const n=p.get(e);n?.forEach((e=>{e.forEach((e=>{e.forEach((e=>{e(t,r)}))}))}))}return Reflect.set(e,t,r)}})}window.observers=p;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 d=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,r){if("class"!==r.kind)throw new Error("@Component() can only decorate a class");var n,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]=(n=t.prototype[f],(o=e.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,n):n.match(/<child\/>/)?n.replace(/<child\/>/,o||""):`${n}${o||""}`));const a=t.prototype.connectedCallback||(()=>{}),i=t.prototype.disconnectedCallback||(()=>{});t.prototype.connectedCallback=function(){if(this[d]||void 0!==e.template||void 0!==e.style)if(this[d]){if(this[d]&&e.style);else if(this[d]&&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 r=document.importNode(e.content,!0),n=this.attachShadow({mode:"open"});n.adoptedStyleSheets=t.prototype[m].reduce(((e,t)=>{if(!t)return e;if(t instanceof CSSStyleSheet)return e.push(t),e;var r=new CSSStyleSheet;return r.replaceSync(t.toString()),e.push(r),e}),[]),n.appendChild(r)}}else!1===e.useShadow||this.attachShadow({mode:"open"});const r=new Set;for(const e of this.shadowRoot.querySelectorAll("*"))-1!==e.localName.indexOf("-")&&r.add(e.localName);const n=Array.from(r.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===n.length?(this[d]=!0,a.call(this),o()):Promise.all(n).then((()=>{this[d]=!0,a.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,r){this[g(e)]=r},r.addInitializer((function(){if(e.selector){if(window.customElements.get(e.selector))throw new Error(`@Component() ${r.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[d]&&e[y].map((r=>{r.render&&r.render.call(e,{[t]:!0})}))}function E(e){return null===e?"null":w(e)?"array":typeof e}function x(e){return function(t,r){const n=r.name,o=Symbol(n),c=Symbol(`${n}:type`),p=Symbol(`${n}:meta`);return r.addInitializer((function(){Reflect.defineProperty(this,n,{get:()=>"object"===this[c]||"array"===this[c]?this[o][s]?this[o]:u(this[o]):this[o],set:t=>{const r=E(e?e(t):t);if("index"!==n&&this[c]!==r&&"null"!==this[c]&&"null"!==r)throw new Error(`@Prop() ${n} with type '${this[c]}' cannot be set to ${r}.`);if("array"===this[c]){if(!w(t))throw new PropError(`Array "${n}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,n)?.set);if(this[o]===t)throw new Error("Setting an array to itself is not allowed.");const e=u(this[o]);if(e[a](this)){const r=t[s]?t[l]:t;e[i](this,r),this[o]=t}else this[o]=t}else this[o]=e?e(t):t,S(this,n)}})})),function(t){if(void 0===t&&"index"!==n)throw new Error(`@Prop() ${n} must have an initial value defined.`);if(void 0!==t&&"index"===n)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${n} boolean must initialize to false.`);if(!r.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,r=v(n);t[n]||(e.observedAttributes.push(r),t[n]=o)}return this[c]=E(t),"array"===this[c]?(this[o]=t,new Proxy(t,{get:(e,t)=>t===P?this[p]:(console.log("errr???"),Reflect.get(this[o],t)),set:(e,t,r)=>{if(t===P)return this[p]=r,!0;const a=Reflect.set(e,t,r);return"length"===t&&this[o].length===r||S(this,n),this[o]=r,a}})):(this[o]=e?e(this.getAttribute(n)??t):this.getAttribute(n)??t,this[o])}}}Symbol("hasProxy");const P=Symbol("meta");var $=r(569),C=function(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",p=!t&&e?n.static?e:e.prototype:null,u=t||(p?Object.getOwnPropertyDescriptor(p,n.name):{}),h=!1,d=r.length-1;d>=0;d--){var f={};for(var m in n)f[m]="access"===m?{}:n[m];for(var m in n.access)f.access[m]=n.access[m];f.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var y=(0,r[d])("accessor"===l?{get:u.get,set:u.set}:u[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(u.get=s),(s=i(y.set))&&(u.set=s),(s=i(y.init))&&o.unshift(s)}else(s=i(y))&&("field"===l?o.unshift(s):u[c]=s)}p&&Object.defineProperty(p,n.name,u),h=!0},k=function(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0};(()=>{let e,t,r,n,o,a,i=[b({selector:"pg-input-text",style:$.A,template:'<input part="input" type="text"/>'})],s=[],l=HTMLElement,c=[],p=[],u=[],h=[],d=[],f=[],m=[],y=[];(class extends l{static{t=this}static{const v="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;r=[x()],n=[x()],o=[x()],a=[function(e,t){const r=t.name,n=r.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,r,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${n}]`))}})}))}],C(null,null,r,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:v},c,p),C(null,null,n,{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},u,h),C(null,null,o,{kind:"field",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder,set:(e,t)=>{e.placeholder=t}},metadata:v},d,f),C(null,null,a,{kind:"field",name:"$input",static:!1,private:!1,access:{has:e=>"$input"in e,get:e=>e.$input,set:(e,t)=>{e.$input=t}},metadata:v},m,y),C(null,e={value:t},i,{kind:"class",name:t.name,metadata:v},null,s),t=e.value,v&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:v}),k(t,s)}name=k(this,c,"");value=(k(this,p),k(this,u,""));placeholder=(k(this,h),k(this,d,""));$input=(k(this,f),k(this,m,void 0));connectedCallback(){this.$input.addEventListener("input",this.handleInput.bind(this)),this.$input.addEventListener("change",this.handleChange.bind(this))}skipValue=(k(this,y),!1);render(e){e.value&&!this.skipValue&&(this.$input.value=this.value),e.placeholder&&(this.$input.placeholder=this.placeholder),this.skipValue=!1}handleInput(e){e.stopPropagation(),this.skipValue=!0,this.value=e.target.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:e.target.value,name:e.name}}))}handleChange(e){this.dispatchEvent(new CustomEvent("change",{detail:{value:e.target.value,name:e.name}}))}})})()})();
@@ -1 +0,0 @@
1
- (()=>{"use strict";var t={277:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(601),o=n.n(r),a=n(314),i=n.n(a)()(o());i.push([t.id,':host {\n display: block;\n}\n\n[part="grid"] {\n display: grid;\n grid-template-columns: auto 1.5rem;\n}\n\n[part="icon"] {\n grid-row: 1;\n grid-column: 2;\n pointer-events: none;\n transform: translate(calc(-0.35rem + 1px), calc(0.25rem + 1px));\n}\n\n[part="input"] {\n grid-row: 1;\n grid-column: 1 / span 2;\n}\n\n[part="input"]:focus + [part="icon"] {\n --pg-icon-color: #4f8ff9;\n}',""]);var s=new CSSStyleSheet;s.replaceSync(i.toString());const l=s},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,a){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(i[l]=!0)}for(var c=0;c<t.length;c++){var p=[].concat(t[c]);r&&i[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),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),o&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=o):p[4]="".concat(o)),e.push(p))}},e}},441:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(601),o=n.n(r),a=n(314),i=n.n(a)()(o());i.push([t.id,':host {\n display: inline-flex;\n color: var(--pg-icon-color, #453C4F);\n}\n\n[part="svg"] {\n width: var(--pg-icon-width, 1.5rem);\n height: var(--pg-icon-height, 1.5rem);\n}',""]);var s=new CSSStyleSheet;s.replaceSync(i.toString());const l=s},569:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(601),o=n.n(r),a=n(314),i=n.n(a)()(o());i.push([t.id,':host {\n display: block;\n font-family: var(--pg-font-family);\n}\n\n[part="input"] {\n border: 1px solid var(--pg-input-text-border-color, #453C4F);\n border-radius: 0.125rem;\n padding: calc(0.5rem - 1px) 0.75rem;\n font-family: var(--pg-font-family);\n font-size: 1rem;\n outline: none;\n width: calc(100% - 1.5rem - 2px);\n}\n\n[part="input"]:active {\n box-shadow: 0 0 0 3px var(--pg-input-text-active-glow, rgb(79, 143, 249, 0.6));\n}\n[part="input"]:focus {\n box-shadow: 0 0 0 3px var(--pg-input-text-focus-glow, rgb(79, 143, 249, 0.5));\n}',""]);var s=new CSSStyleSheet;s.replaceSync(i.toString());const l=s},601:t=>{t.exports=function(t){return t[1]}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var a=e[r]={id:r,exports:{}};return t[r](a,a.exports,n),a.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 r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const r=Symbol("addObserver"),o=Symbol("removeObserver"),a=Symbol("getObservers"),i=Symbol("swapObserver"),s=Symbol("isProxy"),l=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],p=new Map;function u(t){return new Proxy(t,{get(e,n){if("symbol"==typeof n){switch(n){case s:return!0;case l:return e;case a:return e=>{const n=p.get(t);return n?.has(e)};case i:return(e,n)=>{const r=p.get(t);if(r){const t=r.get(e);t&&t.forEach(((r,o)=>{if(!r)throw new Error("Unreachable");{const t=p.get(n);if(t){const n=t.get(e);n?n.set(o,r):t.set(e,new Map([[o,r]]))}else p.set(n,new Map([[e,new Map([[o,r]])]]))}t.delete(o),r.forEach((t=>{t(null,h.swap,[n])}))}))}};case r:return(e,n)=>{const r=e.getRootNode().host,o=p.get(t);if(o){const t=o.get(r);if(t){const r=t.get(e);r?r.push(n):t.set(e,[n])}else o.set(r,new Map([[e,[n]]]))}else p.set(t,new Map([[r,new Map([[e,[n]]])]]))};case o:return e=>{const n=e.getRootNode().host,r=p.get(t);r&&(r.delete(n),0===r.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]?u(e[n]):e[n];if("copyWithin"===n)throw new Error("Unsupported array method copyWithin");if(c.includes(n))return p.has(e)?function(){const t=Array.prototype[n].apply(e,arguments),r=p.get(e);return r?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,n,arguments)}))}))})),t}:Reflect.get(e,n);if(e[n]instanceof Array)return u(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)){const r=p.get(t);r?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,n)}))}))}))}return Reflect.set(t,e,n)}})}window.observers=p;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(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const d=Symbol("init"),f=Symbol("template"),m=Symbol("style"),y=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,n){if("class"!==n.kind)throw new Error("@Component() can only decorate a class");var r,o;Reflect.defineProperty(e,"name",{value:t.selector,writable:!1,configurable:!1}),!e.prototype[y]||e.prototype[y][e.prototype[y].length-1]instanceof Object.getPrototypeOf(e)?e.prototype instanceof HTMLElement&&(e.prototype[y]=[e.prototype],e.prototype[m]=t.style?[t.style]:[],e.prototype[f]=t.template||""):(e.prototype[y].push(e.prototype),e.prototype[m].push(t.style),e.prototype[f]=(r=e.prototype[f],(o=t.template||null)&&o.match(/<parent\/>/)?o.replace(/<parent\/>/,r):r.match(/<child\/>/)?r.replace(/<child\/>/,o||""):`${r}${o||""}`));const a=e.prototype.connectedCallback||(()=>{}),i=e.prototype.disconnectedCallback||(()=>{});e.prototype.connectedCallback=function(){if(this[d]||void 0!==t.template||void 0!==t.style)if(this[d]){if(this[d]&&t.style);else if(this[d]&&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[f]||"";const n=document.importNode(t.content,!0),r=this.attachShadow({mode:"open"});r.adoptedStyleSheets=e.prototype[m].reduce(((t,e)=>{if(!e)return t;if(e instanceof CSSStyleSheet)return t.push(e),t;var n=new CSSStyleSheet;return n.replaceSync(e.toString()),t.push(n),t}),[]),r.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 r=Array.from(n.values()).map((t=>customElements.get(t)?Promise.resolve():customElements.whenDefined(t))),o=()=>{this[y].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[g(e)]=!0,t)),{}):{})}))};0===r.length?(this[d]=!0,a.call(this),o()):Promise.all(r).then((()=>{this[d]=!0,a.call(this);for(const t of this.shadowRoot.querySelectorAll("slot"))t.dispatchEvent(new CustomEvent("slotchange"));o()}))},e.prototype.disconnectedCallback=function(){i.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 w(t){return!!t&&t.constructor===Array}function S(t,e){t[d]&&t[y].map((n=>{n.render&&n.render.call(t,{[e]:!0})}))}function E(t){return null===t?"null":w(t)?"array":typeof t}function x(t){return function(e,n){const r=n.name,o=Symbol(r),c=Symbol(`${r}:type`),p=Symbol(`${r}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,r,{get:()=>"object"===this[c]||"array"===this[c]?this[o][s]?this[o]:u(this[o]):this[o],set:e=>{const n=E(t?t(e):e);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(e))throw new PropError(`Array "${r}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,r)?.set);if(this[o]===e)throw new Error("Setting an array to itself is not allowed.");const t=u(this[o]);if(t[a](this)){const n=e[s]?e[l]:e;t[i](this,n),this[o]=e}else this[o]=e}else this[o]=t?t(e):e,S(this,r)}})})),function(e){if(void 0===e&&"index"!==r)throw new Error(`@Prop() ${r} must have an initial value defined.`);if(void 0!==e&&"index"===r)throw new Error("@Prop() index must not have an initial value defined.");if(!0===e)throw new Error(`@Prop() ${r} boolean must initialize to false.`);if(!n.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[c]=E(e),"array"===this[c]?(this[o]=e,new Proxy(e,{get:(t,e)=>e===P?this[p]:(console.log("errr???"),Reflect.get(this[o],e)),set:(t,e,n)=>{if(e===P)return this[p]=n,!0;const a=Reflect.set(t,e,n);return"length"===e&&this[o].length===n||S(this,r),this[o]=n,a}})):(this[o]=t?t(this.getAttribute(r)??e):this.getAttribute(r)??e,this[o])}}}function $(){return function(t,e){const n=e.name,r=n.replace(/^\$/,"");e.addInitializer((function(){let t=null;Reflect.defineProperty(this,n,{get(){return t??(t=this.shadowRoot?.querySelector(`[part~=${r}]`))}})}))}}Symbol("hasProxy");const P=Symbol("meta");var k=n(277);var O=n(569),C=function(t,e,n,r,o,a){function i(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",p=!e&&t?r.static?t:t.prototype:null,u=e||(p?Object.getOwnPropertyDescriptor(p,r.name):{}),h=!1,d=n.length-1;d>=0;d--){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(t){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(t||null))};var y=(0,n[d])("accessor"===l?{get:u.get,set:u.set}:u[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(u.get=s),(s=i(y.set))&&(u.set=s),(s=i(y.init))&&o.unshift(s)}else(s=i(y))&&("field"===l?o.unshift(s):u[c]=s)}p&&Object.defineProperty(p,r.name,u),h=!0},j=function(t,e,n){for(var r=arguments.length>2,o=0;o<e.length;o++)n=r?e[o].call(t,n):e[o].call(t);return r?n:void 0};const A=(()=>{let t,e,n,r,o,a,i=[b({selector:"pg-input-text",style:O.A,template:'<input part="input" type="text"/>'})],s=[],l=HTMLElement,c=[],p=[],u=[],h=[],d=[],f=[],m=[],y=[];(class extends l{static{e=this}static{const v="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;n=[x()],r=[x()],o=[x()],a=[$()],C(null,null,n,{kind:"field",name:"name",static:!1,private:!1,access:{has:t=>"name"in t,get:t=>t.name,set:(t,e)=>{t.name=e}},metadata:v},c,p),C(null,null,r,{kind:"field",name:"value",static:!1,private:!1,access:{has:t=>"value"in t,get:t=>t.value,set:(t,e)=>{t.value=e}},metadata:v},u,h),C(null,null,o,{kind:"field",name:"placeholder",static:!1,private:!1,access:{has:t=>"placeholder"in t,get:t=>t.placeholder,set:(t,e)=>{t.placeholder=e}},metadata:v},d,f),C(null,null,a,{kind:"field",name:"$input",static:!1,private:!1,access:{has:t=>"$input"in t,get:t=>t.$input,set:(t,e)=>{t.$input=e}},metadata:v},m,y),C(null,t={value:e},i,{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}),j(e,s)}name=j(this,c,"");value=(j(this,p),j(this,u,""));placeholder=(j(this,h),j(this,d,""));$input=(j(this,f),j(this,m,void 0));connectedCallback(){this.$input.addEventListener("input",this.handleInput.bind(this)),this.$input.addEventListener("change",this.handleChange.bind(this))}skipValue=(j(this,y),!1);render(t){t.value&&!this.skipValue&&(this.$input.value=this.value),t.placeholder&&(this.$input.placeholder=this.placeholder),this.skipValue=!1}handleInput(t){t.stopPropagation(),this.skipValue=!0,this.value=t.target.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:t.target.value,name:t.name}}))}handleChange(t){this.dispatchEvent(new CustomEvent("change",{detail:{value:t.target.value,name:t.name}}))}});return e})();var z=n(441),M=function(t,e,n,r,o,a){function i(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",p=!e&&t?r.static?t:t.prototype:null,u=e||(p?Object.getOwnPropertyDescriptor(p,r.name):{}),h=!1,d=n.length-1;d>=0;d--){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(t){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(t||null))};var y=(0,n[d])("accessor"===l?{get:u.get,set:u.set}:u[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(u.get=s),(s=i(y.set))&&(u.set=s),(s=i(y.init))&&o.unshift(s)}else(s=i(y))&&("field"===l?o.unshift(s):u[c]=s)}p&&Object.defineProperty(p,r.name,u),h=!0},T=function(t,e,n){for(var r=arguments.length>2,o=0;o<e.length;o++)n=r?e[o].call(t,n):e[o].call(t);return r?n:void 0};(()=>{let t,e,n,r,o,a=[b({selector:"pg-icon",style:z.A,template:'<svg part="svg" viewBox="0 0 24 24"> <path part="path" fill="currentColor" d="M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"/> </svg>'})],i=[],s=HTMLElement,l=[],c=[],p=[],u=[],h=[],d=[];(class extends s{static{e=this}static{const f="function"==typeof Symbol&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;n=[x()],r=[$()],o=[$()],M(null,null,n,{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:f},l,c),M(null,null,r,{kind:"field",name:"$svg",static:!1,private:!1,access:{has:t=>"$svg"in t,get:t=>t.$svg,set:(t,e)=>{t.$svg=e}},metadata:f},p,u),M(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:f},h,d),M(null,t={value:e},a,{kind:"class",name:e.name,metadata:f},null,i),e=t.value,f&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:f}),T(e,i)}path=T(this,l,"M0 0h24v24H0V0zm2 2v20h20V2H2z");$svg=(T(this,c),T(this,p,void 0));$path=(T(this,u),T(this,h,void 0));render(t){if(t.path){const t=getComputedStyle(this).getPropertyValue("--pg-icon-viewbox");if(this.$svg.setAttribute("viewBox",t||"0 0 24 24"),!this.path)throw new Error("invalid path set on pg-icon");this.$path.setAttribute("d",this.path)}}constructor(){super(...arguments),T(this,d)}})})();var R=function(t,e,n,r,o,a){function i(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",p=!e&&t?r.static?t:t.prototype:null,u=e||(p?Object.getOwnPropertyDescriptor(p,r.name):{}),h=!1,d=n.length-1;d>=0;d--){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(t){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(t||null))};var y=(0,n[d])("accessor"===l?{get:u.get,set:u.set}:u[c],f);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(u.get=s),(s=i(y.set))&&(u.set=s),(s=i(y.init))&&o.unshift(s)}else(s=i(y))&&("field"===l?o.unshift(s):u[c]=s)}p&&Object.defineProperty(p,r.name,u),h=!0},H=function(t,e,n){for(var r=arguments.length>2,o=0;o<e.length;o++)n=r?e[o].call(t,n):e[o].call(t);return r?n:void 0};(()=>{let t,e,n,r,o=[b({selector:"pg-input-text-icon",style:k.A,template:'<div part="grid"> <parent/> <pg-icon part="icon"></pg-icon> </div>'})],a=[],i=A,s=[],l=[],c=[],p=[];(class extends i{static{e=this}static{const u="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;n=[x()],r=[$()],R(null,null,n,{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},s,l),R(null,null,r,{kind:"field",name:"$icon",static:!1,private:!1,access:{has:t=>"$icon"in t,get:t=>t.$icon,set:(t,e)=>{t.$icon=e}},metadata:u},c,p),R(null,t={value:e},o,{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}),H(e,a)}path=H(this,s,"M3,3V21H21V3");$icon=(H(this,l),H(this,c,void 0));render(t){t.path&&(this.$icon.path=this.path)}constructor(){super(...arguments),H(this,p)}})})()})();
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e={25:(e,t,n)=>{n.d(t,{A:()=>l});var s=n(601),i=n.n(s),o=n(314),a=n.n(o)()(i());a.push([e.id,':host {\n display: block;\n}\n\n[part="wrapper"] {\n display: grid;\n grid-template-rows: auto 0;\n grid-template-columns: 100%;\n}\n\n[part="select"] {\n display: grid;\n grid-template-columns: 3.5rem 1.75rem auto 2.75rem 1fr 1.5rem;\n grid-template-rows: 1.5rem 1.5rem;\n grid-row: 1;\n grid-column: 1;\n border: 1px solid var(--pg-input-select-border-color, #453C4F);\n border-radius: 0.25rem;\n padding: 0.5rem 0.5rem 0.5rem 0.75rem;\n width: 100%;\n font-size: 1rem;\n outline: 0;\n text-align: left;\n background: var(--pg-input-select-background, #fff);\n}\n\n[part="select"]:focus {\n box-shadow: 0 0 0 3px rgba(79, 143, 249, 0.5);\n}\n\n[part="select"]:disabled {\n border: 1px solid var(--pg-input-select-disabled-border-color, rgba(69, 60, 79, 0.6));\n color: var(--pg-input-select-disabled-color, rgba(69, 60, 79, 0.6));\n}\n\n[part="chevron"] {\n grid-row: 1 / span 2;\n grid-column: 6;\n pointer-events: none;\n width: 1.5rem;\n height: 1.5rem;\n align-self: center;\n}\n\n.githubIcon,\n[part="githubIcon"] {\n grid-row: 2;\n grid-column: 2;\n width: 1.5rem;\n height: 1.5rem;\n align-self: center;\n color: var(--pg-input-select-border-color, #453C4F);\n}\n\n.avatar,\n[part="selectedAvatar"] {\n grid-row: 1 / span 2;\n grid-column: 1;\n width: 3rem;\n height: 3rem;\n border-radius: 50%;\n border: 1px solid var(--pg-input-select-border-color, #453C4F);\n}\n\n.name,\n[part="selectedName"] {\n grid-row: 1;\n grid-column: 2 / span 4;\n align-self: center;\n}\n\n.github,\n[part="selectedGithub"] {\n grid-row: 2;\n grid-column: 3;\n align-self: center;\n}\n\n.countIcon,\n[part="countIcon"] {\n grid-row: 2;\n grid-column: 4;\n width: 1.5rem;\n height: 1.5rem;\n align-self: center;\n margin-left: 1rem;\n color: var(--pg-input-select-border-color, #453C4F);\n}\n\n.iconCount,\n[part="selectedCount"] {\n grid-row: 2;\n grid-column: 5;\n align-self: center;\n font-weight: bold;\n}\n\n[part="dropdown"].open {\n display: flex;\n}\n\n[part="dropdown"] {\n grid-row: 2;\n grid-column: 1;\n display: none;\n flex-direction: column;\n border: 1px solid var(--pg-input-select-border-color, #453C4F);\n border-radius: 0.25rem;\n background: #fff;\n z-index: 1;\n position: absolute;\n max-height: 16.5rem;\n overflow: auto;\n}\n\n[part="dropdown"] button {\n display: grid;\n grid-template-columns: 3.5rem 1.75rem auto 2.75rem 1fr;\n grid-template-rows: auto;\n border: 0;\n padding: 0.5rem 0.75rem;\n text-align: left;\n background: #fff;\n}\n\n[part="dropdown"] button:hover,\n[part="dropdown"] button:focus {\n color: #fff;\n background: #1E90FF;\n}\n\n[part="dropdown"] button:hover .githubIcon,\n[part="dropdown"] button:hover .countIcon,\n[part="dropdown"] button:focus .githubIcon,\n[part="dropdown"] button:focus .countIcon {\n color: #fff;\n}\n\n[part="loading"] {\n width: 3rem;\n height: 3rem;\n animation: spin 2s infinite linear;\n grid-row: 1 / span 2;;\n grid-column: 1;\n pointer-events: none;\n align-self: center;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(359deg);\n }\n}\n\n[part="loadingText"] {\n grid-row: 1 / span 2;\n grid-column: 2 / span 3;\n align-self: center;\n}\n\n[part="noData"] {\n grid-row: 1 / span 2;\n grid-column: 1 / span 4;\n align-self: center;\n}\n\n[part="noSelection"] {\n grid-row: 1 / span 2;\n grid-column: 1 / span 4;\n align-self: center;\n}',""]);var r=new CSSStyleSheet;r.replaceSync(a.toString());const l=r},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",s=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),s&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),s&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,s,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(s)for(var r=0;r<this.length;r++){var l=this[r][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);s&&a[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),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}},601:e=>{e.exports=function(e){return e[1]}}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var o=t[s]={id:s,exports:{}};return e[s](o,o.exports,n),o.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 s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=Symbol("addObserver"),i=Symbol("removeObserver"),o=Symbol("getObservers"),a=Symbol("swapObserver"),r=Symbol("isProxy"),l=Symbol("getTarget"),c=["fill","pop","push","reverse","shift","sort","splice","unshift"],d=new Map;function p(e){return new Proxy(e,{get(t,n){if("symbol"==typeof n){switch(n){case r:return!0;case l:return t;case o:return t=>{const n=d.get(e);return n?.has(t)};case a:return(t,n)=>{const s=d.get(e);if(s){const e=s.get(t);e&&e.forEach(((s,i)=>{if(!s)throw new Error("Unreachable");{const e=d.get(n);if(e){const n=e.get(t);n?n.set(i,s):e.set(t,new Map([[i,s]]))}else d.set(n,new Map([[t,new Map([[i,s]])]]))}e.delete(i),s.forEach((e=>{e(null,h.swap,[n])}))}))}};case s:return(t,n)=>{const s=t.getRootNode().host,i=d.get(e);if(i){const e=i.get(s);if(e){const s=e.get(t);s?s.push(n):e.set(t,[n])}else i.set(s,new Map([[t,[n]]]))}else d.set(e,new Map([[s,new Map([[t,[n]]])]]))};case i:return t=>{const n=t.getRootNode().host,s=d.get(e);s&&(s.delete(n),0===s.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]?p(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),s=d.get(t);return s?.forEach((e=>{e.forEach((e=>{e.forEach((e=>{e(t,n,arguments)}))}))})),e}:Reflect.get(t,n);if(t[n]instanceof Array)return p(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)){const s=d.get(e);s?.forEach((e=>{e.forEach((e=>{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 u=Symbol("init"),m=Symbol("template"),g=Symbol("style"),f=Symbol("parent");function y(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 s,i;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[g]=e.style?[e.style]:[],t.prototype[m]=e.template||""):(t.prototype[f].push(t.prototype),t.prototype[g].push(e.style),t.prototype[m]=(s=t.prototype[m],(i=e.template||null)&&i.match(/<parent\/>/)?i.replace(/<parent\/>/,s):s.match(/<child\/>/)?s.replace(/<child\/>/,i||""):`${s}${i||""}`));const o=t.prototype.connectedCallback||(()=>{}),a=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[m]||"";const n=document.importNode(e.content,!0),s=this.attachShadow({mode:"open"});s.adoptedStyleSheets=t.prototype[g].reduce(((e,t)=>{if(!t)return e;if(t instanceof CSSStyleSheet)return e.push(t),e;var n=new CSSStyleSheet;return n.replaceSync(t.toString()),e.push(n),e}),[]),s.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 s=Array.from(n.values()).map((e=>customElements.get(e)?Promise.resolve():customElements.whenDefined(e))),i=()=>{this[f].map((e=>{e.render&&e.render.call(this,t.observedAttributes?t.observedAttributes.reduce(((e,t)=>(e[v(t)]=!0,e)),{}):{})}))};0===s.length?(this[u]=!0,o.call(this),i()):Promise.all(s).then((()=>{this[u]=!0,o.call(this);for(const e of this.shadowRoot.querySelectorAll("slot"))e.dispatchEvent(new CustomEvent("slotchange"));i()}))},t.prototype.disconnectedCallback=function(){a.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 w(e){return!!e&&e.constructor===Array}function $(e,t){e[u]&&e[f].map((n=>{n.render&&n.render.call(e,{[t]:!0})}))}function C(e){return null===e?"null":w(e)?"array":typeof e}function S(e){return function(t,n){const s=n.name,i=Symbol(s),c=Symbol(`${s}:type`),d=Symbol(`${s}:meta`);return n.addInitializer((function(){Reflect.defineProperty(this,s,{get:()=>"object"===this[c]||"array"===this[c]?this[i][r]?this[i]:p(this[i]):this[i],set:t=>{const n=C(e?e(t):t);if("index"!==s&&this[c]!==n&&"null"!==this[c]&&"null"!==n)throw new Error(`@Prop() ${s} with type '${this[c]}' cannot be set to ${n}.`);if("array"===this[c]){if(!w(t))throw new PropError(`Array "${s}" (Prop) initialized already. Reassignments must be array type.`,Object.getOwnPropertyDescriptor(this,s)?.set);if(this[i]===t)throw new Error("Setting an array to itself is not allowed.");const e=p(this[i]);if(e[o](this)){const n=t[r]?t[l]:t;e[a](this,n),this[i]=t}else this[i]=t}else this[i]=e?e(t):t,$(this,s)}})})),function(t){if(void 0===t&&"index"!==s)throw new Error(`@Prop() ${s} must have an initial value defined.`);if(void 0!==t&&"index"===s)throw new Error("@Prop() index must not have an initial value defined.");if(!0===t)throw new Error(`@Prop() ${s} boolean must initialize to false.`);if(!n.private){const{constructor:e}=this;e.observedAttributes??=[],e.symbols||(e.symbols={});const{symbols:t}=e,n=y(s);t[s]||(e.observedAttributes.push(n),t[s]=i)}return this[c]=C(t),"array"===this[c]?(this[i]=t,new Proxy(t,{get:(e,t)=>t===E?this[d]:(console.log("errr???"),Reflect.get(this[i],t)),set:(e,t,n)=>{if(t===E)return this[d]=n,!0;const o=Reflect.set(e,t,n);return"length"===t&&this[i].length===n||$(this,s),this[i]=n,o}})):(this[i]=e?e(this.getAttribute(s)??t):this.getAttribute(s)??t,this[i])}}}function x(){return function(e,t){const n=t.name,s=n.replace(/^\$/,"");t.addInitializer((function(){let e=null;Reflect.defineProperty(this,n,{get(){return e??(e=this.shadowRoot?.querySelector(`[part~=${s}]`))}})}))}}Symbol("hasProxy");const E=Symbol("meta");var k=n(25),T=function(e,t,n,s,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=s.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?s.static?e:e.prototype:null,p=t||(d?Object.getOwnPropertyDescriptor(d,s.name):{}),h=!1,u=n.length-1;u>=0;u--){var m={};for(var g in s)m[g]="access"===g?{}:s[g];for(var g in s.access)m.access[g]=s.access[g];m.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var f=(0,n[u])("accessor"===l?{get:p.get,set:p.set}:p[c],m);if("accessor"===l){if(void 0===f)continue;if(null===f||"object"!=typeof f)throw new TypeError("Object expected");(r=a(f.get))&&(p.get=r),(r=a(f.set))&&(p.set=r),(r=a(f.init))&&i.unshift(r)}else(r=a(f))&&("field"===l?i.unshift(r):p[c]=r)}d&&Object.defineProperty(d,s.name,p),h=!0},A=function(e,t,n){for(var s=arguments.length>2,i=0;i<t.length;i++)n=s?t[i].call(e,n):t[i].call(e);return s?n:void 0};function I(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 24 24");const s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",e),s.setAttribute("fill","currentColor"),n.appendChild(s),n.classList.add(t),n}const M="ArrowUp",L="ArrowDown",D="Escape",N="Tab";(()=>{let e,t,n,s,i,o,a,r,l,c,d,p,h,u,m,g,f,y,v,w,$=[b({selector:"pg-input-user-select",style:k.A,template:'<div part="wrapper"> <button part="select"> <img part="selectedAvatar"/> <span part="selectedName">First Last</span> <svg part="githubIcon" viewBox="0 0 24 24"><path fill="currentColor" d="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"/></svg> <span part="selectedGithub">GitHub</span> <svg part="countIcon" viewBox="0 0 24 24"><path fill="currentColor" d="M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z"/></svg> <span part="selectedCount">9999</span> <svg part="loading" viewBox="0 0 24 24"><path fill="currentColor" d="M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"/></svg> <span part="loadingText">Loading...</span> <svg part="chevron" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"/></svg> <span part="noData">Empty Users List</span> <span part="noSelection">Select a User</span> </button> <div part="dropdownContainer"> <div part="dropdown"></div> </div> </div>'})],C=[],E=HTMLElement,P=[],O=[],R=[],j=[],G=[],z=[],H=[],B=[],F=[],U=[],Z=[],V=[],W=[],q=[],K=[],_=[],Y=[],J=[],Q=[],X=[],ee=[],te=[],ne=[],se=[],ie=[],oe=[],ae=[],re=[],le=[],ce=[],de=[],pe=[],he=[],ue=[],me=[],ge=[];(class extends E{static{t=this}static{const b="function"==typeof Symbol&&Symbol.metadata?Object.create(E[Symbol.metadata]??null):void 0;n=[S()],s=[S()],i=[S()],o=[S()],a=[S()],r=[S()],l=[x()],c=[x()],d=[x()],p=[x()],h=[x()],u=[x()],m=[x()],g=[x()],f=[x()],y=[x()],v=[x()],w=[x()],T(null,null,n,{kind:"field",name:"options",static:!1,private:!1,access:{has:e=>"options"in e,get:e=>e.options,set:(e,t)=>{e.options=t}},metadata:b},P,O),T(null,null,s,{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},R,j),T(null,null,i,{kind:"field",name:"clear",static:!1,private:!1,access:{has:e=>"clear"in e,get:e=>e.clear,set:(e,t)=>{e.clear=t}},metadata:b},G,z),T(null,null,o,{kind:"field",name:"noDataText",static:!1,private:!1,access:{has:e=>"noDataText"in e,get:e=>e.noDataText,set:(e,t)=>{e.noDataText=t}},metadata:b},H,B),T(null,null,a,{kind:"field",name:"noSelectionText",static:!1,private:!1,access:{has:e=>"noSelectionText"in e,get:e=>e.noSelectionText,set:(e,t)=>{e.noSelectionText=t}},metadata:b},F,U),T(null,null,r,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:b},Z,V),T(null,null,l,{kind:"field",name:"$select",static:!1,private:!1,access:{has:e=>"$select"in e,get:e=>e.$select,set:(e,t)=>{e.$select=t}},metadata:b},W,q),T(null,null,c,{kind:"field",name:"$selectedAvatar",static:!1,private:!1,access:{has:e=>"$selectedAvatar"in e,get:e=>e.$selectedAvatar,set:(e,t)=>{e.$selectedAvatar=t}},metadata:b},K,_),T(null,null,d,{kind:"field",name:"$selectedName",static:!1,private:!1,access:{has:e=>"$selectedName"in e,get:e=>e.$selectedName,set:(e,t)=>{e.$selectedName=t}},metadata:b},Y,J),T(null,null,p,{kind:"field",name:"$githubIcon",static:!1,private:!1,access:{has:e=>"$githubIcon"in e,get:e=>e.$githubIcon,set:(e,t)=>{e.$githubIcon=t}},metadata:b},Q,X),T(null,null,h,{kind:"field",name:"$selectedGithub",static:!1,private:!1,access:{has:e=>"$selectedGithub"in e,get:e=>e.$selectedGithub,set:(e,t)=>{e.$selectedGithub=t}},metadata:b},ee,te),T(null,null,u,{kind:"field",name:"$countIcon",static:!1,private:!1,access:{has:e=>"$countIcon"in e,get:e=>e.$countIcon,set:(e,t)=>{e.$countIcon=t}},metadata:b},ne,se),T(null,null,m,{kind:"field",name:"$selectedCount",static:!1,private:!1,access:{has:e=>"$selectedCount"in e,get:e=>e.$selectedCount,set:(e,t)=>{e.$selectedCount=t}},metadata:b},ie,oe),T(null,null,g,{kind:"field",name:"$dropdown",static:!1,private:!1,access:{has:e=>"$dropdown"in e,get:e=>e.$dropdown,set:(e,t)=>{e.$dropdown=t}},metadata:b},ae,re),T(null,null,f,{kind:"field",name:"$loading",static:!1,private:!1,access:{has:e=>"$loading"in e,get:e=>e.$loading,set:(e,t)=>{e.$loading=t}},metadata:b},le,ce),T(null,null,y,{kind:"field",name:"$loadingText",static:!1,private:!1,access:{has:e=>"$loadingText"in e,get:e=>e.$loadingText,set:(e,t)=>{e.$loadingText=t}},metadata:b},de,pe),T(null,null,v,{kind:"field",name:"$noData",static:!1,private:!1,access:{has:e=>"$noData"in e,get:e=>e.$noData,set:(e,t)=>{e.$noData=t}},metadata:b},he,ue),T(null,null,w,{kind:"field",name:"$noSelection",static:!1,private:!1,access:{has:e=>"$noSelection"in e,get:e=>e.$noSelection,set:(e,t)=>{e.$noSelection=t}},metadata:b},me,ge),T(null,e={value:t},$,{kind:"class",name:t.name,metadata:b},null,C),t=e.value,b&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:b}),A(t,C)}options=A(this,P,[]);value=(A(this,O),A(this,R,null));clear=(A(this,j),A(this,G,!1));noDataText=(A(this,z),A(this,H,"Empty Users List"));noSelectionText=(A(this,B),A(this,F,"Select a User"));name=(A(this,U),A(this,Z,""));$select=(A(this,V),A(this,W,void 0));$selectedAvatar=(A(this,q),A(this,K,void 0));$selectedName=(A(this,_),A(this,Y,void 0));$githubIcon=(A(this,J),A(this,Q,void 0));$selectedGithub=(A(this,X),A(this,ee,void 0));$countIcon=(A(this,te),A(this,ne,void 0));$selectedCount=(A(this,se),A(this,ie,void 0));$dropdown=(A(this,oe),A(this,ae,void 0));$loading=(A(this,re),A(this,le,void 0));$loadingText=(A(this,ce),A(this,de,void 0));$noData=(A(this,pe),A(this,he,void 0));$noSelection=(A(this,ue),A(this,me,void 0));connectedCallback(){this.$select.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeys.bind(this))}isOpen=(A(this,ge),!1);handleCloseBind;optionsElements=[];close(){this.isOpen=!1,this.$dropdown.classList.remove("open"),document.removeEventListener("mousedown",this.handleCloseBind)}handleClose(e){const t=e.target;t.nodeName===this.nodeName&&t.isOpen||this.close()}handleClick(){this.isOpen=!this.isOpen,this.$dropdown.classList.toggle("open",this.isOpen),this.handleCloseBind=this.handleClose.bind(this),document.addEventListener("mousedown",this.handleCloseBind),this.focusSelected()}focusSelected(){const e=this.options?.findIndex((e=>e===this.value));e&&-1!==e?(this.optionsElements[e].focus(),this.index=e):this.optionsElements.length&&this.optionsElements[0].focus()}handleSelect(e){console.log("clicked");const{id:t}=e.currentTarget.dataset,n=this.options?.find((e=>e.id===t));this.value=n||null,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,name:this.name}})),this.close()}loadingMode(){this.$selectedAvatar.style.display="none",this.$selectedName.style.display="none",this.$githubIcon.style.display="none",this.$selectedGithub.style.display="none",this.$countIcon.style.display="none",this.$selectedCount.style.display="none",this.$noData.style.display="none",this.$noSelection.style.display="none",this.$loading.style.display="flex",this.$loadingText.style.display="initial",this.$select.disabled=!0}noDataMode(){this.$selectedAvatar.style.display="none",this.$selectedName.style.display="none",this.$githubIcon.style.display="none",this.$selectedGithub.style.display="none",this.$countIcon.style.display="none",this.$selectedCount.style.display="none",this.$noData.style.display="initial",this.$noSelection.style.display="none",this.$loading.style.display="none",this.$loadingText.style.display="none",this.$select.disabled=!0}noSelectionMode(){this.$selectedAvatar.style.display="none",this.$selectedName.style.display="none",this.$githubIcon.style.display="none",this.$selectedGithub.style.display="none",this.$countIcon.style.display="none",this.$selectedCount.style.display="none",this.$noData.style.display="none",this.$noSelection.style.display="initial",this.$loading.style.display="none",this.$loadingText.style.display="none",this.$select.disabled=!1}selectMode(){this.$selectedAvatar.style.display="initial",this.$selectedName.style.display="initial",this.$githubIcon.style.display="initial",this.$selectedGithub.style.display="initial",this.$countIcon.style.display="initial",this.$selectedCount.style.display="initial",this.$noData.style.display="none",this.$noSelection.style.display="none",this.$loading.style.display="none",this.$loadingText.style.display="none",this.$select.disabled=!1}render(e){e.options&&(null===this.options?this.loadingMode():0===this.options.length?this.noDataMode():(this.selectMode(),this.calculateMinWidth(),this.optionsElements=this.options.map((e=>{const t=document.createElement("button"),n=document.createElement("img");n.src=`${e.base64}`,n.classList.add("avatar"),t.appendChild(n);const s=document.createElement("span");s.innerText=`${e.name}`,s.classList.add("name"),t.appendChild(s);const i=document.createElement("span");i.innerText=`${e.github}`,i.classList.add("github"),t.appendChild(i);const o=document.createElement("span");return o.innerText=`${e.iconCount}`,o.classList.add("iconCount"),t.appendChild(o),t.dataset.id=`${e.id}`,t.appendChild(I("M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z","githubIcon")),t.appendChild(I("M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z","countIcon")),t.addEventListener("click",this.handleSelect.bind(this)),this.$dropdown.appendChild(t),t})),null===this.value&&this.noSelectionMode())),e.value&&e.value&&this.value&&(this.$selectedAvatar.src=this.value.base64||"",this.$selectedCount.innerText=`${this.value.iconCount}`,this.$selectedName.innerText=`${this.value.name}`,this.$selectedGithub.innerText=`${this.value.github}`,this.selectMode()),e.noDataText&&(this.$noData.innerText=this.noDataText),e.noSelectionText&&(this.$noSelection.innerText=this.noSelectionText)}calculateMinWidth(){const{width:e}=this.$select.getBoundingClientRect();this.$dropdown.style.minWidth=e-2+"px"}index=-1;handleKeys(e){const t=this.optionsElements;let n=this.index;switch(e.key){case M:0===n?n=t.length-1:n>=0&&(n-=1);break;case L:n<t.length-1?n+=1:n===t.length-1&&(n=0);break;case N:case D:this.close()}n!=this.index&&(this.index=n,t[n].focus(),e.preventDefault())}})})()})();
package/pgListTag.js DELETED
@@ -1 +0,0 @@
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 i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<t.length;l++){var p=[].concat(t[l]);o&&i[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]}},833:(t,e,r)=>{r.d(e,{A:()=>c});var o=r(601),n=r.n(o),s=r(314),i=r.n(s)()(n());i.push([t.id,':host {\n display: inline-flex;\n color: var(--pg-icon-color, #453C4F);\n}\n\n[part="svg"] {\n width: var(--pg-icon-width, 1.5rem);\n height: var(--pg-icon-height, 1.5rem);\n}',""]);var a=new CSSStyleSheet;a.replaceSync(i.toString());const c=a}},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"),i=Symbol("swapObserver"),a=Symbol("isProxy"),c=Symbol("getTarget"),l=["fill","pop","push","reverse","shift","sort","splice","unshift"],p=new Map;function u(t){return new Proxy(t,{get(e,r){if("symbol"==typeof r){switch(r){case a:return!0;case c:return e;case s:return e=>{const r=p.get(t);return r?.has(e)};case i:return(e,r)=>{const o=p.get(t);if(o){const t=o.get(e);t&&t.forEach(((o,n)=>{if(!o)throw new Error("Unreachable");{const t=p.get(r);if(t){const r=t.get(e);r?r.set(n,o):t.set(e,new Map([[n,o]]))}else p.set(r,new Map([[e,new Map([[n,o]])]]))}t.delete(n),o.forEach((t=>{t(null,h.swap,[r])}))}))}};case o:return(e,r)=>{const o=e.getRootNode().host,n=p.get(t);if(n){const t=n.get(o);if(t){const o=t.get(e);o?o.push(r):t.set(e,[r])}else n.set(o,new Map([[e,[r]]]))}else p.set(t,new Map([[o,new Map([[e,[r]]])]]))};case n:return e=>{const r=e.getRootNode().host,o=p.get(t);o&&(o.delete(r),0===o.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]?u(e[r]):e[r];if("copyWithin"===r)throw new Error("Unsupported array method copyWithin");if(l.includes(r))return p.has(e)?function(){const t=Array.prototype[r].apply(e,arguments),o=p.get(e);return o?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,r,arguments)}))}))})),t}:Reflect.get(e,r);if(e[r]instanceof Array)return u(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)){const o=p.get(t);o?.forEach((t=>{t.forEach((t=>{t.forEach((t=>{t(e,r)}))}))}))}return Reflect.set(t,e,r)}})}window.observers=p;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(t,e){super(t),this.name="PropError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}}Symbol("index");const d=Symbol("init"),f=Symbol("template"),m=Symbol("style"),y=Symbol("parent");function b(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function v(t){return t.replace(/-([a-z])/g,(t=>t[1].toUpperCase()))}function g(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[y]||e.prototype[y][e.prototype[y].length-1]instanceof Object.getPrototypeOf(e)?e.prototype instanceof HTMLElement&&(e.prototype[y]=[e.prototype],e.prototype[m]=t.style?[t.style]:[],e.prototype[f]=t.template||""):(e.prototype[y].push(e.prototype),e.prototype[m].push(t.style),e.prototype[f]=(o=e.prototype[f],(n=t.template||null)&&n.match(/<parent\/>/)?n.replace(/<parent\/>/,o):o.match(/<child\/>/)?o.replace(/<child\/>/,n||""):`${o}${n||""}`));const s=e.prototype.connectedCallback||(()=>{}),i=e.prototype.disconnectedCallback||(()=>{});e.prototype.connectedCallback=function(){if(this[d]||void 0!==t.template||void 0!==t.style)if(this[d]){if(this[d]&&t.style);else if(this[d]&&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[f]||"";const r=document.importNode(t.content,!0),o=this.attachShadow({mode:"open"});o.adoptedStyleSheets=e.prototype[m].reduce(((t,e)=>{if(!e)return t;if(e instanceof CSSStyleSheet)return t.push(e),t;var r=new CSSStyleSheet;return r.replaceSync(e.toString()),t.push(r),t}),[]),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[y].map((t=>{t.render&&t.render.call(this,e.observedAttributes?e.observedAttributes.reduce(((t,e)=>(t[v(e)]=!0,t)),{}):{})}))};0===o.length?(this[d]=!0,s.call(this),n()):Promise.all(o).then((()=>{this[d]=!0,s.call(this);for(const t of this.shadowRoot.querySelectorAll("slot"))t.dispatchEvent(new CustomEvent("slotchange"));n()}))},e.prototype.disconnectedCallback=function(){i.call(this)},e.prototype.attributeChangedCallback=function(t,e,r){this[v(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[d]&&t[y].map((r=>{r.render&&r.render.call(t,{[e]:!0})}))}function E(t){return null===t?"null":w(t)?"array":typeof t}function P(t){return function(e,r){const o=r.name,n=Symbol(o),l=Symbol(`${o}:type`),p=Symbol(`${o}:meta`);return r.addInitializer((function(){Reflect.defineProperty(this,o,{get:()=>"object"===this[l]||"array"===this[l]?this[n][a]?this[n]:u(this[n]):this[n],set:e=>{const r=E(t?t(e):e);if("index"!==o&&this[l]!==r&&"null"!==this[l]&&"null"!==r)throw new Error(`@Prop() ${o} with type '${this[l]}' cannot be set to ${r}.`);if("array"===this[l]){if(!w(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=u(this[n]);if(t[s](this)){const r=e[a]?e[c]:e;t[i](this,r),this[n]=e}else this[n]=e}else this[n]=t?t(e):e,S(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(!r.private){const{constructor:t}=this;t.observedAttributes??=[],t.symbols||(t.symbols={});const{symbols:e}=t,r=b(o);e[o]||(t.observedAttributes.push(r),e[o]=n)}return this[l]=E(e),"array"===this[l]?(this[n]=e,new Proxy(e,{get:(t,e)=>e===x?this[p]:(console.log("errr???"),Reflect.get(this[n],e)),set:(t,e,r)=>{if(e===x)return this[p]=r,!0;const s=Reflect.set(t,e,r);return"length"===e&&this[n].length===r||S(this,o),this[n]=r,s}})):(this[n]=t?t(this.getAttribute(o)??e):this.getAttribute(o)??e,this[n])}}}Symbol("hasProxy");const x=Symbol("meta");var A=r(833),$=function(t,e,r,o,n,s){function i(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var a,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,d=r.length-1;d>=0;d--){var f={};for(var m in o)f[m]="access"===m?{}:o[m];for(var m in o.access)f.access[m]=o.access[m];f.addInitializer=function(t){if(h)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(t||null))};var y=(0,r[d])("accessor"===c?{get:u.get,set:u.set}:u[l],f);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=i(y.get))&&(u.get=a),(a=i(y.set))&&(u.set=a),(a=i(y.init))&&n.unshift(a)}else(a=i(y))&&("field"===c?n.unshift(a):u[l]=a)}p&&Object.defineProperty(p,o.name,u),h=!0},O=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,s=[g({selector:"pg-list-tag",style:A.A,template:'<div part="items"></div>'})],i=[],a=HTMLElement,c=[],l=[],p=[],u=[],h=[],d=[];(class extends a{static{e=this}static{const f="function"==typeof Symbol&&Symbol.metadata?Object.create(a[Symbol.metadata]??null):void 0;r=[P()],o=[P()],n=[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:"items",static:!1,private:!1,access:{has:t=>"items"in t,get:t=>t.items,set:(t,e)=>{t.items=e}},metadata:f},c,l),$(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:f},p,u),$(null,null,n,{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:f},h,d),$(null,t={value:e},s,{kind:"class",name:e.name,metadata:f},null,i),e=t.value,f&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:f}),O(e,i)}items=O(this,c,[]);edit=(O(this,l),O(this,p,!1));$items=(O(this,u),O(this,h,void 0));render(t){t.items&&function(t,e,r,o,n){const s=Array.from(t.children),i=s.map((t=>t.dataset.key)),a=e.map((t=>t[r]));e.forEach((e=>{if(!i.includes(e[r])){const n=o(e);return n instanceof DocumentFragment?n.children[0].dataset.key=e[r]:n.dataset.key=e[r],void t.appendChild(n)}{const t=s.find((t=>t.dataset.key===i[r]));if(e[r]===i[r])return void n(e,t)}})),s.forEach((t=>{a.includes(t.dataset.key)||t.remove()}))}(this.$items,this.items,"id",(t=>{const e=function(t,e){const r=document.createElement("template");r.innerHTML=t;const o=document.importNode(r.content,!0);for(const[t,r]of Object.entries(e)){const e=o.querySelector(`[part~="${t}"]`);if(e)for(const[t,o]of Object.entries(r))o instanceof Function?null===o()?e.removeAttribute(t):e.setAttribute(t,o()):e[t]=o}return o}('<button part="name"> </button>',{name:{innerText:t.name}}),r=e.querySelector('[part="name"]');return r?.addEventListener("click",(e=>{console.log(t)})),e}),((t,e)=>{})),t.edit}constructor(){super(...arguments),O(this,d)}})})()})();