@mgdis/mg-components 6.22.0 → 6.23.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.
- package/dist/cjs/{index-C2viYwrR.js → index-BEF-cqV9.js} +325 -1789
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +242 -172
- package/dist/cjs/mg-alert.cjs.entry.js +6 -2
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
- package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -3
- package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +7491 -6367
- package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
- package/dist/cjs/mg-loader.cjs.entry.js +2 -2
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +5 -2
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +12 -3
- package/dist/collection/components/atoms/mg-button/mg-button.js +9 -4
- package/dist/collection/components/atoms/mg-card/mg-card.js +16 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +16 -9
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -3
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +15 -13
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +49 -26
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +16 -8
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +6 -3
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +7 -4
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +11 -5
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +9 -4
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +61 -19
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +15 -8
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -4
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +8 -4
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +29 -3
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
- package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +5 -2
- package/dist/collection/components/molecules/mg-form/mg-form.js +8 -4
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +43 -4
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +20 -6
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
- package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/index4.js +1 -0
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-breadcrumb.js +1 -1
- package/dist/components/mg-button2.js +1 -1
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-checkbox.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-date.js +1 -1
- package/dist/components/mg-input-file.js +1 -1
- package/dist/components/mg-input-numeric.js +1 -1
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +284 -284
- package/dist/components/mg-input-select2.js +1 -1
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +1 -1
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-pagination.js +1 -1
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover-content2.js +1 -1
- package/dist/components/mg-popover2.js +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-table.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/components/mg-tooltip2.js +1 -1
- package/dist/custom-elements.json +8828 -0
- package/dist/esm/{index-DFwaH2hS.js → index-DshvCiTL.js} +325 -1789
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +244 -173
- package/dist/esm/mg-alert.entry.js +6 -2
- package/dist/esm/mg-breadcrumb.entry.js +2 -2
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +4 -3
- package/dist/esm/mg-input-combobox.entry.js +4 -3
- package/dist/esm/mg-input-file.entry.js +5 -4
- package/dist/esm/mg-input-rich-text-editor.entry.js +7491 -6367
- package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
- package/dist/esm/mg-loader.entry.js +2 -2
- package/dist/esm/mg-progress.entry.js +2 -2
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-d5e69c95.entry.js → p-13feb37a.entry.js} +1 -1
- package/dist/mg-components/{p-c8c8cfc1.entry.js → p-236bb1d2.entry.js} +1 -1
- package/dist/mg-components/p-79265ad3.entry.js +1 -0
- package/dist/mg-components/{p-adec7fcc.entry.js → p-7c63e469.entry.js} +1 -1
- package/dist/mg-components/p-7fd3e519.entry.js +1 -0
- package/dist/mg-components/p-DOi9lJXy.js +1 -0
- package/dist/mg-components/p-DshvCiTL.js +2 -0
- package/dist/mg-components/p-a0e2c886.entry.js +1 -0
- package/dist/mg-components/p-cdb01923.entry.js +1 -0
- package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
- package/dist/mg-components/{p-c63f97f0.entry.js → p-d698fa67.entry.js} +283 -283
- package/dist/types/assets/icons/index.d.ts +2 -0
- package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
- package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
- package/dist/types/components.d.ts +547 -170
- package/dist/types/stencil-public-runtime.d.ts +53 -2
- package/ide/intellij/web-types.json +211 -3476
- package/ide/vscode/css-custom-data.json +1 -1
- package/ide/vscode/html-custom-data.json +58 -314
- package/package.json +30 -25
- package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
- package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
- package/dist/components/mg-input-checkbox-paginated.js +0 -1
- package/dist/components/mg-input-checkbox-paginated2.js +0 -1
- package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
- package/dist/mg-components/p-0482eb9f.entry.js +0 -1
- package/dist/mg-components/p-2ee92f38.entry.js +0 -1
- package/dist/mg-components/p-3b653226.entry.js +0 -1
- package/dist/mg-components/p-5745fbea.entry.js +0 -1
- package/dist/mg-components/p-C9rmNQIL.js +0 -1
- package/dist/mg-components/p-DFwaH2hS.js +0 -2
- package/dist/mg-components/p-cc793586.entry.js +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
|
@@ -5,254 +5,22 @@ const globalScripts = () => {};
|
|
|
5
5
|
const globalStyles = ":root{--mg-b-size-4:0.4rem;--mg-b-size-8:0.8rem;--mg-b-size-12:1.2rem;--mg-b-size-16:1.6rem;--mg-b-size-20:2rem;--mg-b-size-24:2.4rem;--mg-b-size-32:3.2rem;--mg-b-size-40:4rem;--mg-b-size-48:4.8rem;--mg-b-size-56:5.6rem;--mg-b-size-64:6.4rem;--mg-b-size-72:7.2rem;--mg-b-size-120:12rem;--mg-b-size-border:0.1rem;--mg-b-size-radius:var(--mg-b-size-4);--mg-b-size-floating-element-max-width:40rem;--mg-b-size-min-height:3.5rem;--mg-b-spacing-actions:var(--mg-b-size-8);--mg-b-color-blue-10:rgb(227, 244, 255);--mg-b-color-blue-20:rgb(209, 237, 255);--mg-b-color-blue-30:rgb(166, 219, 255);--mg-b-color-blue-40:rgb(106, 195, 255);--mg-b-color-blue-50:rgb(64, 179, 255);--mg-b-color-blue-60:rgb(22, 162, 255);--mg-b-color-blue-70:rgb(0, 132, 220);--mg-b-color-blue-80:rgb(0, 94, 156);--mg-b-color-blue-90:rgb(0, 67, 111);--mg-b-color-blue-100:rgb(0, 39, 66);--mg-b-color-green-10:rgb(234, 251, 244);--mg-b-color-green-20:rgb(212, 247, 234);--mg-b-color-green-30:rgb(181, 240, 219);--mg-b-color-green-40:rgb(144, 232, 202);--mg-b-color-green-50:rgb(97, 223, 179);--mg-b-color-green-60:rgb(50, 213, 156);--mg-b-color-green-70:rgb(46, 194, 142);--mg-b-color-green-80:rgb(36, 151, 111);--mg-b-color-green-90:rgb(21, 89, 66);--mg-b-color-green-100:rgb(13, 54, 40);--mg-b-color-red-10:rgb(251, 233, 234);--mg-b-color-red-20:rgb(248, 216, 217);--mg-b-color-red-30:rgb(242, 174, 178);--mg-b-color-red-40:rgb(236, 134, 139);--mg-b-color-red-50:rgb(229, 96, 103);--mg-b-color-red-60:rgb(221, 42, 52);--mg-b-color-red-70:rgb(219, 31, 41);--mg-b-color-red-80:rgb(152, 21, 28);--mg-b-color-red-90:rgb(120, 17, 23);--mg-b-color-red-100:rgb(92, 13, 13);--mg-b-color-yellow-10:rgb(255, 247, 230);--mg-b-color-yellow-20:rgb(255, 240, 207);--mg-b-color-yellow-30:rgb(255, 226, 162);--mg-b-color-yellow-40:rgb(255, 212, 118);--mg-b-color-yellow-50:rgb(255, 195, 62);--mg-b-color-yellow-60:rgb(232, 177, 56);--mg-b-color-yellow-70:rgb(181, 138, 44);--mg-b-color-yellow-80:rgb(140, 107, 34);--mg-b-color-yellow-90:rgb(86, 66, 21);--mg-b-color-yellow-100:rgb(53, 41, 13);--mg-b-color-neutral-0:rgb(255, 255, 255);--mg-b-color-neutral-10:rgb(250, 251, 251);--mg-b-color-neutral-20:rgb(236, 238, 238);--mg-b-color-neutral-30:rgb(225, 227, 228);--mg-b-color-neutral-40:rgb(197, 201, 203);--mg-b-color-neutral-50:rgb(182, 188, 190);--mg-b-color-neutral-60:rgb(157, 165, 167);--mg-b-color-neutral-70:rgb(129, 139, 142);--mg-b-color-neutral-80:rgb(101, 113, 117);--mg-b-color-neutral-90:rgb(75, 89, 94);--mg-b-color-neutral-100:rgb(47, 64, 69);--mg-b-color-neutral-110:rgb(21, 40, 46);--mg-b-color-neutral-120:rgb(5, 9, 11);--mg-b-color-dark:var(--mg-b-color-neutral-110);--mg-b-color-light:var(--mg-b-color-neutral-0);--mg-b-color-danger:var(--mg-b-color-red-70);--mg-b-color-text-on-danger:var(--mg-b-color-light);--mg-b-color-info:var(--mg-b-color-blue-80);--mg-b-color-text-on-info:var(--mg-b-color-light);--mg-b-color-success:var(--mg-b-color-green-60);--mg-b-color-text-on-success:var(--mg-b-color-dark);--mg-b-color-warning:var(--mg-b-color-yellow-50);--mg-b-color-text-on-warning:var(--mg-b-color-dark);--mg-b-color-app:var(--mg-b-color-blue-80);--mg-b-color-primary:var(--mg-b-color-neutral-110);--mg-b-color-text-on-primary:var(--mg-b-color-light);--mg-b-color-secondary:var(--mg-b-color-neutral-10);--mg-b-color-text-on-secondary:var(--mg-b-color-dark);--mg-b-font-size:1.3rem;--mg-b-font-size-small:1.17rem;--mg-b-font-size-h1:calc(var(--mg-b-font-size) * 1.85);--mg-b-font-size-h2:calc(var(--mg-b-font-size) * 1.65);--mg-b-font-size-h3:calc(var(--mg-b-font-size) * 1.35);--mg-b-font-size-h4:calc(var(--mg-b-font-size) * 1.2);--mg-b-font-size-h5:calc(var(--mg-b-font-size) * 1.1);--mg-b-font-size-h6:calc(var(--mg-b-font-size) * 0.8);--mg-b-small-font-size:0.9em;--mg-b-font-family:'Open Sans', sans-serif;--mg-b-font-family-heading:var(--mg-b-font-family);--mg-b-line-height:1.4;--mg-b-box-shadow:0 0.3rem 0.8rem 0 color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-b-opacity-element-disabled:0.4}:root{--mg-c-badge-size:var(--mg-b-size-16);--mg-c-badge-font-size:var(--mg-b-font-size-small);--mg-c-button-border-radius:var(--mg-b-size-radius);--mg-c-button-icon-border-radius:var(--mg-b-size-min-height);--mg-c-button-color-background-danger:var(--mg-b-color-danger);--mg-c-button-color-border-danger:var(--mg-b-color-red-80);--mg-c-button-color-gradient-danger:var(--mg-b-color-red-80);--mg-c-button-color-text-danger:var(--mg-b-color-text-on-danger);--mg-c-button-color-background-info:var(--mg-b-color-info);--mg-c-button-color-border-info:var(--mg-b-color-blue-90);--mg-c-button-color-gradient-info:var(--mg-b-color-blue-90);--mg-c-button-color-text-info:var(--mg-b-color-text-on-info);--mg-c-button-color-background-success:var(--mg-b-color-success);--mg-c-button-color-border-success:var(--mg-b-color-green-70);--mg-c-button-color-gradient-success:var(--mg-b-color-green-70);--mg-c-button-color-text-success:var(--mg-b-color-text-on-success);--mg-c-button-color-background-warning:var(--mg-b-color-warning);--mg-c-button-color-border-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-gradient-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-text-warning:var(--mg-b-color-text-on-warning);--mg-c-button-color-background-primary:var(--mg-b-color-primary);--mg-c-button-color-border-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-gradient-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-text-primary:var(--mg-b-color-text-on-primary);--mg-c-button-color-background-secondary:var(--mg-b-color-secondary);--mg-c-button-color-border-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-text-secondary:var(--mg-b-color-text-on-secondary);--mg-c-button-color-background-danger-alt:var(--mg-b-color-neutral-10);--mg-c-button-color-border-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-text-danger-alt:var(--mg-b-color-danger);--mg-c-card-spacing-default:var(--mg-b-size-16);--mg-c-card-border-radius-default:var(--mg-b-size-12);--mg-c-card-color-background-default:var(--mg-b-color-light);--mg-c-card-border-default:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);--mg-c-card-box-shadow-default:var(--mg-b-box-shadow);--mg-c-divider-color-background:color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-c-divider-thickness:var(--mg-b-size-border);--mg-c-divider-spacing-vertical:var(--mg-b-size-40);--mg-c-icon-border-radius:50%;--mg-c-tag-height:var(--mg-b-size-24);--mg-c-tag-border-radius:var(--mg-b-size-radius);--mg-c-tag-font-size:var(--mg-b-font-size-small);--mg-c-tooltip-border-radius:var(--mg-b-size-radius);--mg-c-tooltip-color-background:var(--mg-b-color-dark);--mg-c-tooltip-color-text:var(--mg-b-color-light);--mg-c-details-spacing:var(--mg-b-size-8);--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-40);--mg-c-input-border-width:var(--mg-b-size-border);--mg-c-input-border-radius:var(--mg-b-size-radius);--mg-c-input-color-border:rgb(181 194 201);--mg-c-input-placeholder-color-text:rgb(181 194 201);--mg-c-input-color-icon:rgb(181 194 201);--mg-c-input-color-box-shadow-focus:rgb(0 221 255 / 50%);--mg-c-input-error-color-background:color-mix(in srgb, var(--mg-b-color-danger), white 95%);--mg-c-input-toggle-border-radius-ratio:2;--mg-c-input-check-size:var(--mg-b-size-16);--mg-c-menu-item-color:var(--mg-b-color-app);--mg-c-message-border-radius:var(--mg-b-size-radius);--mg-c-modal-border-radius:var(--mg-c-card-border-radius-default);--mg-c-modal-title-font-size:var(--mg-b-font-size-h3);--mg-c-panel-border-radius:var(--mg-c-card-border-radius-default);--mg-c-panel-box-shadow:var(--mg-b-box-shadow);--mg-c-panel-content-spacing:var(--mg-b-size-16);--mg-c-popover-border-radius:var(--mg-c-card-border-radius-default);--mg-c-popover-color-background:var(--mg-b-color-light);--mg-c-popover-color-text:var(--mg-b-color-dark);--mg-c-popover-title-font-size:var(--mg-b-font-size-h5);--mg-c-popover-max-width:var(--mg-b-size-floating-element-max-width);--mg-c-progress-size:var(--mg-b-size-8);--mg-c-progress-border-color:var(--mg-b-color-neutral-80);--mg-c-progress-bar-color-background:var(--mg-b-color-neutral-30);--mg-c-progress-fill-color-background:var(--mg-b-color-app);--mg-c-tabs-color:var(--mg-b-color-app)}html{font-size:62.5%}body{font-family:var(--mg-b-font-family);font-size:var(--mg-b-font-size);-webkit-font-smoothing:antialiased;line-height:var(--mg-b-line-height)}:root{--mg-b-font-family:system-ui, sans-serif}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
|
-
var __create = Object.create;
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __typeError = (msg) => {
|
|
17
|
-
throw TypeError(msg);
|
|
18
|
-
};
|
|
19
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
21
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
22
|
-
};
|
|
23
|
-
var __export = (target, all) => {
|
|
24
|
-
for (var name in all)
|
|
25
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
-
};
|
|
27
|
-
var __copyProps = (to, from, except, desc) => {
|
|
28
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
-
for (let key of __getOwnPropNames(from))
|
|
30
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
-
}
|
|
33
|
-
return to;
|
|
34
|
-
};
|
|
35
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
36
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
37
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
38
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
39
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
40
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
41
|
-
mod
|
|
42
|
-
));
|
|
43
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
44
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
45
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
46
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
47
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
48
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
49
10
|
|
|
50
|
-
// node_modules/balanced-match/index.js
|
|
51
|
-
var require_balanced_match = __commonJS({
|
|
52
|
-
"node_modules/balanced-match/index.js"(exports, module) {
|
|
53
|
-
module.exports = balanced;
|
|
54
|
-
function balanced(a, b, str) {
|
|
55
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
56
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
57
|
-
var r = range(a, b, str);
|
|
58
|
-
return r && {
|
|
59
|
-
start: r[0],
|
|
60
|
-
end: r[1],
|
|
61
|
-
pre: str.slice(0, r[0]),
|
|
62
|
-
body: str.slice(r[0] + a.length, r[1]),
|
|
63
|
-
post: str.slice(r[1] + b.length)
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function maybeMatch(reg, str) {
|
|
67
|
-
var m = str.match(reg);
|
|
68
|
-
return m ? m[0] : null;
|
|
69
|
-
}
|
|
70
|
-
balanced.range = range;
|
|
71
|
-
function range(a, b, str) {
|
|
72
|
-
var begs, beg, left, right, result;
|
|
73
|
-
var ai = str.indexOf(a);
|
|
74
|
-
var bi = str.indexOf(b, ai + 1);
|
|
75
|
-
var i2 = ai;
|
|
76
|
-
if (ai >= 0 && bi > 0) {
|
|
77
|
-
if (a === b) {
|
|
78
|
-
return [ai, bi];
|
|
79
|
-
}
|
|
80
|
-
begs = [];
|
|
81
|
-
left = str.length;
|
|
82
|
-
while (i2 >= 0 && !result) {
|
|
83
|
-
if (i2 == ai) {
|
|
84
|
-
begs.push(i2);
|
|
85
|
-
ai = str.indexOf(a, i2 + 1);
|
|
86
|
-
} else if (begs.length == 1) {
|
|
87
|
-
result = [begs.pop(), bi];
|
|
88
|
-
} else {
|
|
89
|
-
beg = begs.pop();
|
|
90
|
-
if (beg < left) {
|
|
91
|
-
left = beg;
|
|
92
|
-
right = bi;
|
|
93
|
-
}
|
|
94
|
-
bi = str.indexOf(b, i2 + 1);
|
|
95
|
-
}
|
|
96
|
-
i2 = ai < bi && ai >= 0 ? ai : bi;
|
|
97
|
-
}
|
|
98
|
-
if (begs.length) {
|
|
99
|
-
result = [left, right];
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return result;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
11
|
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
115
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
116
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
117
|
-
function numeric(str) {
|
|
118
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
119
|
-
}
|
|
120
|
-
function escapeBraces(str) {
|
|
121
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
122
|
-
}
|
|
123
|
-
function unescapeBraces(str) {
|
|
124
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
125
|
-
}
|
|
126
|
-
function parseCommaParts(str) {
|
|
127
|
-
if (!str)
|
|
128
|
-
return [""];
|
|
129
|
-
var parts = [];
|
|
130
|
-
var m = balanced("{", "}", str);
|
|
131
|
-
if (!m)
|
|
132
|
-
return str.split(",");
|
|
133
|
-
var pre = m.pre;
|
|
134
|
-
var body = m.body;
|
|
135
|
-
var post = m.post;
|
|
136
|
-
var p = pre.split(",");
|
|
137
|
-
p[p.length - 1] += "{" + body + "}";
|
|
138
|
-
var postParts = parseCommaParts(post);
|
|
139
|
-
if (post.length) {
|
|
140
|
-
p[p.length - 1] += postParts.shift();
|
|
141
|
-
p.push.apply(p, postParts);
|
|
142
|
-
}
|
|
143
|
-
parts.push.apply(parts, p);
|
|
144
|
-
return parts;
|
|
145
|
-
}
|
|
146
|
-
function expandTop(str) {
|
|
147
|
-
if (!str)
|
|
148
|
-
return [];
|
|
149
|
-
if (str.substr(0, 2) === "{}") {
|
|
150
|
-
str = "\\{\\}" + str.substr(2);
|
|
151
|
-
}
|
|
152
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
153
|
-
}
|
|
154
|
-
function embrace(str) {
|
|
155
|
-
return "{" + str + "}";
|
|
156
|
-
}
|
|
157
|
-
function isPadded(el) {
|
|
158
|
-
return /^-?0\d/.test(el);
|
|
159
|
-
}
|
|
160
|
-
function lte(i2, y) {
|
|
161
|
-
return i2 <= y;
|
|
162
|
-
}
|
|
163
|
-
function gte(i2, y) {
|
|
164
|
-
return i2 >= y;
|
|
165
|
-
}
|
|
166
|
-
function expand2(str, isTop) {
|
|
167
|
-
var expansions = [];
|
|
168
|
-
var m = balanced("{", "}", str);
|
|
169
|
-
if (!m) return [str];
|
|
170
|
-
var pre = m.pre;
|
|
171
|
-
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
172
|
-
if (/\$$/.test(m.pre)) {
|
|
173
|
-
for (var k = 0; k < post.length; k++) {
|
|
174
|
-
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
175
|
-
expansions.push(expansion);
|
|
176
|
-
}
|
|
177
|
-
} else {
|
|
178
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
179
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
180
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
181
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
|
182
|
-
if (!isSequence && !isOptions) {
|
|
183
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
184
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
|
185
|
-
return expand2(str);
|
|
186
|
-
}
|
|
187
|
-
return [str];
|
|
188
|
-
}
|
|
189
|
-
var n;
|
|
190
|
-
if (isSequence) {
|
|
191
|
-
n = m.body.split(/\.\./);
|
|
192
|
-
} else {
|
|
193
|
-
n = parseCommaParts(m.body);
|
|
194
|
-
if (n.length === 1) {
|
|
195
|
-
n = expand2(n[0], false).map(embrace);
|
|
196
|
-
if (n.length === 1) {
|
|
197
|
-
return post.map(function(p) {
|
|
198
|
-
return m.pre + n[0] + p;
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
var N;
|
|
204
|
-
if (isSequence) {
|
|
205
|
-
var x = numeric(n[0]);
|
|
206
|
-
var y = numeric(n[1]);
|
|
207
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
208
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
209
|
-
var test = lte;
|
|
210
|
-
var reverse = y < x;
|
|
211
|
-
if (reverse) {
|
|
212
|
-
incr *= -1;
|
|
213
|
-
test = gte;
|
|
214
|
-
}
|
|
215
|
-
var pad = n.some(isPadded);
|
|
216
|
-
N = [];
|
|
217
|
-
for (var i2 = x; test(i2, y); i2 += incr) {
|
|
218
|
-
var c;
|
|
219
|
-
if (isAlphaSequence) {
|
|
220
|
-
c = String.fromCharCode(i2);
|
|
221
|
-
if (c === "\\")
|
|
222
|
-
c = "";
|
|
223
|
-
} else {
|
|
224
|
-
c = String(i2);
|
|
225
|
-
if (pad) {
|
|
226
|
-
var need = width - c.length;
|
|
227
|
-
if (need > 0) {
|
|
228
|
-
var z = new Array(need + 1).join("0");
|
|
229
|
-
if (i2 < 0)
|
|
230
|
-
c = "-" + z + c.slice(1);
|
|
231
|
-
else
|
|
232
|
-
c = z + c;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
N.push(c);
|
|
237
|
-
}
|
|
238
|
-
} else {
|
|
239
|
-
N = [];
|
|
240
|
-
for (var j = 0; j < n.length; j++) {
|
|
241
|
-
N.push.apply(N, expand2(n[j], false));
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
for (var j = 0; j < N.length; j++) {
|
|
245
|
-
for (var k = 0; k < post.length; k++) {
|
|
246
|
-
var expansion = pre + N[j] + post[k];
|
|
247
|
-
if (!isTop || isSequence || expansion)
|
|
248
|
-
expansions.push(expansion);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return expansions;
|
|
253
|
-
}
|
|
12
|
+
// src/utils/get-prop-descriptor.ts
|
|
13
|
+
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
14
|
+
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
15
|
+
while (obj && obj !== stopAt) {
|
|
16
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
17
|
+
if (desc && (!getOnly || desc.get)) return desc;
|
|
18
|
+
obj = Object.getPrototypeOf(obj);
|
|
254
19
|
}
|
|
255
|
-
|
|
20
|
+
return void 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/utils/es2022-rewire-class-members.ts
|
|
256
24
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
257
25
|
var _a;
|
|
258
26
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -260,7 +28,7 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
260
28
|
members.map(([memberName, [memberFlags]]) => {
|
|
261
29
|
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
262
30
|
const ogValue = instance[memberName];
|
|
263
|
-
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
31
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
264
32
|
if (ogDescriptor) {
|
|
265
33
|
Object.defineProperty(instance, memberName, {
|
|
266
34
|
get() {
|
|
@@ -273,18 +41,14 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
273
41
|
enumerable: true
|
|
274
42
|
});
|
|
275
43
|
}
|
|
276
|
-
|
|
44
|
+
if (hostRef.$instanceValues$.has(memberName)) {
|
|
45
|
+
instance[memberName] = hostRef.$instanceValues$.get(memberName);
|
|
46
|
+
} else if (ogValue !== void 0) {
|
|
47
|
+
instance[memberName] = ogValue;
|
|
48
|
+
}
|
|
277
49
|
}
|
|
278
50
|
});
|
|
279
51
|
};
|
|
280
|
-
function getPropertyDescriptor(obj, memberName) {
|
|
281
|
-
while (obj) {
|
|
282
|
-
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
283
|
-
if (desc == null ? void 0 : desc.get) return desc;
|
|
284
|
-
obj = Object.getPrototypeOf(obj);
|
|
285
|
-
}
|
|
286
|
-
return void 0;
|
|
287
|
-
}
|
|
288
52
|
|
|
289
53
|
// src/client/client-host-ref.ts
|
|
290
54
|
var getHostRef = (ref) => {
|
|
@@ -375,10 +139,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
375
139
|
return import(
|
|
376
140
|
/* webpackMode: "lazy" */
|
|
377
141
|
'./mg-progress.entry.js').then(processMod, consoleError);
|
|
378
|
-
case 'mg-action-
|
|
142
|
+
case 'mg-action-more_36':
|
|
379
143
|
return import(
|
|
380
144
|
/* webpackMode: "lazy" */
|
|
381
|
-
'./mg-action-
|
|
145
|
+
'./mg-action-more_36.entry.js').then(processMod, consoleError);
|
|
382
146
|
case 'mg-input-rich-text-editor':
|
|
383
147
|
return import(
|
|
384
148
|
/* webpackMode: "lazy" */
|
|
@@ -485,1426 +249,6 @@ var flush = () => {
|
|
|
485
249
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
486
250
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
487
251
|
|
|
488
|
-
// src/utils/helpers.ts
|
|
489
|
-
var isDef = (v) => v != null && v !== void 0;
|
|
490
|
-
var isComplexType = (o) => {
|
|
491
|
-
o = typeof o;
|
|
492
|
-
return o === "object" || o === "function";
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
496
|
-
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
497
|
-
|
|
498
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
499
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
500
|
-
var assertValidPattern = (pattern) => {
|
|
501
|
-
if (typeof pattern !== "string") {
|
|
502
|
-
throw new TypeError("invalid pattern");
|
|
503
|
-
}
|
|
504
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
505
|
-
throw new TypeError("pattern is too long");
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
|
|
509
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
510
|
-
var posixClasses = {
|
|
511
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
512
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
513
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
514
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
515
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
516
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
517
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
518
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
519
|
-
"[:print:]": ["\\p{C}", true],
|
|
520
|
-
"[:punct:]": ["\\p{P}", true],
|
|
521
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
522
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
523
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
524
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
525
|
-
};
|
|
526
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
527
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
528
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
529
|
-
var parseClass = (glob, position) => {
|
|
530
|
-
const pos = position;
|
|
531
|
-
if (glob.charAt(pos) !== "[") {
|
|
532
|
-
throw new Error("not in a brace expression");
|
|
533
|
-
}
|
|
534
|
-
const ranges = [];
|
|
535
|
-
const negs = [];
|
|
536
|
-
let i2 = pos + 1;
|
|
537
|
-
let sawStart = false;
|
|
538
|
-
let uflag = false;
|
|
539
|
-
let escaping = false;
|
|
540
|
-
let negate = false;
|
|
541
|
-
let endPos = pos;
|
|
542
|
-
let rangeStart = "";
|
|
543
|
-
WHILE: while (i2 < glob.length) {
|
|
544
|
-
const c = glob.charAt(i2);
|
|
545
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
546
|
-
negate = true;
|
|
547
|
-
i2++;
|
|
548
|
-
continue;
|
|
549
|
-
}
|
|
550
|
-
if (c === "]" && sawStart && !escaping) {
|
|
551
|
-
endPos = i2 + 1;
|
|
552
|
-
break;
|
|
553
|
-
}
|
|
554
|
-
sawStart = true;
|
|
555
|
-
if (c === "\\") {
|
|
556
|
-
if (!escaping) {
|
|
557
|
-
escaping = true;
|
|
558
|
-
i2++;
|
|
559
|
-
continue;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
if (c === "[" && !escaping) {
|
|
563
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
564
|
-
if (glob.startsWith(cls, i2)) {
|
|
565
|
-
if (rangeStart) {
|
|
566
|
-
return ["$.", false, glob.length - pos, true];
|
|
567
|
-
}
|
|
568
|
-
i2 += cls.length;
|
|
569
|
-
if (neg)
|
|
570
|
-
negs.push(unip);
|
|
571
|
-
else
|
|
572
|
-
ranges.push(unip);
|
|
573
|
-
uflag = uflag || u;
|
|
574
|
-
continue WHILE;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
escaping = false;
|
|
579
|
-
if (rangeStart) {
|
|
580
|
-
if (c > rangeStart) {
|
|
581
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
582
|
-
} else if (c === rangeStart) {
|
|
583
|
-
ranges.push(braceEscape(c));
|
|
584
|
-
}
|
|
585
|
-
rangeStart = "";
|
|
586
|
-
i2++;
|
|
587
|
-
continue;
|
|
588
|
-
}
|
|
589
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
590
|
-
ranges.push(braceEscape(c + "-"));
|
|
591
|
-
i2 += 2;
|
|
592
|
-
continue;
|
|
593
|
-
}
|
|
594
|
-
if (glob.startsWith("-", i2 + 1)) {
|
|
595
|
-
rangeStart = c;
|
|
596
|
-
i2 += 2;
|
|
597
|
-
continue;
|
|
598
|
-
}
|
|
599
|
-
ranges.push(braceEscape(c));
|
|
600
|
-
i2++;
|
|
601
|
-
}
|
|
602
|
-
if (endPos < i2) {
|
|
603
|
-
return ["", false, 0, false];
|
|
604
|
-
}
|
|
605
|
-
if (!ranges.length && !negs.length) {
|
|
606
|
-
return ["$.", false, glob.length - pos, true];
|
|
607
|
-
}
|
|
608
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
609
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
610
|
-
return [regexpEscape(r), false, endPos - pos, false];
|
|
611
|
-
}
|
|
612
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
613
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
614
|
-
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
615
|
-
return [comb, uflag, endPos - pos, true];
|
|
616
|
-
};
|
|
617
|
-
|
|
618
|
-
// node_modules/minimatch/dist/esm/unescape.js
|
|
619
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
620
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
// node_modules/minimatch/dist/esm/ast.js
|
|
624
|
-
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
625
|
-
var isExtglobType = (c) => types.has(c);
|
|
626
|
-
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
627
|
-
var startNoDot = "(?!\\.)";
|
|
628
|
-
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
629
|
-
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
630
|
-
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
631
|
-
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
632
|
-
var qmark = "[^/]";
|
|
633
|
-
var star = qmark + "*?";
|
|
634
|
-
var starNoEmpty = qmark + "+?";
|
|
635
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
636
|
-
var _AST = class _AST {
|
|
637
|
-
constructor(type, parent, options = {}) {
|
|
638
|
-
__privateAdd(this, _AST_instances);
|
|
639
|
-
__publicField(this, "type");
|
|
640
|
-
__privateAdd(this, _root);
|
|
641
|
-
__privateAdd(this, _hasMagic);
|
|
642
|
-
__privateAdd(this, _uflag, false);
|
|
643
|
-
__privateAdd(this, _parts, []);
|
|
644
|
-
__privateAdd(this, _parent);
|
|
645
|
-
__privateAdd(this, _parentIndex);
|
|
646
|
-
__privateAdd(this, _negs);
|
|
647
|
-
__privateAdd(this, _filledNegs, false);
|
|
648
|
-
__privateAdd(this, _options);
|
|
649
|
-
__privateAdd(this, _toString);
|
|
650
|
-
// set to true if it's an extglob with no children
|
|
651
|
-
// (which really means one child of '')
|
|
652
|
-
__privateAdd(this, _emptyExt, false);
|
|
653
|
-
this.type = type;
|
|
654
|
-
if (type)
|
|
655
|
-
__privateSet(this, _hasMagic, true);
|
|
656
|
-
__privateSet(this, _parent, parent);
|
|
657
|
-
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
658
|
-
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
659
|
-
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
660
|
-
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
661
|
-
__privateGet(this, _negs).push(this);
|
|
662
|
-
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
663
|
-
}
|
|
664
|
-
get hasMagic() {
|
|
665
|
-
if (__privateGet(this, _hasMagic) !== void 0)
|
|
666
|
-
return __privateGet(this, _hasMagic);
|
|
667
|
-
for (const p of __privateGet(this, _parts)) {
|
|
668
|
-
if (typeof p === "string")
|
|
669
|
-
continue;
|
|
670
|
-
if (p.type || p.hasMagic)
|
|
671
|
-
return __privateSet(this, _hasMagic, true);
|
|
672
|
-
}
|
|
673
|
-
return __privateGet(this, _hasMagic);
|
|
674
|
-
}
|
|
675
|
-
// reconstructs the pattern
|
|
676
|
-
toString() {
|
|
677
|
-
if (__privateGet(this, _toString) !== void 0)
|
|
678
|
-
return __privateGet(this, _toString);
|
|
679
|
-
if (!this.type) {
|
|
680
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
681
|
-
} else {
|
|
682
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
push(...parts) {
|
|
686
|
-
for (const p of parts) {
|
|
687
|
-
if (p === "")
|
|
688
|
-
continue;
|
|
689
|
-
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
690
|
-
throw new Error("invalid part: " + p);
|
|
691
|
-
}
|
|
692
|
-
__privateGet(this, _parts).push(p);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
toJSON() {
|
|
696
|
-
var _a;
|
|
697
|
-
const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
|
|
698
|
-
if (this.isStart() && !this.type)
|
|
699
|
-
ret.unshift([]);
|
|
700
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
701
|
-
ret.push({});
|
|
702
|
-
}
|
|
703
|
-
return ret;
|
|
704
|
-
}
|
|
705
|
-
isStart() {
|
|
706
|
-
var _a;
|
|
707
|
-
if (__privateGet(this, _root) === this)
|
|
708
|
-
return true;
|
|
709
|
-
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
710
|
-
return false;
|
|
711
|
-
if (__privateGet(this, _parentIndex) === 0)
|
|
712
|
-
return true;
|
|
713
|
-
const p = __privateGet(this, _parent);
|
|
714
|
-
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
715
|
-
const pp = __privateGet(p, _parts)[i2];
|
|
716
|
-
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
717
|
-
return false;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
return true;
|
|
721
|
-
}
|
|
722
|
-
isEnd() {
|
|
723
|
-
var _a, _b, _c;
|
|
724
|
-
if (__privateGet(this, _root) === this)
|
|
725
|
-
return true;
|
|
726
|
-
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
727
|
-
return true;
|
|
728
|
-
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
729
|
-
return false;
|
|
730
|
-
if (!this.type)
|
|
731
|
-
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
732
|
-
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
733
|
-
return __privateGet(this, _parentIndex) === pl - 1;
|
|
734
|
-
}
|
|
735
|
-
copyIn(part) {
|
|
736
|
-
if (typeof part === "string")
|
|
737
|
-
this.push(part);
|
|
738
|
-
else
|
|
739
|
-
this.push(part.clone(this));
|
|
740
|
-
}
|
|
741
|
-
clone(parent) {
|
|
742
|
-
const c = new _AST(this.type, parent);
|
|
743
|
-
for (const p of __privateGet(this, _parts)) {
|
|
744
|
-
c.copyIn(p);
|
|
745
|
-
}
|
|
746
|
-
return c;
|
|
747
|
-
}
|
|
748
|
-
static fromGlob(pattern, options = {}) {
|
|
749
|
-
var _a;
|
|
750
|
-
const ast = new _AST(null, void 0, options);
|
|
751
|
-
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
752
|
-
return ast;
|
|
753
|
-
}
|
|
754
|
-
// returns the regular expression if there's magic, or the unescaped
|
|
755
|
-
// string if not.
|
|
756
|
-
toMMPattern() {
|
|
757
|
-
if (this !== __privateGet(this, _root))
|
|
758
|
-
return __privateGet(this, _root).toMMPattern();
|
|
759
|
-
const glob = this.toString();
|
|
760
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
761
|
-
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
762
|
-
if (!anyMagic) {
|
|
763
|
-
return body;
|
|
764
|
-
}
|
|
765
|
-
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
766
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
767
|
-
_src: re,
|
|
768
|
-
_glob: glob
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
get options() {
|
|
772
|
-
return __privateGet(this, _options);
|
|
773
|
-
}
|
|
774
|
-
// returns the string match, the regexp source, whether there's magic
|
|
775
|
-
// in the regexp (so a regular expression is required) and whether or
|
|
776
|
-
// not the uflag is needed for the regular expression (for posix classes)
|
|
777
|
-
// TODO: instead of injecting the start/end at this point, just return
|
|
778
|
-
// the BODY of the regexp, along with the start/end portions suitable
|
|
779
|
-
// for binding the start/end in either a joined full-path makeRe context
|
|
780
|
-
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
781
|
-
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
782
|
-
//
|
|
783
|
-
// In part-matching mode, the start is:
|
|
784
|
-
// - if not isStart: nothing
|
|
785
|
-
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
786
|
-
// - if dots allowed or not possible: ^
|
|
787
|
-
// - if dots possible and not allowed: ^(?!\.)
|
|
788
|
-
// end is:
|
|
789
|
-
// - if not isEnd(): nothing
|
|
790
|
-
// - else: $
|
|
791
|
-
//
|
|
792
|
-
// In full-path matching mode, we put the slash at the START of the
|
|
793
|
-
// pattern, so start is:
|
|
794
|
-
// - if first pattern: same as part-matching mode
|
|
795
|
-
// - if not isStart(): nothing
|
|
796
|
-
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
797
|
-
// - if dots allowed or not possible: /
|
|
798
|
-
// - if dots possible and not allowed: /(?!\.)
|
|
799
|
-
// end is:
|
|
800
|
-
// - if last pattern, same as part-matching mode
|
|
801
|
-
// - else nothing
|
|
802
|
-
//
|
|
803
|
-
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
804
|
-
// there to bind the end of the negated pattern portion, and it's easier to
|
|
805
|
-
// just stick it in now rather than try to inject it later in the middle of
|
|
806
|
-
// the pattern.
|
|
807
|
-
//
|
|
808
|
-
// We can just always return the same end, and leave it up to the caller
|
|
809
|
-
// to know whether it's going to be used joined or in parts.
|
|
810
|
-
// And, if the start is adjusted slightly, can do the same there:
|
|
811
|
-
// - if not isStart: nothing
|
|
812
|
-
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
813
|
-
// - if dots allowed or not possible: (?:/|^)
|
|
814
|
-
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
815
|
-
//
|
|
816
|
-
// But it's better to have a simpler binding without a conditional, for
|
|
817
|
-
// performance, so probably better to return both start options.
|
|
818
|
-
//
|
|
819
|
-
// Then the caller just ignores the end if it's not the first pattern,
|
|
820
|
-
// and the start always gets applied.
|
|
821
|
-
//
|
|
822
|
-
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
823
|
-
// so the caller can just attach $ at the end of the pattern when building.
|
|
824
|
-
//
|
|
825
|
-
// So the todo is:
|
|
826
|
-
// - better detect what kind of start is needed
|
|
827
|
-
// - return both flavors of starting pattern
|
|
828
|
-
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
829
|
-
//
|
|
830
|
-
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
831
|
-
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
832
|
-
// that dot prevention biz to live in the extglob portions, because eg
|
|
833
|
-
// +(*|.x*) can match .xy but not .yx.
|
|
834
|
-
//
|
|
835
|
-
// So, return the two flavors if it's #root and the first child is not an
|
|
836
|
-
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
837
|
-
// use the (?:^|/) style of start binding.
|
|
838
|
-
//
|
|
839
|
-
// Even simplified further:
|
|
840
|
-
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
841
|
-
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
842
|
-
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
843
|
-
toRegExpSource(allowDot) {
|
|
844
|
-
var _a;
|
|
845
|
-
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
846
|
-
if (__privateGet(this, _root) === this)
|
|
847
|
-
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
848
|
-
if (!this.type) {
|
|
849
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
850
|
-
const src = __privateGet(this, _parts).map((p) => {
|
|
851
|
-
var _a2;
|
|
852
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
853
|
-
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
854
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
855
|
-
return re;
|
|
856
|
-
}).join("");
|
|
857
|
-
let start2 = "";
|
|
858
|
-
if (this.isStart()) {
|
|
859
|
-
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
860
|
-
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
861
|
-
if (!dotTravAllowed) {
|
|
862
|
-
const aps = addPatternStart;
|
|
863
|
-
const needNoTrav = (
|
|
864
|
-
// dots are allowed, and the pattern starts with [ or .
|
|
865
|
-
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
866
|
-
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
867
|
-
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
868
|
-
);
|
|
869
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
870
|
-
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
let end = "";
|
|
875
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
876
|
-
end = "(?:$|\\/)";
|
|
877
|
-
}
|
|
878
|
-
const final2 = start2 + src + end;
|
|
879
|
-
return [
|
|
880
|
-
final2,
|
|
881
|
-
unescape(src),
|
|
882
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
883
|
-
__privateGet(this, _uflag)
|
|
884
|
-
];
|
|
885
|
-
}
|
|
886
|
-
const repeated = this.type === "*" || this.type === "+";
|
|
887
|
-
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
888
|
-
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
889
|
-
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
890
|
-
const s = this.toString();
|
|
891
|
-
__privateSet(this, _parts, [s]);
|
|
892
|
-
this.type = null;
|
|
893
|
-
__privateSet(this, _hasMagic, void 0);
|
|
894
|
-
return [s, unescape(this.toString()), false, false];
|
|
895
|
-
}
|
|
896
|
-
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
897
|
-
if (bodyDotAllowed === body) {
|
|
898
|
-
bodyDotAllowed = "";
|
|
899
|
-
}
|
|
900
|
-
if (bodyDotAllowed) {
|
|
901
|
-
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
902
|
-
}
|
|
903
|
-
let final = "";
|
|
904
|
-
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
905
|
-
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
906
|
-
} else {
|
|
907
|
-
const close = this.type === "!" ? (
|
|
908
|
-
// !() must match something,but !(x) can match ''
|
|
909
|
-
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
910
|
-
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
911
|
-
final = start + body + close;
|
|
912
|
-
}
|
|
913
|
-
return [
|
|
914
|
-
final,
|
|
915
|
-
unescape(body),
|
|
916
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
917
|
-
__privateGet(this, _uflag)
|
|
918
|
-
];
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
_root = new WeakMap();
|
|
922
|
-
_hasMagic = new WeakMap();
|
|
923
|
-
_uflag = new WeakMap();
|
|
924
|
-
_parts = new WeakMap();
|
|
925
|
-
_parent = new WeakMap();
|
|
926
|
-
_parentIndex = new WeakMap();
|
|
927
|
-
_negs = new WeakMap();
|
|
928
|
-
_filledNegs = new WeakMap();
|
|
929
|
-
_options = new WeakMap();
|
|
930
|
-
_toString = new WeakMap();
|
|
931
|
-
_emptyExt = new WeakMap();
|
|
932
|
-
_AST_instances = new WeakSet();
|
|
933
|
-
fillNegs_fn = function() {
|
|
934
|
-
if (this !== __privateGet(this, _root))
|
|
935
|
-
throw new Error("should only call on root");
|
|
936
|
-
if (__privateGet(this, _filledNegs))
|
|
937
|
-
return this;
|
|
938
|
-
this.toString();
|
|
939
|
-
__privateSet(this, _filledNegs, true);
|
|
940
|
-
let n;
|
|
941
|
-
while (n = __privateGet(this, _negs).pop()) {
|
|
942
|
-
if (n.type !== "!")
|
|
943
|
-
continue;
|
|
944
|
-
let p = n;
|
|
945
|
-
let pp = __privateGet(p, _parent);
|
|
946
|
-
while (pp) {
|
|
947
|
-
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
948
|
-
for (const part of __privateGet(n, _parts)) {
|
|
949
|
-
if (typeof part === "string") {
|
|
950
|
-
throw new Error("string part in extglob AST??");
|
|
951
|
-
}
|
|
952
|
-
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
p = pp;
|
|
956
|
-
pp = __privateGet(p, _parent);
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
return this;
|
|
960
|
-
};
|
|
961
|
-
_AST_static = new WeakSet();
|
|
962
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
963
|
-
var _a, _b;
|
|
964
|
-
let escaping = false;
|
|
965
|
-
let inBrace = false;
|
|
966
|
-
let braceStart = -1;
|
|
967
|
-
let braceNeg = false;
|
|
968
|
-
if (ast.type === null) {
|
|
969
|
-
let i3 = pos;
|
|
970
|
-
let acc2 = "";
|
|
971
|
-
while (i3 < str.length) {
|
|
972
|
-
const c = str.charAt(i3++);
|
|
973
|
-
if (escaping || c === "\\") {
|
|
974
|
-
escaping = !escaping;
|
|
975
|
-
acc2 += c;
|
|
976
|
-
continue;
|
|
977
|
-
}
|
|
978
|
-
if (inBrace) {
|
|
979
|
-
if (i3 === braceStart + 1) {
|
|
980
|
-
if (c === "^" || c === "!") {
|
|
981
|
-
braceNeg = true;
|
|
982
|
-
}
|
|
983
|
-
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
984
|
-
inBrace = false;
|
|
985
|
-
}
|
|
986
|
-
acc2 += c;
|
|
987
|
-
continue;
|
|
988
|
-
} else if (c === "[") {
|
|
989
|
-
inBrace = true;
|
|
990
|
-
braceStart = i3;
|
|
991
|
-
braceNeg = false;
|
|
992
|
-
acc2 += c;
|
|
993
|
-
continue;
|
|
994
|
-
}
|
|
995
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
996
|
-
ast.push(acc2);
|
|
997
|
-
acc2 = "";
|
|
998
|
-
const ext2 = new _AST(c, ast);
|
|
999
|
-
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
1000
|
-
ast.push(ext2);
|
|
1001
|
-
continue;
|
|
1002
|
-
}
|
|
1003
|
-
acc2 += c;
|
|
1004
|
-
}
|
|
1005
|
-
ast.push(acc2);
|
|
1006
|
-
return i3;
|
|
1007
|
-
}
|
|
1008
|
-
let i2 = pos + 1;
|
|
1009
|
-
let part = new _AST(null, ast);
|
|
1010
|
-
const parts = [];
|
|
1011
|
-
let acc = "";
|
|
1012
|
-
while (i2 < str.length) {
|
|
1013
|
-
const c = str.charAt(i2++);
|
|
1014
|
-
if (escaping || c === "\\") {
|
|
1015
|
-
escaping = !escaping;
|
|
1016
|
-
acc += c;
|
|
1017
|
-
continue;
|
|
1018
|
-
}
|
|
1019
|
-
if (inBrace) {
|
|
1020
|
-
if (i2 === braceStart + 1) {
|
|
1021
|
-
if (c === "^" || c === "!") {
|
|
1022
|
-
braceNeg = true;
|
|
1023
|
-
}
|
|
1024
|
-
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
1025
|
-
inBrace = false;
|
|
1026
|
-
}
|
|
1027
|
-
acc += c;
|
|
1028
|
-
continue;
|
|
1029
|
-
} else if (c === "[") {
|
|
1030
|
-
inBrace = true;
|
|
1031
|
-
braceStart = i2;
|
|
1032
|
-
braceNeg = false;
|
|
1033
|
-
acc += c;
|
|
1034
|
-
continue;
|
|
1035
|
-
}
|
|
1036
|
-
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
1037
|
-
part.push(acc);
|
|
1038
|
-
acc = "";
|
|
1039
|
-
const ext2 = new _AST(c, part);
|
|
1040
|
-
part.push(ext2);
|
|
1041
|
-
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
1042
|
-
continue;
|
|
1043
|
-
}
|
|
1044
|
-
if (c === "|") {
|
|
1045
|
-
part.push(acc);
|
|
1046
|
-
acc = "";
|
|
1047
|
-
parts.push(part);
|
|
1048
|
-
part = new _AST(null, ast);
|
|
1049
|
-
continue;
|
|
1050
|
-
}
|
|
1051
|
-
if (c === ")") {
|
|
1052
|
-
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
1053
|
-
__privateSet(ast, _emptyExt, true);
|
|
1054
|
-
}
|
|
1055
|
-
part.push(acc);
|
|
1056
|
-
acc = "";
|
|
1057
|
-
ast.push(...parts, part);
|
|
1058
|
-
return i2;
|
|
1059
|
-
}
|
|
1060
|
-
acc += c;
|
|
1061
|
-
}
|
|
1062
|
-
ast.type = null;
|
|
1063
|
-
__privateSet(ast, _hasMagic, void 0);
|
|
1064
|
-
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1065
|
-
return i2;
|
|
1066
|
-
};
|
|
1067
|
-
partsToRegExp_fn = function(dot) {
|
|
1068
|
-
return __privateGet(this, _parts).map((p) => {
|
|
1069
|
-
if (typeof p === "string") {
|
|
1070
|
-
throw new Error("string type in extglob ast??");
|
|
1071
|
-
}
|
|
1072
|
-
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1073
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1074
|
-
return re;
|
|
1075
|
-
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1076
|
-
};
|
|
1077
|
-
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1078
|
-
let escaping = false;
|
|
1079
|
-
let re = "";
|
|
1080
|
-
let uflag = false;
|
|
1081
|
-
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1082
|
-
const c = glob.charAt(i2);
|
|
1083
|
-
if (escaping) {
|
|
1084
|
-
escaping = false;
|
|
1085
|
-
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1086
|
-
continue;
|
|
1087
|
-
}
|
|
1088
|
-
if (c === "\\") {
|
|
1089
|
-
if (i2 === glob.length - 1) {
|
|
1090
|
-
re += "\\\\";
|
|
1091
|
-
} else {
|
|
1092
|
-
escaping = true;
|
|
1093
|
-
}
|
|
1094
|
-
continue;
|
|
1095
|
-
}
|
|
1096
|
-
if (c === "[") {
|
|
1097
|
-
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1098
|
-
if (consumed) {
|
|
1099
|
-
re += src;
|
|
1100
|
-
uflag = uflag || needUflag;
|
|
1101
|
-
i2 += consumed - 1;
|
|
1102
|
-
hasMagic = hasMagic || magic;
|
|
1103
|
-
continue;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
if (c === "*") {
|
|
1107
|
-
if (noEmpty && glob === "*")
|
|
1108
|
-
re += starNoEmpty;
|
|
1109
|
-
else
|
|
1110
|
-
re += star;
|
|
1111
|
-
hasMagic = true;
|
|
1112
|
-
continue;
|
|
1113
|
-
}
|
|
1114
|
-
if (c === "?") {
|
|
1115
|
-
re += qmark;
|
|
1116
|
-
hasMagic = true;
|
|
1117
|
-
continue;
|
|
1118
|
-
}
|
|
1119
|
-
re += regExpEscape(c);
|
|
1120
|
-
}
|
|
1121
|
-
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1122
|
-
};
|
|
1123
|
-
__privateAdd(_AST, _AST_static);
|
|
1124
|
-
var AST = _AST;
|
|
1125
|
-
|
|
1126
|
-
// node_modules/minimatch/dist/esm/escape.js
|
|
1127
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1128
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1129
|
-
};
|
|
1130
|
-
|
|
1131
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
1132
|
-
var minimatch = (p, pattern, options = {}) => {
|
|
1133
|
-
assertValidPattern(pattern);
|
|
1134
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1135
|
-
return false;
|
|
1136
|
-
}
|
|
1137
|
-
return new Minimatch(pattern, options).match(p);
|
|
1138
|
-
};
|
|
1139
|
-
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1140
|
-
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1141
|
-
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1142
|
-
var starDotExtTestNocase = (ext2) => {
|
|
1143
|
-
ext2 = ext2.toLowerCase();
|
|
1144
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1145
|
-
};
|
|
1146
|
-
var starDotExtTestNocaseDot = (ext2) => {
|
|
1147
|
-
ext2 = ext2.toLowerCase();
|
|
1148
|
-
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1149
|
-
};
|
|
1150
|
-
var starDotStarRE = /^\*+\.\*+$/;
|
|
1151
|
-
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1152
|
-
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1153
|
-
var dotStarRE = /^\.\*+$/;
|
|
1154
|
-
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1155
|
-
var starRE = /^\*+$/;
|
|
1156
|
-
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1157
|
-
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1158
|
-
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1159
|
-
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1160
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1161
|
-
if (!ext2)
|
|
1162
|
-
return noext;
|
|
1163
|
-
ext2 = ext2.toLowerCase();
|
|
1164
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1165
|
-
};
|
|
1166
|
-
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1167
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1168
|
-
if (!ext2)
|
|
1169
|
-
return noext;
|
|
1170
|
-
ext2 = ext2.toLowerCase();
|
|
1171
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1172
|
-
};
|
|
1173
|
-
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1174
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1175
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1176
|
-
};
|
|
1177
|
-
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1178
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1179
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1180
|
-
};
|
|
1181
|
-
var qmarksTestNoExt = ([$0]) => {
|
|
1182
|
-
const len = $0.length;
|
|
1183
|
-
return (f) => f.length === len && !f.startsWith(".");
|
|
1184
|
-
};
|
|
1185
|
-
var qmarksTestNoExtDot = ([$0]) => {
|
|
1186
|
-
const len = $0.length;
|
|
1187
|
-
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1188
|
-
};
|
|
1189
|
-
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1190
|
-
var path = {
|
|
1191
|
-
win32: { sep: "\\" },
|
|
1192
|
-
posix: { sep: "/" }
|
|
1193
|
-
};
|
|
1194
|
-
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1195
|
-
minimatch.sep = sep;
|
|
1196
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1197
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1198
|
-
var qmark2 = "[^/]";
|
|
1199
|
-
var star2 = qmark2 + "*?";
|
|
1200
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1201
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1202
|
-
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1203
|
-
minimatch.filter = filter;
|
|
1204
|
-
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1205
|
-
var defaults = (def) => {
|
|
1206
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1207
|
-
return minimatch;
|
|
1208
|
-
}
|
|
1209
|
-
const orig = minimatch;
|
|
1210
|
-
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1211
|
-
return Object.assign(m, {
|
|
1212
|
-
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1213
|
-
constructor(pattern, options = {}) {
|
|
1214
|
-
super(pattern, ext(def, options));
|
|
1215
|
-
}
|
|
1216
|
-
static defaults(options) {
|
|
1217
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
|
1218
|
-
}
|
|
1219
|
-
},
|
|
1220
|
-
AST: class AST extends orig.AST {
|
|
1221
|
-
/* c8 ignore start */
|
|
1222
|
-
constructor(type, parent, options = {}) {
|
|
1223
|
-
super(type, parent, ext(def, options));
|
|
1224
|
-
}
|
|
1225
|
-
/* c8 ignore stop */
|
|
1226
|
-
static fromGlob(pattern, options = {}) {
|
|
1227
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1228
|
-
}
|
|
1229
|
-
},
|
|
1230
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1231
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1232
|
-
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1233
|
-
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1234
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1235
|
-
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1236
|
-
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1237
|
-
sep: orig.sep,
|
|
1238
|
-
GLOBSTAR
|
|
1239
|
-
});
|
|
1240
|
-
};
|
|
1241
|
-
minimatch.defaults = defaults;
|
|
1242
|
-
var braceExpand = (pattern, options = {}) => {
|
|
1243
|
-
assertValidPattern(pattern);
|
|
1244
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1245
|
-
return [pattern];
|
|
1246
|
-
}
|
|
1247
|
-
return (0, import_brace_expansion.default)(pattern);
|
|
1248
|
-
};
|
|
1249
|
-
minimatch.braceExpand = braceExpand;
|
|
1250
|
-
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1251
|
-
minimatch.makeRe = makeRe;
|
|
1252
|
-
var match = (list, pattern, options = {}) => {
|
|
1253
|
-
const mm = new Minimatch(pattern, options);
|
|
1254
|
-
list = list.filter((f) => mm.match(f));
|
|
1255
|
-
if (mm.options.nonull && !list.length) {
|
|
1256
|
-
list.push(pattern);
|
|
1257
|
-
}
|
|
1258
|
-
return list;
|
|
1259
|
-
};
|
|
1260
|
-
minimatch.match = match;
|
|
1261
|
-
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1262
|
-
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1263
|
-
var Minimatch = class {
|
|
1264
|
-
options;
|
|
1265
|
-
set;
|
|
1266
|
-
pattern;
|
|
1267
|
-
windowsPathsNoEscape;
|
|
1268
|
-
nonegate;
|
|
1269
|
-
negate;
|
|
1270
|
-
comment;
|
|
1271
|
-
empty;
|
|
1272
|
-
preserveMultipleSlashes;
|
|
1273
|
-
partial;
|
|
1274
|
-
globSet;
|
|
1275
|
-
globParts;
|
|
1276
|
-
nocase;
|
|
1277
|
-
isWindows;
|
|
1278
|
-
platform;
|
|
1279
|
-
windowsNoMagicRoot;
|
|
1280
|
-
regexp;
|
|
1281
|
-
constructor(pattern, options = {}) {
|
|
1282
|
-
assertValidPattern(pattern);
|
|
1283
|
-
options = options || {};
|
|
1284
|
-
this.options = options;
|
|
1285
|
-
this.pattern = pattern;
|
|
1286
|
-
this.platform = options.platform || defaultPlatform;
|
|
1287
|
-
this.isWindows = this.platform === "win32";
|
|
1288
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1289
|
-
if (this.windowsPathsNoEscape) {
|
|
1290
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1291
|
-
}
|
|
1292
|
-
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1293
|
-
this.regexp = null;
|
|
1294
|
-
this.negate = false;
|
|
1295
|
-
this.nonegate = !!options.nonegate;
|
|
1296
|
-
this.comment = false;
|
|
1297
|
-
this.empty = false;
|
|
1298
|
-
this.partial = !!options.partial;
|
|
1299
|
-
this.nocase = !!this.options.nocase;
|
|
1300
|
-
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1301
|
-
this.globSet = [];
|
|
1302
|
-
this.globParts = [];
|
|
1303
|
-
this.set = [];
|
|
1304
|
-
this.make();
|
|
1305
|
-
}
|
|
1306
|
-
hasMagic() {
|
|
1307
|
-
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1308
|
-
return true;
|
|
1309
|
-
}
|
|
1310
|
-
for (const pattern of this.set) {
|
|
1311
|
-
for (const part of pattern) {
|
|
1312
|
-
if (typeof part !== "string")
|
|
1313
|
-
return true;
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
return false;
|
|
1317
|
-
}
|
|
1318
|
-
debug(..._) {
|
|
1319
|
-
}
|
|
1320
|
-
make() {
|
|
1321
|
-
const pattern = this.pattern;
|
|
1322
|
-
const options = this.options;
|
|
1323
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1324
|
-
this.comment = true;
|
|
1325
|
-
return;
|
|
1326
|
-
}
|
|
1327
|
-
if (!pattern) {
|
|
1328
|
-
this.empty = true;
|
|
1329
|
-
return;
|
|
1330
|
-
}
|
|
1331
|
-
this.parseNegate();
|
|
1332
|
-
this.globSet = [...new Set(this.braceExpand())];
|
|
1333
|
-
if (options.debug) {
|
|
1334
|
-
this.debug = (...args) => console.error(...args);
|
|
1335
|
-
}
|
|
1336
|
-
this.debug(this.pattern, this.globSet);
|
|
1337
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1338
|
-
this.globParts = this.preprocess(rawGlobParts);
|
|
1339
|
-
this.debug(this.pattern, this.globParts);
|
|
1340
|
-
let set = this.globParts.map((s, _, __) => {
|
|
1341
|
-
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1342
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1343
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1344
|
-
if (isUNC) {
|
|
1345
|
-
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1346
|
-
} else if (isDrive) {
|
|
1347
|
-
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
return s.map((ss) => this.parse(ss));
|
|
1351
|
-
});
|
|
1352
|
-
this.debug(this.pattern, set);
|
|
1353
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1354
|
-
if (this.isWindows) {
|
|
1355
|
-
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1356
|
-
const p = this.set[i2];
|
|
1357
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1358
|
-
p[2] = "?";
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
this.debug(this.pattern, this.set);
|
|
1363
|
-
}
|
|
1364
|
-
// various transforms to equivalent pattern sets that are
|
|
1365
|
-
// faster to process in a filesystem walk. The goal is to
|
|
1366
|
-
// eliminate what we can, and push all ** patterns as far
|
|
1367
|
-
// to the right as possible, even if it increases the number
|
|
1368
|
-
// of patterns that we have to process.
|
|
1369
|
-
preprocess(globParts) {
|
|
1370
|
-
if (this.options.noglobstar) {
|
|
1371
|
-
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1372
|
-
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1373
|
-
if (globParts[i2][j] === "**") {
|
|
1374
|
-
globParts[i2][j] = "*";
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1380
|
-
if (optimizationLevel >= 2) {
|
|
1381
|
-
globParts = this.firstPhasePreProcess(globParts);
|
|
1382
|
-
globParts = this.secondPhasePreProcess(globParts);
|
|
1383
|
-
} else if (optimizationLevel >= 1) {
|
|
1384
|
-
globParts = this.levelOneOptimize(globParts);
|
|
1385
|
-
} else {
|
|
1386
|
-
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1387
|
-
}
|
|
1388
|
-
return globParts;
|
|
1389
|
-
}
|
|
1390
|
-
// just get rid of adjascent ** portions
|
|
1391
|
-
adjascentGlobstarOptimize(globParts) {
|
|
1392
|
-
return globParts.map((parts) => {
|
|
1393
|
-
let gs = -1;
|
|
1394
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1395
|
-
let i2 = gs;
|
|
1396
|
-
while (parts[i2 + 1] === "**") {
|
|
1397
|
-
i2++;
|
|
1398
|
-
}
|
|
1399
|
-
if (i2 !== gs) {
|
|
1400
|
-
parts.splice(gs, i2 - gs);
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
return parts;
|
|
1404
|
-
});
|
|
1405
|
-
}
|
|
1406
|
-
// get rid of adjascent ** and resolve .. portions
|
|
1407
|
-
levelOneOptimize(globParts) {
|
|
1408
|
-
return globParts.map((parts) => {
|
|
1409
|
-
parts = parts.reduce((set, part) => {
|
|
1410
|
-
const prev = set[set.length - 1];
|
|
1411
|
-
if (part === "**" && prev === "**") {
|
|
1412
|
-
return set;
|
|
1413
|
-
}
|
|
1414
|
-
if (part === "..") {
|
|
1415
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1416
|
-
set.pop();
|
|
1417
|
-
return set;
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
set.push(part);
|
|
1421
|
-
return set;
|
|
1422
|
-
}, []);
|
|
1423
|
-
return parts.length === 0 ? [""] : parts;
|
|
1424
|
-
});
|
|
1425
|
-
}
|
|
1426
|
-
levelTwoFileOptimize(parts) {
|
|
1427
|
-
if (!Array.isArray(parts)) {
|
|
1428
|
-
parts = this.slashSplit(parts);
|
|
1429
|
-
}
|
|
1430
|
-
let didSomething = false;
|
|
1431
|
-
do {
|
|
1432
|
-
didSomething = false;
|
|
1433
|
-
if (!this.preserveMultipleSlashes) {
|
|
1434
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1435
|
-
const p = parts[i2];
|
|
1436
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1437
|
-
continue;
|
|
1438
|
-
if (p === "." || p === "") {
|
|
1439
|
-
didSomething = true;
|
|
1440
|
-
parts.splice(i2, 1);
|
|
1441
|
-
i2--;
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1445
|
-
didSomething = true;
|
|
1446
|
-
parts.pop();
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
let dd = 0;
|
|
1450
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1451
|
-
const p = parts[dd - 1];
|
|
1452
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1453
|
-
didSomething = true;
|
|
1454
|
-
parts.splice(dd - 1, 2);
|
|
1455
|
-
dd -= 2;
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
} while (didSomething);
|
|
1459
|
-
return parts.length === 0 ? [""] : parts;
|
|
1460
|
-
}
|
|
1461
|
-
// First phase: single-pattern processing
|
|
1462
|
-
// <pre> is 1 or more portions
|
|
1463
|
-
// <rest> is 1 or more portions
|
|
1464
|
-
// <p> is any portion other than ., .., '', or **
|
|
1465
|
-
// <e> is . or ''
|
|
1466
|
-
//
|
|
1467
|
-
// **/.. is *brutal* for filesystem walking performance, because
|
|
1468
|
-
// it effectively resets the recursive walk each time it occurs,
|
|
1469
|
-
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1470
|
-
// or most strings (other than .., ., and '') can be.
|
|
1471
|
-
//
|
|
1472
|
-
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1473
|
-
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1474
|
-
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1475
|
-
// **/**/<rest> -> **/<rest>
|
|
1476
|
-
//
|
|
1477
|
-
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1478
|
-
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1479
|
-
firstPhasePreProcess(globParts) {
|
|
1480
|
-
let didSomething = false;
|
|
1481
|
-
do {
|
|
1482
|
-
didSomething = false;
|
|
1483
|
-
for (let parts of globParts) {
|
|
1484
|
-
let gs = -1;
|
|
1485
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1486
|
-
let gss = gs;
|
|
1487
|
-
while (parts[gss + 1] === "**") {
|
|
1488
|
-
gss++;
|
|
1489
|
-
}
|
|
1490
|
-
if (gss > gs) {
|
|
1491
|
-
parts.splice(gs + 1, gss - gs);
|
|
1492
|
-
}
|
|
1493
|
-
let next = parts[gs + 1];
|
|
1494
|
-
const p = parts[gs + 2];
|
|
1495
|
-
const p2 = parts[gs + 3];
|
|
1496
|
-
if (next !== "..")
|
|
1497
|
-
continue;
|
|
1498
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1499
|
-
continue;
|
|
1500
|
-
}
|
|
1501
|
-
didSomething = true;
|
|
1502
|
-
parts.splice(gs, 1);
|
|
1503
|
-
const other = parts.slice(0);
|
|
1504
|
-
other[gs] = "**";
|
|
1505
|
-
globParts.push(other);
|
|
1506
|
-
gs--;
|
|
1507
|
-
}
|
|
1508
|
-
if (!this.preserveMultipleSlashes) {
|
|
1509
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1510
|
-
const p = parts[i2];
|
|
1511
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1512
|
-
continue;
|
|
1513
|
-
if (p === "." || p === "") {
|
|
1514
|
-
didSomething = true;
|
|
1515
|
-
parts.splice(i2, 1);
|
|
1516
|
-
i2--;
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1520
|
-
didSomething = true;
|
|
1521
|
-
parts.pop();
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
let dd = 0;
|
|
1525
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1526
|
-
const p = parts[dd - 1];
|
|
1527
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1528
|
-
didSomething = true;
|
|
1529
|
-
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1530
|
-
const splin = needDot ? ["."] : [];
|
|
1531
|
-
parts.splice(dd - 1, 2, ...splin);
|
|
1532
|
-
if (parts.length === 0)
|
|
1533
|
-
parts.push("");
|
|
1534
|
-
dd -= 2;
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
} while (didSomething);
|
|
1539
|
-
return globParts;
|
|
1540
|
-
}
|
|
1541
|
-
// second phase: multi-pattern dedupes
|
|
1542
|
-
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1543
|
-
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1544
|
-
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1545
|
-
//
|
|
1546
|
-
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1547
|
-
// ^-- not valid because ** doens't follow symlinks
|
|
1548
|
-
secondPhasePreProcess(globParts) {
|
|
1549
|
-
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1550
|
-
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1551
|
-
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1552
|
-
if (!matched)
|
|
1553
|
-
continue;
|
|
1554
|
-
globParts[i2] = matched;
|
|
1555
|
-
globParts[j] = [];
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
return globParts.filter((gs) => gs.length);
|
|
1559
|
-
}
|
|
1560
|
-
partsMatch(a, b, emptyGSMatch = false) {
|
|
1561
|
-
let ai = 0;
|
|
1562
|
-
let bi = 0;
|
|
1563
|
-
let result = [];
|
|
1564
|
-
let which = "";
|
|
1565
|
-
while (ai < a.length && bi < b.length) {
|
|
1566
|
-
if (a[ai] === b[bi]) {
|
|
1567
|
-
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1568
|
-
ai++;
|
|
1569
|
-
bi++;
|
|
1570
|
-
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1571
|
-
result.push(a[ai]);
|
|
1572
|
-
ai++;
|
|
1573
|
-
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1574
|
-
result.push(b[bi]);
|
|
1575
|
-
bi++;
|
|
1576
|
-
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1577
|
-
if (which === "b")
|
|
1578
|
-
return false;
|
|
1579
|
-
which = "a";
|
|
1580
|
-
result.push(a[ai]);
|
|
1581
|
-
ai++;
|
|
1582
|
-
bi++;
|
|
1583
|
-
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1584
|
-
if (which === "a")
|
|
1585
|
-
return false;
|
|
1586
|
-
which = "b";
|
|
1587
|
-
result.push(b[bi]);
|
|
1588
|
-
ai++;
|
|
1589
|
-
bi++;
|
|
1590
|
-
} else {
|
|
1591
|
-
return false;
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
return a.length === b.length && result;
|
|
1595
|
-
}
|
|
1596
|
-
parseNegate() {
|
|
1597
|
-
if (this.nonegate)
|
|
1598
|
-
return;
|
|
1599
|
-
const pattern = this.pattern;
|
|
1600
|
-
let negate = false;
|
|
1601
|
-
let negateOffset = 0;
|
|
1602
|
-
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1603
|
-
negate = !negate;
|
|
1604
|
-
negateOffset++;
|
|
1605
|
-
}
|
|
1606
|
-
if (negateOffset)
|
|
1607
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1608
|
-
this.negate = negate;
|
|
1609
|
-
}
|
|
1610
|
-
// set partial to true to test if, for example,
|
|
1611
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1612
|
-
// Partial means, if you run out of file before you run
|
|
1613
|
-
// out of pattern, then that's fine, as long as all
|
|
1614
|
-
// the parts match.
|
|
1615
|
-
matchOne(file, pattern, partial = false) {
|
|
1616
|
-
const options = this.options;
|
|
1617
|
-
if (this.isWindows) {
|
|
1618
|
-
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1619
|
-
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1620
|
-
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1621
|
-
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1622
|
-
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1623
|
-
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1624
|
-
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1625
|
-
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1626
|
-
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1627
|
-
pattern[pdi] = fd;
|
|
1628
|
-
if (pdi > fdi) {
|
|
1629
|
-
pattern = pattern.slice(pdi);
|
|
1630
|
-
} else if (fdi > pdi) {
|
|
1631
|
-
file = file.slice(fdi);
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1637
|
-
if (optimizationLevel >= 2) {
|
|
1638
|
-
file = this.levelTwoFileOptimize(file);
|
|
1639
|
-
}
|
|
1640
|
-
this.debug("matchOne", this, { file, pattern });
|
|
1641
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1642
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1643
|
-
this.debug("matchOne loop");
|
|
1644
|
-
var p = pattern[pi];
|
|
1645
|
-
var f = file[fi];
|
|
1646
|
-
this.debug(pattern, p, f);
|
|
1647
|
-
if (p === false) {
|
|
1648
|
-
return false;
|
|
1649
|
-
}
|
|
1650
|
-
if (p === GLOBSTAR) {
|
|
1651
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1652
|
-
var fr = fi;
|
|
1653
|
-
var pr = pi + 1;
|
|
1654
|
-
if (pr === pl) {
|
|
1655
|
-
this.debug("** at the end");
|
|
1656
|
-
for (; fi < fl; fi++) {
|
|
1657
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1658
|
-
return false;
|
|
1659
|
-
}
|
|
1660
|
-
return true;
|
|
1661
|
-
}
|
|
1662
|
-
while (fr < fl) {
|
|
1663
|
-
var swallowee = file[fr];
|
|
1664
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1665
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1666
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1667
|
-
return true;
|
|
1668
|
-
} else {
|
|
1669
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1670
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1671
|
-
break;
|
|
1672
|
-
}
|
|
1673
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1674
|
-
fr++;
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
if (partial) {
|
|
1678
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1679
|
-
if (fr === fl) {
|
|
1680
|
-
return true;
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
return false;
|
|
1684
|
-
}
|
|
1685
|
-
let hit;
|
|
1686
|
-
if (typeof p === "string") {
|
|
1687
|
-
hit = f === p;
|
|
1688
|
-
this.debug("string match", p, f, hit);
|
|
1689
|
-
} else {
|
|
1690
|
-
hit = p.test(f);
|
|
1691
|
-
this.debug("pattern match", p, f, hit);
|
|
1692
|
-
}
|
|
1693
|
-
if (!hit)
|
|
1694
|
-
return false;
|
|
1695
|
-
}
|
|
1696
|
-
if (fi === fl && pi === pl) {
|
|
1697
|
-
return true;
|
|
1698
|
-
} else if (fi === fl) {
|
|
1699
|
-
return partial;
|
|
1700
|
-
} else if (pi === pl) {
|
|
1701
|
-
return fi === fl - 1 && file[fi] === "";
|
|
1702
|
-
} else {
|
|
1703
|
-
throw new Error("wtf?");
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
braceExpand() {
|
|
1707
|
-
return braceExpand(this.pattern, this.options);
|
|
1708
|
-
}
|
|
1709
|
-
parse(pattern) {
|
|
1710
|
-
assertValidPattern(pattern);
|
|
1711
|
-
const options = this.options;
|
|
1712
|
-
if (pattern === "**")
|
|
1713
|
-
return GLOBSTAR;
|
|
1714
|
-
if (pattern === "")
|
|
1715
|
-
return "";
|
|
1716
|
-
let m;
|
|
1717
|
-
let fastTest = null;
|
|
1718
|
-
if (m = pattern.match(starRE)) {
|
|
1719
|
-
fastTest = options.dot ? starTestDot : starTest;
|
|
1720
|
-
} else if (m = pattern.match(starDotExtRE)) {
|
|
1721
|
-
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1722
|
-
} else if (m = pattern.match(qmarksRE)) {
|
|
1723
|
-
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1724
|
-
} else if (m = pattern.match(starDotStarRE)) {
|
|
1725
|
-
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1726
|
-
} else if (m = pattern.match(dotStarRE)) {
|
|
1727
|
-
fastTest = dotStarTest;
|
|
1728
|
-
}
|
|
1729
|
-
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1730
|
-
if (fastTest && typeof re === "object") {
|
|
1731
|
-
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1732
|
-
}
|
|
1733
|
-
return re;
|
|
1734
|
-
}
|
|
1735
|
-
makeRe() {
|
|
1736
|
-
if (this.regexp || this.regexp === false)
|
|
1737
|
-
return this.regexp;
|
|
1738
|
-
const set = this.set;
|
|
1739
|
-
if (!set.length) {
|
|
1740
|
-
this.regexp = false;
|
|
1741
|
-
return this.regexp;
|
|
1742
|
-
}
|
|
1743
|
-
const options = this.options;
|
|
1744
|
-
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1745
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1746
|
-
let re = set.map((pattern) => {
|
|
1747
|
-
const pp = pattern.map((p) => {
|
|
1748
|
-
if (p instanceof RegExp) {
|
|
1749
|
-
for (const f of p.flags.split(""))
|
|
1750
|
-
flags.add(f);
|
|
1751
|
-
}
|
|
1752
|
-
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1753
|
-
});
|
|
1754
|
-
pp.forEach((p, i2) => {
|
|
1755
|
-
const next = pp[i2 + 1];
|
|
1756
|
-
const prev = pp[i2 - 1];
|
|
1757
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1758
|
-
return;
|
|
1759
|
-
}
|
|
1760
|
-
if (prev === void 0) {
|
|
1761
|
-
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1762
|
-
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1763
|
-
} else {
|
|
1764
|
-
pp[i2] = twoStar;
|
|
1765
|
-
}
|
|
1766
|
-
} else if (next === void 0) {
|
|
1767
|
-
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1768
|
-
} else if (next !== GLOBSTAR) {
|
|
1769
|
-
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1770
|
-
pp[i2 + 1] = GLOBSTAR;
|
|
1771
|
-
}
|
|
1772
|
-
});
|
|
1773
|
-
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1774
|
-
}).join("|");
|
|
1775
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1776
|
-
re = "^" + open + re + close + "$";
|
|
1777
|
-
if (this.negate)
|
|
1778
|
-
re = "^(?!" + re + ").+$";
|
|
1779
|
-
try {
|
|
1780
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1781
|
-
} catch (ex) {
|
|
1782
|
-
this.regexp = false;
|
|
1783
|
-
}
|
|
1784
|
-
return this.regexp;
|
|
1785
|
-
}
|
|
1786
|
-
slashSplit(p) {
|
|
1787
|
-
if (this.preserveMultipleSlashes) {
|
|
1788
|
-
return p.split("/");
|
|
1789
|
-
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1790
|
-
return ["", ...p.split(/\/+/)];
|
|
1791
|
-
} else {
|
|
1792
|
-
return p.split(/\/+/);
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
match(f, partial = this.partial) {
|
|
1796
|
-
this.debug("match", f, this.pattern);
|
|
1797
|
-
if (this.comment) {
|
|
1798
|
-
return false;
|
|
1799
|
-
}
|
|
1800
|
-
if (this.empty) {
|
|
1801
|
-
return f === "";
|
|
1802
|
-
}
|
|
1803
|
-
if (f === "/" && partial) {
|
|
1804
|
-
return true;
|
|
1805
|
-
}
|
|
1806
|
-
const options = this.options;
|
|
1807
|
-
if (this.isWindows) {
|
|
1808
|
-
f = f.split("\\").join("/");
|
|
1809
|
-
}
|
|
1810
|
-
const ff = this.slashSplit(f);
|
|
1811
|
-
this.debug(this.pattern, "split", ff);
|
|
1812
|
-
const set = this.set;
|
|
1813
|
-
this.debug(this.pattern, "set", set);
|
|
1814
|
-
let filename = ff[ff.length - 1];
|
|
1815
|
-
if (!filename) {
|
|
1816
|
-
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
1817
|
-
filename = ff[i2];
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
for (let i2 = 0; i2 < set.length; i2++) {
|
|
1821
|
-
const pattern = set[i2];
|
|
1822
|
-
let file = ff;
|
|
1823
|
-
if (options.matchBase && pattern.length === 1) {
|
|
1824
|
-
file = [filename];
|
|
1825
|
-
}
|
|
1826
|
-
const hit = this.matchOne(file, pattern, partial);
|
|
1827
|
-
if (hit) {
|
|
1828
|
-
if (options.flipNegate) {
|
|
1829
|
-
return true;
|
|
1830
|
-
}
|
|
1831
|
-
return !this.negate;
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
|
-
if (options.flipNegate) {
|
|
1835
|
-
return false;
|
|
1836
|
-
}
|
|
1837
|
-
return this.negate;
|
|
1838
|
-
}
|
|
1839
|
-
static defaults(def) {
|
|
1840
|
-
return minimatch.defaults(def).Minimatch;
|
|
1841
|
-
}
|
|
1842
|
-
};
|
|
1843
|
-
minimatch.AST = AST;
|
|
1844
|
-
minimatch.Minimatch = Minimatch;
|
|
1845
|
-
minimatch.escape = escape;
|
|
1846
|
-
minimatch.unescape = unescape;
|
|
1847
|
-
|
|
1848
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
1849
|
-
function queryNonceMetaTagContent(doc) {
|
|
1850
|
-
var _a, _b, _c;
|
|
1851
|
-
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
|
-
// src/utils/regular-expression.ts
|
|
1855
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
1856
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1857
|
-
};
|
|
1858
|
-
|
|
1859
|
-
// src/utils/result.ts
|
|
1860
|
-
var result_exports = {};
|
|
1861
|
-
__export(result_exports, {
|
|
1862
|
-
err: () => err,
|
|
1863
|
-
map: () => map,
|
|
1864
|
-
ok: () => ok,
|
|
1865
|
-
unwrap: () => unwrap,
|
|
1866
|
-
unwrapErr: () => unwrapErr
|
|
1867
|
-
});
|
|
1868
|
-
var ok = (value) => ({
|
|
1869
|
-
isOk: true,
|
|
1870
|
-
isErr: false,
|
|
1871
|
-
value
|
|
1872
|
-
});
|
|
1873
|
-
var err = (value) => ({
|
|
1874
|
-
isOk: false,
|
|
1875
|
-
isErr: true,
|
|
1876
|
-
value
|
|
1877
|
-
});
|
|
1878
|
-
function map(result, fn) {
|
|
1879
|
-
if (result.isOk) {
|
|
1880
|
-
const val = fn(result.value);
|
|
1881
|
-
if (val instanceof Promise) {
|
|
1882
|
-
return val.then((newVal) => ok(newVal));
|
|
1883
|
-
} else {
|
|
1884
|
-
return ok(val);
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
if (result.isErr) {
|
|
1888
|
-
const value = result.value;
|
|
1889
|
-
return err(value);
|
|
1890
|
-
}
|
|
1891
|
-
throw "should never get here";
|
|
1892
|
-
}
|
|
1893
|
-
var unwrap = (result) => {
|
|
1894
|
-
if (result.isOk) {
|
|
1895
|
-
return result.value;
|
|
1896
|
-
} else {
|
|
1897
|
-
throw result.value;
|
|
1898
|
-
}
|
|
1899
|
-
};
|
|
1900
|
-
var unwrapErr = (result) => {
|
|
1901
|
-
if (result.isErr) {
|
|
1902
|
-
return result.value;
|
|
1903
|
-
} else {
|
|
1904
|
-
throw result.value;
|
|
1905
|
-
}
|
|
1906
|
-
};
|
|
1907
|
-
|
|
1908
252
|
// src/utils/style.ts
|
|
1909
253
|
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
1910
254
|
if (!supportsConstructableStylesheets) return void 0;
|
|
@@ -1969,8 +313,9 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
1969
313
|
let childNode;
|
|
1970
314
|
for (; i2 < childNodes.length; i2++) {
|
|
1971
315
|
childNode = childNodes[i2];
|
|
1972
|
-
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
316
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
1973
317
|
slottedNodes.push(childNode);
|
|
318
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
1974
319
|
}
|
|
1975
320
|
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
1976
321
|
}
|
|
@@ -2028,6 +373,18 @@ function patchSlotNode(node) {
|
|
|
2028
373
|
node.assignedElements = assignedFactory(true);
|
|
2029
374
|
node.assignedNodes = assignedFactory(false);
|
|
2030
375
|
}
|
|
376
|
+
function dispatchSlotChangeEvent(elm) {
|
|
377
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
378
|
+
}
|
|
379
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
380
|
+
var _a;
|
|
381
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
382
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
383
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
384
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
385
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
386
|
+
return { slotNode, slotName };
|
|
387
|
+
}
|
|
2031
388
|
function internalCall(node, method) {
|
|
2032
389
|
if ("__" + method in node) {
|
|
2033
390
|
const toReturn = node["__" + method];
|
|
@@ -2052,6 +409,14 @@ var uniqueTime = (key, measureText) => {
|
|
|
2052
409
|
};
|
|
2053
410
|
}
|
|
2054
411
|
};
|
|
412
|
+
|
|
413
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
414
|
+
function queryNonceMetaTagContent(doc) {
|
|
415
|
+
var _a, _b, _c;
|
|
416
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// src/runtime/styles.ts
|
|
2055
420
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2056
421
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2057
422
|
let style = styles.get(scopeId2);
|
|
@@ -2085,7 +450,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2085
450
|
}
|
|
2086
451
|
if (!appliedStyles.has(scopeId2)) {
|
|
2087
452
|
styleElm = win.document.createElement("style");
|
|
2088
|
-
styleElm.
|
|
453
|
+
styleElm.textContent = style;
|
|
2089
454
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2090
455
|
if (nonce != null) {
|
|
2091
456
|
styleElm.setAttribute("nonce", nonce);
|
|
@@ -2110,8 +475,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2110
475
|
}
|
|
2111
476
|
} else {
|
|
2112
477
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2113
|
-
if (existingStyleContainer) {
|
|
2114
|
-
existingStyleContainer.
|
|
478
|
+
if (existingStyleContainer && true) {
|
|
479
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
2115
480
|
} else {
|
|
2116
481
|
styleContainerNode.prepend(styleElm);
|
|
2117
482
|
}
|
|
@@ -2124,7 +489,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2124
489
|
styleContainerNode.insertBefore(styleElm, null);
|
|
2125
490
|
}
|
|
2126
491
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2127
|
-
styleElm.
|
|
492
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
2128
493
|
}
|
|
2129
494
|
if (appliedStyles) {
|
|
2130
495
|
appliedStyles.add(scopeId2);
|
|
@@ -2172,6 +537,15 @@ var attachStyles = (hostRef) => {
|
|
|
2172
537
|
endAttachStyles();
|
|
2173
538
|
};
|
|
2174
539
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
540
|
+
|
|
541
|
+
// src/utils/helpers.ts
|
|
542
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
543
|
+
var isComplexType = (o) => {
|
|
544
|
+
o = typeof o;
|
|
545
|
+
return o === "object" || o === "function";
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
// src/runtime/vdom/h.ts
|
|
2175
549
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2176
550
|
if (typeof nodeName === "string") {
|
|
2177
551
|
nodeName = transformTag(nodeName);
|
|
@@ -2239,7 +613,8 @@ var newVNode = (tag, text) => {
|
|
|
2239
613
|
const vnode = {
|
|
2240
614
|
$flags$: 0,
|
|
2241
615
|
$tag$: tag,
|
|
2242
|
-
|
|
616
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
617
|
+
$text$: text != null ? text : null,
|
|
2243
618
|
$elm$: null,
|
|
2244
619
|
$children$: null
|
|
2245
620
|
};
|
|
@@ -2286,18 +661,33 @@ var convertToPrivate = (node) => {
|
|
|
2286
661
|
vnode.$name$ = node.vname;
|
|
2287
662
|
return vnode;
|
|
2288
663
|
};
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
)
|
|
664
|
+
|
|
665
|
+
// src/runtime/normalize-watchers.ts
|
|
666
|
+
var normalizeWatchers = (raw) => {
|
|
667
|
+
if (!raw) return void 0;
|
|
668
|
+
const keys = Object.keys(raw);
|
|
669
|
+
if (keys.length === 0) return void 0;
|
|
670
|
+
let hasLegacy = false;
|
|
671
|
+
for (const propName of keys) {
|
|
672
|
+
if (hasLegacy) break;
|
|
673
|
+
for (const h2 of raw[propName]) {
|
|
674
|
+
if (typeof h2 === "string") {
|
|
675
|
+
hasLegacy = true;
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
if (!hasLegacy) return raw;
|
|
681
|
+
const out = {};
|
|
682
|
+
for (const propName of keys) {
|
|
683
|
+
out[propName] = raw[propName].map(
|
|
684
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
return out;
|
|
2297
688
|
};
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
createSupportsRuleRe(":host-context");
|
|
689
|
+
|
|
690
|
+
// src/runtime/parse-property-value.ts
|
|
2301
691
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2302
692
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2303
693
|
if (propType & 4 /* Boolean */) {
|
|
@@ -2376,7 +766,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2376
766
|
}
|
|
2377
767
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
2378
768
|
if (newValue) {
|
|
2379
|
-
newValue
|
|
769
|
+
queueRefAttachment(newValue, elm);
|
|
2380
770
|
}
|
|
2381
771
|
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2382
772
|
if (memberName[2] === "-") {
|
|
@@ -2396,15 +786,45 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2396
786
|
plt.ael(elm, memberName, newValue, capture);
|
|
2397
787
|
}
|
|
2398
788
|
}
|
|
789
|
+
} else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
790
|
+
const propName = memberName.slice(5);
|
|
791
|
+
let attrName;
|
|
792
|
+
{
|
|
793
|
+
const hostRef = getHostRef(elm);
|
|
794
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
795
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
796
|
+
if (memberMeta && memberMeta[1]) {
|
|
797
|
+
attrName = memberMeta[1];
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
if (!attrName) {
|
|
802
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
803
|
+
}
|
|
804
|
+
if (newValue == null || newValue === false) {
|
|
805
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
806
|
+
elm.removeAttribute(attrName);
|
|
807
|
+
}
|
|
808
|
+
} else {
|
|
809
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
810
|
+
}
|
|
811
|
+
return;
|
|
812
|
+
} else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
813
|
+
const propName = memberName.slice(5);
|
|
814
|
+
try {
|
|
815
|
+
elm[propName] = newValue;
|
|
816
|
+
} catch (e) {
|
|
817
|
+
}
|
|
818
|
+
return;
|
|
2399
819
|
} else {
|
|
2400
820
|
const isComplex = isComplexType(newValue);
|
|
2401
|
-
if ((isProp || isComplex && newValue !== null) &&
|
|
821
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
2402
822
|
try {
|
|
2403
823
|
if (!elm.tagName.includes("-")) {
|
|
2404
824
|
const n = newValue == null ? "" : newValue;
|
|
2405
825
|
if (memberName === "list") {
|
|
2406
826
|
isProp = false;
|
|
2407
|
-
} else if (oldValue == null || elm[memberName]
|
|
827
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
2408
828
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2409
829
|
elm[memberName] = n;
|
|
2410
830
|
} else {
|
|
@@ -2501,6 +921,8 @@ var useNativeShadowDom = false;
|
|
|
2501
921
|
var checkSlotFallbackVisibility = false;
|
|
2502
922
|
var checkSlotRelocate = false;
|
|
2503
923
|
var isSvgMode = false;
|
|
924
|
+
var refCallbacksToRemove = [];
|
|
925
|
+
var refCallbacksToAttach = [];
|
|
2504
926
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2505
927
|
var _a;
|
|
2506
928
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2523,7 +945,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2523
945
|
);
|
|
2524
946
|
}
|
|
2525
947
|
}
|
|
2526
|
-
if (newVNode2.$text$
|
|
948
|
+
if (newVNode2.$text$ != null) {
|
|
2527
949
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2528
950
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2529
951
|
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
@@ -2532,9 +954,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2532
954
|
}
|
|
2533
955
|
} else {
|
|
2534
956
|
if (!win.document) {
|
|
2535
|
-
throw new Error(
|
|
2536
|
-
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
2537
|
-
);
|
|
957
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
2538
958
|
}
|
|
2539
959
|
elm = newVNode2.$elm$ = win.document.createElement(
|
|
2540
960
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
@@ -2565,9 +985,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2565
985
|
patchSlotNode(elm);
|
|
2566
986
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2567
987
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2568
|
-
|
|
2569
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2570
|
-
}
|
|
988
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2571
989
|
}
|
|
2572
990
|
{
|
|
2573
991
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -2576,9 +994,37 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2576
994
|
}
|
|
2577
995
|
return elm;
|
|
2578
996
|
};
|
|
997
|
+
var relocateToHostRoot = (parentElm) => {
|
|
998
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
999
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
1000
|
+
if (host != null) {
|
|
1001
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
1002
|
+
(ref) => ref["s-cr"]
|
|
1003
|
+
);
|
|
1004
|
+
const childNodeArray = Array.from(
|
|
1005
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
1006
|
+
);
|
|
1007
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
1008
|
+
if (childNode["s-sh"] != null) {
|
|
1009
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
1010
|
+
childNode["s-sh"] = void 0;
|
|
1011
|
+
checkSlotRelocate = true;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1016
|
+
};
|
|
2579
1017
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2580
1018
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2581
1019
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1020
|
+
if (parentElm["s-sr"]) {
|
|
1021
|
+
let node = parentElm;
|
|
1022
|
+
while (node = node.nextSibling) {
|
|
1023
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1024
|
+
oldSlotChildNodes.push(node);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
2582
1028
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
2583
1029
|
const childNode = oldSlotChildNodes[i2];
|
|
2584
1030
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
@@ -2748,10 +1194,17 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2748
1194
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
2749
1195
|
const oldChildren = oldVNode.$children$;
|
|
2750
1196
|
const newChildren = newVNode2.$children$;
|
|
1197
|
+
const tag = newVNode2.$tag$;
|
|
2751
1198
|
const text = newVNode2.$text$;
|
|
2752
1199
|
let defaultHolder;
|
|
2753
|
-
if (text
|
|
1200
|
+
if (text == null) {
|
|
2754
1201
|
{
|
|
1202
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
1203
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1204
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1205
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
2755
1208
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
2756
1209
|
}
|
|
2757
1210
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -2785,7 +1238,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2785
1238
|
const slotName = childNode["s-sn"];
|
|
2786
1239
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2787
1240
|
node = hostContentNodes[j];
|
|
2788
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (
|
|
1241
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
2789
1242
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2790
1243
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2791
1244
|
checkSlotFallbackVisibility = true;
|
|
@@ -2825,15 +1278,39 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2825
1278
|
};
|
|
2826
1279
|
var nullifyVNodeRefs = (vNode) => {
|
|
2827
1280
|
{
|
|
2828
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
1281
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
1282
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
1283
|
+
}
|
|
2829
1284
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2830
1285
|
}
|
|
2831
1286
|
};
|
|
2832
|
-
var
|
|
2833
|
-
|
|
2834
|
-
|
|
1287
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
1288
|
+
{
|
|
1289
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
2835
1290
|
}
|
|
1291
|
+
};
|
|
1292
|
+
var flushQueuedRefCallbacks = () => {
|
|
2836
1293
|
{
|
|
1294
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
1295
|
+
refCallbacksToRemove.length = 0;
|
|
1296
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
1297
|
+
refCallbacksToAttach.length = 0;
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
1301
|
+
{
|
|
1302
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
1303
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
1304
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
1305
|
+
parent.insertBefore(newNode, reference);
|
|
1306
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1307
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
1308
|
+
return newNode;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
if (parent.__insertBefore) {
|
|
1312
|
+
return parent.__insertBefore(newNode, reference);
|
|
1313
|
+
} else {
|
|
2837
1314
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
2838
1315
|
}
|
|
2839
1316
|
};
|
|
@@ -2859,7 +1336,7 @@ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
|
2859
1336
|
}
|
|
2860
1337
|
}
|
|
2861
1338
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
2862
|
-
var _a, _b, _c, _d;
|
|
1339
|
+
var _a, _b, _c, _d, _e;
|
|
2863
1340
|
const hostElm = hostRef.$hostElement$;
|
|
2864
1341
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2865
1342
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -2903,7 +1380,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2903
1380
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2904
1381
|
const orgLocationNode = win.document.createTextNode("");
|
|
2905
1382
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2906
|
-
insertBefore(
|
|
1383
|
+
insertBefore(
|
|
1384
|
+
nodeToRelocate.parentNode,
|
|
1385
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
1386
|
+
nodeToRelocate,
|
|
1387
|
+
isInitialLoad
|
|
1388
|
+
);
|
|
2907
1389
|
}
|
|
2908
1390
|
}
|
|
2909
1391
|
for (const relocateData of relocateNodes) {
|
|
@@ -2915,7 +1397,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2915
1397
|
if (slotRefNode) {
|
|
2916
1398
|
const parentNodeRef = slotRefNode.parentNode;
|
|
2917
1399
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
2918
|
-
{
|
|
1400
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
2919
1401
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
2920
1402
|
while (orgLocationNode) {
|
|
2921
1403
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -2936,10 +1418,18 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2936
1418
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2937
1419
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
2938
1420
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
2939
|
-
|
|
2940
|
-
|
|
1421
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
1422
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
1423
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
1424
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
1425
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
1426
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
1427
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
1428
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
1429
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
1430
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
1431
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
2941
1432
|
}
|
|
2942
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
2943
1433
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
2944
1434
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
2945
1435
|
}
|
|
@@ -2957,7 +1447,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2957
1447
|
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2958
1448
|
relocateNodes.length = 0;
|
|
2959
1449
|
}
|
|
1450
|
+
if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
1451
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1452
|
+
for (const childNode of children) {
|
|
1453
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1454
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1455
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1456
|
+
}
|
|
1457
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1458
|
+
childNode.hidden = true;
|
|
1459
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
1460
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
1461
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
1462
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
1463
|
+
childNode.parentNode.removeChild(childNode);
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
2960
1468
|
contentRef = void 0;
|
|
1469
|
+
flushQueuedRefCallbacks();
|
|
2961
1470
|
};
|
|
2962
1471
|
|
|
2963
1472
|
// src/runtime/update-component.ts
|
|
@@ -3003,6 +1512,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3003
1512
|
let maybePromise;
|
|
3004
1513
|
if (isInitialLoad) {
|
|
3005
1514
|
{
|
|
1515
|
+
if (hostRef.$deferredConnectedCallback$) {
|
|
1516
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
1517
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1518
|
+
}
|
|
3006
1519
|
{
|
|
3007
1520
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
3008
1521
|
if (hostRef.$queuedListeners$) {
|
|
@@ -3022,8 +1535,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3022
1535
|
endSchedule();
|
|
3023
1536
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
3024
1537
|
};
|
|
3025
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
3026
|
-
console.error(
|
|
1538
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
1539
|
+
console.error(err);
|
|
3027
1540
|
fn();
|
|
3028
1541
|
}) : fn();
|
|
3029
1542
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
@@ -3051,7 +1564,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3051
1564
|
if (childrenPromises.length === 0) {
|
|
3052
1565
|
postUpdate();
|
|
3053
1566
|
} else {
|
|
3054
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
1567
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
3055
1568
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3056
1569
|
childrenPromises.length = 0;
|
|
3057
1570
|
}
|
|
@@ -3189,13 +1702,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3189
1702
|
});
|
|
3190
1703
|
}
|
|
3191
1704
|
}
|
|
3192
|
-
if (
|
|
1705
|
+
if (flags & 2 /* hasRendered */) {
|
|
3193
1706
|
if (instance.componentShouldUpdate) {
|
|
3194
|
-
|
|
1707
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
1708
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3195
1709
|
return;
|
|
3196
1710
|
}
|
|
3197
1711
|
}
|
|
3198
|
-
|
|
1712
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
1713
|
+
scheduleUpdate(hostRef, false);
|
|
1714
|
+
}
|
|
3199
1715
|
}
|
|
3200
1716
|
}
|
|
3201
1717
|
};
|
|
@@ -3207,7 +1723,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3207
1723
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3208
1724
|
{
|
|
3209
1725
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3210
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1726
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3211
1727
|
}
|
|
3212
1728
|
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3213
1729
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
@@ -3219,7 +1735,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3219
1735
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3220
1736
|
members.map(([memberName, [memberFlags]]) => {
|
|
3221
1737
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3222
|
-
const { get: origGetter, set: origSetter } =
|
|
1738
|
+
const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
|
|
3223
1739
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3224
1740
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3225
1741
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
@@ -3333,11 +1849,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3333
1849
|
return;
|
|
3334
1850
|
}
|
|
3335
1851
|
const propFlags = members.find(([m]) => m === propName);
|
|
3336
|
-
|
|
1852
|
+
const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
|
|
1853
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1854
|
+
if (isBooleanTarget) {
|
|
3337
1855
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
3338
1856
|
}
|
|
3339
1857
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3340
|
-
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1858
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3341
1859
|
this[propName] = newValue;
|
|
3342
1860
|
}
|
|
3343
1861
|
});
|
|
@@ -3364,71 +1882,87 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3364
1882
|
// src/runtime/initialize-component.ts
|
|
3365
1883
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
3366
1884
|
let Cstr;
|
|
3367
|
-
|
|
3368
|
-
hostRef.$flags$
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
1885
|
+
try {
|
|
1886
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1887
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1888
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1889
|
+
if (bundleId) {
|
|
1890
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1891
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1892
|
+
const endLoad = uniqueTime();
|
|
1893
|
+
Cstr = await CstrImport;
|
|
1894
|
+
endLoad();
|
|
1895
|
+
} else {
|
|
1896
|
+
Cstr = CstrImport;
|
|
1897
|
+
}
|
|
1898
|
+
if (!Cstr) {
|
|
1899
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1900
|
+
}
|
|
1901
|
+
if (!Cstr.isProxied) {
|
|
1902
|
+
{
|
|
1903
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1904
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1905
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1906
|
+
}
|
|
1907
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1908
|
+
Cstr.isProxied = true;
|
|
1909
|
+
}
|
|
1910
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3383
1911
|
{
|
|
3384
|
-
|
|
3385
|
-
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3386
|
-
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1912
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3387
1913
|
}
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
1914
|
+
try {
|
|
1915
|
+
new Cstr(hostRef);
|
|
1916
|
+
} catch (e) {
|
|
1917
|
+
consoleError(e, elm);
|
|
1918
|
+
}
|
|
1919
|
+
{
|
|
1920
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1921
|
+
}
|
|
1922
|
+
{
|
|
1923
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1924
|
+
}
|
|
1925
|
+
endNewInstance();
|
|
1926
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
1927
|
+
if (!needsDeferredCallback) {
|
|
1928
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1929
|
+
} else {
|
|
1930
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
1931
|
+
}
|
|
1932
|
+
} else {
|
|
1933
|
+
Cstr = elm.constructor;
|
|
1934
|
+
const cmpTag = elm.localName;
|
|
1935
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3402
1936
|
}
|
|
3403
|
-
{
|
|
3404
|
-
|
|
1937
|
+
if (Cstr && Cstr.style) {
|
|
1938
|
+
let style;
|
|
1939
|
+
if (typeof Cstr.style === "string") {
|
|
1940
|
+
style = Cstr.style;
|
|
1941
|
+
}
|
|
1942
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1943
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
|
|
1944
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1945
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1946
|
+
endRegisterStyles();
|
|
1947
|
+
}
|
|
3405
1948
|
}
|
|
3406
|
-
|
|
3407
|
-
|
|
1949
|
+
}
|
|
1950
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1951
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1952
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1953
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3408
1954
|
} else {
|
|
3409
|
-
|
|
3410
|
-
const cmpTag = elm.localName;
|
|
3411
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1955
|
+
schedule();
|
|
3412
1956
|
}
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3422
|
-
endRegisterStyles();
|
|
3423
|
-
}
|
|
1957
|
+
} catch (e) {
|
|
1958
|
+
consoleError(e, elm);
|
|
1959
|
+
if (hostRef.$onRenderResolve$) {
|
|
1960
|
+
hostRef.$onRenderResolve$();
|
|
1961
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1962
|
+
}
|
|
1963
|
+
if (hostRef.$onReadyResolve$) {
|
|
1964
|
+
hostRef.$onReadyResolve$(elm);
|
|
3424
1965
|
}
|
|
3425
|
-
}
|
|
3426
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3427
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3428
|
-
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3429
|
-
ancestorComponent["s-rc"].push(schedule);
|
|
3430
|
-
} else {
|
|
3431
|
-
schedule();
|
|
3432
1966
|
}
|
|
3433
1967
|
};
|
|
3434
1968
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -3465,7 +1999,7 @@ var connectedCallback = (elm) => {
|
|
|
3465
1999
|
}
|
|
3466
2000
|
if (cmpMeta.$members$) {
|
|
3467
2001
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3468
|
-
if (memberFlags & 31 /* Prop */ &&
|
|
2002
|
+
if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
|
|
3469
2003
|
const value = elm[memberName];
|
|
3470
2004
|
delete elm[memberName];
|
|
3471
2005
|
elm[memberName] = value;
|
|
@@ -3546,7 +2080,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3546
2080
|
let hasSlotRelocation = false;
|
|
3547
2081
|
lazyBundles.map((lazyBundle) => {
|
|
3548
2082
|
lazyBundle[1].map((compactMeta) => {
|
|
3549
|
-
var _a2, _b
|
|
2083
|
+
var _a2, _b;
|
|
3550
2084
|
const cmpMeta = {
|
|
3551
2085
|
$flags$: compactMeta[0],
|
|
3552
2086
|
$tagName$: compactMeta[1],
|
|
@@ -3566,16 +2100,18 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3566
2100
|
cmpMeta.$attrsToReflect$ = [];
|
|
3567
2101
|
}
|
|
3568
2102
|
{
|
|
3569
|
-
cmpMeta.$watchers$ = (
|
|
3570
|
-
cmpMeta.$serializers$ = (
|
|
3571
|
-
cmpMeta.$deserializers$ = (
|
|
2103
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
2104
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
2105
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
3572
2106
|
}
|
|
3573
2107
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
3574
2108
|
const HostElement = class extends HTMLElement {
|
|
2109
|
+
["s-p"];
|
|
2110
|
+
["s-rc"];
|
|
2111
|
+
hasRegisteredEventListeners = false;
|
|
3575
2112
|
// StencilLazyHost
|
|
3576
2113
|
constructor(self) {
|
|
3577
2114
|
super(self);
|
|
3578
|
-
this.hasRegisteredEventListeners = false;
|
|
3579
2115
|
self = this;
|
|
3580
2116
|
registerHost(self, cmpMeta);
|
|
3581
2117
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|