@globalpayments/vega-sandbox-app 0.1.1-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.
Potentially problematic release.
This version of @globalpayments/vega-sandbox-app might be problematic. Click here for more details.
- package/README.md +49 -0
- package/dist/assets/accessibility-6af5cf2e-XlEB_Jt7.js +1 -0
- package/dist/assets/action-color-accessibility-validator-ce55cb07-C-ZfZ90r.js +1 -0
- package/dist/assets/align-left-7f959adf-BlPklVKE.js +1 -0
- package/dist/assets/aria-attributes-value-mapper-2c632641-BA3SU8ke.js +1 -0
- package/dist/assets/aria-dialog-focusable-trap-slimmer-7db3d5a7-Cx8CJUcp.js +1 -0
- package/dist/assets/array-7888f339-BUzRhXHn.js +1 -0
- package/dist/assets/auto-run-when-re-render-task-queue-slimmer.abstract-27820d4c-DrPRo97a.js +1 -0
- package/dist/assets/babel-Dyqlk8mN.svg +1 -0
- package/dist/assets/brand-switch-state-controller-slimmer-9ca03c81-D2Iufq0G.js +1 -0
- package/dist/assets/check-box-required-rule-cb0aa339-B8GrMHqP.js +1 -0
- package/dist/assets/chevron-down-4a75d28e-CQKZrHY1.js +1 -0
- package/dist/assets/chevron-up-b1989751-Bfzxj3jY.js +1 -0
- package/dist/assets/child-nodes-event-prevent-slimmer-1e3ac106-DA54t1iv.js +1 -0
- package/dist/assets/child-nodes-notify-observer-slimmer-499a3aa7-tNZc5byb.js +1 -0
- package/dist/assets/click-outside-only-to-dismiss-strategy-3d286c1b-Bt4qXmzF.js +1 -0
- package/dist/assets/component-7d906393-CRgivpmK.js +1 -0
- package/dist/assets/component-global-style-slimmer-ac703085-BrAKY3hJ.js +1 -0
- package/dist/assets/component-load-required-db42032a-Di7iuaem.js +1 -0
- package/dist/assets/component-usage-runtime-metrics-4b1afd04-D5yBE3LX.js +2 -0
- package/dist/assets/component-value-history-controller-slimmer.abstract-21e9126a-B95QIB1M.js +1 -0
- package/dist/assets/country-flags-39dbfa43-CX7jF-6J.js +927 -0
- package/dist/assets/dark-mode-state-controller-slimmer-778dd929-DdCZ4Jof.js +1 -0
- package/dist/assets/date-required-rule-d6ce832c-CEFLpidy.js +1 -0
- package/dist/assets/deprecated-property-slimmer-ea34fa7b-DPzyydTv.js +1 -0
- package/dist/assets/design-token-0a575bf2-PUb6fp1k.js +1 -0
- package/dist/assets/docker-CILJA9EV.svg +1 -0
- package/dist/assets/drop-file-accept-filter-slimmer-ad759e4a-DTuTuRV0.js +1 -0
- package/dist/assets/effect-f50e072d-BVwAMfLb.js +1 -0
- package/dist/assets/element-appender-slimmer-44bbb5c6-BvVikV-9.js +7 -0
- package/dist/assets/event-emit-slimmer-3eb4d8ad-Ctlccsem.js +1 -0
- package/dist/assets/file-uploader-required-rule-ad886d01-BSSsG3dt.js +1 -0
- package/dist/assets/fileDropUtils-RRUBaLqo.js +1 -0
- package/dist/assets/form-field-controller-slimmer-03894a51-CoAcSeLl.js +1 -0
- package/dist/assets/gulp-BUg8jesr.svg +1 -0
- package/dist/assets/image-annotation-action-e8ab7b64-KPj0aQNC.js +1 -0
- package/dist/assets/immutable-map-4fe22b11-DIPXISW1.js +1 -0
- package/dist/assets/index-CVS-vjRT.js +669 -0
- package/dist/assets/index-DJavp-p1.css +32 -0
- package/dist/assets/inject-keyboard-manager-e5874185-CNHbHoko.js +1 -0
- package/dist/assets/input-phone-number-required-rule-be6a5572-Cwd2Hv4V.js +1 -0
- package/dist/assets/input-range-required-rule-3ad74776-B7PLb3FQ.js +1 -0
- package/dist/assets/keyboard-manager-404b9c17-BrcyLUZb.js +1 -0
- package/dist/assets/keyboard-manager-slimmer-c8fcfe60-CN3LeBJZ.js +1 -0
- package/dist/assets/legend-input-processor-122008c5-XSunuE2s.js +1 -0
- package/dist/assets/license-C5slmVrE.svg +1 -0
- package/dist/assets/min-number-rule-2f1cfbf9-CWIvZYfA.js +1 -0
- package/dist/assets/min-string-length-rule-c31c89f4-BTY-3yJy.js +1 -0
- package/dist/assets/month-view-generator-d341fa5a-IIor3YXJ.js +1 -0
- package/dist/assets/mutation-observer-filters-1a054fb0-CJhfq3iU.js +1 -0
- package/dist/assets/mutation-observer-slimmer-58ebc13c-m99uIPjN.js +1 -0
- package/dist/assets/page-size-option-utils-50afc81a-BpAIWejs.js +1 -0
- package/dist/assets/placeholder-bf562081-D8zcyDHt.js +1 -0
- package/dist/assets/public-rules-09387dcf-BYyE4A0Y.js +1 -0
- package/dist/assets/required-field-rule-ab4bdc47-BVWO4gts.js +1 -0
- package/dist/assets/responsive-format-facade-51c0c2e1-CSNTrSBX.js +1 -0
- package/dist/assets/rich-text-editor-required-rule-cca16fd0-DCeA9od8.js +1 -0
- package/dist/assets/ruby-B9Na5RWH.svg +1 -0
- package/dist/assets/rust-D4Lh77kM.svg +1 -0
- package/dist/assets/state-border-formatter-50394e9c-ByDMiCxI.js +1 -0
- package/dist/assets/string-format-strategy.abstract-de17b899-BAoFnBxC.js +1 -0
- package/dist/assets/string-input-formatter-slimmer-c3d483ef-D4FEqo9Z.js +1 -0
- package/dist/assets/string-mask-strategy-87efdb9e-yW6x2ZjX.js +1 -0
- package/dist/assets/style-formatter-c20c1988-CFX-tZPv.js +1 -0
- package/dist/assets/sub-state-notify-slimmer-d5a21bb3-D4DqpbZp.js +1 -0
- package/dist/assets/sub-state-observer-slimmer-d924288a-Dvj3sSUI.js +1 -0
- package/dist/assets/synchronize-task-queue-ac8acc3b-Zj5FaVSX.js +1 -0
- package/dist/assets/time-required-rule-026c17a1-DhKBWnaH.js +1 -0
- package/dist/assets/toggle-switch-required-rule-b3cf4302-BAn2CJUG.js +1 -0
- package/dist/assets/translation-slimmer-7f195ba8-B5rGwI39.js +1 -0
- package/dist/assets/trash-can-8819a939-BMBO4L_u.js +1 -0
- package/dist/assets/vega-accordion.entry-CfEINT7F.js +1 -0
- package/dist/assets/vega-app-footer.entry-dxKlVGHF.js +1 -0
- package/dist/assets/vega-app-header-button.entry-BqvJf9ih.js +1 -0
- package/dist/assets/vega-backdrop.entry-zvDuVOIm.js +1 -0
- package/dist/assets/vega-banner.entry-BP5KtjWa.js +1 -0
- package/dist/assets/vega-bar-chart.entry-CkwKn-ae.js +1 -0
- package/dist/assets/vega-box.entry-CKRpS_7q.js +1 -0
- package/dist/assets/vega-brand-logo.entry-D55jTPdD.js +1 -0
- package/dist/assets/vega-breadcrumb.entry-Bi43hitV.js +1 -0
- package/dist/assets/vega-button-circle.entry-Q2J7n2u7.js +1 -0
- package/dist/assets/vega-button-group_2.entry-CeqFPsfs.js +1 -0
- package/dist/assets/vega-button-link.entry-DMdYQDOf.js +1 -0
- package/dist/assets/vega-button.entry-D3XB1oFN.js +1 -0
- package/dist/assets/vega-calendar_4.entry-Cj_Aij7Z.js +1 -0
- package/dist/assets/vega-card.entry-C2ddJjpk.js +1 -0
- package/dist/assets/vega-carousel.entry-DGpl69kz.js +1 -0
- package/dist/assets/vega-checkbox_2.entry-C21WN-0W.js +1 -0
- package/dist/assets/vega-chip.entry-Bp2Li7OI.js +1 -0
- package/dist/assets/vega-code-block.entry-DKuulw1O.js +8 -0
- package/dist/assets/vega-color-picker.entry-DMEFhqQB.js +1 -0
- package/dist/assets/vega-color-swatch-picker.entry-CD1Epzrl.js +1 -0
- package/dist/assets/vega-color-swatch.entry-DcQLUHHI.js +1 -0
- package/dist/assets/vega-combo-box.entry-D4ug2PTD.js +1 -0
- package/dist/assets/vega-counter-badge.entry-BW_zAciV.js +1 -0
- package/dist/assets/vega-date-picker_2.entry-CAk2ZvQC.js +4 -0
- package/dist/assets/vega-dialog_2.entry-BrWAWuH-.js +1 -0
- package/dist/assets/vega-divider.entry-C4hdehoc.js +1 -0
- package/dist/assets/vega-dropdown_5.entry-BX3pQZ88.js +1 -0
- package/dist/assets/vega-field-error.entry-sTqISZIh.js +1 -0
- package/dist/assets/vega-field-label.entry-B__dQ20F.js +1 -0
- package/dist/assets/vega-file-uploader.entry-CO-VykBt.js +1 -0
- package/dist/assets/vega-flag-icon.entry-DxPXoyZ_.js +1 -0
- package/dist/assets/vega-flex.entry-668-6FhU.js +1 -0
- package/dist/assets/vega-font.entry-DcCrpbh1.js +1 -0
- package/dist/assets/vega-form.entry-BY-iqkFc.js +1 -0
- package/dist/assets/vega-grid.entry-Dm_eAuM6.js +1 -0
- package/dist/assets/vega-hint.entry-w8vfPncB.js +1 -0
- package/dist/assets/vega-icon.entry-D0_veR1Z.js +19 -0
- package/dist/assets/vega-image-uploader.entry-C1ApH3Dq.js +1 -0
- package/dist/assets/vega-input-credit-card.entry-dGTMeBXb.js +1 -0
- package/dist/assets/vega-input-numeric.entry-DbKsmljR.js +1 -0
- package/dist/assets/vega-input-passcode.entry-AxuvDAd-.js +1 -0
- package/dist/assets/vega-input-phone-number.entry-BiiZYFI1.js +1 -0
- package/dist/assets/vega-input-range.entry-DGIIQve0.js +1 -0
- package/dist/assets/vega-input-select.entry-nlgDZyki.js +1 -0
- package/dist/assets/vega-input.entry-BtU6J85I.js +1 -0
- package/dist/assets/vega-item-toggle.entry-CAUYBFcM.js +1 -0
- package/dist/assets/vega-left-nav_5.entry-DDK5HUna.js +1 -0
- package/dist/assets/vega-line-chart.entry-CyhXfR8n.js +1 -0
- package/dist/assets/vega-loader-wrapper_2.entry-DOe-Q5fc.js +1 -0
- package/dist/assets/vega-page-notification_2.entry-DjquyS0N.js +1 -0
- package/dist/assets/vega-pagination-page-selector-mobile.entry-BDFn5APr.js +1 -0
- package/dist/assets/vega-pagination-page-size-selector-mobile.entry-VDwjbmBP.js +1 -0
- package/dist/assets/vega-pagination.entry-T9P8GzDt.js +1 -0
- package/dist/assets/vega-pie-chart.entry-DXqyhKag.js +1 -0
- package/dist/assets/vega-popover_2.entry-CUnGGq6S.js +1 -0
- package/dist/assets/vega-progress-tracker_2.entry-BN8MMnIz.js +1 -0
- package/dist/assets/vega-radio_2.entry-D3q0-wxn.js +1 -0
- package/dist/assets/vega-rich-text-content.entry-C0oUM9kr.js +3 -0
- package/dist/assets/vega-rich-text-editor_4.entry-CIo_VUmI.js +10 -0
- package/dist/assets/vega-rich-text-special-characters-panel.entry-DGrfdbvp.js +1 -0
- package/dist/assets/vega-rich-text-table-properties_3.entry-D6KltaW8.js +1 -0
- package/dist/assets/vega-section-title.entry-DMRteeP5.js +1 -0
- package/dist/assets/vega-segment-control.entry-BwMgjNjf.js +1 -0
- package/dist/assets/vega-selection-chip_2.entry-BzfGr-t3.js +1 -0
- package/dist/assets/vega-selection-tile_2.entry-D0Rj0qTo.js +1 -0
- package/dist/assets/vega-sidenav_3.entry-CoM3yggu.js +1 -0
- package/dist/assets/vega-signature-capture.entry-DiooBJdu.js +1 -0
- package/dist/assets/vega-skeleton.entry-G3BcZuxx.js +1 -0
- package/dist/assets/vega-slot-container.entry-CJ33BQ0e.js +1 -0
- package/dist/assets/vega-stepper.entry-BrHGbs7A.js +1 -0
- package/dist/assets/vega-tab-group_2.entry-BUeLgXca.js +1 -0
- package/dist/assets/vega-table_11.entry-4Qi4DN0-.js +1 -0
- package/dist/assets/vega-text.entry-BbuifURi.js +1 -0
- package/dist/assets/vega-textarea.entry-62v-CMjF.js +1 -0
- package/dist/assets/vega-time-picker_2.entry-DpI-krpy.js +1 -0
- package/dist/assets/vega-toggle-switch.entry-Dw9nwAY4.js +1 -0
- package/dist/assets/vega-tooltip_2.entry-CL3u7qCj.js +1 -0
- package/dist/assets/video-BNtpQqFj.svg +1 -0
- package/dist/assets/wait-for-component-did-render-b378bf16-B6sxiKZd.js +1 -0
- package/dist/assets/y-axis-input-processor-c7e05353-ChGpmgoo.js +1 -0
- package/dist/assets/zip-B6t6sldd.svg +1 -0
- package/dist/coi-serviceworker.js +2 -0
- package/dist/index.html +21 -0
- package/package.json +34 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f,O as v,C as p,bP as b,M as u,f as d}from"./index-CVS-vjRT.js";var i=function(n,e,t,o){var s=arguments.length,r=s<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,e,t,o);else for(var a=n.length-1;a>=0;a--)(c=n[a])&&(r=(s<3?c(r):s>3?c(e,t,r):c(e,t))||r);return s>3&&r&&Object.defineProperty(e,t,r),r};class l extends f{connectedCallback(){this.observer=new v(this.isAcceptObserver.bind(this),e=>{this.isInDarkMode=e}),p.register(b,this.observer)}disconnectResizeObserver(){p.unregister(b,this.observer)}isAcceptObserver(){return!0}}i([u({writable:!0})],l.prototype,"isInDarkMode",void 0);i([d("connectedCallback")],l.prototype,"connectedCallback",null);i([d("disconnectedCallback")],l.prototype,"disconnectResizeObserver",null);export{l as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{az as s,cI as i}from"./index-CVS-vjRT.js";class a extends s{constructor(e){super(),this.config=e}evaluate(e){if(!this.isAcceptedInputType(e))throw new Error(`Invalid date value ${e} for mode ${this.config.mode}`);let r;switch(this.config.mode){case"single":r=i(e);break;case"range":r=Array.isArray(e)&&e.length===2&&e.every(i);break}return{isValid:r,message:r?"":"This field is required"}}canEvaluate(e,r){return r?this.isAcceptedInputType(e)&&!r.disabled&&r.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){if(e==null)return!0;if(!this.config.mode)throw new Error(`Unexpected type of mode: ${this.config.mode}`);switch(this.config.mode){case"single":return typeof e=="string";case"range":return Array.isArray(e);default:return!1}}}export{a as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a$ as s,a as m,bH as o,aF as l}from"./index-CVS-vjRT.js";class p extends m{constructor({newPropertyName:e,oldPropertyName:t,defaultValue:r}){super(),this.newPropertyName=e,this.oldPropertyName=t,this.defaultValue=r}getValue(){const e=o(this.host,this.newPropertyName),t=o(this.host,this.oldPropertyName);return l(e,this.defaultValue)?t:e}}function u(a,e,t,r){return s(a,p,[{mapFrom:"host",mapTo:"host"}],[],[{newPropertyName:e,oldPropertyName:t,defaultValue:r}])}export{u as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aP as d,aQ as n,aR as i,aS as l,aT as f,L as u,aU as m,aV as c,aW as T,aX as p,aY as s,aZ as y,a_ as $}from"./index-CVS-vjRT.js";import{R as S}from"./responsive-format-facade-51c0c2e1-CSNTrSBX.js";import{S as g,a as h,b as v}from"./state-border-formatter-50394e9c-ByDMiCxI.js";class F{format(r,e){switch(e){case"backgroundColor":return T.format(r);case"borderColor":return v.format(r);case"shadow":return h.format(r);case"border":return g.format(r);default:throw new Error(`Invalid flag ${e} passed into StateFormatFacade`)}}}const b=new F;function o(a,r,e){u.warn(`The ${a} value ${r} is invalid, it must be a value of: `,e)}function t(a,r){let e="";return r.includes("dark")&&(e+=` dark:v-dark-${a}`),e}function C(a){if(f(a))return`v-border-${a}`;o("border-style",a,p)}function A(a,r=[]){if(n(a))return`v-${a}`+t(a,r);o("background-color",a,s.filter(()=>/^bg-.+$/.test))}function x(a,r=[]){if(d(a))return`v-${a}`+t(a,r);o("text-color",a,s.filter(()=>/^text-.+$/.test))}function k(a){if(l(a))return`vega-flex-${a}`;o("breakpoint",a,Object.keys(y))}function R(a,r=[]){if(i(a))return`v-${a}`+t(a,r);o("shadows",a,$)}function I(a,r){if(a!=null)return S.format(a,r)}function L(a){if(m(a))return`v-${a}`;o("font",a,c)}function M(a,r){if(a!=null)return b.format(a,r)}export{A as a,x as b,C as c,M as d,k as e,I as f,R as g,L as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>file_type_docker</title><path d="M18.191,13.071H20.7v2.566H21.97a5.5,5.5,0,0,0,1.744-.292,4.462,4.462,0,0,0,.848-.383,3.149,3.149,0,0,1-.589-1.623,3.427,3.427,0,0,1,.616-2.416l.264-.305.314.253a4,4,0,0,1,1.575,2.538,3.837,3.837,0,0,1,2.913.271l.345.2-.181.354a3.629,3.629,0,0,1-3.648,1.74c-2.173,5.413-6.9,7.976-12.642,7.976A7.958,7.958,0,0,1,6.3,20.211l-.025-.043-.226-.459a7.28,7.28,0,0,1-.579-3.693l.035-.38H7.648V13.071h2.51v-2.51h5.02V8.051h3.012v5.02Z" style="fill:#3a4e55"/><path d="M26.324,14.021A3.311,3.311,0,0,0,24.906,11.2a3.072,3.072,0,0,0,.289,3.821,5.279,5.279,0,0,1-3.225,1.037H5.883a6.779,6.779,0,0,0,.667,3.737l.183.335a6.2,6.2,0,0,0,.379.569h0q.992.064,1.829.045h0a8.972,8.972,0,0,0,2.669-.389.193.193,0,1,1,.126.365c-.09.031-.184.061-.281.088h0a8.4,8.4,0,0,1-1.845.3c.044,0-.046.007-.046.007l-.082.007c-.291.016-.6.02-.925.02-.351,0-.7-.007-1.083-.026l-.01.007a7.882,7.882,0,0,0,6.063,2.41c5.56,0,10.276-2.465,12.365-8,1.482.152,2.906-.226,3.553-1.49a3.5,3.5,0,0,0-3.122-.022" style="fill:#00aada"/><path d="M26.324,14.021A3.311,3.311,0,0,0,24.906,11.2a3.072,3.072,0,0,0,.289,3.821,5.279,5.279,0,0,1-3.225,1.037H6.836a5.223,5.223,0,0,0,2.106,4.686h0a8.972,8.972,0,0,0,2.669-.389.193.193,0,1,1,.126.365c-.09.031-.184.061-.281.088h0a8.83,8.83,0,0,1-1.894.314L9.543,21.1c1.892.971,4.636.967,7.782-.241a21.868,21.868,0,0,0,9.1-6.889l-.1.048" style="fill:#27b9ec"/><path d="M5.913,17.732a6.431,6.431,0,0,0,.637,2.061l.183.335a6.2,6.2,0,0,0,.379.569q.992.064,1.829.045a8.972,8.972,0,0,0,2.669-.389.193.193,0,1,1,.126.365c-.09.031-.184.061-.281.088h0a8.826,8.826,0,0,1-1.891.307l-.1,0c-.291.016-.6.026-.922.026-.351,0-.709-.007-1.1-.026a7.913,7.913,0,0,0,6.076,2.413c4.76,0,8.9-1.807,11.3-5.8Z" style="fill:#088cb9"/><path d="M6.98,17.732a4.832,4.832,0,0,0,1.961,3.01,8.972,8.972,0,0,0,2.669-.389.193.193,0,1,1,.126.365c-.09.031-.184.061-.281.088h0a8.959,8.959,0,0,1-1.9.307c1.892.971,4.628.957,7.773-.252a20.545,20.545,0,0,0,5.377-3.13Z" style="fill:#039cc7"/><path d="M9.889,13.671h.172v1.813H9.889V13.671Zm-.33,0h.179v1.813H9.559V13.671Zm-.33,0h.179v1.813H9.23V13.671Zm-.33,0h.179v1.813H8.9V13.671Zm-.33,0h.179v1.813H8.57V13.671Zm-.323,0h.172v1.813H8.248V13.671Zm-.181-.181h2.175v2.176H8.066V13.49Z" style="fill:#00acd3"/><path d="M12.4,11.161h.172v1.813H12.4V11.161Zm-.33,0h.179v1.813H12.07V11.161Zm-.33,0h.179v1.813H11.74V11.161Zm-.33,0h.179v1.813H11.41V11.161Zm-.33,0h.178v1.813h-.178V11.161Zm-.323,0h.172v1.813h-.172V11.161Zm-.181-.181h2.176v2.176H10.577V10.979Z" style="fill:#00acd3"/><path d="M12.4,13.671h.172v1.813H12.4V13.671Zm-.33,0h.179v1.813H12.07V13.671Zm-.33,0h.179v1.813H11.74V13.671Zm-.33,0h.179v1.813H11.41V13.671Zm-.33,0h.178v1.813h-.178V13.671Zm-.323,0h.172v1.813h-.172V13.671Zm-.181-.181h2.176v2.176H10.577V13.49Z" style="fill:#26c2ee"/><path d="M14.909,13.671h.172v1.813h-.172V13.671Zm-.33,0h.179v1.813H14.58V13.671Zm-.33,0h.179v1.813H14.25V13.671Zm-.33,0H14.1v1.813h-.179V13.671Zm-.33,0h.179v1.813h-.179V13.671Zm-.323,0h.172v1.813h-.172V13.671Zm-.181-.181h2.176v2.176H13.087V13.49Z" style="fill:#00acd3"/><path d="M14.909,11.161h.172v1.813h-.172V11.161Zm-.33,0h.179v1.813H14.58V11.161Zm-.33,0h.179v1.813H14.25V11.161Zm-.33,0H14.1v1.813h-.179V11.161Zm-.33,0h.179v1.813h-.179V11.161Zm-.323,0h.172v1.813h-.172V11.161Zm-.181-.181h2.176v2.176H13.087V10.979Z" style="fill:#26c2ee"/><path d="M17.42,13.671h.172v1.813H17.42V13.671Zm-.33,0h.179v1.813H17.09V13.671Zm-.33,0h.179v1.813H16.76V13.671Zm-.33,0h.179v1.813h-.179V13.671Zm-.33,0h.179v1.813H16.1V13.671Zm-.323,0h.172v1.813h-.172V13.671ZM15.6,13.49h2.176v2.176H15.6V13.49Z" style="fill:#26c2ee"/><path d="M17.42,11.161h.172v1.813H17.42V11.161Zm-.33,0h.179v1.813H17.09V11.161Zm-.33,0h.179v1.813H16.76V11.161Zm-.33,0h.179v1.813h-.179V11.161Zm-.33,0h.179v1.813H16.1V11.161Zm-.323,0h.172v1.813h-.172V11.161Zm-.181-.181h2.176v2.176H15.6V10.979Z" style="fill:#00acd3"/><path d="M17.42,8.65h.172v1.813H17.42V8.65Zm-.33,0h.179v1.813H17.09V8.65Zm-.33,0h.179v1.813H16.76V8.65Zm-.33,0h.179v1.813h-.179V8.65Zm-.33,0h.179v1.813H16.1V8.65Zm-.323,0h.172v1.813h-.172V8.65ZM15.6,8.469h2.176v2.176H15.6V8.469Z" style="fill:#26c2ee"/><path d="M19.93,13.671H20.1v1.813H19.93V13.671Zm-.33,0h.178v1.813H19.6V13.671Zm-.33,0h.179v1.813h-.179V13.671Zm-.33,0h.179v1.813h-.179V13.671Zm-.33,0h.179v1.813h-.179V13.671Zm-.323,0h.172v1.813h-.172V13.671Zm-.181-.181h2.176v2.176H18.107V13.49Z" style="fill:#00acd3"/><path d="M12.616,19.193a.6.6,0,1,1-.6.6.6.6,0,0,1,.6-.6" style="fill:#d5eef2"/><path d="M12.616,19.363a.431.431,0,0,1,.156.029.175.175,0,1,0,.241.236.43.43,0,1,1-.4-.265" style="fill:#3a4e55"/><path d="M2,17.949H29.92c-.608-.154-1.923-.362-1.707-1.159-1.105,1.279-3.771.9-4.444.267-.749,1.087-5.111.674-5.415-.173-.939,1.1-3.85,1.1-4.789,0-.3.847-4.666,1.26-5.415.173-.673.631-3.338,1.012-4.444-.267.217.8-1.1,1.005-1.707,1.159" style="fill:#3a4e55"/><path d="M14.211,23.518a5.287,5.287,0,0,1-2.756-2.711,9.2,9.2,0,0,1-1.987.3q-.436.024-.917.025-.554,0-1.168-.033a7.942,7.942,0,0,0,6.145,2.43q.344,0,.683-.013" style="fill:#c0dbe1"/><path d="M12.007,21.773a5.206,5.206,0,0,1-.552-.966,9.2,9.2,0,0,1-1.987.3,6.325,6.325,0,0,0,2.539.664" style="fill:#d5eef2"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,M as l}from"./index-CVS-vjRT.js";var f=function(i,e,r,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,r,n);else for(var a=i.length-1;a>=0;a--)(t=i[a])&&(o=(s<3?t(o):s>3?t(e,r,o):t(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o};class p extends c{process(e){const r=Array.from(e||[]);if(e&&this.accept&&this.accept!=="*"&&this.accept!=="/*"&&this.accept!=="*/*"){const n=this.accept.split(",");return r.filter(s=>this.validateFileType(s,n))}return r}validateFileType(e,r){const n=e.name,s=(e.type||"").toLowerCase(),o=s.replace(/\/.*$/,"");return r.some(t=>(t=t.trim().toLowerCase(),t.startsWith(".")?n.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):s===t))}}f([l()],p.prototype,"accept",void 0);export{p as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const s=e=>{const t=e.offsetHeight;isNaN(t)||(e.dataset.vegaReflow=t.toString())};function r(e,t,n){let o=0;const i=()=>{t.removeEventListener("transitionend",i),n&&clearTimeout(o),e()};t.addEventListener("transitionend",i),o=n?setTimeout(i,n):0}export{r as e,s as r};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as y,ac as P,z as p,O as x,C as j,cQ as _,cR as B,B as ee,cS as V,D as te,a$ as ie,ad as F,P as ne,L as E,cT as L,u as I,K as oe,w as N,cU as $,cV as z,bw as re,M as c,I as g,f as b}from"./index-CVS-vjRT.js";import{R as q}from"./responsive-format-facade-51c0c2e1-CSNTrSBX.js";var se=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class U{canRetrieve(){return!0}retrieve(){const e=document.body;return this.showConfig.appendableElement.parentElement!==e&&e.append(this.showConfig.appendableElement),e}}se([c()],U.prototype,"showConfig",void 0);class T{canRetrieve(){return!this.showConfig.isScreenPosition}}var ae=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class G extends T{canRetrieve(){return super.canRetrieve()&&!!this.showConfig.positionRelativeTo&&!!document.querySelector(this.showConfig.positionRelativeTo)}retrieve(){const e=document.querySelector(this.showConfig.positionRelativeTo);return this.showConfig.appendableElement.parentElement!==e&&e.append(this.showConfig.appendableElement),e}}ae([c()],G.prototype,"showConfig",void 0);var le=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class Y extends T{canRetrieve(){return super.canRetrieve()&&!!p(this.showConfig.target,"vega-modal")}retrieve(){return this.getVegaModalShowConfigContainer()}setElementSlot(e,t){var n;const o=(n=Array.from(e.children).find(i=>{const r=i.getAttribute("slot");return r&&["content","modal-content"].includes(r)}))===null||n===void 0?void 0:n.getAttribute("slot");o&&t.setAttribute("slot",o)}getVegaModalShowConfigContainer(){const e=p(this.showConfig.target,"vega-modal"),t=e.shadowRoot.querySelector(".vega-modal-content-with-scroll"),n=e.shadowRoot.querySelector(".modal-dialog");return this.setElementSlot(e,this.showConfig.appendableElement),e.append(this.showConfig.appendableElement),t||n}}le([c({writable:!0})],Y.prototype,"showConfig",void 0);var he=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class X extends T{canRetrieve(){return super.canRetrieve()&&!!p(this.showConfig.target,".vega-popover")}retrieve(){const e=p(this.showConfig.target,".vega-popover");return e.append(this.showConfig.appendableElement),e}}he([c()],X.prototype,"showConfig",void 0);var ce=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class Z extends T{canRetrieve(){return this.focusTrapRoot=this.findFocusTrapRoot(this.showConfig.target),!!this.focusTrapRoot}retrieve(){const e=this.focusTrapRoot;return this.focusTrapRoot=null,this.showConfig.appendableElement.parentElement!==e&&e.append(this.showConfig.appendableElement),e}findFocusTrapRoot(e){var t;const n=p(e,'dialog, [aria-modal="true"]');return!n||this.isVegaOwned(n)?null:(t=n.closest('[tabindex="-1"]'))!==null&&t!==void 0?t:n}isVegaOwned(e){return e.tagName.startsWith("VEGA-")}}ce([c()],Z.prototype,"showConfig",void 0);var f=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class u extends y{constructor(){super(...arguments),this.positionRelativeToWrapper=new G,this.vegaPopoverWrapper=new X,this.vegaModalWrapper=new Y,this.thirdPartyDialogWrapper=new Z,this.defaultWrapper=new U}setContainer(){this.setContainerRetrievers();for(const e of this.containerRetrievers)if(e.canRetrieve()){this.container=e.retrieve();return}}setContainerRetrievers(){this.containerRetrievers=[this.positionRelativeToWrapper,this.vegaPopoverWrapper,this.vegaModalWrapper,this.thirdPartyDialogWrapper,this.defaultWrapper]}}f([c({writable:!0})],u.prototype,"container",void 0);f([c({writable:!0})],u.prototype,"showConfig",void 0);f([g()],u.prototype,"positionRelativeToWrapper",void 0);f([g()],u.prototype,"vegaPopoverWrapper",void 0);f([g()],u.prototype,"vegaModalWrapper",void 0);f([g()],u.prototype,"thirdPartyDialogWrapper",void 0);f([g()],u.prototype,"defaultWrapper",void 0);class K extends y{shouldAdjustPosition(){return!0}getPositionBox(e,t){const n=e&&e.length>0?e:this.getPlacements(),o=t&&t.length>0?t:this.getAlignments(),i=this.getTargetBoundBox(),r=this.getElementBoundBox(),s=this.getElementScrollDimension(),l=this.getSuitablePlacement(s,r,i,n),d=l||n[0],m=this.getSuitableAlignment(s,r,i,d,o),k=m||o[0],v=this.calculatePosition(r,i,d,k),W=this.getTranslocationBox(d);return v.placement=l,v.alignment=m,v.left+=W.X,v.top+=W.Y,!this.showConfig.positionRelativeTo&&this.showConfig.isScreenPosition&&this.adjustPositionForViewport(v,r,i,d),v}hasEnoughAlignmentSpace(e,t,n,o,i){if(["top","bottom"].includes(o))switch(i){case"start":return t.left+n.width<=e.width;case"center":return t.left>=(n.width-t.width)/2&&t.left+t.width/2+n.width/2<=e.width;case"end":return t.left+t.width>=n.width}if(["right","left"].includes(o))switch(i){case"start":return t.top+n.height<=e.height;case"center":return t.top>=(n.height-t.height)/2&&t.top+t.height/2+n.height/2<=e.height;case"end":return t.top+t.height>=n.height}return!1}calculateLeft(e,t,n,o){switch(n){case"top":case"bottom":return o==="end"?t.left+t.width-e.width:o==="center"?t.left-(e.width-t.width)/2:t.left;case"left":return t.left-e.width;case"right":return t.left+t.width;default:throw new Error(`Unexpected placement: ${n}. Expected values are top, bottom, left, or right.`)}}calculateTop(e,t,n,o){switch(n){case"left":case"right":return o==="end"?t.top+t.height-e.height:o==="center"?t.top-(e.height-t.height)/2:t.top;case"top":return t.top-e.height;case"bottom":return t.top+t.height;default:throw new Error(`Unexpected placement: ${n}. Expected values are top, bottom, left, or right.`)}}getAlignments(){const e=this.showConfig.alignment;if(typeof e=="string"){const t=$.filter(n=>n!==e);return[e,...t]}else return Array.isArray(e)?e:[...$]}getSuitablePlacement(e,t,n,o){const i=o[0],r=o.find(s=>this.hasEnoughSpace(e,s,n,t));return r||(E.warn(`
|
|
2
|
+
No enough space found for placing element and we will keep using the defined placement:
|
|
3
|
+
${i}
|
|
4
|
+
`),null)}getElementBoundBox(){const e=this.showConfig.appendableElement,t=e.classList.contains("vega-force-hidden");t&&e.classList.remove("vega-force-hidden");const n=e.getBoundingClientRect();return t&&e.classList.add("vega-force-hidden"),{width:n.width,height:n.height,left:n.left,top:n.top}}getPlacements(){const e=this.showConfig.placement;if(typeof e=="string"){const t=z.filter(n=>n!==e);return[e,...t]}else return Array.isArray(e)?e:[...z]}calculatePosition(e,t,n,o){return{top:this.calculateTop(e,t,n,o),left:this.calculateLeft(e,t,n,o)}}keepVerticallyInView(e,t){return Math.max(0,Math.min(e,window.innerHeight-t))}keepHorizontallyInView(e,t){return Math.max(0,Math.min(e,window.innerWidth-t))}isTargetInView(e){const t=window.innerHeight,n=window.innerWidth,o=e.top+e.height,i=e.left+e.width;return e.top<=t&&o>=0&&e.left<=n&&i>=0}adjustPositionForViewport(e,t,n,o){this.isTargetInView(n)&&(o==="top"||o==="bottom"?e.top=this.adjustForVerticalOverflow(e.top,t.height,n.height):(o==="left"||o==="right")&&(e.left=this.adjustForHorizontalOverflow(e.left,t.width,n.width)),e.top=this.keepVerticallyInView(e.top,t.height),e.left=this.keepHorizontallyInView(e.left,t.width))}adjustForVerticalOverflow(e,t,n){const o=e+t-window.innerHeight,i=-e;return o>0&&o<n?e-o:i>0&&i<n?e+i:e}adjustForHorizontalOverflow(e,t,n){const o=e+t-window.innerWidth,i=-e;return o>0&&o<n?e-o:i>0&&i<n?e+i:e}getTranslocationBox(e){const t=Array.isArray(this.showConfig.placement)?this.showConfig.placement[0]:this.showConfig.placement,n=this.getTranslocation(),o={X:0,Y:0};if(re(n)){let i=n.X,r=n.Y;(t&&["left","right"].includes(t)&&["top","bottom"].includes(e)||t&&["top","bottom"].includes(t)&&["left","right"].includes(e))&&(i=n.Y,r=n.X),["bottom","top"].includes(e)&&(o.Y=e==="top"?-r:r,o.X=i),["left","right"].includes(e)&&(o.X=e==="left"?-i:i,o.Y=r)}return o}getSuitableAlignment(e,t,n,o,i){const r=i[0],s=i.find(l=>this.hasEnoughAlignmentSpace(e,n,t,o,l));return s||(E.warn(`
|
|
5
|
+
No enough space found for placing element and we will keep using the defined alignment:
|
|
6
|
+
${r}
|
|
7
|
+
`),null)}hasEnoughSpace(e,t,n,o){switch(t){case"top":return n.top>=o.height;case"bottom":return e.height-n.top-n.height>=o.height;case"left":return n.left>=o.width;case"right":return e.width-n.left-n.width>=o.width;default:return!1}}getTranslocation(){const e=this.showConfig.translocation;return e&&q.format(e,"translocation")}}var Q=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class M extends K{getPosition(){return window.getComputedStyle(this.container).position!=="relative"&&E.warn("Calculate position should make container as 'position: relative', otherwise the result might not be accurate."),this.getPositionBox()}getTargetBoundBox(){const e=this.container.getBoundingClientRect(),t=this.showConfig.target.getBoundingClientRect(),n=t.top-e.top+this.container.scrollTop,o=t.left-e.left+this.container.scrollLeft;return{width:t.width,height:t.height,top:n,left:o}}getElementScrollDimension(){return{width:this.container.scrollWidth,height:this.container.scrollHeight}}}Q([c()],M.prototype,"container",void 0);Q([c()],M.prototype,"showConfig",void 0);class de{constructor(){this.viewportWidth=window.innerWidth,this.viewportHeight=window.innerHeight}shouldUpdatePosition(e){const{previousTargetRect:t,currentTargetRect:n,appendableRect:o,viewportWidth:i,viewportHeight:r}=e;this.viewportWidth=i,this.viewportHeight=r;const s=!t||n.left!==t.left||n.top!==t.top,l=!this.isRectOutsideViewport(n),d=!this.isRectEntirelyWithinViewport(o);return{shouldUpdate:s&&l&&d}}isRectEntirelyWithinViewport(e){return e.left>=0&&e.top>=0&&e.right<=this.viewportWidth&&e.bottom<=this.viewportHeight}isRectOutsideViewport(e){return e.right<=0||e.bottom<=0||e.left>=this.viewportWidth||e.top>=this.viewportHeight}}var ge=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class J extends K{constructor(){super(...arguments),this.scrollFrameRequestId=null,this.usePreviousPlacement=!1,this.scrollPositionUpdateStrategy=new de}shouldAdjustPosition(){return this.scrollFrameRequestId!==null?!1:I.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")?this.previousTargetRect?(this.scrollFrameRequestId=requestAnimationFrame(()=>{var e;this.scrollFrameRequestId=null;let t=window.innerWidth,n=window.innerHeight;if(this.showConfig.positionRelativeTo){const s=(e=oe())===null||e===void 0?void 0:e.querySelector(this.showConfig.positionRelativeTo);s&&(t=s.getBoundingClientRect().width,n=s.getBoundingClientRect().height)}const o=this.showConfig.target.getBoundingClientRect(),i=this.showConfig.appendableElement.getBoundingClientRect(),{shouldUpdate:r}=this.scrollPositionUpdateStrategy.shouldUpdatePosition({currentTargetRect:o,previousTargetRect:this.previousTargetRect,appendableRect:i,viewportWidth:t,viewportHeight:n});this.usePreviousPlacement=!r,this.previousTargetRect=o}),!0):(this.previousTargetRect=this.showConfig.target.getBoundingClientRect(),this.usePreviousPlacement=!1,!0):(this.usePreviousPlacement=!0,!0)}clearScrollFrame(){this.scrollFrameRequestId!==null&&(cancelAnimationFrame(this.scrollFrameRequestId),this.scrollFrameRequestId=null)}getPosition(e){const t=e?this.usePreviousPlacement:!1;let n;return t?(n=this.getPositionBox([this.previousPositionBox.placement].filter(N),[this.previousPositionBox.alignment].filter(N)),I.isEnabled("VEGA_ELEMENT_APPENDER.AUTO_PLACEMENT")||(n.placement=this.previousPositionBox.placement,n.alignment=this.previousPositionBox.alignment)):n=this.getPositionBox(),this.previousPositionBox=n,n}getTargetBoundBox(){const e=this.showConfig.target.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,left:e.left}}getElementScrollDimension(){return{width:window.innerWidth,height:window.innerHeight}}hasEnoughAlignmentSpace(e,t,n,o,i){const r=this.calculateLeft(n,t,o,i),s=this.calculateTop(n,t,o,i);return r>=0&&s>=0&&r+n.width<=e.width&&s+n.height<=e.height}getSuitablePlacement(e,t,n,o){const i=this.getAlignments(),r=o.find(s=>i.some(l=>this.hasEnoughAlignmentSpace(e,n,t,s,l)));return r||super.getSuitablePlacement(e,t,n,o)}}ge([c()],J.prototype,"showConfig",void 0);var A=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class S extends y{constructor(){super(...arguments),this.bodyPositionStrategy=new M,this.screenPositionStrategy=new J}clearScreenPositionScrollFrame(){this.screenPositionStrategy.clearScrollFrame()}setCalculationStrategy(){this.positionStrategy=this.showConfig.isScreenPosition?this.screenPositionStrategy:this.bodyPositionStrategy}adjustPosition(e){this.positionStrategy.shouldAdjustPosition()&&(this.adjustWidth(),this.adjustHeight(),this.applyPosition(this.positionStrategy.getPosition(e)))}applyPosition(e){const t=this.showConfig.appendableElement;this.showConfig.isScreenPosition?t.style.position="fixed":t.classList.contains("date-picker-content-box")&&(t.style.position="absolute"),t.style.left=`${e.left}px`,t.style.top=`${e.top}px`,t.classList.remove("vega-placement-left","vega-placement-right","vega-placement-top","vega-placement-bottom","vega-no-suitable-placement"),t.classList.remove("vega-alignment-start","vega-alignment-center","vega-alignment-end","vega-no-suitable-alignment"),e.placement?t.classList.add(`vega-placement-${e.placement}`):t.classList.add("vega-no-suitable-placement"),e.alignment?t.classList.add(`vega-alignment-${e.alignment}`):t.classList.add("vega-no-suitable-alignment")}adjustWidth(){if(this.showConfig.matchTargetWidth){const{width:e}=this.showConfig.target.getBoundingClientRect();this.setRelatedWidth("width",e)}else this.setRelatedWidth("width",this.showConfig.size),this.setRelatedWidth("minWidth",this.showConfig.minWidth),this.setRelatedWidth("maxWidth",this.showConfig.maxWidth)}setRelatedWidth(e,t){if(!t)return;const n=q.format(t,"size");n&&(this.showConfig.appendableElement.style[e]=typeof n=="number"?`${n}px`:n)}adjustHeight(){if(this.showConfig.matchContainerHeight&&!this.showConfig.isScreenPosition){const{height:e}=this.showConfig.target.getBoundingClientRect();let t=this.container.scrollHeight-this.showConfig.target.offsetTop-e;this.showConfig.maxHeight&&(t=Math.min(t,this.showConfig.maxHeight)),this.showConfig.appendableElement.style.maxHeight=`${t}px`}else this.showConfig.maxHeight&&(this.showConfig.appendableElement.style.maxHeight=`${this.showConfig.maxHeight}px`)}}A([c()],S.prototype,"container",void 0);A([c()],S.prototype,"showConfig",void 0);A([g()],S.prototype,"bodyPositionStrategy",void 0);A([g()],S.prototype,"screenPositionStrategy",void 0);var D=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class h{constructor(e,t){var n;this.resizeObserverSlimmer=ie(h,ne,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"},{mapFrom:"disconnectResizeObserver",mapTo:"disconnectResizeObserver"}],[{callback:()=>{F(this.showConfig.target)&&F(this.showConfig.appendableElement)&&this.adjustPosition()},target:()=>[document.body,this.showConfig.appendableElement,this.showConfig.target]}]),this.elementAppenderContainerController=new u,this.positionCalculationController=new S,this.showConfigCallback=e,this.showConfigCallbackTarget=t;const o=this.getShowConfig();this.hideElementAppender(o.appendableElement),(n=o.appendableElement)===null||n===void 0||n.classList.add("vega-element-appender-appendable")}show(){if(this.positionCalculationController.clearScreenPositionScrollFrame(),this.setShowConfig(),!this.showConfig.target){E.error("No target element found, please add it at new elementAppender.");return}if(!this.showConfig.appendableElement){E.error("No appendable element found, please add it at new elementAppender.");return}this.prepareShow(),this.adjustPosition(),this.setZIndex(),this.toggleShow(!0),this.connectResizeObserver()}hide(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.toggleShow(!1),this.resetContainerPosition(),L.removeZIndex(this.showConfig.appendableElement,"base"))}onScroll(){this.showConfig.isScreenPosition&&this.adjustPosition(!0)}destroy(){this.showConfig&&(this.positionCalculationController.clearScreenPositionScrollFrame(),this.removeVisibleAppendElement(this.showConfig.appendableElement),this.resetContainerPosition(),L.removeZIndex(this.showConfig.appendableElement,"base"),this.showConfig.appendableElement.remove(),this.disconnectResizeObserver())}connectResizeObserver(){}disconnectResizeObserver(){}toggleShow(e){e?(this.showElementAppender(this.showConfig.appendableElement),this.saveVisibleAppendElement(this.showConfig.appendableElement)):(this.hideElementAppender(this.showConfig.appendableElement),this.removeVisibleAppendElement(this.showConfig.appendableElement))}showElementAppender(e){e.classList.contains("date-picker-content-box")?e.style.display="block":e.classList.remove("vega-force-hidden")}hideElementAppender(e){e&&(e.classList.contains("date-picker-content-box")?e.style.display="none":e.classList.add("vega-force-hidden"))}saveVisibleAppendElement(e){const t=h.containerMap.get(this.container);t&&t.visibleAppendElements.add(e)}removeVisibleAppendElement(e){const t=h.containerMap.get(this.container);t&&t.visibleAppendElements.delete(e)}resetContainerPosition(){const e=h.containerMap.get(this.container);if(e){const{visibleAppendElements:t,originPosition:n="static"}=e;t.size===0&&(this.container.style.position=n,h.containerMap.delete(this.container))}}setShowConfig(){this.showConfig=this.getShowConfig(),this.showConfig=Object.assign({matchTargetWidth:!1,matchContainerHeight:!1},this.showConfig),this.showConfig.target&&this.showConfig.appendableElement&&this.elementAppenderContainerController.setContainer()}prepareShow(){this.showConfig.isScreenPosition||this.initVisibleAppendElement(),this.showConfig.appendableElement.style.boxSizing="border-box",this.positionCalculationController.setCalculationStrategy()}initVisibleAppendElement(){const t=window.getComputedStyle(this.container).position;h.containerMap.has(this.container)||h.containerMap.set(this.container,{visibleAppendElements:new Set,originPosition:t}),t==="static"&&(this.container.style.position="relative")}adjustPosition(e){this.positionCalculationController.adjustPosition(e)}setZIndex(){L.setZIndex(this.showConfig.appendableElement,"base")}getShowConfig(){return this.showConfigCallback instanceof Function?this.showConfigCallback(this.showConfigCallbackTarget):this.showConfigCallback}}h.containerMap=new Map;D([g()],h.prototype,"resizeObserverSlimmer",void 0);D([g()],h.prototype,"elementAppenderContainerController",void 0);D([g()],h.prototype,"positionCalculationController",void 0);var H=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i},C;(function(a){a.SHOW="show",a.HIDE="hide"})(C||(C={}));class R extends y{constructor(e){super(),this.childrenEA=[],this.currentEA=e}componentDidLoad(){this.register()}onShow(){this.notify(C.SHOW)}onHide(){this.notify(C.HIDE)}getParent(){return this.parentEA}getChildren(){return this.childrenEA}notify(e){const t=p(this.showConfig.target,".vega-element-appender-appendable");t&&j.notify(ee.getSubject(t,V),{type:e,child:this.currentEA,callback:n=>{this.parentEA=n}})}register(){this.showConfig&&te.addUniqueObserverToNode(this.showConfig.appendableElement,V,e=>{e.type===C.SHOW?this.childrenEA.push(e.child):e.type===C.HIDE&&(this.childrenEA=this.childrenEA.filter(t=>t!==e.child)),e.callback(this.currentEA)})}}H([c()],R.prototype,"showConfig",void 0);H([b("componentDidLoad")],R.prototype,"componentDidLoad",null);H([b("show")],R.prototype,"onShow",null);H([b("hide")],R.prototype,"onHide",null);class pe{canEvaluate(e){return e==="target-click"||e==="click-outside"}evaluate(e){return e.eventType==="target-click"?{nextAction:e.currentState.isVisible?"hide":"show"}:e.eventType==="click-outside"&&e.currentState.isVisible?{nextAction:"hide"}:{}}}class ue{canEvaluate(e){return["target-mouseenter","target-mouseleave","element-mouseenter","element-mouseleave"].includes(e)}evaluate(e){return["target-mouseenter","element-mouseenter"].includes(e.eventType)?e.currentState.isVisible?{}:{nextAction:"show"}:["target-mouseleave","element-mouseleave"].includes(e.eventType)?{nextAction:"hide"}:{}}}class fe{canEvaluate(){return!1}evaluate(){return{}}}var O=function(a,e,t,n){var o=arguments.length,i=o<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,n);else for(var s=a.length-1;s>=0;s--)(r=a[s])&&(i=(o<3?r(i):o>3?r(e,t,i):r(e,t))||i);return o>3&&i&&Object.defineProperty(e,t,i),i};class w extends y{constructor(e,t,n="isDropdownShow",o=()=>!1){super(),this.hierarchyTreeManager=new R(this),this.registerElementAppenderListener=()=>{var i,r,s,l,d,m;this.unRegisterElementAppenderListener(),this.showConfig&&((i=this.showConfig.target)===null||i===void 0||i.addEventListener("click",this.targetClickHandler),(r=this.showConfig.target)===null||r===void 0||r.addEventListener("mouseenter",this.targetMouseEnterHandler),(s=this.showConfig.target)===null||s===void 0||s.addEventListener("mouseleave",this.targetMouseLeaveHandler),(l=this.showConfig.target)===null||l===void 0||l.addEventListener("focusout",this.targetFocusoutHandler),(d=this.showConfig.appendableElement)===null||d===void 0||d.addEventListener("mouseenter",this.elementMouseEnterHandler),(m=this.showConfig.appendableElement)===null||m===void 0||m.addEventListener("mouseleave",this.elementMouseLeaveHandler)),window.addEventListener("mousedown",this.globalMouseDownHandler),document.addEventListener("scroll",this.globalScrollHandler,{capture:!0}),this.listenShadowRootElementScrolling()},this.targetClickHandler=i=>{const r=this.getTriggerStrategy();r.canEvaluate("target-click")&&this.executeTriggerStrategy(r,i,"target-click")},this.targetMouseEnterHandler=i=>{const r=this.getTriggerStrategy();r.canEvaluate("target-mouseenter")&&(this.executeTriggerStrategy(r,i,"target-mouseenter"),this.clearDelayHideTimer())},this.targetMouseLeaveHandler=i=>{this.getTriggerStrategy().canEvaluate("target-mouseleave")&&this.createDelayHideTimer(i,"target-mouseleave")},this.targetFocusoutHandler=i=>{var r;P(i.relatedTarget,(r=this.showConfig)===null||r===void 0?void 0:r.appendableElement)||this.targetMouseLeaveHandler(i)},this.elementMouseEnterHandler=()=>{var i;(i=this.hierarchyTreeManager.getParent())===null||i===void 0||i.elementMouseEnterHandler(),this.getTriggerStrategy().canEvaluate("element-mouseenter")&&!this.disableInteractiveGetter()&&this.clearDelayHideTimer()},this.elementMouseLeaveHandler=i=>{var r;(r=this.hierarchyTreeManager.getParent())===null||r===void 0||r.elementMouseLeaveHandler(i),this.getTriggerStrategy().canEvaluate("element-mouseleave")&&!this.disableInteractiveGetter()&&this.createDelayHideTimer(i,"element-mouseleave")},this.globalMouseDownHandler=i=>{const r=i.composedPath()[0],s=this.hierarchyTreeManager.getChildren().some(d=>d.isShowing()),l=this.getTriggerStrategy();!s&&l.canEvaluate("click-outside")&&this.showConfig&&!P(r,this.showConfig.appendableElement)&&!P(r,this.showConfig.target)&&(this.showConfig.isScreenPosition||p(r,"vega-modal")===p(this.showConfig.target,"vega-modal"))&&this.executeTriggerStrategy(l,i,"click-outside")},this.globalScrollHandler=()=>{var i;this.showConfig&&this.showConfig.isScreenPosition&&this.isShowing()&&((i=this.elementAppender)===null||i===void 0||i.onScroll())},this.createDelayHideTimer=(i,r)=>{const s=this.getTriggerStrategy();this.delayHideTimer=setTimeout(()=>{this.executeTriggerStrategy(s,i,r),clearTimeout(this.delayHideTimer)},w.DELAY_HIDE_TIME)},this.clearDelayHideTimer=()=>{this.delayHideTimer&&clearTimeout(this.delayHideTimer)},this.executeTriggerStrategy=(i,r,s)=>{if(this.showConfig){const l=i.evaluate({target:this.showConfig.target,appendableElement:this.showConfig.appendableElement,htmlEvent:r,eventType:s,currentState:{isVisible:this.isShowing()}});l&&(l.nextAction==="hide"&&this.hide(),l.nextAction==="show"&&this.show())}},this.showConfigFactory=e,this.getTrigger=t,this.isDropdownShowName=n,this.disableInteractiveGetter=o}connectedCallback(){this.elementAppender===null&&(this.setElementAppender(),this.registerElementAppenderListener())}disconnectedCallback(){this.unRegisterElementAppenderListener(),this.destroyElementAppender()}componentDidLoad(){this.initElementAppender()}getElementAppender(){return this.elementAppender}show(){this.elementAppender&&this.elementAppender.show(),this[this.isDropdownShowName]=!0,this.setAriaOwns()}hide(){this.elementAppender&&this.elementAppender.hide(),this[this.isDropdownShowName]=!1,this.hierarchyTreeManager.getChildren().map(e=>{e.hide()})}destroy(){this.removeAriaOwns(),this.destroyElementAppender(),this[this.isDropdownShowName]=!1}updateShowConfigFactory(e){this.showConfigFactory=e,this.initElementAppender()}destroyElementAppender(){this.elementAppender&&(this.elementAppender.destroy(),this.elementAppender=null)}initElementAppender(){this.setShowConfig(),this.setElementAppender(),this.registerElementAppenderListener()}setElementAppender(){this.elementAppender=new h(this.showConfigFactory,this)}isShowing(){return this[this.isDropdownShowName]}setShowConfig(){this.showConfig=this.showConfigFactory()}unRegisterElementAppenderListener(){var e,t,n,o,i,r;this.showConfig&&((e=this.showConfig.target)===null||e===void 0||e.removeEventListener("click",this.targetClickHandler),(t=this.showConfig.target)===null||t===void 0||t.removeEventListener("mouseenter",this.targetMouseEnterHandler),(n=this.showConfig.target)===null||n===void 0||n.removeEventListener("mouseleave",this.targetMouseLeaveHandler),(o=this.showConfig.target)===null||o===void 0||o.removeEventListener("focusout",this.targetMouseLeaveHandler),(i=this.showConfig.appendableElement)===null||i===void 0||i.removeEventListener("mouseenter",this.elementMouseEnterHandler),(r=this.showConfig.appendableElement)===null||r===void 0||r.removeEventListener("mouseleave",this.elementMouseLeaveHandler)),window.removeEventListener("mousedown",this.globalMouseDownHandler),document.removeEventListener("scroll",this.globalScrollHandler),this.removeShadowRootElementScrolling()}listenShadowRootElementScrolling(){this.shadowRootElementScrollingObserver=new x(this.canAcceptShadowRootScrollEvent.bind(this),this.globalScrollHandler.bind(this)),j.register(_,this.shadowRootElementScrollingObserver)}canAcceptShadowRootScrollEvent(e){return!!(this.showConfig&&P(this.showConfig.target,e.host))}removeShadowRootElementScrolling(){j.unregister(_,this.shadowRootElementScrollingObserver)}getTriggerStrategy(){const e=this.getTrigger();return e==="click"?new pe:e==="hover"?new ue:B(e)?e:new fe}setAriaOwns(){if(this.showConfig){const e=this.showConfig.target,t=this.showConfig.appendableElement;e&&t&&(e.ariaOwnsElements=[t])}}removeAriaOwns(){var e;!((e=this.showConfig)===null||e===void 0)&&e.target&&(this.showConfig.target.ariaOwnsElements=[])}}w.DELAY_HIDE_TIME=100;O([g()],w.prototype,"hierarchyTreeManager",void 0);O([b("connectedCallback")],w.prototype,"connectedCallback",null);O([b("disconnectedCallback")],w.prototype,"disconnectedCallback",null);O([b("componentDidLoad")],w.prototype,"componentDidLoad",null);export{w as E};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a$ as g,a as v,C as D,B as b,b0 as y,D as H,K as j,b1 as f,M as l,I as c}from"./index-CVS-vjRT.js";var p=function(o,e,t,r){var i=arguments.length,n=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(o,e,t,r);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(n=(i<3?a(n):i>3?a(e,t,n):a(e,t))||n);return i>3&&n&&Object.defineProperty(e,t,n),n};class h extends v{constructor(){super(...arguments),this.canHandle=({namespace:e})=>e==="vega"||!this.nativeEvent||typeof this.nativeEvent.emit!="function",this.handle=e=>this.vegaEvent.emit(e)}}p([l()],h.prototype,"vegaEvent",void 0);p([l()],h.prototype,"nativeEvent",void 0);var O=function(o,e,t,r){var i=arguments.length,n=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(o,e,t,r);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(n=(i<3?a(n):i>3?a(e,t,n):a(e,t))||n);return i>3&&n&&Object.defineProperty(e,t,n),n};class d extends v{constructor(){super(...arguments),this.canHandle=({namespace:e})=>e==="native",this.handle=(e,t)=>(t&&t.stopPropagation(),this.nativeEvent.emit(e))}}O([l()],d.prototype,"nativeEvent",void 0);var N=function(o,e,t,r){var i=arguments.length,n=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(o,e,t,r);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(n=(i<3?a(n):i>3?a(e,t,n):a(e,t))||n);return i>3&&n&&Object.defineProperty(e,t,n),n};class E extends v{constructor(){super(...arguments),this.canHandle=({namespace:e,jqueryDelegatedEvent:t})=>e==="native"&&!!t&&f.isSupportDelegated(this.host,this.eventID),this.handle=(e,t)=>{const r=f.getStrategy(this.host,this.eventID);if(r)return t&&t.stopPropagation(),r.handle(this.host,e)}}setEventID(e){this.eventID=e}}N([l()],E.prototype,"host",void 0);var u=function(o,e,t,r){var i=arguments.length,n=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(o,e,t,r);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(n=(i<3?a(n):i>3?a(e,t,n):a(e,t))||n);return i>3&&n&&Object.defineProperty(e,t,n),n};class m extends v{constructor({eventID:e}){super(),this.vegaEventEmitHandler=new h,this.nativeEventEmitHandler=new d,this.jqueryDelegatedEventEmitHandler=new E,this.emit=(t,r)=>{let i=!1;D.notify(b.getSubject(this.host,this.eventID),{host:this.host,detail:t,eventName:this.eventName,preventDefault:()=>{i=!0}});const n=y.getSemantics(this.host);let a;for(const s of this.eventHandlers)if(s.canHandle(n)){a=s.handle(t,r);break}return a&&i&&a.preventDefault(),a},this.removeObserverFromHost=()=>{Promise.resolve(!0).then(()=>{this.isNodeRemovedFromDocument(this.host)&&H.removeUniqueObserverFromNode(this.host,this.eventID)})},this.eventID=e,this.eventName=e.getVegaName(),this.initialEventHandlers()}isNodeRemovedFromDocument(e){var t;return!!(e&&!(!((t=j())===null||t===void 0)&&t.body.contains(e))&&!e.parentNode)}initialEventHandlers(){this.jqueryDelegatedEventEmitHandler.setEventID(this.eventID),this.eventHandlers=[this.vegaEventEmitHandler,this.jqueryDelegatedEventEmitHandler,this.nativeEventEmitHandler]}}u([c()],m.prototype,"vegaEventEmitHandler",void 0);u([c()],m.prototype,"nativeEventEmitHandler",void 0);u([c()],m.prototype,"jqueryDelegatedEventEmitHandler",void 0);function R(o,e,t){const r=e.getVegaName(),i=t||e.getNativeName();return g(o,m,[{mapFrom:"host",mapTo:"host"},{mapFrom:r,mapTo:"vegaEvent"},{mapFrom:i,mapTo:"nativeEvent",isOptional:!0}],[{mapFrom:"disconnectedCallback",mapTo:"removeObserverFromHost"}],[{eventID:e}])}export{R as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as r}from"./required-field-rule-ab4bdc47-BVWO4gts.js";class o extends r{constructor(){super(...arguments),this.checkArrayItemType=e=>!!(e&&typeof e=="object")}}export{o as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
async function d(t,n=""){try{const o=await t.text(),i=t.webkitRelativePath||t.name,s=n?`${n}/${i}`:i;return console.log("[fileDropUtils] Read file:",{fileName:i,basePath:n,path:s,contentLength:o.length}),{path:s,content:o}}catch(o){return console.warn("[fileDropUtils] Failed to read file:",t.name,o),null}}async function D(t,n=""){console.log("[fileDropUtils] readDroppedEntries called",{entriesLength:t.length,basePath:n});const o={},i=[],s=async(e,a="")=>{if(console.log("[fileDropUtils] Processing entry:",{name:e.name,isFile:e.isFile,isDirectory:e.isDirectory,currentPath:a}),e.isFile){const p=e;await new Promise(c=>{p.file(async r=>{const l=await d(r,a);l&&(o[l.path]=l.content),c()},r=>{console.error("[fileDropUtils] Failed to get file from entry:",e.name,r),c()})})}else if(e.isDirectory){const p=e,c=a?`${a}/${e.name}`:e.name,r=p.createReader();await new Promise(l=>{r.readEntries(async f=>{console.log(`[fileDropUtils] Directory "${e.name}" has ${f.length} entries`);for(const m of f)await s(m,c);l()},f=>{console.error("[fileDropUtils] Failed to read directory entries:",e.name,f),l()})})}};for(const e of t)i.push(s(e,n));return await Promise.all(i),console.log("[fileDropUtils] readDroppedEntries completed",{fileCount:Object.keys(o).length,files:Object.keys(o)}),o}async function g(t,n=""){const o={};for(let i=0;i<t.length;i++){const s=t[i],e=await d(s,n);e&&(o[e.path]=e.content)}return o}export{D as readDroppedEntries,g as readFilesFromFileList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as E,C as d,a8 as z,bI as K,O as C,a3 as D,D as L,ae as U,a$ as k,z as F,P as W,ab as _,aa as $,U as j,a9 as H,ad as q,B as S,E as X,az as J,bJ as N,s as P,a1 as B,bK as Q,aw as G,bL as Y,bM as Z,I as m,M as c,f}from"./index-CVS-vjRT.js";import{M as ee}from"./mutation-observer-slimmer-58ebc13c-m99uIPjN.js";import{A as te}from"./mutation-observer-filters-1a054fb0-CJhfq3iU.js";import{b as re}from"./array-7888f339-BUzRhXHn.js";import{S as ie}from"./sub-state-observer-slimmer-d924288a-Dvj3sSUI.js";class se{constructor(e){this.rule=e}getStatus(e,t,r){return{canEvaluate:this.rule.canEvaluate(e,t,r),isAsync:Z(this.rule.evaluate)}}shouldShowError(e,t){try{return this.rule.shouldShowError?this.rule.shouldShowError(e,t):this.defaultShouldShowError(e)}catch{return!1}}handle(e){try{return this.rule.evaluate(e)}catch{return{isValid:!0,message:""}}}defaultShouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}}class oe{constructor(){this.handlers=[],this.processId=""}checkIncludesAsyncRuleHandler(e,t,r){return!!this.handlers.find(i=>{const o=i.getStatus(e,t,r);return o.canEvaluate&&o.isAsync})}setHandlersByRules(e){e&&e.length?this.handlers=e.map(t=>new se(t)):this.handlers=[]}async process(e,t,r,s,i){const o=this.preProcess();let n;for(const u of this.handlers){if(o!==this.processId)break;const p=u.getStatus(e,t,r);if(!p.canEvaluate)continue;let g;if(p.isAsync)try{g=await u.handle(e)}catch{}else g=u.handle(e);if(g&&!g.isValid){const w=u.shouldShowError(t,r);n=Object.assign(Object.assign({},g),{shouldShowError:w});break}}return this.postProcess(o,s,n,i),n?{isValid:!1,message:n.message}:{isValid:!0,message:""}}preProcess(){const e=Y();return this.processId=e,e}postProcess(e,t,r,s){this.processId===e&&s(t,r)}}class ne{run(e){const t=e.nextElementSibling;return t&&t.querySelector(".vega-error")?t.querySelector(".vega-error"):null}}class ae{run(e){let t=e.nextElementSibling;return t&&!t.classList.contains("vega-error")&&(t=document.createElement("label"),t.classList.add("vega-error"),t.setAttribute("part","field-error-message"),e.after(t)),t}}class le{run(e){let t=e.nextElementSibling;return t||(t=document.createElement("label"),t.classList.add("vega-error"),t.setAttribute("part","field-error-message"),e.after(t)),t}}class x extends E{getTranslatedMessage(e){return typeof e=="string"?G.t(e):G.t(e.key,...e.args||[])}}var A=function(a,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,r);else for(var n=a.length-1;n>=0;n--)(o=a[n])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};class R extends E{constructor(){super(),this.formFieldMessageTranslatorSlimmer=new x,this.fieldErrorUiControllerStrategies=[new ne,new ae,new le],this.initTranslationObserver()}applyInputInvalidUI(e){const t=this.getInputElementContainer();if(d.notify(S.getSubject(this.host,N),{host:this.host,showError:!0}),t&&(t.classList.add("error"),e)){this.errorMessage=e;const r=this.getErrorContainer(t);r.innerHTML=P.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(e),B),r.classList.remove("vega-hidden")}}resetInputInvalidUI(){this.errorMessage="";const e=this.getInputElementContainer();e&&(this.getErrorContainer(e).classList.add("vega-hidden"),e.classList.remove("error"),d.notify(S.getSubject(this.host,N),{host:this.host,showError:!1}))}getInputElementContainer(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}getErrorContainer(e){for(const t of this.fieldErrorUiControllerStrategies){const r=t.run(e);if(r)return r}}initTranslationObserver(){const e=new C(this.isAcceptableTranslationObserver.bind(this),()=>{if(!this.errorMessage)return;const t=this.getInputElementContainer();if(t){const r=this.getErrorContainer(t);r&&(r.innerHTML=P.sanitize(this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(this.errorMessage),B))}});d.register(Q,e)}isAcceptableTranslationObserver(){return!0}}A([m()],R.prototype,"formFieldMessageTranslatorSlimmer",void 0);A([c()],R.prototype,"host",void 0);A([c()],R.prototype,"options",void 0);var M=function(a,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,r);else for(var n=a.length-1;n>=0;n--)(o=a[n])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};class v{constructor(e,t,r,s){var i,o;this.formFieldMessageTranslatorSlimmer=new x,this.fieldErrorUIController=new R,this.resizeObserverSlimmer=k(v,W,[],[{mapFrom:"connectResizeObserver",mapTo:"connectResizeObserver"}],[{callback:n=>{const u=this.isVisible,p=n[0].contentRect.height>0;this.isVisible=p,this.isAutoValidationEnabled()&&F(this.host,"vega-form")&&u!==p&&this.valid(["visible"])},target:()=>this.host}]),this.defaultRules=[],this.additionalRules=[],this.listeners=[],this.isTouched=!1,this.isModified=!1,this.isVisible=!1,this.formFieldValidationRuleHandlerChain=new oe,this.hostChildAddedBlurEventMap=new WeakMap,this.handleValidationResult=(n,u)=>{let p=!0;return u?(n==="rule"?u.shouldShowError?this.fieldErrorUIController.applyInputInvalidUI(u.message):this.fieldErrorUIController.resetInputInvalidUI():n?this.fieldErrorUIController.applyInputInvalidUI(u.message):this.fieldErrorUIController.resetInputInvalidUI(),p=!1):this.fieldErrorUIController.resetInputInvalidUI(),this.invokeListeners(p),d.notify(_,{host:this.host,detail:p}),p},this.setupTouchedListener=()=>{this.getTouchableAreaElements().filter(n=>n&&this.hostChildAddedBlurEventMap.get(n)!==!0).forEach(n=>{n.addEventListener("blur",()=>{this.updateIsTouched(!0)}),this.hostChildAddedBlurEventMap.set(n,!0)})},this.defaultRules=e||[],this.host=t,this.defaultValue=r,this.options=s,this.initDisabledAttrObserver(),this.connectResizeObserver(),this.initFormResetObserver(),(o=(i=this.host).componentOnReady)===null||o===void 0||o.call(i).then(()=>{this.didRender()}),this.setupModifiedListener(),this.listenHostElementKeydown(),this.updateValidationHandlers()}async validate(e){return await this.valid([],e)}addListener(e){this.listeners.push(e)}getRules(){const e=[...this.additionalRules];return[...this.defaultRules.map(r=>this.overrideDefaultRuleByAdditionalRule(r,e)),...e]}setDefaultRules(e){this.defaultRules=e,this.updateValidationHandlers()}setAdditionalRules(e){this.additionalRules=e,this.updateValidationHandlers()}destroy(){d.notify($,{host:this.host}),this.unregisterFormResetObserver(),d.unregister(j,this.hostValueChangeObserver),this.hostChildrenObserver&&this.hostChildrenObserver.disconnect()}connectResizeObserver(){}updateDisableBlurValidation(e){this.disableBlurValidation=e}updateValidationHandlers(){this.formFieldValidationRuleHandlerChain.setHandlersByRules(this.getRules())}async valid(e,t="rule"){const r=this.getStatus(),s=this.host.value;this.formFieldValidationRuleHandlerChain.checkIncludesAsyncRuleHandler(s,r,e)&&d.notify(_,{host:this.host,detail:null});const{isValid:o,message:n}=await this.formFieldValidationRuleHandlerChain.process(s,r,e,t,this.handleValidationResult),u=this.formFieldMessageTranslatorSlimmer.getTranslatedMessage(n);return{isValid:o,message:u}}invokeListeners(e){this.listeners.forEach(t=>t.callback(e))}getStatus(){return{touched:this.isTouched,modified:this.isModified,disabled:this.host.disabled,visible:this.isVisible}}updateIsTouched(e){const t=this.isTouched;this.isTouched=e,!this.disableBlurValidation&&this.isAutoValidationEnabled()&&this.valid(t===e?[]:["touched"])}updateIsModified(e){const t=this.isModified;this.isModified=e,this.isAutoValidationEnabled()&&this.valid(t===e?[]:["modified"])}initDisabledAttrObserver(){this.disabledAttrObserver=new MutationObserver(()=>{this.isAutoValidationEnabled()&&this.valid(["disabled"])}),this.disabledAttrObserver.observe(this.host,{attributes:!0,attributeFilter:["disabled"]})}canAcceptFormResetOperation(e){return F(this.host,"vega-form")===e.host}unregisterFormResetObserver(){d.unregister(H,this.formResetTriggeredObserver)}monitorTouchedListener(){const e=this.getInputContainerElements();e&&(this.hostChildrenObserver=new MutationObserver(()=>{this.setupTouchedListener()}),this.hostChildrenObserver.observe(e,{childList:!0,subtree:!0})),this.setupTouchedListener()}getTouchableAreaElements(){return this.options&&this.options.touchableAreaGetter?this.options.touchableAreaGetter():[]}getInputContainerElements(){return this.options&&this.options.inputContainerGetter?this.options.inputContainerGetter():null}setupModifiedListener(){this.hostValueChangeObserver=new C(this.isCurrentTarget.bind(this),()=>this.updateIsModified(!0)),d.register(j,this.hostValueChangeObserver)}isCurrentTarget(e){return this.host===e.host}async reset(e){var t,r;if(this.shouldVisitElement(this.host,(t=e.option)===null||t===void 0?void 0:t.skipDisabled,(r=e.option)===null||r===void 0?void 0:r.skipInvisible)){const s=e.defaultValueMap,i=this.host.dataset.vegaForm,o=s[i]===void 0||s[i]===null?this.getDefaultValue():s[i];typeof this.host.setValue=="function"?await this.host.setValue(o):this.host.value=o,this.isTouched=!1,this.isModified=!1,this.fieldErrorUIController.resetInputInvalidUI()}}getDefaultValue(){return this.defaultValue instanceof Function?this.defaultValue(this.host):this.defaultValue}didRender(){this.monitorTouchedListener()}initFormResetObserver(){this.formResetTriggeredObserver=new C(this.canAcceptFormResetOperation.bind(this),this.reset.bind(this)),d.register(H,this.formResetTriggeredObserver)}isAutoValidationEnabled(){return this.host.autoValidation!==!1}shouldVisitElement(e,t,r){return!!(e.dataset.vegaForm&&(!t||!e.disabled)&&(!r||q(e)))}listenHostElementKeydown(){this.host.addEventListener("keydown",e=>{if(this.canSubmitFormByEvent(e)){const t=F(this.host,"vega-form",{outerMost:!0});t&&d.notify(S.getSubject(t,X),{host:this.host})}})}canSubmitFormByEvent(e){const t=e.key==="Enter"||e.keyCode===13,r=t&&e.shiftKey;switch(this.host.tagName){case"VEGA-TEXTAREA":case"VEGA-DATE-PICKER":case"VEGA-TIME-PICKER":return r&&e.preventDefault(),r;case"VEGA-RICH-TEXT-EDITOR":return!1;default:return t}}overrideDefaultRuleByAdditionalRule(e,t){if(e&&t){const r=t.findIndex(s=>s instanceof J&&s instanceof e.constructor&&s.overrideDefault);if(r>-1)return t.splice(r,1)[0]}return e}}M([m()],v.prototype,"formFieldMessageTranslatorSlimmer",void 0);M([m()],v.prototype,"fieldErrorUIController",void 0);M([m()],v.prototype,"resizeObserverSlimmer",void 0);var I=function(a,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,r);else for(var n=a.length-1;n>=0;n--)(o=a[n])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};class b extends E{constructor(){super(...arguments),this.fieldErrorUIController=new R,this.handleFieldErrorMessageUpdate=e=>{const{message:t,isValid:r}=e;r?this.fieldErrorUIController.resetInputInvalidUI():this.fieldErrorUIController.applyInputInvalidUI(t)}}handleComponentWillLoadByFieldErrorSlimmer(){this.fieldErrorMessageChangeObserver=new C(this.canAcceptFieldErrorMessageUpdate.bind(this),this.handleFieldErrorMessageUpdate),d.register(D,this.fieldErrorMessageChangeObserver)}handleUnregisterObserver(){d.unregister(D,this.fieldErrorMessageChangeObserver)}canAcceptFieldErrorMessageUpdate(e){const{host:t}=e,r=this.host.parentElement;return r&&r===t&&r.tagName==="VEGA-FIELD-ERROR"||this.host===t}}I([c()],b.prototype,"host",void 0);I([c()],b.prototype,"options",void 0);I([m()],b.prototype,"fieldErrorUIController",void 0);I([f("setInjectFormFieldHelper")],b.prototype,"handleComponentWillLoadByFieldErrorSlimmer",null);I([f("disconnectedCallback")],b.prototype,"handleUnregisterObserver",null);var V=function(a,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,r);else for(var n=a.length-1;n>=0;n--)(o=a[n])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};class y extends E{constructor(){super(...arguments),this.handleValidInvocation=async e=>{if(this.validator){e.timerId!==void 0&&clearTimeout(e.timerId);const t=await this.validator.validate(e.message);if(t){const{isValid:r,message:s}=t;typeof e.promiseResolve=="function"&&e.promiseResolve({isValid:r,message:s})}}}}registerValidInvocationObserver(){L.addUniqueObserverToNode(this.host,U,this.handleValidInvocation)}handleUnregisterObserver(){L.removeUniqueObserverFromNode(this.host,U)}}V([c()],y.prototype,"host",void 0);V([c()],y.prototype,"validator",void 0);V([f("setInjectFormFieldHelper")],y.prototype,"registerValidInvocationObserver",null);V([f("disconnectedCallback")],y.prototype,"handleUnregisterObserver",null);var T=function(a,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,r);else for(var n=a.length-1;n>=0;n--)(o=a[n])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};class O extends ie{constructor(){super({parent:"vega-form",subStates:[{subStateName:"disableBlurValidation",parentStateName:"disableBlurValidation",callback:e=>{var t;(t=this.validator)===null||t===void 0||t.updateDisableBlurValidation(e)}}]})}componentWillLoad(){super.componentWillLoad()}}T([c()],O.prototype,"host",void 0);T([c()],O.prototype,"validator",void 0);T([f("setInjectFormFieldHelper")],O.prototype,"componentWillLoad",null);var h=function(a,e,t,r){var s=arguments.length,i=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(a,e,t,r);else for(var n=a.length-1;n>=0;n--)(o=a[n])&&(i=(s<3?o(i):s>3?o(e,t,i):o(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i};class l extends E{constructor(e){super(),this.fieldErrorSlimmer=new b,this.formFieldValidInvokeSlimmer=new y,this.formFormStateController=new O,this.mutationObserverCallBack=()=>{this.validator&&(this.setDefaultRules(),this.internalValidate())},this.options=e,this.setMutationObserverSlimmer()}connectedCallback(){this.validator===null&&this.setInjectFormFieldHelper()}disconnectedCallback(){this.validator&&(this.validator.destroy(),this.validator=null)}componentDidLoad(){}static isValidFormField(e){return e&&!!e.getAttribute("data-vega-form")}watchValidationRulesByFormControllerSlimmer(e,t){re(e,t,!1,(r,s)=>r===s?0:-1)||(this.setAdditionalRules(),this.internalValidate())}setInjectFormFieldHelper(){if(l.isValidFormField(this.host)){const{defaultValue:e}=this.options,t=new v(this.getPropertyRules(),this.host,e,this.options);t.addListener({callback:r=>{this.isValid!=r&&(this.isValid=r,d.notify(z,{host:this.host,detail:r}))}}),this.validator=t,this.setAdditionalRules()}}setAdditionalRules(){this.options.validationRulesName&&this.options.validationRulesName==="validationRules"&&this.validator&&this.validator.setAdditionalRules(this.validationRules||[])}setDefaultRules(){this.validator&&this.validator.setDefaultRules(this.getPropertyRules())}getPropertyRules(){const{propertyRules:e,attributeGetter:t}=this.options;return e.map(r=>{const s=r.dependence&&typeof r.dependence=="string"?[t(r.dependence)]:Array.isArray(r.dependence)?r.dependence.map(i=>t(i)):[null];return r.ruleFactory(t(r.propertyName),...s)}).filter(Boolean)}internalValidate(){!this.disabled&&this.validator&&this.validator.validate()}setMutationObserverSlimmer(){this.mutationObserverSlimmer=new ee({options:{attributeFilter:this.options.propertyRules.map(e=>K(e.propertyName)),attributeOldValue:!0},mutationFilter:te(),callback:this.mutationObserverCallBack})}}h([c()],l.prototype,"host",void 0);h([c({writable:!0})],l.prototype,"validationRules",void 0);h([c()],l.prototype,"disabled",void 0);h([c()],l.prototype,"autoValidation",void 0);h([c({writable:!0})],l.prototype,"isValid",void 0);h([m()],l.prototype,"fieldErrorSlimmer",void 0);h([m()],l.prototype,"formFieldValidInvokeSlimmer",void 0);h([m()],l.prototype,"mutationObserverSlimmer",void 0);h([m()],l.prototype,"formFormStateController",void 0);h([f("connectedCallback")],l.prototype,"connectedCallback",null);h([f("disconnectedCallback")],l.prototype,"disconnectedCallback",null);h([f("componentDidLoad")],l.prototype,"componentDidLoad",null);h([f("watchValidationRules")],l.prototype,"watchValidationRulesByFormControllerSlimmer",null);h([f("componentWillLoad")],l.prototype,"setInjectFormFieldHelper",null);export{l as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>file_type_gulp</title><path d="M15.942,24.095a15.353,15.353,0,0,1-3.518-.393,6.761,6.761,0,0,1-1.006-.311l.813,1.389.318,4.34c0,.487,1.546.881,3.452.881s3.452-.394,3.452-.881l.252-4.387.769-1.346a6.691,6.691,0,0,1-1.015.315A15.353,15.353,0,0,1,15.942,24.095ZM20.5,9.973a34.285,34.285,0,0,1-4.5.261,34.285,34.285,0,0,1-4.5-.261,8.43,8.43,0,0,1-1.4-.292,2.03,2.03,0,0,1-.345-.143L10.5,16.4q.052-.177.116-.354a6.711,6.711,0,0,1,.3-.707,6.264,6.264,0,0,1,.376-.653,5.049,5.049,0,0,1,.432-.566,3.45,3.45,0,0,1,.47-.445,2.238,2.238,0,0,1,.487-.291,1.235,1.235,0,0,1,.487-.1,1.051,1.051,0,0,1,.538.152,1.541,1.541,0,0,1,.486.492.393.393,0,0,1,.066.154.838.838,0,0,1,.014.147.391.391,0,0,1-.078.257.233.233,0,0,1-.185.094.237.237,0,0,1-.182-.1,1.953,1.953,0,0,1-.188-.295.712.712,0,0,0-.215-.251.453.453,0,0,0-.255-.078.788.788,0,0,0-.457.177,2.652,2.652,0,0,0-.481.468,5.131,5.131,0,0,0-.457.666,6.946,6.946,0,0,0-.386.767,5.477,5.477,0,0,0-.267.774,2.751,2.751,0,0,0-.1.685,1.64,1.64,0,0,0,.014.208.7.7,0,0,0,.052.194.389.389,0,0,0,.1.143.247.247,0,0,0,.166.056.561.561,0,0,0,.257-.076,1.928,1.928,0,0,0,.3-.2,3.741,3.741,0,0,0,.31-.279q.156-.155.29-.315t.238-.306a1.808,1.808,0,0,0,.156-.255l.284-.85a.4.4,0,0,1,.136-.2.3.3,0,0,1,.173-.058.267.267,0,0,1,.085.014.209.209,0,0,1,.13.125.3.3,0,0,1,.02.114,1.653,1.653,0,0,1-.031.326,2.587,2.587,0,0,1-.078.3q-.047.145-.105.291t-.113.306a.694.694,0,0,0-.044.114q-.032.1-.078.241t-.1.324l-.11.365q-.057.186-.108.365t-.093.324l-.069.242c-.018.065-.03.1-.034.116a.753.753,0,0,1-.049.128.848.848,0,0,1-.079.134.488.488,0,0,1-.1.1.186.186,0,0,1-.113.042.159.159,0,0,1-.142-.065.455.455,0,0,1-.044-.239v-.051a.514.514,0,0,1,0-.054A1.283,1.283,0,0,1,12.3,18.8q.043-.159.1-.36t.128-.416q.069-.215.124-.385-.162.181-.351.36a3.788,3.788,0,0,1-.388.322,2.3,2.3,0,0,1-.4.233.947.947,0,0,1-.388.09.694.694,0,0,1-.368-.094c-.019-.011-.036-.024-.053-.037l.415,4.352c.108.271,2.142.936,4.825.936s4.719-.666,4.825-.937l.6-5.174-.143.132a6.253,6.253,0,0,1-.484.41,2.184,2.184,0,0,1-.444.266,1.153,1.153,0,0,1-.464.094.562.562,0,0,1-.359-.1.337.337,0,0,1-.127-.278v-.027a.184.184,0,0,1,0-.031.657.657,0,0,1,.095-.25,2.868,2.868,0,0,1,.2-.293q.116-.152.247-.308t.243-.295a2.847,2.847,0,0,0,.185-.255.383.383,0,0,0,.073-.188.085.085,0,0,0-.031-.069.16.16,0,0,0-.1-.025.573.573,0,0,0-.252.063,1.251,1.251,0,0,0-.257.17,2.324,2.324,0,0,0-.247.244,3.6,3.6,0,0,0-.226.286q-.105.148-.192.3t-.148.277l-.052.112q-.034.072-.073.163t-.084.186q-.044.1-.081.181l-.066.152q-.029.067-.041.092t-.05.123q-.035.09-.081.212l-.1.255-.095.253-.078.21c-.022.06-.037.1-.043.123a1.32,1.32,0,0,1-.072.177.73.73,0,0,1-.095.147.433.433,0,0,1-.122.1.312.312,0,0,1-.154.038.3.3,0,0,1-.182-.052.236.236,0,0,1-.072-.2.631.631,0,0,1,.018-.148,1.322,1.322,0,0,1,.046-.15c.018-.05.037-.1.057-.145s.037-.092.053-.136q.165-.362.336-.725t.328-.72c.022-.05.042-.1.063-.147l-.019.019a4.054,4.054,0,0,1-.4.338,2.1,2.1,0,0,1-.391.233.922.922,0,0,1-.377.087.487.487,0,0,1-.209-.04.349.349,0,0,1-.134-.108.433.433,0,0,1-.072-.163c0-.021-.008-.044-.011-.066-.036.028-.072.055-.108.081a2.192,2.192,0,0,1-.373.215.824.824,0,0,1-.33.081.312.312,0,0,1-.238-.1.482.482,0,0,1-.091-.333,1.824,1.824,0,0,1,.049-.387,1.978,1.978,0,0,1-.2.286,1.741,1.741,0,0,1-.272.264,1.358,1.358,0,0,1-.342.193,1.122,1.122,0,0,1-.412.074.737.737,0,0,1-.194-.025.407.407,0,0,1-.163-.087.436.436,0,0,1-.113-.165.679.679,0,0,1-.043-.259s0-.039.012-.11a2.357,2.357,0,0,1,.078-.336q.066-.23.2-.6t.388-.886a.489.489,0,0,1,.148-.2.308.308,0,0,1,.182-.06.335.335,0,0,1,.089.013.286.286,0,0,1,.086.04.215.215,0,0,1,.064.069.187.187,0,0,1,.024.1.251.251,0,0,1-.009.069.824.824,0,0,1-.066.161q-.05.1-.118.228t-.142.277q-.075.148-.139.307a3.069,3.069,0,0,0-.11.324,1.4,1.4,0,0,0-.052.32.238.238,0,0,0,.031.119.107.107,0,0,0,.1.054.638.638,0,0,0,.379-.13,1.683,1.683,0,0,0,.333-.324,3.108,3.108,0,0,0,.276-.416q.124-.222.206-.407a2.063,2.063,0,0,0,.1-.264,2.626,2.626,0,0,1,.1-.26.8.8,0,0,1,.119-.2.211.211,0,0,1,.168-.08.208.208,0,0,1,.174.083.316.316,0,0,1,.064.2.566.566,0,0,1-.041.179q-.041.114-.1.26t-.136.313q-.073.167-.136.338a3.352,3.352,0,0,0-.1.336,1.26,1.26,0,0,0-.041.306.117.117,0,0,0,.134.13.586.586,0,0,0,.235-.065,1.607,1.607,0,0,0,.295-.183c.026-.02.052-.04.077-.061a2.511,2.511,0,0,1,.1-.327q.107-.282.217-.561l.2-.51.925-2.333a.391.391,0,0,1,.148-.2.354.354,0,0,1,.188-.058.272.272,0,0,1,.172.061.238.238,0,0,1,.078.2.407.407,0,0,1-.026.137,1.664,1.664,0,0,1-.066.156q-.076.17-.182.416t-.226.535q-.121.289-.247.6l-.247.609q-.12.3-.226.562l-.182.461a2.031,2.031,0,0,0-.066.194.713.713,0,0,0-.032.2.177.177,0,0,0,.018.087.073.073,0,0,0,.07.033.4.4,0,0,0,.16-.045,1.638,1.638,0,0,0,.208-.119q.112-.074.232-.17t.24-.2q.119-.1.228-.206t.194-.19a.137.137,0,0,1,.047-.031c.034-.1.066-.2.093-.3q.024-.065.067-.185a2.535,2.535,0,0,1,.1-.235,1.007,1.007,0,0,1,.124-.2A.193.193,0,0,1,19.185,16a.24.24,0,0,1,.177.056.226.226,0,0,1,.055.165.6.6,0,0,1-.006.069c0,.031-.009.065-.015.1s-.013.068-.02.1a.456.456,0,0,1-.02.069q.113-.123.244-.244a2.513,2.513,0,0,1,.272-.219,1.571,1.571,0,0,1,.287-.159.755.755,0,0,1,.293-.061.71.71,0,0,1,.2.029.575.575,0,0,1,.177.085.444.444,0,0,1,.127.141.388.388,0,0,1,.049.2.78.78,0,0,1-.075.317,2.293,2.293,0,0,1-.188.338q-.113.17-.244.331t-.246.293l-.193.224a.338.338,0,0,0-.081.125.1.1,0,0,0,.028.071.128.128,0,0,0,.092.027.352.352,0,0,0,.153-.058,2.6,2.6,0,0,0,.282-.2q.182-.143.461-.383c.128-.11.277-.241.446-.39l.808-7.48a2.024,2.024,0,0,1-.345.143A8.427,8.427,0,0,1,20.5,9.973ZM16,8.2c-3.492,0-6.322.39-6.322.872S12.5,9.942,16,9.942s6.322-.39,6.322-.872S19.488,8.2,16,8.2Zm2.524,1.127c0,.113-.336.2-.751.2s-.751-.092-.751-.2.336-.2.751-.2S18.521,9.212,18.521,9.325Z" style="fill:#da4648"/><path d="M17.17,9.234a.034.034,0,0,0-.006.018c0,.073.271.132.6.132s.6-.059.6-.132l.79-3.2,3.142-3.317,0,0c.066-.075-.068-.308-.292-.508s-.466-.267-.541-.191l0,0L18.122,5.559Z" style="fill:#da4648"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c2 as m,cl as h,h as c,D as u,cm as y,cn as w,Y as S,co as T,cp as C,c8 as g,cq as x,a as D,b as O,cr as N,c9 as A,M as a,d as I}from"./index-CVS-vjRT.js";const R={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M64 96v32c0 17.7-14.3 32-32 32s-32-14.3-32-32V80C0 53.5 21.5 32 48 32H224 400c26.5 0 48 21.5 48 48v48c0 17.7-14.3 32-32 32s-32-14.3-32-32V96H256l0 320h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H144c-17.7 0-32-14.3-32-32s14.3-32 32-32h48l0-320H64z"/></svg>'};var f=function(i,e,t,r){var s=arguments.length,o=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var l=i.length-1;l>=0;l--)(n=i[l])&&(o=(s<3?n(o):s>3?n(e,t,o):n(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class p extends D{constructor({icon:e,tooltip:t,autoFocusOnClick:r=!0}){super(),this.renderBtn=({showArrowIcon:s,iconColor:o}={})=>{var n;return c("vega-tooltip",{text:this.translationSlimmer.t(this.tooltip.text),placement:["bottom","top"]},c("vega-rich-text-editor-toolbar-button",Object.assign({showArrowIcon:s,icon:this.icon,iconColor:o,ref:l=>{u.addUniqueObserverToNode(l,O,()=>{this.handleClick()})},selected:this.isSelected(),disabled:this.isDisabled(),hidden:this.isHidden()},this.preventLostFocus()),(n=this.renderSlotContent)===null||n===void 0?void 0:n.call(this)))},this.handleClick=()=>{typeof this.onClick=="function"&&(!this.selectionController.getSelectedNodes().length&&this.autoFocusOnClick?this.focusController.focusOnLastTextNode().then(()=>{this.onClick()}):this.onClick())},this.icon=e,this.tooltip=t,this.autoFocusOnClick=r}setIcon(e){this.icon=e}isHidden(){return!1}render(){return typeof this.renderBtnWrapper=="function"?this.renderBtnWrapper(this.renderBtn):this.renderBtn()}isDisabled(){return this.disabled}preventLostFocus(){return{onMouseDown:e=>e.preventDefault()}}}f([a()],p.prototype,"translationSlimmer",void 0);f([a()],p.prototype,"selectionController",void 0);f([a()],p.prototype,"focusController",void 0);f([a()],p.prototype,"disabled",void 0);var k=function(i,e,t,r){var s=arguments.length,o=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var l=i.length-1;l>=0;l--)(n=i[l])&&(o=(s<3?n(o):s>3?n(e,t,o):n(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class b extends p{constructor(e){super(e)}isHidden(){return this.sourceView}isDisabled(){return super.isDisabled()&&!this.sourceView}shouldDisabledToolbar(e,t){return e&&!x.canHandle(t,e)}}k([a()],b.prototype,"sourceView",void 0);var v=function(i,e,t,r){var s=arguments.length,o=s<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,r);else for(var l=i.length-1;l>=0;l--)(n=i[l])&&(o=(s<3?n(o):s>3?n(e,t,o):n(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class d extends b{constructor(){super({icon:"text",tooltip:{text:"Text Color"}}),this.popoverShow=!1,m.registerCustomDarkModeColor(d.formatDarkModeColor())}static formatDarkModeColor(){return h.reduce((e,t)=>(t.dark&&(e[`rich-text-editor-${t.key}`]=t.dark),e),{})}renderSlotContent(){return c("div",{class:{"toolbar-btn-color-preview-box":!0,disabled:this.isDisabled()},style:{backgroundColor:this.getCurrentColor()}})}handlePopoverShowChange(){this.popoverShow=!0}handlePopoverHideChange(){this.popoverShow=!1}renderBtnWrapper(e){return c("vega-popover",{placement:"bottom",alignment:"center",ref:t=>{this.popoverRef=t,u.addUniqueObserverToNode(t,y,this.handlePopoverShowChange.bind(this)),u.addUniqueObserverToNode(t,w,this.handlePopoverHideChange.bind(this))}},c("div",{slot:"popover-content"},e({showArrowIcon:!1})),c("div",Object.assign({slot:"popover",style:{userSelect:"none"}},super.preventLostFocus()),this.renderPopoverContent()))}renderPopoverContent(){return c("vega-color-picker",{isInline:!0,colors:h.map(e=>e[this.isInDarkMode?"dark":"light"]),ref:e=>{u.addUniqueObserverToNode(e,S,this.handleChange.bind(this))},value:this.getCurrentColor()})}async handleChange(e){this.popoverShow&&(this.selectionController.getSelectedNodes().length||await this.focusController.focusOnLastTextNode(),this.selectionController.getSelectedNodes().filter(t=>t instanceof T).forEach(t=>t.apply(new C(this.matchColor(e.detail).key)))),this.popoverRef.hide()}matchColor(e){return h.find(t=>t[this.isInDarkMode?"dark":"light"]===e)}getCurrentColor(){let e=h[0];const t=this.selectionController.getSelectedNodes();return t.length>1&&(this.isSelectedSameColor(t)?e=this.getTextColor(t[0]):e=null),t.length===1&&(e=this.getTextColor(t[0])),e?e[this.isInDarkMode?"dark":"light"]:null}isSelected(){return!1}isSelectedSameColor(e){return e.every(t=>this.getTextColor(t).key===this.getTextColor(e[0]).key)}getTextColor(e){var t;return((t=e.getAnnotationByType("TEXT_COLOR"))===null||t===void 0?void 0:t.textColor)||h[0]}isDisabled(){const e=this.selectionController.getSelectedNodes();return super.isDisabled()||e.some(t=>{var r;return((r=t.getAnnotationByType(g.CODE))===null||r===void 0?void 0:r.code)||t.getAnnotationByType(g.LINK)||this.shouldDisabledToolbar(t,C.name)})}}I.register({text:R});v([a()],d.prototype,"host",void 0);v([a()],d.prototype,"isInDarkMode",void 0);v([a()],d.prototype,"selectionController",void 0);v([a()],d.prototype,"focusController",void 0);class M extends N{constructor(e,t){super(),this.isFlushable=!0,this.size=e,this.alt=t}toAnnotation(){return new A(this.size,this.alt)}}export{M as I,d as T,b as V,p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class r{constructor(t,e){this.size=0,this.map=new Map,t&&(this.map=t,this.size=t.size),typeof e=="function"&&(this.onMutate=e)}has(t){return this.map.has(t)}keys(){return this.map.keys()}set(t,e){return this.withMutation(s=>{s.set(t,e)})}get(t){return this.map.get(t)}values(){return this.map.values()}delete(t){return this.withMutation(e=>{e.delete(t)})}clear(t=!0){return t?this.withMutation(e=>{e.clear()}):(Array.from(this.keys()).forEach(e=>{this.map.delete(e)}),this.size=0,this)}onMutate(t){}withMutation(t){const e=new Map(this.map);t(e);const s=new r(e,this.onMutate);return this.onMutate(s),s}}export{r as I};
|