aiex-cli 0.0.2-beta.4 → 0.0.2-beta.6
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/README.md +7 -7
- package/dist/cli.mjs +50 -12
- package/dist/{doctor-collector-DoJqOYMT.mjs → doctor-collector-DV4s3Xx0.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/web/assets/{AISettings-BgwAdAIK.js → AISettings-DaT-2xRB.js} +17 -17
- package/dist/web/assets/{DataBrowser-CLOlYw5B.js → DataBrowser-CwcTG80-.js} +3 -3
- package/dist/web/assets/{ExtractionViewer-Dxgbk3y5.js → ExtractionViewer-BghKsfo8.js} +1 -1
- package/dist/web/assets/{JsonSchemaEditor-ul3bZNBq.js → JsonSchemaEditor-D477lV5a.js} +3 -3
- package/dist/web/assets/{api-client-BwMoRXRu.js → api-client-BF3HG2Vn.js} +1 -1
- package/dist/web/assets/{cssMode-BJcNHjlk.js → cssMode-CPThwItX.js} +1 -1
- package/dist/web/assets/dialog-CUkPLPNP.js +109 -0
- package/dist/web/assets/{editor.main-DQNDtAJT.js → editor.main-BnOkwRFv.js} +2 -2
- package/dist/web/assets/{freemarker2-S3U7WteK.js → freemarker2-DWDTYVJR.js} +1 -1
- package/dist/web/assets/{handlebars-BrE9AAwL.js → handlebars-D4DzjGQ7.js} +1 -1
- package/dist/web/assets/{html-C6Vb0qjf.js → html-DnzhKSoD.js} +1 -1
- package/dist/web/assets/{htmlMode-D6ZrqWr1.js → htmlMode-CR7UKfEH.js} +1 -1
- package/dist/web/assets/{index-e8dWRIEv.js → index-B8rPityE.js} +38 -38
- package/dist/web/assets/index-C9N8oWt4.css +2 -0
- package/dist/web/assets/{javascript-DB-UTK4i.js → javascript-D2srszZ8.js} +1 -1
- package/dist/web/assets/{jsonMode-w2VFiNNs.js → jsonMode-B4jaPYEr.js} +1 -1
- package/dist/web/assets/{liquid-1XTLVrg3.js → liquid-CIT2Wl_l.js} +1 -1
- package/dist/web/assets/{mdx-C4k_4MX5.js → mdx-CWLaEOFy.js} +1 -1
- package/dist/web/assets/{monaco.contribution-DrrjJ0Xr.js → monaco.contribution-DDv5ldfS.js} +2 -2
- package/dist/web/assets/{python-DU-NBP37.js → python-6CGfpCNq.js} +1 -1
- package/dist/web/assets/{razor-CDS0MJZV.js → razor-DEMMh3TD.js} +1 -1
- package/dist/web/assets/runtime-dom.esm-bundler-ei_N7Xjw.js +1 -0
- package/dist/web/assets/{select-Dj2p-fw_.js → select-BGex2SPs.js} +2 -2
- package/dist/web/assets/{tsMode-ClDl0-oy.js → tsMode-Cm1NtjPs.js} +1 -1
- package/dist/web/assets/{typescript-DVPndl3f.js → typescript-BM9aPEFg.js} +1 -1
- package/dist/web/assets/{xml-ZTAdiNZS.js → xml-CoSbvcg5.js} +1 -1
- package/dist/web/assets/{yaml-4WO-VI9I.js → yaml-56GOgy8k.js} +1 -1
- package/dist/web/index.html +8 -9
- package/package.json +1 -1
- package/dist/web/assets/ExtractRunner-BxI-y6zS.js +0 -1
- package/dist/web/assets/dialog-8xaIXBKO.js +0 -108
- package/dist/web/assets/index-BEorm4a5.css +0 -2
- package/dist/web/assets/runtime-dom.esm-bundler-DZwuSnld.js +0 -1
- package/dist/web/assets/utils-CZhxh2Ya.js +0 -2
- /package/dist/web/assets/{abap-CFuyUYKP.js → abap-Bgec7Keq.js} +0 -0
- /package/dist/web/assets/{apex-Ctq_xcrv.js → apex-VBlPwEoQ.js} +0 -0
- /package/dist/web/assets/{azcli-BBQSVn-C.js → azcli-DKqrEFBx.js} +0 -0
- /package/dist/web/assets/{bat-DbnqAfvr.js → bat-DdgQWy_0.js} +0 -0
- /package/dist/web/assets/{bicep-BtDlIXop.js → bicep-CRMM43EB.js} +0 -0
- /package/dist/web/assets/{cameligo-BLeJgKTj.js → cameligo-UatALtML.js} +0 -0
- /package/dist/web/assets/{clojure-aZUQIUKP.js → clojure-D8JU08RA.js} +0 -0
- /package/dist/web/assets/{coffee-Secadq9U.js → coffee-C56wu358.js} +0 -0
- /package/dist/web/assets/{cpp-JicRPTRv.js → cpp-CyZLvhJG.js} +0 -0
- /package/dist/web/assets/{csharp-C7NSOZyj.js → csharp-BJl3ixva.js} +0 -0
- /package/dist/web/assets/{csp-CIje7830.js → csp-CxEKxmO-.js} +0 -0
- /package/dist/web/assets/{css-G0bm1q_M.js → css-B0t_muXd.js} +0 -0
- /package/dist/web/assets/{cypher-CldD5D0u.js → cypher-D1hqiMFD.js} +0 -0
- /package/dist/web/assets/{dart-DIK3l8YT.js → dart-Bz550Pyv.js} +0 -0
- /package/dist/web/assets/{dist-B5Yem2Jn.js → dist-9yHVMqQ0.js} +0 -0
- /package/dist/web/assets/{dockerfile-czxaGh2L.js → dockerfile-CIXgVAuA.js} +0 -0
- /package/dist/web/assets/{ecl-BqdYhwmw.js → ecl-D9qbvZoA.js} +0 -0
- /package/dist/web/assets/{editor.api-DrogPInQ.js → editor.api-C8BHpRhn.js} +0 -0
- /package/dist/web/assets/{elixir-m52LePTW.js → elixir-b2M38fAy.js} +0 -0
- /package/dist/web/assets/{flow9-B5QJ9GvZ.js → flow9-Dq1UYMkt.js} +0 -0
- /package/dist/web/assets/{fsharp-Bsj2_cCa.js → fsharp-BaeLhgfq.js} +0 -0
- /package/dist/web/assets/{go-BqOR3oKA.js → go-Bd-NFKIC.js} +0 -0
- /package/dist/web/assets/{graphql-B8qEHPdi.js → graphql-DZVerJfy.js} +0 -0
- /package/dist/web/assets/{hcl-DWuCE4v-.js → hcl-CAVzrZfH.js} +0 -0
- /package/dist/web/assets/{ini-Qq7k0Z4_.js → ini-CyXdX58t.js} +0 -0
- /package/dist/web/assets/{java-BYPjirKp.js → java-B5pNgvhy.js} +0 -0
- /package/dist/web/assets/{julia-BDPeJze-.js → julia-XRhmV3AN.js} +0 -0
- /package/dist/web/assets/{kotlin-Cn6ib1e9.js → kotlin-DOd3J5vr.js} +0 -0
- /package/dist/web/assets/{less-CJaXZ051.js → less-veZSnyw6.js} +0 -0
- /package/dist/web/assets/{lexon-8Vqfm7H_.js → lexon-QWGkuK0H.js} +0 -0
- /package/dist/web/assets/{lua-CvR2zKQJ.js → lua-CYGpjuO5.js} +0 -0
- /package/dist/web/assets/{m3-B_srJ0-W.js → m3-yNnrZkdc.js} +0 -0
- /package/dist/web/assets/{markdown-BLHPl-_K.js → markdown-BCSWEPSX.js} +0 -0
- /package/dist/web/assets/{mips-DVyJ6qEt.js → mips-OpYmcC30.js} +0 -0
- /package/dist/web/assets/{msdax-CSgWECQy.js → msdax-2oxoTO9Z.js} +0 -0
- /package/dist/web/assets/{mysql-DgAobqZA.js → mysql-5KlC-K_9.js} +0 -0
- /package/dist/web/assets/{object-utils-Cm2M3fPO.js → object-utils-I4gWdSnS.js} +0 -0
- /package/dist/web/assets/{objective-c-YsnCzZhx.js → objective-c-CcDCgtLx.js} +0 -0
- /package/dist/web/assets/{pascal-DBRbVM1J.js → pascal-BZGsbaEV.js} +0 -0
- /package/dist/web/assets/{pascaligo-DGMAqea9.js → pascaligo-DtD5qU3G.js} +0 -0
- /package/dist/web/assets/{perl-BbO9hyuY.js → perl-C1jNNS3E.js} +0 -0
- /package/dist/web/assets/{pgsql-C-hxeXjm.js → pgsql-CT0fhiZa.js} +0 -0
- /package/dist/web/assets/{php-CNUtuIOY.js → php-D6DrXoPM.js} +0 -0
- /package/dist/web/assets/{pla-kg11R4PY.js → pla-b3-HN2pF.js} +0 -0
- /package/dist/web/assets/{postiats-B1z9yYod.js → postiats-Bin2ApVS.js} +0 -0
- /package/dist/web/assets/{powerquery-B7uH8tJZ.js → powerquery-7ASnn-ZG.js} +0 -0
- /package/dist/web/assets/{powershell-C4XFI11Z.js → powershell-t4p7sU1H.js} +0 -0
- /package/dist/web/assets/{preload-helper-DgFuoWHe.js → preload-helper-Dd-HcVz_.js} +0 -0
- /package/dist/web/assets/{protobuf-BcOV_0Q2.js → protobuf-BUGeWa_j.js} +0 -0
- /package/dist/web/assets/{pug-68xbfbza.js → pug-BuKcgC9s.js} +0 -0
- /package/dist/web/assets/{qsharp-BrGH6SSV.js → qsharp-DxLLX8mo.js} +0 -0
- /package/dist/web/assets/{r--OWX2YhF.js → r-DMlFgn7A.js} +0 -0
- /package/dist/web/assets/{redis-BOXumJdj.js → redis-cXItkC5u.js} +0 -0
- /package/dist/web/assets/{redshift-8U3qVUZv.js → redshift-BZVbW7HE.js} +0 -0
- /package/dist/web/assets/{restructuredtext-D6puF6Gd.js → restructuredtext-BzjxwS8h.js} +0 -0
- /package/dist/web/assets/{ruby-g_KUrR8T.js → ruby-C5nyLV4l.js} +0 -0
- /package/dist/web/assets/{rust-Dm8AnzU3.js → rust-BcmMsHdf.js} +0 -0
- /package/dist/web/assets/{sb-D_ts6T0n.js → sb-Dnb1iy6B.js} +0 -0
- /package/dist/web/assets/{scala-C6NOuwmJ.js → scala-anMIFYpA.js} +0 -0
- /package/dist/web/assets/{scheme-CPooyhAN.js → scheme-BItQTe08.js} +0 -0
- /package/dist/web/assets/{scss-DUEUJROR.js → scss-BOv51BJ5.js} +0 -0
- /package/dist/web/assets/{shell-kdqtsGKx.js → shell-BsRYRTNN.js} +0 -0
- /package/dist/web/assets/{solidity-CnMA-U-d.js → solidity-BtuLgGDx.js} +0 -0
- /package/dist/web/assets/{sophia-BKvc9daj.js → sophia-B0Vkc5MF.js} +0 -0
- /package/dist/web/assets/{sparql-Bh3XvRxY.js → sparql-B7lvkZQM.js} +0 -0
- /package/dist/web/assets/{sql-CRPVrMOO.js → sql-DvP5MpA3.js} +0 -0
- /package/dist/web/assets/{st-DBvoSKfh.js → st-GVUeyB3U.js} +0 -0
- /package/dist/web/assets/{swift-B8QEexRZ.js → swift-DSPIoCjm.js} +0 -0
- /package/dist/web/assets/{systemverilog-CBeOTblq.js → systemverilog-Icj2-k23.js} +0 -0
- /package/dist/web/assets/{tcl-DR5kknHN.js → tcl-Cd8KQcm-.js} +0 -0
- /package/dist/web/assets/{twig-5OXXSkT1.js → twig-CBHmt8z3.js} +0 -0
- /package/dist/web/assets/{typespec-cVMWW5z1.js → typespec-Ckc037mq.js} +0 -0
- /package/dist/web/assets/{vb-DRjqfs-G.js → vb-B97GW9Wb.js} +0 -0
- /package/dist/web/assets/{wgsl-B5lRvHwm.js → wgsl-DIKmb3YH.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as e,Cn as t,En as n,Fn as r,Ft as i,G as a,Gt as o,H as s,Jt as c,K as l,Lt as u,M as d,Nn as f,On as p,Pt as m,Qt as h,S as g,Sn as _,Tn as v,U as y,W as b,Yt as x,_ as S,a as C,b as ee,c as w,d as T,fn as te,g as E,h as D,hn as O,i as k,in as ne,jn as re,kn as A,n as ie,nt as j,on as M,pn as N,r as ae,rn as P,rt as oe,un as se,v as F,wn as I,x as L}from"./button-Cdgr9Igy.js";import{i as
|
|
1
|
+
import{B as e,Cn as t,En as n,Fn as r,Ft as i,G as a,Gt as o,H as s,Jt as c,K as l,Lt as u,M as d,Nn as f,On as p,Pt as m,Qt as h,S as g,Sn as _,Tn as v,U as y,W as b,Yt as x,_ as S,a as C,b as ee,c as w,d as T,fn as te,g as E,h as D,hn as O,i as k,in as ne,jn as re,kn as A,n as ie,nt as j,on as M,pn as N,r as ae,rn as P,rt as oe,un as se,v as F,wn as I,x as L}from"./button-Cdgr9Igy.js";import{i as ce,n as le,o as ue,r as de,s as R}from"./dialog-CUkPLPNP.js";import{c as fe,t as pe}from"./runtime-dom.esm-bundler-ei_N7Xjw.js";var z={name:`CheckIcon`,extends:k};function me(e){return ve(e)||_e(e)||ge(e)||he()}function he(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ge(e,t){if(e){if(typeof e==`string`)return B(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function _e(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ve(e){if(Array.isArray(e))return B(e)}function B(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ye(t,n,r,i,a,o){return e(),F(`svg`,d({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),me(n[0]||=[D(`path`,{d:`M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z`,fill:`currentColor`},null,-1)]),16)}z.render=ye;var V={name:`BaseEditableHolder`,extends:C,emits:[`update:modelValue`,`value-change`],props:{modelValue:{type:null,default:void 0},defaultValue:{type:null,default:void 0},name:{type:String,default:void 0},invalid:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},formControl:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0},$pcForm:{default:void 0},$pcFormField:{default:void 0}},data:function(){return{d_value:this.defaultValue===void 0?this.modelValue:this.defaultValue}},watch:{modelValue:{deep:!0,handler:function(e){this.d_value=e}},defaultValue:function(e){this.d_value=e},$formName:{immediate:!0,handler:function(e){var t,n;this.formField=((t=this.$pcForm)==null||(n=t.register)==null?void 0:n.call(t,e,this.$formControl))||{}}},$formControl:{immediate:!0,handler:function(e){var t,n;this.formField=((t=this.$pcForm)==null||(n=t.register)==null?void 0:n.call(t,this.$formName,e))||{}}},$formDefaultValue:{immediate:!0,handler:function(e){this.d_value!==e&&(this.d_value=e)}},$formValue:{immediate:!1,handler:function(e){var t;(t=this.$pcForm)!=null&&t.getFieldState(this.$formName)&&e!==this.d_value&&(this.d_value=e)}}},formField:{},methods:{writeValue:function(e,t){var n,r;this.controlled&&(this.d_value=e,this.$emit(`update:modelValue`,e)),this.$emit(`value-change`,e),(n=(r=this.formField).onChange)==null||n.call(r,{originalEvent:t,value:e})},findNonEmpty:function(){return[...arguments].find(r)}},computed:{$filled:function(){return r(this.d_value)},$invalid:function(){var e,t;return!this.$formNovalidate&&this.findNonEmpty(this.invalid,(e=this.$pcFormField)==null||(e=e.$field)==null?void 0:e.invalid,(t=this.$pcForm)==null||(t=t.getFieldState(this.$formName))==null?void 0:t.invalid)},$formName:function(){return this.$formNovalidate?void 0:this.name||this.$formControl?.name},$formControl:function(){return this.formControl||this.$pcFormField?.formControl},$formNovalidate:function(){return this.$formControl?.novalidate},$formDefaultValue:function(){var e;return this.findNonEmpty(this.d_value,this.$pcFormField?.initialValue,(e=this.$pcForm)==null||(e=e.initialValues)==null?void 0:e[this.$formName])},$formValue:function(){var e,t;return this.findNonEmpty((e=this.$pcFormField)==null||(e=e.$field)==null?void 0:e.value,(t=this.$pcForm)==null||(t=t.getFieldState(this.$formName))==null?void 0:t.value)},controlled:function(){return this.$inProps.hasOwnProperty(`modelValue`)||!this.$inProps.hasOwnProperty(`modelValue`)&&!this.$inProps.hasOwnProperty(`defaultValue`)},filled:function(){return this.$filled}}},H={name:`BaseInput`,extends:V,props:{size:{type:String,default:null},fluid:{type:Boolean,default:null},variant:{type:String,default:null}},inject:{$parentInstance:{default:void 0},$pcFluid:{default:void 0}},computed:{$variant:function(){return this.variant??(this.$primevue.config.inputStyle||this.$primevue.config.inputVariant)},$fluid:function(){return this.fluid??!!this.$pcFluid},hasFluid:function(){return this.$fluid}}},be={name:`BaseInputText`,extends:H,style:w.extend({name:`inputtext`,style:`
|
|
3
3
|
.p-inputtext {
|
|
4
4
|
font-family: inherit;
|
|
@@ -436,4 +436,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
436
436
|
padding-block-end: dt('select.padding.y');
|
|
437
437
|
}
|
|
438
438
|
`,classes:{root:function(e){var t=e.instance,n=e.props,r=e.state;return[`p-select p-component p-inputwrapper`,{"p-disabled":n.disabled,"p-invalid":t.$invalid,"p-variant-filled":t.$variant===`filled`,"p-focus":r.focused,"p-inputwrapper-filled":t.$filled,"p-inputwrapper-focus":r.focused||r.overlayVisible,"p-select-open":r.overlayVisible,"p-select-fluid":t.$fluid,"p-select-sm p-inputfield-sm":n.size===`small`,"p-select-lg p-inputfield-lg":n.size===`large`}]},label:function(e){var t=e.instance,n=e.props;return[`p-select-label`,{"p-placeholder":!n.editable&&t.label===n.placeholder,"p-select-label-empty":!n.editable&&!t.$slots.value&&(t.label===`p-emptylabel`||t.label?.length===0)}]},clearIcon:`p-select-clear-icon`,dropdown:`p-select-dropdown`,loadingicon:`p-select-loading-icon`,dropdownIcon:`p-select-dropdown-icon`,overlay:`p-select-overlay p-component`,header:`p-select-header`,pcFilter:`p-select-filter`,listContainer:`p-select-list-container`,list:`p-select-list`,optionGroup:`p-select-option-group`,optionGroupLabel:`p-select-option-group-label`,option:function(e){var t=e.instance,n=e.props,r=e.state,i=e.option,a=e.focusedOption;return[`p-select-option`,{"p-select-option-selected":t.isSelected(i)&&n.highlightOnSelect,"p-focus":r.focusedOptionIndex===a,"p-disabled":t.isOptionDisabled(i)}]},optionLabel:`p-select-option-label`,optionCheckIcon:`p-select-option-check-icon`,optionBlankIcon:`p-select-option-blank-icon`,emptyMessage:`p-select-empty-message`}}),ct={name:`BaseSelect`,extends:H,props:{options:Array,optionLabel:[String,Function],optionValue:[String,Function],optionDisabled:[String,Function],optionGroupLabel:[String,Function],optionGroupChildren:[String,Function],scrollHeight:{type:String,default:`14rem`},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:`contains`},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},labelId:{type:String,default:null},labelClass:{type:[String,Object],default:null},labelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},overlayStyle:{type:Object,default:null},overlayClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},appendTo:{type:[String,Object],default:`body`},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},resetFilterOnHide:{type:Boolean,default:!1},resetFilterOnClear:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:st,provide:function(){return{$pcSelect:this,$parentInstance:this}}};function X(e){"@babel/helpers - typeof";return X=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},X(e)}function lt(e){return pt(e)||ft(e)||dt(e)||ut()}function ut(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
439
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dt(e,t){if(e){if(typeof e==`string`)return Z(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}function ft(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function pt(e){if(Array.isArray(e))return Z(e)}function Z(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mt(Object(n),!0).forEach(function(t){Q(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Q(e,t,n){return(t=gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gt(e){var t=_t(e,`string`);return X(t)==`symbol`?t:t+``}function _t(e,t){if(X(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(X(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $={name:`Select`,extends:ct,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`before-show`,`before-hide`,`show`,`hide`,`filter`],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,matchMediaOrientationListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1,queryOrientation:null}},watch:{modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel(),this.bindLabelClickListener(),this.bindMatchMediaOrientationListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.unbindMatchMediaOrientationListener(),this.scrollHandler&&=(this.scrollHandler.destroy(),null),this.overlay&&=(R.clear(this.overlay),null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?f(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?f(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?f(e,this.dataKey):this.getOptionLabel(e))+`_`+t},getPTItemOptions:function(e,t,n,r){return this.ptm(r,{context:{option:e,index:n,selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?f(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return f(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return f(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(e){return t.isOptionGroup(e)}).length:e)+1},show:function(e){this.$emit(`before-show`),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex===-1?this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex():this.focusedOptionIndex,e&&N(this.$refs.focusInput)},hide:function(e){var t=this,n=function(){t.$emit(`before-hide`),t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,t.searchValue=``,t.resetFilterOnHide&&(t.filterValue=null),e&&N(t.$refs.focusInput)};setTimeout(function(){n()},0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=this.focusedOptionIndex===-1?this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex():this.focusedOptionIndex,this.scrollInView(this.focusedOptionIndex)),this.$emit(`focus`,e))},onBlur:function(e){var t=this;setTimeout(function(){var n,r;t.focused=!1,t.focusedOptionIndex=-1,t.searchValue=``,t.$emit(`blur`,e),(n=(r=t.formField).onBlur)==null||n.call(r,e)},100)},onKeyDown:function(e){var t=this;if(this.disabled){e.preventDefault();return}if(o())switch(e.code){case`Backspace`:this.onBackspaceKey(e,this.editable);break;case`Enter`:case`NumpadDecimal`:this.onEnterKey(e);break;default:e.preventDefault();return}var n=e.metaKey||e.ctrlKey;switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e,this.editable);break;case`ArrowLeft`:case`ArrowRight`:this.onArrowLeftKey(e,this.editable);break;case`Home`:this.onHomeKey(e,this.editable);break;case`End`:this.onEndKey(e,this.editable);break;case`PageDown`:this.onPageDownKey(e);break;case`PageUp`:this.onPageUpKey(e);break;case`Space`:this.onSpaceKey(e,this.editable);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break;case`Backspace`:this.onBackspaceKey(e,this.editable);break;case`ShiftLeft`:case`ShiftRight`:break;default:!n&&p(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key),this.filter&&this.$nextTick(function(){t.$refs.filterInput&&N(t.$refs.filterInput.$el)}));break}this.clicked=!1},onEditableInput:function(e){var t=e.target.value;this.searchValue=``,!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.updateModel(e,t),!this.overlayVisible&&r(t)&&this.show()},onContainerClick:function(e){this.disabled||this.loading||e.target.tagName===`INPUT`||e.target.getAttribute(`data-pc-section`)===`clearicon`||e.target.closest(`[data-pc-section="clearicon"]`)||((!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onClearClick:function(e){this.updateModel(e,null),this.resetFilterOnClear&&(this.filterValue=null)},onFirstHiddenFocus:function(e){N(e.relatedTarget===this.$refs.focusInput?t(this.overlay,`:not([data-p-hidden-focusable="true"])`):this.$refs.focusInput)},onLastHiddenFocus:function(e){N(e.relatedTarget===this.$refs.focusInput?h(this.overlay,`:not([data-p-hidden-focusable="true"])`):this.$refs.focusInput)},onOptionSelect:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(this.overlayVisible){var r=this.getOptionValue(t);this.updateModel(e,r),n&&this.hide(!0)}},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange:function(e){var t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit(`filter`,{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){if(!e.isComposing)switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e,!0);break;case`ArrowLeft`:case`ArrowRight`:this.onArrowLeftKey(e,!0);break;case`Home`:this.onHomeKey(e,!0);break;case`End`:this.onEndKey(e,!0);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){Ee.emit(`overlay-click`,{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case`Escape`:this.onEscapeKey(e);break}},onArrowDownKey:function(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{var t=this.focusedOptionIndex===-1?this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex():this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e,t)}e.preventDefault()},onArrowUpKey:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.altKey&&!t)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var n=this.focusedOptionIndex===-1?this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex():this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;e.shiftKey?t.setSelectionRange(0,e.target.selectionStart):(t.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;if(e.shiftKey)t.setSelectionRange(e.target.selectionStart,t.value.length);else{var n=t.value.length;t.setSelectionRange(n,n),this.focusedOptionIndex=-1}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide(!0)):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onSpaceKey:function(e){!(arguments.length>1&&arguments[1]!==void 0&&arguments[1])&&this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()},onTabKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]||(this.overlayVisible&&this.hasFocusableElements()?(N(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]&&!this.overlayVisible&&this.show()},onOverlayEnter:function(e){var t=this;R.set(`overlay`,e,this.$primevue.config.zIndex.overlay),ne(e,{position:`absolute`,top:`0`}),this.alignOverlay(),this.scrollInView(),this.$attrSelector&&e.setAttribute(this.$attrSelector,``),setTimeout(function(){t.autoFilterFocus&&t.filter&&N(t.$refs.filterInput.$el),t.autoUpdateModel()},1)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit(`show`)},onOverlayLeave:function(e){var t=this;e.style.pointerEvents=`none`,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.autoFilterFocus&&this.filter&&!this.editable&&this.$nextTick(function(){t.$refs.filterInput&&N(t.$refs.filterInput.$el)}),this.$emit(`hide`),this.overlay=null},onOverlayAfterLeave:function(e){R.clear(e)},alignOverlay:function(){this.appendTo===`self`?x(this.overlay,this.$el):this.overlay&&(this.overlay.style.minWidth=_(this.$el)+`px`,c(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var n=t.composedPath();e.overlayVisible&&e.overlay&&!n.includes(e.$el)&&!n.includes(e.overlay)&&e.hide()},document.addEventListener(`click`,this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&=(document.removeEventListener(`click`,this.outsideClickListener,!0),null)},bindScrollListener:function(){var e=this;this.scrollHandler||=new de(this.$refs.container,function(){e.overlayVisible&&e.hide()}),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!se()&&e.hide()},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},bindLabelClickListener:function(){var e=this;if(!this.editable&&!this.labelClickListener){var t=document.querySelector(`label[for="${this.labelId}"]`);t&&O(t)&&(this.labelClickListener=function(){N(e.$refs.focusInput)},t.addEventListener(`click`,this.labelClickListener))}},unbindLabelClickListener:function(){if(this.labelClickListener){var e=document.querySelector(`label[for="${this.labelId}"]`);e&&O(e)&&e.removeEventListener(`click`,this.labelClickListener)}},bindMatchMediaOrientationListener:function(){var e=this;this.matchMediaOrientationListener||(this.queryOrientation=matchMedia(`(orientation: portrait)`),this.matchMediaOrientationListener=function(){e.alignOverlay()},this.queryOrientation.addEventListener(`change`,this.matchMediaOrientationListener))},unbindMatchMediaOrientationListener:function(){this.matchMediaOrientationListener&&=(this.queryOrientation.removeEventListener(`change`,this.matchMediaOrientationListener),this.queryOrientation=null,null)},hasFocusableElements:function(){return te(this.overlay,`:not([data-p-hidden-focusable="true"])`).length>0},isOptionExactMatched:function(e){return this.isValidOption(e)&&typeof this.getOptionLabel(e)==`string`&&this.getOptionLabel(e)?.toLocaleLowerCase(this.filterLocale)==this.searchValue.toLocaleLowerCase(this.filterLocale)},isOptionStartsWith:function(e){return this.isValidOption(e)&&typeof this.getOptionLabel(e)==`string`&&this.getOptionLabel(e)?.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return r(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return re(this.d_value,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(t){return e.isValidOption(t)})},findLastOptionIndex:function(){var e=this;return A(this.visibleOptions,function(t){return e.isValidOption(t)})},findNextOptionIndex:function(e){var t=this,n=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(e){return t.isValidOption(e)}):-1;return n>-1?n+e+1:e},findPrevOptionIndex:function(e){var t=this,n=e>0?A(this.visibleOptions.slice(0,e),function(e){return t.isValidOption(e)}):-1;return n>-1?n:e},findSelectedOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(t){return e.isValidSelectedOption(t)})},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var n=this;this.searchValue=(this.searchValue||``)+t;var i=-1,a=!1;return r(this.searchValue)&&(i=this.visibleOptions.findIndex(function(e){return n.isOptionExactMatched(e)}),i===-1&&(i=this.visibleOptions.findIndex(function(e){return n.isOptionStartsWith(e)})),i!==-1&&(a=!0),i===-1&&this.focusedOptionIndex===-1&&(i=this.findFirstFocusedOptionIndex()),i!==-1&&this.changeFocusedOptionIndex(e,i)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){n.searchValue=``,n.searchTimeout=null},500),a},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var n=t===-1?e.focusedOptionId:`${e.$id}_${t}`,r=I(e.list,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:`nearest`,inline:`nearest`}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(t===-1?e.focusedOptionIndex:t)})},autoUpdateModel:function(){this.autoOptionFocus&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()),this.selectOnFocus&&this.autoOptionFocus&&!this.$filled&&this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1)},updateModel:function(e,t){this.writeValue(t,e),this.$emit(`change`,{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce(function(e,n,r){e.push({optionGroup:n,group:!0,index:r});var i=t.getOptionGroupChildren(n);return i&&i.forEach(function(t){return e.push(t)}),e},[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var e=this,t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var n=ue.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var r=this.options||[],i=[];return r.forEach(function(t){var r=e.getOptionGroupChildren(t).filter(function(e){return n.includes(e)});r.length>0&&i.push(ht(ht({},t),{},Q({},typeof e.optionGroupChildren==`string`?e.optionGroupChildren:`items`,lt(r))))}),this.flatOptions(i)}return n}return t},hasSelectedOption:function(){return this.$filled},label:function(){var e=this.findSelectedOptionIndex();return e===-1?this.placeholder||`p-emptylabel`:this.getOptionLabel(this.visibleOptions[e])},editableInputValue:function(){var e=this.findSelectedOptionIndex();return e===-1?this.d_value||``:this.getOptionLabel(this.visibleOptions[e])},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return r(this.visibleOptions)?this.filterMessageText.replaceAll(`{0}`,this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||``},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||``},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||``},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||``},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||``},selectedMessageText:function(){return this.$filled?this.selectionMessageText.replaceAll(`{0}`,`1`):this.emptySelectionMessageText},focusedOptionId:function(){return this.focusedOptionIndex===-1?null:`${this.$id}_${this.focusedOptionIndex}`},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(t){return!e.isOptionGroup(t)}).length},isClearIconVisible:function(){return this.showClear&&this.d_value!=null&&!this.disabled&&!this.loading},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions},containerDataP:function(){return v(Q({invalid:this.$invalid,disabled:this.disabled,focus:this.focused,fluid:this.$fluid,filled:this.$variant===`filled`},this.size,this.size))},labelDataP:function(){return v(Q(Q({placeholder:!this.editable&&this.label===this.placeholder,clearable:this.showClear,disabled:this.disabled,editable:this.editable},this.size,this.size),`empty`,!this.editable&&!this.$slots.value&&(this.label===`p-emptylabel`||this.label.length===0)))},dropdownIconDataP:function(){return v(Q({},this.size,this.size))},overlayDataP:function(){return v(Q({},`portal-`+this.appendTo,`portal-`+this.appendTo))}},directives:{ripple:ie},components:{InputText:W,VirtualScroller:it,Portal:ce,InputIcon:Xe,IconField:Je,TimesIcon:le,ChevronDownIcon:Pe,SpinnerIcon:ae,SearchIcon:Ve,CheckIcon:z,BlankIcon:De}},vt=[`id`,`data-p`],yt=[`name`,`id`,`value`,`placeholder`,`tabindex`,`disabled`,`aria-label`,`aria-labelledby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`,`aria-invalid`,`data-p`],bt=[`name`,`id`,`tabindex`,`aria-label`,`aria-labelledby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`,`aria-invalid`,`aria-disabled`,`data-p`],xt=[`data-p`],St=[`id`],Ct=[`id`],wt=[`id`,`aria-label`,`aria-selected`,`aria-disabled`,`aria-setsize`,`aria-posinset`,`onMousedown`,`onMousemove`,`data-p-selected`,`data-p-focused`,`data-p-disabled`];function Tt(t,n,r,o,c,f){var p=b(`SpinnerIcon`),h=b(`InputText`),_=b(`SearchIcon`),v=b(`InputIcon`),x=b(`IconField`),C=b(`CheckIcon`),w=b(`BlankIcon`),te=b(`VirtualScroller`),O=b(`Portal`),k=a(`ripple`);return e(),F(`div`,d({ref:`container`,id:t.$id,class:t.cx(`root`),onClick:n[12]||=function(){return f.onContainerClick&&f.onContainerClick.apply(f,arguments)},"data-p":f.containerDataP},t.ptmi(`root`)),[t.editable?(e(),F(`input`,d({key:0,ref:`focusInput`,name:t.name,id:t.labelId||t.inputId,type:`text`,class:[t.cx(`label`),t.inputClass,t.labelClass],style:[t.inputStyle,t.labelStyle],value:f.editableInputValue,placeholder:t.placeholder,tabindex:t.disabled?-1:t.tabindex,disabled:t.disabled,autocomplete:`off`,role:`combobox`,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-haspopup":`listbox`,"aria-expanded":c.overlayVisible,"aria-controls":c.overlayVisible?t.$id+`_list`:void 0,"aria-activedescendant":c.focused?f.focusedOptionId:void 0,"aria-invalid":t.invalid||void 0,onFocus:n[0]||=function(){return f.onFocus&&f.onFocus.apply(f,arguments)},onBlur:n[1]||=function(){return f.onBlur&&f.onBlur.apply(f,arguments)},onKeydown:n[2]||=function(){return f.onKeyDown&&f.onKeyDown.apply(f,arguments)},onInput:n[3]||=function(){return f.onEditableInput&&f.onEditableInput.apply(f,arguments)},"data-p":f.labelDataP},t.ptm(`label`)),null,16,yt)):(e(),F(`span`,d({key:1,ref:`focusInput`,name:t.name,id:t.labelId||t.inputId,class:[t.cx(`label`),t.inputClass,t.labelClass],style:[t.inputStyle,t.labelStyle],tabindex:t.disabled?-1:t.tabindex,role:`combobox`,"aria-label":t.ariaLabel||(f.label===`p-emptylabel`?void 0:f.label),"aria-labelledby":t.ariaLabelledby,"aria-haspopup":`listbox`,"aria-expanded":c.overlayVisible,"aria-controls":t.$id+`_list`,"aria-activedescendant":c.focused?f.focusedOptionId:void 0,"aria-invalid":t.invalid||void 0,"aria-disabled":t.disabled,onFocus:n[4]||=function(){return f.onFocus&&f.onFocus.apply(f,arguments)},onBlur:n[5]||=function(){return f.onBlur&&f.onBlur.apply(f,arguments)},onKeydown:n[6]||=function(){return f.onKeyDown&&f.onKeyDown.apply(f,arguments)},"data-p":f.labelDataP},t.ptm(`label`)),[y(t.$slots,`value`,{value:t.d_value,placeholder:t.placeholder},function(){return[L(u(f.label===`p-emptylabel`?`\xA0`:f.label??`empty`),1)]})],16,bt)),f.isClearIconVisible?y(t.$slots,`clearicon`,{key:2,class:m(t.cx(`clearIcon`)),clearCallback:f.onClearClick},function(){return[(e(),E(l(t.clearIcon?`i`:`TimesIcon`),d({ref:`clearIcon`,class:[t.cx(`clearIcon`),t.clearIcon],onClick:f.onClearClick},t.ptm(`clearIcon`),{"data-pc-section":`clearicon`}),null,16,[`class`,`onClick`]))]}):S(``,!0),D(`div`,d({class:t.cx(`dropdown`)},t.ptm(`dropdown`)),[t.loading?y(t.$slots,`loadingicon`,{key:0,class:m(t.cx(`loadingIcon`))},function(){return[t.loadingIcon?(e(),F(`span`,d({key:0,class:[t.cx(`loadingIcon`),`pi-spin`,t.loadingIcon],"aria-hidden":`true`},t.ptm(`loadingIcon`)),null,16)):(e(),E(p,d({key:1,class:t.cx(`loadingIcon`),spin:``,"aria-hidden":`true`},t.ptm(`loadingIcon`)),null,16,[`class`]))]}):y(t.$slots,`dropdownicon`,{key:1,class:m(t.cx(`dropdownIcon`))},function(){return[(e(),E(l(t.dropdownIcon?`span`:`ChevronDownIcon`),d({class:[t.cx(`dropdownIcon`),t.dropdownIcon],"aria-hidden":`true`,"data-p":f.dropdownIconDataP},t.ptm(`dropdownIcon`)),null,16,[`class`,`data-p`]))]})],16),g(O,{appendTo:t.appendTo},{default:j(function(){return[g(pe,d({name:`p-anchored-overlay`,onEnter:f.onOverlayEnter,onAfterEnter:f.onOverlayAfterEnter,onLeave:f.onOverlayLeave,onAfterLeave:f.onOverlayAfterLeave},t.ptm(`transition`)),{default:j(function(){return[c.overlayVisible?(e(),F(`div`,d({key:0,ref:f.overlayRef,class:[t.cx(`overlay`),t.panelClass,t.overlayClass],style:[t.panelStyle,t.overlayStyle],onClick:n[10]||=function(){return f.onOverlayClick&&f.onOverlayClick.apply(f,arguments)},onKeydown:n[11]||=function(){return f.onOverlayKeyDown&&f.onOverlayKeyDown.apply(f,arguments)},"data-p":f.overlayDataP},t.ptm(`overlay`)),[D(`span`,d({ref:`firstHiddenFocusableElementOnOverlay`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:0,onFocus:n[7]||=function(){return f.onFirstHiddenFocus&&f.onFirstHiddenFocus.apply(f,arguments)}},t.ptm(`hiddenFirstFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),y(t.$slots,`header`,{value:t.d_value,options:f.visibleOptions}),t.filter?(e(),F(`div`,d({key:0,class:t.cx(`header`)},t.ptm(`header`)),[g(x,{unstyled:t.unstyled,pt:t.ptm(`pcFilterContainer`)},{default:j(function(){return[g(h,{ref:`filterInput`,type:`text`,value:c.filterValue,onVnodeMounted:f.onFilterUpdated,onVnodeUpdated:f.onFilterUpdated,class:m(t.cx(`pcFilter`)),placeholder:t.filterPlaceholder,variant:t.variant,unstyled:t.unstyled,role:`searchbox`,autocomplete:`off`,"aria-owns":t.$id+`_list`,"aria-activedescendant":f.focusedOptionId,onKeydown:f.onFilterKeyDown,onBlur:f.onFilterBlur,onInput:f.onFilterChange,pt:t.ptm(`pcFilter`),formControl:{novalidate:!0}},null,8,[`value`,`onVnodeMounted`,`onVnodeUpdated`,`class`,`placeholder`,`variant`,`unstyled`,`aria-owns`,`aria-activedescendant`,`onKeydown`,`onBlur`,`onInput`,`pt`]),g(v,{unstyled:t.unstyled,pt:t.ptm(`pcFilterIconContainer`)},{default:j(function(){return[y(t.$slots,`filtericon`,{},function(){return[t.filterIcon?(e(),F(`span`,d({key:0,class:t.filterIcon},t.ptm(`filterIcon`)),null,16)):(e(),E(_,i(d({key:1},t.ptm(`filterIcon`))),null,16))]})]}),_:3},8,[`unstyled`,`pt`])]}),_:3},8,[`unstyled`,`pt`]),D(`span`,d({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},t.ptm(`hiddenFilterResult`),{"data-p-hidden-accessible":!0}),u(f.filterResultMessageText),17)],16)):S(``,!0),D(`div`,d({class:t.cx(`listContainer`),style:{"max-height":f.virtualScrollerDisabled?t.scrollHeight:``}},t.ptm(`listContainer`)),[g(te,d({ref:f.virtualScrollerRef},t.virtualScrollerOptions,{items:f.visibleOptions,style:{height:t.scrollHeight},tabindex:-1,disabled:f.virtualScrollerDisabled,pt:t.ptm(`virtualScroller`)}),ee({content:j(function(r){var i=r.styleClass,a=r.contentRef,o=r.items,l=r.getItemOptions,p=r.contentStyle,m=r.itemSize;return[D(`ul`,d({ref:function(e){return f.listRef(e,a)},id:t.$id+`_list`,class:[t.cx(`list`),i],style:p,role:`listbox`},t.ptm(`list`)),[(e(!0),F(T,null,s(o,function(r,i){return e(),F(T,{key:f.getOptionRenderKey(r,f.getOptionIndex(i,l))},[f.isOptionGroup(r)?(e(),F(`li`,d({key:0,id:t.$id+`_`+f.getOptionIndex(i,l),style:{height:m?m+`px`:void 0},class:t.cx(`optionGroup`),role:`option`},{ref_for:!0},t.ptm(`optionGroup`)),[y(t.$slots,`optiongroup`,{option:r.optionGroup,index:f.getOptionIndex(i,l)},function(){return[D(`span`,d({class:t.cx(`optionGroupLabel`)},{ref_for:!0},t.ptm(`optionGroupLabel`)),u(f.getOptionGroupLabel(r.optionGroup)),17)]})],16,Ct)):oe((e(),F(`li`,d({key:1,id:t.$id+`_`+f.getOptionIndex(i,l),class:t.cx(`option`,{option:r,focusedOption:f.getOptionIndex(i,l)}),style:{height:m?m+`px`:void 0},role:`option`,"aria-label":f.getOptionLabel(r),"aria-selected":f.isSelected(r),"aria-disabled":f.isOptionDisabled(r),"aria-setsize":f.ariaSetSize,"aria-posinset":f.getAriaPosInset(f.getOptionIndex(i,l)),onMousedown:function(e){return f.onOptionSelect(e,r)},onMousemove:function(e){return f.onOptionMouseMove(e,f.getOptionIndex(i,l))},onClick:n[8]||=fe(function(){},[`stop`]),"data-p-selected":!t.checkmark&&f.isSelected(r),"data-p-focused":c.focusedOptionIndex===f.getOptionIndex(i,l),"data-p-disabled":f.isOptionDisabled(r)},{ref_for:!0},f.getPTItemOptions(r,l,i,`option`)),[t.checkmark?(e(),F(T,{key:0},[f.isSelected(r)?(e(),E(C,d({key:0,class:t.cx(`optionCheckIcon`)},{ref_for:!0},t.ptm(`optionCheckIcon`)),null,16,[`class`])):(e(),E(w,d({key:1,class:t.cx(`optionBlankIcon`)},{ref_for:!0},t.ptm(`optionBlankIcon`)),null,16,[`class`]))],64)):S(``,!0),y(t.$slots,`option`,{option:r,selected:f.isSelected(r),index:f.getOptionIndex(i,l)},function(){return[D(`span`,d({class:t.cx(`optionLabel`)},{ref_for:!0},t.ptm(`optionLabel`)),u(f.getOptionLabel(r)),17)]})],16,wt)),[[k]])],64)}),128)),c.filterValue&&(!o||o&&o.length===0)?(e(),F(`li`,d({key:0,class:t.cx(`emptyMessage`),role:`option`},t.ptm(`emptyMessage`),{"data-p-hidden-accessible":!0}),[y(t.$slots,`emptyfilter`,{},function(){return[L(u(f.emptyFilterMessageText),1)]})],16)):!t.options||t.options&&t.options.length===0?(e(),F(`li`,d({key:1,class:t.cx(`emptyMessage`),role:`option`},t.ptm(`emptyMessage`),{"data-p-hidden-accessible":!0}),[y(t.$slots,`empty`,{},function(){return[L(u(f.emptyMessageText),1)]})],16)):S(``,!0)],16,St)]}),_:2},[t.$slots.loader?{name:`loader`,fn:j(function(e){var n=e.options;return[y(t.$slots,`loader`,{options:n})]}),key:`0`}:void 0]),1040,[`items`,`style`,`disabled`,`pt`])],16),y(t.$slots,`footer`,{value:t.d_value,options:f.visibleOptions}),!t.options||t.options&&t.options.length===0?(e(),F(`span`,d({key:1,role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},t.ptm(`hiddenEmptyMessage`),{"data-p-hidden-accessible":!0}),u(f.emptyMessageText),17)):S(``,!0),D(`span`,d({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},t.ptm(`hiddenSelectedMessage`),{"data-p-hidden-accessible":!0}),u(f.selectedMessageText),17),D(`span`,d({ref:`lastHiddenFocusableElementOnOverlay`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:0,onFocus:n[9]||=function(){return f.onLastHiddenFocus&&f.onLastHiddenFocus.apply(f,arguments)}},t.ptm(`hiddenLastFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16,xt)):S(``,!0)]}),_:3},16,[`onEnter`,`onAfterEnter`,`onLeave`,`onAfterLeave`])]}),_:3},8,[`appendTo`])],16,vt)}$.render=Tt;export{V as a,H as i,Ee as n,z as o,W as r,$ as t};
|
|
439
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dt(e,t){if(e){if(typeof e==`string`)return Z(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}function ft(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function pt(e){if(Array.isArray(e))return Z(e)}function Z(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mt(Object(n),!0).forEach(function(t){Q(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Q(e,t,n){return(t=gt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gt(e){var t=_t(e,`string`);return X(t)==`symbol`?t:t+``}function _t(e,t){if(X(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(X(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $={name:`Select`,extends:ct,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`before-show`,`before-hide`,`show`,`hide`,`filter`],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,matchMediaOrientationListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1,queryOrientation:null}},watch:{modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel(),this.bindLabelClickListener(),this.bindMatchMediaOrientationListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.unbindMatchMediaOrientationListener(),this.scrollHandler&&=(this.scrollHandler.destroy(),null),this.overlay&&=(R.clear(this.overlay),null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?f(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?f(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?f(e,this.dataKey):this.getOptionLabel(e))+`_`+t},getPTItemOptions:function(e,t,n,r){return this.ptm(r,{context:{option:e,index:n,selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?f(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return f(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return f(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(e){return t.isOptionGroup(e)}).length:e)+1},show:function(e){this.$emit(`before-show`),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex===-1?this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex():this.focusedOptionIndex,e&&N(this.$refs.focusInput)},hide:function(e){var t=this,n=function(){t.$emit(`before-hide`),t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,t.searchValue=``,t.resetFilterOnHide&&(t.filterValue=null),e&&N(t.$refs.focusInput)};setTimeout(function(){n()},0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=this.focusedOptionIndex===-1?this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex():this.focusedOptionIndex,this.scrollInView(this.focusedOptionIndex)),this.$emit(`focus`,e))},onBlur:function(e){var t=this;setTimeout(function(){var n,r;t.focused=!1,t.focusedOptionIndex=-1,t.searchValue=``,t.$emit(`blur`,e),(n=(r=t.formField).onBlur)==null||n.call(r,e)},100)},onKeyDown:function(e){var t=this;if(this.disabled){e.preventDefault();return}if(o())switch(e.code){case`Backspace`:this.onBackspaceKey(e,this.editable);break;case`Enter`:case`NumpadDecimal`:this.onEnterKey(e);break;default:e.preventDefault();return}var n=e.metaKey||e.ctrlKey;switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e,this.editable);break;case`ArrowLeft`:case`ArrowRight`:this.onArrowLeftKey(e,this.editable);break;case`Home`:this.onHomeKey(e,this.editable);break;case`End`:this.onEndKey(e,this.editable);break;case`PageDown`:this.onPageDownKey(e);break;case`PageUp`:this.onPageUpKey(e);break;case`Space`:this.onSpaceKey(e,this.editable);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break;case`Backspace`:this.onBackspaceKey(e,this.editable);break;case`ShiftLeft`:case`ShiftRight`:break;default:!n&&p(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key),this.filter&&this.$nextTick(function(){t.$refs.filterInput&&N(t.$refs.filterInput.$el)}));break}this.clicked=!1},onEditableInput:function(e){var t=e.target.value;this.searchValue=``,!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.updateModel(e,t),!this.overlayVisible&&r(t)&&this.show()},onContainerClick:function(e){this.disabled||this.loading||e.target.tagName===`INPUT`||e.target.getAttribute(`data-pc-section`)===`clearicon`||e.target.closest(`[data-pc-section="clearicon"]`)||((!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onClearClick:function(e){this.updateModel(e,null),this.resetFilterOnClear&&(this.filterValue=null)},onFirstHiddenFocus:function(e){N(e.relatedTarget===this.$refs.focusInput?t(this.overlay,`:not([data-p-hidden-focusable="true"])`):this.$refs.focusInput)},onLastHiddenFocus:function(e){N(e.relatedTarget===this.$refs.focusInput?h(this.overlay,`:not([data-p-hidden-focusable="true"])`):this.$refs.focusInput)},onOptionSelect:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(this.overlayVisible){var r=this.getOptionValue(t);this.updateModel(e,r),n&&this.hide(!0)}},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange:function(e){var t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit(`filter`,{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){if(!e.isComposing)switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e,!0);break;case`ArrowLeft`:case`ArrowRight`:this.onArrowLeftKey(e,!0);break;case`Home`:this.onHomeKey(e,!0);break;case`End`:this.onEndKey(e,!0);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){Ee.emit(`overlay-click`,{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case`Escape`:this.onEscapeKey(e);break}},onArrowDownKey:function(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{var t=this.focusedOptionIndex===-1?this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex():this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e,t)}e.preventDefault()},onArrowUpKey:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.altKey&&!t)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var n=this.focusedOptionIndex===-1?this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex():this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;e.shiftKey?t.setSelectionRange(0,e.target.selectionStart):(t.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;if(e.shiftKey)t.setSelectionRange(e.target.selectionStart,t.value.length);else{var n=t.value.length;t.setSelectionRange(n,n),this.focusedOptionIndex=-1}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide(!0)):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onSpaceKey:function(e){!(arguments.length>1&&arguments[1]!==void 0&&arguments[1])&&this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()},onTabKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]||(this.overlayVisible&&this.hasFocusableElements()?(N(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]&&!this.overlayVisible&&this.show()},onOverlayEnter:function(e){var t=this;R.set(`overlay`,e,this.$primevue.config.zIndex.overlay),ne(e,{position:`absolute`,top:`0`}),this.alignOverlay(),this.scrollInView(),this.$attrSelector&&e.setAttribute(this.$attrSelector,``),setTimeout(function(){t.autoFilterFocus&&t.filter&&N(t.$refs.filterInput.$el),t.autoUpdateModel()},1)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit(`show`)},onOverlayLeave:function(e){var t=this;e.style.pointerEvents=`none`,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.autoFilterFocus&&this.filter&&!this.editable&&this.$nextTick(function(){t.$refs.filterInput&&N(t.$refs.filterInput.$el)}),this.$emit(`hide`),this.overlay=null},onOverlayAfterLeave:function(e){R.clear(e)},alignOverlay:function(){this.appendTo===`self`?x(this.overlay,this.$el):this.overlay&&(this.overlay.style.minWidth=_(this.$el)+`px`,c(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var n=t.composedPath();e.overlayVisible&&e.overlay&&!n.includes(e.$el)&&!n.includes(e.overlay)&&e.hide()},document.addEventListener(`click`,this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&=(document.removeEventListener(`click`,this.outsideClickListener,!0),null)},bindScrollListener:function(){var e=this;this.scrollHandler||=new ce(this.$refs.container,function(){e.overlayVisible&&e.hide()}),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!se()&&e.hide()},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},bindLabelClickListener:function(){var e=this;if(!this.editable&&!this.labelClickListener){var t=document.querySelector(`label[for="${this.labelId}"]`);t&&O(t)&&(this.labelClickListener=function(){N(e.$refs.focusInput)},t.addEventListener(`click`,this.labelClickListener))}},unbindLabelClickListener:function(){if(this.labelClickListener){var e=document.querySelector(`label[for="${this.labelId}"]`);e&&O(e)&&e.removeEventListener(`click`,this.labelClickListener)}},bindMatchMediaOrientationListener:function(){var e=this;this.matchMediaOrientationListener||(this.queryOrientation=matchMedia(`(orientation: portrait)`),this.matchMediaOrientationListener=function(){e.alignOverlay()},this.queryOrientation.addEventListener(`change`,this.matchMediaOrientationListener))},unbindMatchMediaOrientationListener:function(){this.matchMediaOrientationListener&&=(this.queryOrientation.removeEventListener(`change`,this.matchMediaOrientationListener),this.queryOrientation=null,null)},hasFocusableElements:function(){return te(this.overlay,`:not([data-p-hidden-focusable="true"])`).length>0},isOptionExactMatched:function(e){return this.isValidOption(e)&&typeof this.getOptionLabel(e)==`string`&&this.getOptionLabel(e)?.toLocaleLowerCase(this.filterLocale)==this.searchValue.toLocaleLowerCase(this.filterLocale)},isOptionStartsWith:function(e){return this.isValidOption(e)&&typeof this.getOptionLabel(e)==`string`&&this.getOptionLabel(e)?.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return r(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return re(this.d_value,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(t){return e.isValidOption(t)})},findLastOptionIndex:function(){var e=this;return A(this.visibleOptions,function(t){return e.isValidOption(t)})},findNextOptionIndex:function(e){var t=this,n=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(e){return t.isValidOption(e)}):-1;return n>-1?n+e+1:e},findPrevOptionIndex:function(e){var t=this,n=e>0?A(this.visibleOptions.slice(0,e),function(e){return t.isValidOption(e)}):-1;return n>-1?n:e},findSelectedOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(t){return e.isValidSelectedOption(t)})},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var n=this;this.searchValue=(this.searchValue||``)+t;var i=-1,a=!1;return r(this.searchValue)&&(i=this.visibleOptions.findIndex(function(e){return n.isOptionExactMatched(e)}),i===-1&&(i=this.visibleOptions.findIndex(function(e){return n.isOptionStartsWith(e)})),i!==-1&&(a=!0),i===-1&&this.focusedOptionIndex===-1&&(i=this.findFirstFocusedOptionIndex()),i!==-1&&this.changeFocusedOptionIndex(e,i)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){n.searchValue=``,n.searchTimeout=null},500),a},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var n=t===-1?e.focusedOptionId:`${e.$id}_${t}`,r=I(e.list,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:`nearest`,inline:`nearest`}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(t===-1?e.focusedOptionIndex:t)})},autoUpdateModel:function(){this.autoOptionFocus&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()),this.selectOnFocus&&this.autoOptionFocus&&!this.$filled&&this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1)},updateModel:function(e,t){this.writeValue(t,e),this.$emit(`change`,{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce(function(e,n,r){e.push({optionGroup:n,group:!0,index:r});var i=t.getOptionGroupChildren(n);return i&&i.forEach(function(t){return e.push(t)}),e},[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var e=this,t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var n=ue.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var r=this.options||[],i=[];return r.forEach(function(t){var r=e.getOptionGroupChildren(t).filter(function(e){return n.includes(e)});r.length>0&&i.push(ht(ht({},t),{},Q({},typeof e.optionGroupChildren==`string`?e.optionGroupChildren:`items`,lt(r))))}),this.flatOptions(i)}return n}return t},hasSelectedOption:function(){return this.$filled},label:function(){var e=this.findSelectedOptionIndex();return e===-1?this.placeholder||`p-emptylabel`:this.getOptionLabel(this.visibleOptions[e])},editableInputValue:function(){var e=this.findSelectedOptionIndex();return e===-1?this.d_value||``:this.getOptionLabel(this.visibleOptions[e])},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return r(this.visibleOptions)?this.filterMessageText.replaceAll(`{0}`,this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||``},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||``},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||``},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||``},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||``},selectedMessageText:function(){return this.$filled?this.selectionMessageText.replaceAll(`{0}`,`1`):this.emptySelectionMessageText},focusedOptionId:function(){return this.focusedOptionIndex===-1?null:`${this.$id}_${this.focusedOptionIndex}`},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(t){return!e.isOptionGroup(t)}).length},isClearIconVisible:function(){return this.showClear&&this.d_value!=null&&!this.disabled&&!this.loading},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions},containerDataP:function(){return v(Q({invalid:this.$invalid,disabled:this.disabled,focus:this.focused,fluid:this.$fluid,filled:this.$variant===`filled`},this.size,this.size))},labelDataP:function(){return v(Q(Q({placeholder:!this.editable&&this.label===this.placeholder,clearable:this.showClear,disabled:this.disabled,editable:this.editable},this.size,this.size),`empty`,!this.editable&&!this.$slots.value&&(this.label===`p-emptylabel`||this.label.length===0)))},dropdownIconDataP:function(){return v(Q({},this.size,this.size))},overlayDataP:function(){return v(Q({},`portal-`+this.appendTo,`portal-`+this.appendTo))}},directives:{ripple:ie},components:{InputText:W,VirtualScroller:it,Portal:le,InputIcon:Xe,IconField:Je,TimesIcon:de,ChevronDownIcon:Pe,SpinnerIcon:ae,SearchIcon:Ve,CheckIcon:z,BlankIcon:De}},vt=[`id`,`data-p`],yt=[`name`,`id`,`value`,`placeholder`,`tabindex`,`disabled`,`aria-label`,`aria-labelledby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`,`aria-invalid`,`data-p`],bt=[`name`,`id`,`tabindex`,`aria-label`,`aria-labelledby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`,`aria-invalid`,`aria-disabled`,`data-p`],xt=[`data-p`],St=[`id`],Ct=[`id`],wt=[`id`,`aria-label`,`aria-selected`,`aria-disabled`,`aria-setsize`,`aria-posinset`,`onMousedown`,`onMousemove`,`data-p-selected`,`data-p-focused`,`data-p-disabled`];function Tt(t,n,r,o,c,f){var p=b(`SpinnerIcon`),h=b(`InputText`),_=b(`SearchIcon`),v=b(`InputIcon`),x=b(`IconField`),C=b(`CheckIcon`),w=b(`BlankIcon`),te=b(`VirtualScroller`),O=b(`Portal`),k=a(`ripple`);return e(),F(`div`,d({ref:`container`,id:t.$id,class:t.cx(`root`),onClick:n[12]||=function(){return f.onContainerClick&&f.onContainerClick.apply(f,arguments)},"data-p":f.containerDataP},t.ptmi(`root`)),[t.editable?(e(),F(`input`,d({key:0,ref:`focusInput`,name:t.name,id:t.labelId||t.inputId,type:`text`,class:[t.cx(`label`),t.inputClass,t.labelClass],style:[t.inputStyle,t.labelStyle],value:f.editableInputValue,placeholder:t.placeholder,tabindex:t.disabled?-1:t.tabindex,disabled:t.disabled,autocomplete:`off`,role:`combobox`,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-haspopup":`listbox`,"aria-expanded":c.overlayVisible,"aria-controls":c.overlayVisible?t.$id+`_list`:void 0,"aria-activedescendant":c.focused?f.focusedOptionId:void 0,"aria-invalid":t.invalid||void 0,onFocus:n[0]||=function(){return f.onFocus&&f.onFocus.apply(f,arguments)},onBlur:n[1]||=function(){return f.onBlur&&f.onBlur.apply(f,arguments)},onKeydown:n[2]||=function(){return f.onKeyDown&&f.onKeyDown.apply(f,arguments)},onInput:n[3]||=function(){return f.onEditableInput&&f.onEditableInput.apply(f,arguments)},"data-p":f.labelDataP},t.ptm(`label`)),null,16,yt)):(e(),F(`span`,d({key:1,ref:`focusInput`,name:t.name,id:t.labelId||t.inputId,class:[t.cx(`label`),t.inputClass,t.labelClass],style:[t.inputStyle,t.labelStyle],tabindex:t.disabled?-1:t.tabindex,role:`combobox`,"aria-label":t.ariaLabel||(f.label===`p-emptylabel`?void 0:f.label),"aria-labelledby":t.ariaLabelledby,"aria-haspopup":`listbox`,"aria-expanded":c.overlayVisible,"aria-controls":t.$id+`_list`,"aria-activedescendant":c.focused?f.focusedOptionId:void 0,"aria-invalid":t.invalid||void 0,"aria-disabled":t.disabled,onFocus:n[4]||=function(){return f.onFocus&&f.onFocus.apply(f,arguments)},onBlur:n[5]||=function(){return f.onBlur&&f.onBlur.apply(f,arguments)},onKeydown:n[6]||=function(){return f.onKeyDown&&f.onKeyDown.apply(f,arguments)},"data-p":f.labelDataP},t.ptm(`label`)),[y(t.$slots,`value`,{value:t.d_value,placeholder:t.placeholder},function(){return[L(u(f.label===`p-emptylabel`?`\xA0`:f.label??`empty`),1)]})],16,bt)),f.isClearIconVisible?y(t.$slots,`clearicon`,{key:2,class:m(t.cx(`clearIcon`)),clearCallback:f.onClearClick},function(){return[(e(),E(l(t.clearIcon?`i`:`TimesIcon`),d({ref:`clearIcon`,class:[t.cx(`clearIcon`),t.clearIcon],onClick:f.onClearClick},t.ptm(`clearIcon`),{"data-pc-section":`clearicon`}),null,16,[`class`,`onClick`]))]}):S(``,!0),D(`div`,d({class:t.cx(`dropdown`)},t.ptm(`dropdown`)),[t.loading?y(t.$slots,`loadingicon`,{key:0,class:m(t.cx(`loadingIcon`))},function(){return[t.loadingIcon?(e(),F(`span`,d({key:0,class:[t.cx(`loadingIcon`),`pi-spin`,t.loadingIcon],"aria-hidden":`true`},t.ptm(`loadingIcon`)),null,16)):(e(),E(p,d({key:1,class:t.cx(`loadingIcon`),spin:``,"aria-hidden":`true`},t.ptm(`loadingIcon`)),null,16,[`class`]))]}):y(t.$slots,`dropdownicon`,{key:1,class:m(t.cx(`dropdownIcon`))},function(){return[(e(),E(l(t.dropdownIcon?`span`:`ChevronDownIcon`),d({class:[t.cx(`dropdownIcon`),t.dropdownIcon],"aria-hidden":`true`,"data-p":f.dropdownIconDataP},t.ptm(`dropdownIcon`)),null,16,[`class`,`data-p`]))]})],16),g(O,{appendTo:t.appendTo},{default:j(function(){return[g(pe,d({name:`p-anchored-overlay`,onEnter:f.onOverlayEnter,onAfterEnter:f.onOverlayAfterEnter,onLeave:f.onOverlayLeave,onAfterLeave:f.onOverlayAfterLeave},t.ptm(`transition`)),{default:j(function(){return[c.overlayVisible?(e(),F(`div`,d({key:0,ref:f.overlayRef,class:[t.cx(`overlay`),t.panelClass,t.overlayClass],style:[t.panelStyle,t.overlayStyle],onClick:n[10]||=function(){return f.onOverlayClick&&f.onOverlayClick.apply(f,arguments)},onKeydown:n[11]||=function(){return f.onOverlayKeyDown&&f.onOverlayKeyDown.apply(f,arguments)},"data-p":f.overlayDataP},t.ptm(`overlay`)),[D(`span`,d({ref:`firstHiddenFocusableElementOnOverlay`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:0,onFocus:n[7]||=function(){return f.onFirstHiddenFocus&&f.onFirstHiddenFocus.apply(f,arguments)}},t.ptm(`hiddenFirstFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),y(t.$slots,`header`,{value:t.d_value,options:f.visibleOptions}),t.filter?(e(),F(`div`,d({key:0,class:t.cx(`header`)},t.ptm(`header`)),[g(x,{unstyled:t.unstyled,pt:t.ptm(`pcFilterContainer`)},{default:j(function(){return[g(h,{ref:`filterInput`,type:`text`,value:c.filterValue,onVnodeMounted:f.onFilterUpdated,onVnodeUpdated:f.onFilterUpdated,class:m(t.cx(`pcFilter`)),placeholder:t.filterPlaceholder,variant:t.variant,unstyled:t.unstyled,role:`searchbox`,autocomplete:`off`,"aria-owns":t.$id+`_list`,"aria-activedescendant":f.focusedOptionId,onKeydown:f.onFilterKeyDown,onBlur:f.onFilterBlur,onInput:f.onFilterChange,pt:t.ptm(`pcFilter`),formControl:{novalidate:!0}},null,8,[`value`,`onVnodeMounted`,`onVnodeUpdated`,`class`,`placeholder`,`variant`,`unstyled`,`aria-owns`,`aria-activedescendant`,`onKeydown`,`onBlur`,`onInput`,`pt`]),g(v,{unstyled:t.unstyled,pt:t.ptm(`pcFilterIconContainer`)},{default:j(function(){return[y(t.$slots,`filtericon`,{},function(){return[t.filterIcon?(e(),F(`span`,d({key:0,class:t.filterIcon},t.ptm(`filterIcon`)),null,16)):(e(),E(_,i(d({key:1},t.ptm(`filterIcon`))),null,16))]})]}),_:3},8,[`unstyled`,`pt`])]}),_:3},8,[`unstyled`,`pt`]),D(`span`,d({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},t.ptm(`hiddenFilterResult`),{"data-p-hidden-accessible":!0}),u(f.filterResultMessageText),17)],16)):S(``,!0),D(`div`,d({class:t.cx(`listContainer`),style:{"max-height":f.virtualScrollerDisabled?t.scrollHeight:``}},t.ptm(`listContainer`)),[g(te,d({ref:f.virtualScrollerRef},t.virtualScrollerOptions,{items:f.visibleOptions,style:{height:t.scrollHeight},tabindex:-1,disabled:f.virtualScrollerDisabled,pt:t.ptm(`virtualScroller`)}),ee({content:j(function(r){var i=r.styleClass,a=r.contentRef,o=r.items,l=r.getItemOptions,p=r.contentStyle,m=r.itemSize;return[D(`ul`,d({ref:function(e){return f.listRef(e,a)},id:t.$id+`_list`,class:[t.cx(`list`),i],style:p,role:`listbox`},t.ptm(`list`)),[(e(!0),F(T,null,s(o,function(r,i){return e(),F(T,{key:f.getOptionRenderKey(r,f.getOptionIndex(i,l))},[f.isOptionGroup(r)?(e(),F(`li`,d({key:0,id:t.$id+`_`+f.getOptionIndex(i,l),style:{height:m?m+`px`:void 0},class:t.cx(`optionGroup`),role:`option`},{ref_for:!0},t.ptm(`optionGroup`)),[y(t.$slots,`optiongroup`,{option:r.optionGroup,index:f.getOptionIndex(i,l)},function(){return[D(`span`,d({class:t.cx(`optionGroupLabel`)},{ref_for:!0},t.ptm(`optionGroupLabel`)),u(f.getOptionGroupLabel(r.optionGroup)),17)]})],16,Ct)):oe((e(),F(`li`,d({key:1,id:t.$id+`_`+f.getOptionIndex(i,l),class:t.cx(`option`,{option:r,focusedOption:f.getOptionIndex(i,l)}),style:{height:m?m+`px`:void 0},role:`option`,"aria-label":f.getOptionLabel(r),"aria-selected":f.isSelected(r),"aria-disabled":f.isOptionDisabled(r),"aria-setsize":f.ariaSetSize,"aria-posinset":f.getAriaPosInset(f.getOptionIndex(i,l)),onMousedown:function(e){return f.onOptionSelect(e,r)},onMousemove:function(e){return f.onOptionMouseMove(e,f.getOptionIndex(i,l))},onClick:n[8]||=fe(function(){},[`stop`]),"data-p-selected":!t.checkmark&&f.isSelected(r),"data-p-focused":c.focusedOptionIndex===f.getOptionIndex(i,l),"data-p-disabled":f.isOptionDisabled(r)},{ref_for:!0},f.getPTItemOptions(r,l,i,`option`)),[t.checkmark?(e(),F(T,{key:0},[f.isSelected(r)?(e(),E(C,d({key:0,class:t.cx(`optionCheckIcon`)},{ref_for:!0},t.ptm(`optionCheckIcon`)),null,16,[`class`])):(e(),E(w,d({key:1,class:t.cx(`optionBlankIcon`)},{ref_for:!0},t.ptm(`optionBlankIcon`)),null,16,[`class`]))],64)):S(``,!0),y(t.$slots,`option`,{option:r,selected:f.isSelected(r),index:f.getOptionIndex(i,l)},function(){return[D(`span`,d({class:t.cx(`optionLabel`)},{ref_for:!0},t.ptm(`optionLabel`)),u(f.getOptionLabel(r)),17)]})],16,wt)),[[k]])],64)}),128)),c.filterValue&&(!o||o&&o.length===0)?(e(),F(`li`,d({key:0,class:t.cx(`emptyMessage`),role:`option`},t.ptm(`emptyMessage`),{"data-p-hidden-accessible":!0}),[y(t.$slots,`emptyfilter`,{},function(){return[L(u(f.emptyFilterMessageText),1)]})],16)):!t.options||t.options&&t.options.length===0?(e(),F(`li`,d({key:1,class:t.cx(`emptyMessage`),role:`option`},t.ptm(`emptyMessage`),{"data-p-hidden-accessible":!0}),[y(t.$slots,`empty`,{},function(){return[L(u(f.emptyMessageText),1)]})],16)):S(``,!0)],16,St)]}),_:2},[t.$slots.loader?{name:`loader`,fn:j(function(e){var n=e.options;return[y(t.$slots,`loader`,{options:n})]}),key:`0`}:void 0]),1040,[`items`,`style`,`disabled`,`pt`])],16),y(t.$slots,`footer`,{value:t.d_value,options:f.visibleOptions}),!t.options||t.options&&t.options.length===0?(e(),F(`span`,d({key:1,role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},t.ptm(`hiddenEmptyMessage`),{"data-p-hidden-accessible":!0}),u(f.emptyMessageText),17)):S(``,!0),D(`span`,d({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},t.ptm(`hiddenSelectedMessage`),{"data-p-hidden-accessible":!0}),u(f.selectedMessageText),17),D(`span`,d({ref:`lastHiddenFocusableElementOnOverlay`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:0,onFocus:n[9]||=function(){return f.onLastHiddenFocus&&f.onLastHiddenFocus.apply(f,arguments)}},t.ptm(`hiddenLastFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16,xt)):S(``,!0)]}),_:3},16,[`onEnter`,`onAfterEnter`,`onLeave`,`onAfterLeave`])]}),_:3},8,[`appendTo`])],16,vt)}$.render=Tt;export{V as a,H as i,Ee as n,z as o,W as r,$ as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-C8BHpRhn.js";import{t}from"./monaco.contribution-DDv5ldfS.js";var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},s=(e,t,n)=>(o(e,t,`default`),n&&o(n,t,`default`)),c={};s(c,e);var l=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=c.editor.createWebWorker({moduleId:`vs/language/typescript/tsWorker`,label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(c.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},u={};u[`lib.d.ts`]=!0,u[`lib.decorators.d.ts`]=!0,u[`lib.decorators.legacy.d.ts`]=!0,u[`lib.dom.asynciterable.d.ts`]=!0,u[`lib.dom.d.ts`]=!0,u[`lib.dom.iterable.d.ts`]=!0,u[`lib.es2015.collection.d.ts`]=!0,u[`lib.es2015.core.d.ts`]=!0,u[`lib.es2015.d.ts`]=!0,u[`lib.es2015.generator.d.ts`]=!0,u[`lib.es2015.iterable.d.ts`]=!0,u[`lib.es2015.promise.d.ts`]=!0,u[`lib.es2015.proxy.d.ts`]=!0,u[`lib.es2015.reflect.d.ts`]=!0,u[`lib.es2015.symbol.d.ts`]=!0,u[`lib.es2015.symbol.wellknown.d.ts`]=!0,u[`lib.es2016.array.include.d.ts`]=!0,u[`lib.es2016.d.ts`]=!0,u[`lib.es2016.full.d.ts`]=!0,u[`lib.es2016.intl.d.ts`]=!0,u[`lib.es2017.d.ts`]=!0,u[`lib.es2017.date.d.ts`]=!0,u[`lib.es2017.full.d.ts`]=!0,u[`lib.es2017.intl.d.ts`]=!0,u[`lib.es2017.object.d.ts`]=!0,u[`lib.es2017.sharedmemory.d.ts`]=!0,u[`lib.es2017.string.d.ts`]=!0,u[`lib.es2017.typedarrays.d.ts`]=!0,u[`lib.es2018.asyncgenerator.d.ts`]=!0,u[`lib.es2018.asynciterable.d.ts`]=!0,u[`lib.es2018.d.ts`]=!0,u[`lib.es2018.full.d.ts`]=!0,u[`lib.es2018.intl.d.ts`]=!0,u[`lib.es2018.promise.d.ts`]=!0,u[`lib.es2018.regexp.d.ts`]=!0,u[`lib.es2019.array.d.ts`]=!0,u[`lib.es2019.d.ts`]=!0,u[`lib.es2019.full.d.ts`]=!0,u[`lib.es2019.intl.d.ts`]=!0,u[`lib.es2019.object.d.ts`]=!0,u[`lib.es2019.string.d.ts`]=!0,u[`lib.es2019.symbol.d.ts`]=!0,u[`lib.es2020.bigint.d.ts`]=!0,u[`lib.es2020.d.ts`]=!0,u[`lib.es2020.date.d.ts`]=!0,u[`lib.es2020.full.d.ts`]=!0,u[`lib.es2020.intl.d.ts`]=!0,u[`lib.es2020.number.d.ts`]=!0,u[`lib.es2020.promise.d.ts`]=!0,u[`lib.es2020.sharedmemory.d.ts`]=!0,u[`lib.es2020.string.d.ts`]=!0,u[`lib.es2020.symbol.wellknown.d.ts`]=!0,u[`lib.es2021.d.ts`]=!0,u[`lib.es2021.full.d.ts`]=!0,u[`lib.es2021.intl.d.ts`]=!0,u[`lib.es2021.promise.d.ts`]=!0,u[`lib.es2021.string.d.ts`]=!0,u[`lib.es2021.weakref.d.ts`]=!0,u[`lib.es2022.array.d.ts`]=!0,u[`lib.es2022.d.ts`]=!0,u[`lib.es2022.error.d.ts`]=!0,u[`lib.es2022.full.d.ts`]=!0,u[`lib.es2022.intl.d.ts`]=!0,u[`lib.es2022.object.d.ts`]=!0,u[`lib.es2022.regexp.d.ts`]=!0,u[`lib.es2022.sharedmemory.d.ts`]=!0,u[`lib.es2022.string.d.ts`]=!0,u[`lib.es2023.array.d.ts`]=!0,u[`lib.es2023.collection.d.ts`]=!0,u[`lib.es2023.d.ts`]=!0,u[`lib.es2023.full.d.ts`]=!0,u[`lib.es5.d.ts`]=!0,u[`lib.es6.d.ts`]=!0,u[`lib.esnext.collection.d.ts`]=!0,u[`lib.esnext.d.ts`]=!0,u[`lib.esnext.decorators.d.ts`]=!0,u[`lib.esnext.disposable.d.ts`]=!0,u[`lib.esnext.full.d.ts`]=!0,u[`lib.esnext.intl.d.ts`]=!0,u[`lib.esnext.object.d.ts`]=!0,u[`lib.esnext.promise.d.ts`]=!0,u[`lib.scripthost.d.ts`]=!0,u[`lib.webworker.asynciterable.d.ts`]=!0,u[`lib.webworker.d.ts`]=!0,u[`lib.webworker.importscripts.d.ts`]=!0,u[`lib.webworker.iterable.d.ts`]=!0;function d(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;e<n;e++)r+=` `}if(r+=e.messageText,n++,e.next)for(let i of e.next)r+=d(i,t,n);return r}function f(e){return e?e.map(e=>e.text).join(``):``}var p=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},m=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf(`/lib.`)===0?!!u[e.path.slice(1)]:!1}getOrCreateModel(e){let n=c.Uri.parse(e),r=c.editor.getModel(n);if(r)return r;if(this.isLibFile(n)&&this._hasFetchedLibFiles)return c.editor.createModel(this._libFiles[n.path.slice(1)],`typescript`,n);let i=t.getExtraLibs()[e];return i?c.editor.createModel(i.content,`typescript`,n):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},h=class extends p{constructor(e,t,n,r){super(r),this._libFiles=e,this._defaults=t,this._selector=n,this._disposables=[],this._listener=Object.create(null);let i=e=>{if(e.getLanguageId()!==n)return;let t=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},r,i=e.onDidChangeContent(()=>{clearTimeout(r),r=window.setTimeout(t,500)}),a=e.onDidChangeAttached(()=>{let{onlyVisible:n}=this._defaults.getDiagnosticsOptions();n&&(e.isAttachedToEditor()?t():c.editor.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){i.dispose(),a.dispose(),clearTimeout(r)}},t()},a=e=>{c.editor.setModelMarkers(e,this._selector,[]);let t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(c.editor.onDidCreateModel(e=>i(e))),this._disposables.push(c.editor.onWillDisposeModel(a)),this._disposables.push(c.editor.onDidChangeModelLanguage(e=>{a(e.model),i(e.model)})),this._disposables.push({dispose(){for(let e of c.editor.getModels())a(e)}});let o=()=>{for(let e of c.editor.getModels())a(e),i(e)};this._disposables.push(this._defaults.onDidChange(o)),this._disposables.push(this._defaults.onDidExtraLibsChange(o)),c.editor.getModels().forEach(e=>i(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let n=[],{noSyntaxValidation:r,noSemanticValidation:i,noSuggestionDiagnostics:a}=this._defaults.getDiagnosticsOptions();r||n.push(t.getSyntacticDiagnostics(e.uri.toString())),i||n.push(t.getSemanticDiagnostics(e.uri.toString())),a||n.push(t.getSuggestionDiagnostics(e.uri.toString()));let o=await Promise.all(n);if(!o||e.isDisposed())return;let s=o.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),l=s.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?c.Uri.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(l),!e.isDisposed()&&c.editor.setModelMarkers(e,this._selector,s.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(e,t){let n=t.start||0,r=t.length||1,{lineNumber:i,column:a}=e.getPositionAt(n),{lineNumber:o,column:s}=e.getPositionAt(n+r),l=[];return t.reportsUnnecessary&&l.push(c.MarkerTag.Unnecessary),t.reportsDeprecated&&l.push(c.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s,message:d(t.messageText,`
|
|
2
2
|
`),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let n=[];return t.forEach(t=>{let r=e;if(t.file&&(r=this._libFiles.getOrCreateModel(t.file.fileName)),!r)return;let i=t.start||0,a=t.length||1,{lineNumber:o,column:s}=r.getPositionAt(i),{lineNumber:c,column:l}=r.getPositionAt(i+a);n.push({resource:r.uri,startLineNumber:o,startColumn:s,endLineNumber:c,endColumn:l,message:d(t.messageText,`
|
|
3
3
|
`)})}),n}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return c.MarkerSeverity.Error;case 3:return c.MarkerSeverity.Info;case 0:return c.MarkerSeverity.Warning;case 2:return c.MarkerSeverity.Hint}return c.MarkerSeverity.Info}},g=class e extends p{get triggerCharacters(){return[`.`]}async provideCompletionItems(t,n,r,i){let a=t.getWordUntilPosition(n),o=new c.Range(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn),s=t.uri,l=t.getOffsetAt(n),u=await this._worker(s);if(t.isDisposed())return;let d=await u.getCompletionsAtPosition(s.toString(),l);if(!(!d||t.isDisposed()))return{suggestions:d.entries.map(r=>{let i=o;if(r.replacementSpan){let e=t.getPositionAt(r.replacementSpan.start),n=t.getPositionAt(r.replacementSpan.start+r.replacementSpan.length);i=new c.Range(e.lineNumber,e.column,n.lineNumber,n.column)}let a=[];return r.kindModifiers!==void 0&&r.kindModifiers.indexOf(`deprecated`)!==-1&&a.push(c.languages.CompletionItemTag.Deprecated),{uri:s,position:n,offset:l,range:i,label:r.name,insertText:r.name,sortText:r.sortText,kind:e.convertKind(r.kind),tags:a}})}}async resolveCompletionItem(t,n){let r=t,i=r.uri,a=r.position,o=r.offset,s=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),o,r.label);return s?{uri:i,position:a,label:s.name,kind:e.convertKind(s.kind),detail:f(s.displayParts),documentation:{value:e.createDocumentationString(s)}}:r}static convertKind(e){switch(e){case w.primitiveType:case w.keyword:return c.languages.CompletionItemKind.Keyword;case w.variable:case w.localVariable:return c.languages.CompletionItemKind.Variable;case w.memberVariable:case w.memberGetAccessor:case w.memberSetAccessor:return c.languages.CompletionItemKind.Field;case w.function:case w.memberFunction:case w.constructSignature:case w.callSignature:case w.indexSignature:return c.languages.CompletionItemKind.Function;case w.enum:return c.languages.CompletionItemKind.Enum;case w.module:return c.languages.CompletionItemKind.Module;case w.class:return c.languages.CompletionItemKind.Class;case w.interface:return c.languages.CompletionItemKind.Interface;case w.warning:return c.languages.CompletionItemKind.File}return c.languages.CompletionItemKind.Property}static createDocumentationString(e){let t=f(e.documentation);if(e.tags)for(let n of e.tags)t+=`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-C8BHpRhn.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:`//`,blockComment:[`/*`,`*/`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:s.languages.IndentAction.IndentOutdent,appendText:` * `}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:s.languages.IndentAction.None,appendText:` * `}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:s.languages.IndentAction.None,appendText:`* `}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:s.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]},{open:"`",close:"`",notIn:[`string`,`comment`]},{open:`/**`,close:` */`,notIn:[`string`]}],folding:{markers:{start:RegExp(`^\\s*//\\s*#?region\\b`),end:RegExp(`^\\s*//\\s*#?endregion\\b`)}}},l={defaultToken:`invalid`,tokenPostfix:`.ts`,keywords:`abstract.any.as.asserts.bigint.boolean.break.case.catch.class.continue.const.constructor.debugger.declare.default.delete.do.else.enum.export.extends.false.finally.for.from.function.get.if.implements.import.in.infer.instanceof.interface.is.keyof.let.module.namespace.never.new.null.number.object.out.package.private.protected.public.override.readonly.require.global.return.satisfies.set.static.string.super.switch.symbol.this.throw.true.try.type.typeof.undefined.unique.unknown.var.void.while.with.yield.async.await.of`.split(`.`),operators:`<=.>=.==.!=.===.!==.=>.+.-.**.*./.%.++.--.<<.</.>>.>>>.&.|.^.!.~.&&.||.??.?.:.=.+=.-=.*=.**=./=.%=.<<=.>>=.>>>=.&=.|=.^=.@`.split(`.`),symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,`delimiter.bracket`],{include:`common`}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":`keyword`,"@default":`identifier`}}],[/[A-Z][\w\$]*/,`type.identifier`],{include:`@whitespace`},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:`regexp`,bracket:`@open`,next:`@regexp`}],[/[()\[\]]/,`@brackets`],[/[<>](?!@symbols)/,`@brackets`],[/!(?=([^=]|$))/,`delimiter`],[/@symbols/,{cases:{"@operators":`delimiter`,"@default":``}}],[/(@digits)[eE]([\-+]?(@digits))?/,`number.float`],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,`number.float`],[/0[xX](@hexdigits)n?/,`number.hex`],[/0[oO]?(@octaldigits)n?/,`number.octal`],[/0[bB](@binarydigits)n?/,`number.binary`],[/(@digits)n?/,`number`],[/[;,.]/,`delimiter`],[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/"/,`string`,`@string_double`],[/'/,`string`,`@string_single`],[/`/,`string`,`@string_backtick`]],whitespace:[[/[ \t\r\n]+/,``],[/\/\*\*(?!\/)/,`comment.doc`,`@jsdoc`],[/\/\*/,`comment`,`@comment`],[/\/\/.*$/,`comment`]],comment:[[/[^\/*]+/,`comment`],[/\*\//,`comment`,`@pop`],[/[\/*]/,`comment`]],jsdoc:[[/[^\/*]+/,`comment.doc`],[/\*\//,`comment.doc`,`@pop`],[/[\/*]/,`comment.doc`]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,[`regexp.escape.control`,`regexp.escape.control`,`regexp.escape.control`]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[`regexp.escape.control`,{token:`regexp.escape.control`,next:`@regexrange`}]],[/(\()(\?:|\?=|\?!)/,[`regexp.escape.control`,`regexp.escape.control`]],[/[()]/,`regexp.escape.control`],[/@regexpctl/,`regexp.escape.control`],[/[^\\\/]/,`regexp`],[/@regexpesc/,`regexp.escape`],[/\\\./,`regexp.invalid`],[/(\/)([dgimsuy]*)/,[{token:`regexp`,bracket:`@close`,next:`@pop`},`keyword.other`]]],regexrange:[[/-/,`regexp.escape.control`],[/\^/,`regexp.invalid`],[/@regexpesc/,`regexp.escape`],[/[^\]]/,`regexp`],[/\]/,{token:`regexp.escape.control`,next:`@pop`,bracket:`@close`}]],string_double:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],string_single:[[/[^\\']+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/'/,`string`,`@pop`]],string_backtick:[[/\$\{/,{token:`delimiter.bracket`,next:`@bracketCounting`}],[/[^\\`$]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/`/,`string`,`@pop`]],bracketCounting:[[/\{/,`delimiter.bracket`,`@bracketCounting`],[/\}/,`delimiter.bracket`,`@pop`],{include:`common`}]}};export{c as conf,l as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-C8BHpRhn.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:s.languages.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:s.languages.IndentAction.Indent}}]},l={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{c as conf,l as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-C8BHpRhn.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:s.languages.IndentAction.Indent}}]},l={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{c as conf,l as language};
|
package/dist/web/index.html
CHANGED
|
@@ -16,16 +16,15 @@
|
|
|
16
16
|
if (dark) document.documentElement.classList.add("jscb-dark")
|
|
17
17
|
})()
|
|
18
18
|
</script>
|
|
19
|
-
<script type="module" crossorigin src="/assets/index-
|
|
20
|
-
<link rel="modulepreload" crossorigin href="/assets/preload-helper-
|
|
19
|
+
<script type="module" crossorigin src="/assets/index-B8rPityE.js"></script>
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/preload-helper-Dd-HcVz_.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/button-Cdgr9Igy.js">
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/assets/object-utils-
|
|
23
|
-
<link rel="modulepreload" crossorigin href="/assets/api-client-
|
|
24
|
-
<link rel="modulepreload" crossorigin href="/assets/runtime-dom.esm-bundler-
|
|
25
|
-
<link rel="modulepreload" crossorigin href="/assets/dialog-
|
|
26
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
27
|
-
<link rel="
|
|
28
|
-
<link rel="stylesheet" crossorigin href="/assets/index-BEorm4a5.css">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/object-utils-I4gWdSnS.js">
|
|
23
|
+
<link rel="modulepreload" crossorigin href="/assets/api-client-BF3HG2Vn.js">
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/assets/runtime-dom.esm-bundler-ei_N7Xjw.js">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="/assets/dialog-CUkPLPNP.js">
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-9yHVMqQ0.js">
|
|
27
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C9N8oWt4.css">
|
|
29
28
|
</head>
|
|
30
29
|
<body>
|
|
31
30
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,H as t,L as ee,Lt as n,Pt as r,S as i,_ as a,d as o,et as s,g as c,h as l,ht as u,lt as d,m as f,nt as p,rt as m,t as h,v as g,w as _,x as v}from"./button-Cdgr9Igy.js";import{t as te}from"./dialog-8xaIXBKO.js";import{a as y,l as b,o as ne}from"./runtime-dom.esm-bundler-DZwuSnld.js";import{b as x,g as re,h as ie,t as ae,u as oe}from"./api-client-BwMoRXRu.js";var se={class:`h-full min-h-0 p-4 flex flex-col gap-4 overflow-auto`},ce={key:0,class:`space-y-4`},le={class:`space-y-4 text-sm`},ue={class:`grid grid-cols-2 gap-3`},de={class:`font-medium text-foreground`},fe={class:`text-foreground truncate`},pe={class:`text-foreground`},me={key:0},he={class:`text-foreground`},ge={key:1},_e={class:`text-foreground truncate`},ve={class:`rounded-md border border-border bg-secondary p-3`},ye={class:`mb-2 text-xs text-muted-foreground`},be={class:`max-h-32 overflow-auto whitespace-pre-wrap text-xs text-foreground`},xe={key:0},Se={class:`grid grid-cols-2 gap-3`},Ce={key:0},we={class:`text-foreground truncate`},Te={key:1},S={class:`text-foreground`},C={key:1},w={class:`rounded-md border border-border overflow-hidden`},T={class:`text-foreground`},E={class:`text-muted-foreground`},D={key:2},O={class:`rounded-md border border-border overflow-hidden`},Ee={class:`text-foreground truncate`},De={class:`text-muted-foreground truncate`},Oe={key:0,class:`rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700`},ke={class:`max-h-48 overflow-auto rounded-md border border-border bg-secondary p-3 text-xs text-foreground`},Ae={class:`flex flex-wrap items-end gap-3 shrink-0`},je={class:`flex flex-col gap-1 text-sm text-foreground`},Me=[`value`],Ne={class:`flex flex-col gap-1 text-sm text-foreground`},Pe=[`value`],Fe={class:`flex h-9 rounded-md border border-border bg-muted p-0.5`},Ie={key:0,class:`flex-1 flex flex-col items-center justify-center text-muted-foreground`},Le={key:0,class:`flex-1 min-h-64 flex flex-col`},Re={key:1,class:`flex-1 min-h-64 rounded-md border border-dashed border-border bg-background p-6 flex flex-col items-center justify-center gap-3 text-center`},ze={key:0,class:`text-sm text-foreground`},Be={key:2,class:`shrink-0 rounded-md border border-border bg-secondary p-3 text-sm text-foreground`},Ve={class:`flex flex-wrap items-center gap-x-4 gap-y-1`},He={key:0},Ue={key:1},k={key:2},We={key:3},Ge={class:`shrink-0 h-72 rounded-md border border-border bg-background overflow-hidden flex flex-col`},Ke={class:`flex items-center justify-between border-b border-border px-3 py-2`},qe={key:0,class:`px-3 py-4 text-sm text-muted-foreground`},Je={key:1,class:`px-3 py-4 text-sm text-muted-foreground`},Ye={key:2,class:`min-h-0 flex-1 overflow-y-auto divide-y divide-border`},Xe=[`onClick`],Ze={class:`min-w-0`},Qe={class:`flex flex-wrap items-center gap-x-2 gap-y-1`},$e={class:`font-medium text-foreground`},et={key:0,class:`text-xs text-muted-foreground`},tt={class:`mt-1 truncate text-xs text-muted-foreground`},nt={key:0,class:`mt-1 truncate text-xs text-red-600`},rt={class:`flex items-center gap-1`},A=_({__name:`ExtractRunner`,props:{schemas:{},models:{}},emits:[`completed`],setup(_,{emit:A}){let j=_,M=A,N=d(``),P=d(``),F=d(`text`),I=d(``),L=d(null),R=d(!1),z=d(null),B=d([]),V=d(!1),H=d(null),U=d(null),W=d(null),G=d(!1),K=f(()=>j.schemas.map(e=>e.replace(`.json`,``))),it=f(()=>W.value?JSON.stringify(W.value,null,2):``);s(K,e=>{!N.value&&e.length>0&&(N.value=e[0])},{immediate:!0});function at(e){L.value=e.target.files?.[0]??null}function q(){I.value=``,L.value=null,z.value=null}async function J(){V.value=!0;try{B.value=await oe(),W.value&&=B.value.find(e=>e.id===W.value?.id)??W.value}catch{x.error(`Failed to load extraction history`)}V.value=!1}async function ot(){if(!N.value){x.error(`Select a schema`);return}let e=I.value.trim();if(F.value===`text`&&!e){x.error(`Enter text to extract`);return}if(F.value===`file`&&!L.value){x.error(`Choose a file to extract`);return}R.value=!0,z.value=null;try{let t=await re({schema:N.value,text:F.value===`text`?e:void 0,file:F.value===`file`?L.value:null,model:P.value||void 0});z.value=t,x.success(`Extraction complete`),M(`completed`,t),await J()}catch(e){x.error(e instanceof Error?e.message:`Extraction failed`),await J()}R.value=!1}async function Y(e){H.value=e.id;try{let t=await ie(e.id);z.value=t,x.success(`Retry complete`),M(`completed`,t)}catch(e){x.error(e instanceof Error?e.message:`Retry failed`)}await J(),H.value=null}async function X(e){if(confirm(`Delete this extraction history record?`)){U.value=e.id;try{await ae(e.id),x.success(`Extraction record deleted`),W.value?.id===e.id&&(W.value=null,G.value=!1),await J()}catch(e){x.error(e instanceof Error?e.message:`Failed to delete extraction record`)}U.value=null}}function Z(e){W.value=e,G.value=!0}function Q(e){return e===`succeeded`?`text-green-600`:e===`failed`?`text-red-600`:e===`stale`?`text-amber-600`:`text-muted-foreground`}function $(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function st(e){return e.source.type===`file`?e.source.fileName||`file`:`text`}function ct(e){return e.source.type===`file`?e.source.filePath||e.source.fileName||``:e.source.text||``}return ee(J),(ee,s)=>(e(),g(`div`,se,[i(u(te),{visible:G.value,"onUpdate:visible":s[3]||=e=>G.value=e,modal:``,draggable:!1,style:{width:`760px`},header:`Extraction Details`},{footer:p(()=>[W.value?(e(),c(u(h),{key:0,icon:`pi pi-trash`,label:`Delete`,severity:`danger`,size:`small`,outlined:``,loading:U.value===W.value.id,onClick:s[0]||=e=>X(W.value)},null,8,[`loading`])):a(``,!0),W.value?(e(),c(u(h),{key:1,icon:`pi pi-replay`,label:`Retry`,severity:`secondary`,size:`small`,loading:H.value===W.value.id,onClick:s[1]||=e=>Y(W.value)},null,8,[`loading`])):a(``,!0),i(u(h),{label:`Close`,size:`small`,onClick:s[2]||=e=>G.value=!1})]),default:p(()=>[W.value?(e(),g(`div`,ce,[l(`div`,le,[l(`section`,null,[s[15]||=l(`h4`,{class:`m-0 mb-2 text-xs font-semibold text-muted-foreground`},` Run `,-1),l(`div`,ue,[l(`div`,null,[s[9]||=l(`div`,{class:`text-xs text-muted-foreground`},` Status `,-1),l(`div`,{class:r([`font-medium`,Q(W.value.status)])},n(W.value.status),3)]),l(`div`,null,[s[10]||=l(`div`,{class:`text-xs text-muted-foreground`},` Schema `,-1),l(`div`,de,n(W.value.schemaName),1)]),l(`div`,null,[s[11]||=l(`div`,{class:`text-xs text-muted-foreground`},` Source `,-1),l(`div`,fe,n(W.value.source.type===`file`?W.value.source.fileName:`text`),1)]),l(`div`,null,[s[12]||=l(`div`,{class:`text-xs text-muted-foreground`},` Created `,-1),l(`div`,pe,n($(W.value.createdAt)),1)]),W.value.modelName?(e(),g(`div`,me,[s[13]||=l(`div`,{class:`text-xs text-muted-foreground`},` Model `,-1),l(`div`,he,n(W.value.modelName),1)])):a(``,!0),W.value.retryOf?(e(),g(`div`,ge,[s[14]||=l(`div`,{class:`text-xs text-muted-foreground`},` Retry Of `,-1),l(`div`,_e,n(W.value.retryOf),1)])):a(``,!0)])]),l(`section`,null,[s[16]||=l(`h4`,{class:`m-0 mb-2 text-xs font-semibold text-muted-foreground`},` Input `,-1),l(`div`,ve,[l(`div`,ye,n(W.value.source.type),1),l(`pre`,be,n(ct(W.value)),1)])]),W.value.outputName||W.value.tokensUsed?(e(),g(`section`,xe,[s[19]||=l(`h4`,{class:`m-0 mb-2 text-xs font-semibold text-muted-foreground`},` Output `,-1),l(`div`,Se,[W.value.outputName?(e(),g(`div`,Ce,[s[17]||=l(`div`,{class:`text-xs text-muted-foreground`},` File `,-1),l(`div`,we,n(W.value.outputName),1)])):a(``,!0),W.value.tokensUsed?(e(),g(`div`,Te,[s[18]||=l(`div`,{class:`text-xs text-muted-foreground`},` Tokens `,-1),l(`div`,S,n(W.value.tokensUsed.total),1)])):a(``,!0)])])):a(``,!0),W.value.tablesInserted?(e(),g(`section`,C,[s[20]||=l(`h4`,{class:`m-0 mb-2 text-xs font-semibold text-muted-foreground`},` Database Inserts `,-1),l(`div`,w,[(e(!0),g(o,null,t(W.value.tablesInserted,t=>(e(),g(`div`,{key:`${t.table}-${t.rowId}`,class:`flex items-center justify-between px-3 py-2 text-sm border-b border-border last:border-b-0`},[l(`span`,T,n(t.table),1),l(`span`,E,`#`+n(t.rowId),1)]))),128))])])):a(``,!0),W.value.notionPages?(e(),g(`section`,D,[s[21]||=l(`h4`,{class:`m-0 mb-2 text-xs font-semibold text-muted-foreground`},` Notion Pages `,-1),l(`div`,O,[(e(!0),g(o,null,t(W.value.notionPages,t=>(e(),g(`div`,{key:t.pageId,class:`flex items-center justify-between gap-3 px-3 py-2 text-sm border-b border-border last:border-b-0`},[l(`span`,Ee,n(t.databaseId),1),l(`span`,De,n(t.pageId),1)]))),128))])])):a(``,!0)]),W.value.error?(e(),g(`div`,Oe,n(W.value.error),1)):a(``,!0),l(`section`,null,[s[22]||=l(`h4`,{class:`m-0 mb-2 text-xs font-semibold text-muted-foreground`},` Raw Record `,-1),l(`pre`,ke,n(it.value),1)])])):a(``,!0)]),_:1},8,[`visible`]),l(`div`,Ae,[l(`label`,je,[s[23]||=l(`span`,{class:`text-xs text-muted-foreground`},`Schema`,-1),m(l(`select`,{"onUpdate:modelValue":s[4]||=e=>N.value=e,class:`h-9 min-w-48 rounded-md border border-border bg-background px-2 text-sm outline-none focus:border-primary`},[(e(!0),g(o,null,t(K.value,t=>(e(),g(`option`,{key:t,value:t},n(t),9,Me))),128))],512),[[y,N.value]])]),l(`label`,Ne,[s[25]||=l(`span`,{class:`text-xs text-muted-foreground`},`Model`,-1),m(l(`select`,{"onUpdate:modelValue":s[5]||=e=>P.value=e,class:`h-9 min-w-56 rounded-md border border-border bg-background px-2 text-sm outline-none focus:border-primary`},[s[24]||=l(`option`,{value:``},` Auto `,-1),(e(!0),g(o,null,t(j.models,t=>(e(),g(`option`,{key:t.name,value:t.name},n(t.name),9,Pe))),128))],512),[[y,P.value]])]),l(`div`,Fe,[l(`button`,{class:r([`px-3 text-sm rounded transition-colors`,F.value===`text`?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`]),onClick:s[6]||=e=>{F.value=`text`,q()}},` Text `,2),l(`button`,{class:r([`px-3 text-sm rounded transition-colors`,F.value===`file`?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`]),onClick:s[7]||=e=>{F.value=`file`,q()}},` File `,2)]),i(u(h),{icon:`pi pi-sparkles`,label:`Extract`,size:`small`,loading:R.value,disabled:K.value.length===0,onClick:ot},null,8,[`loading`,`disabled`])]),K.value.length===0?(e(),g(`div`,Ie,[...s[26]||=[l(`i`,{class:`pi pi-file-edit text-4xl mb-3 opacity-50`},null,-1),l(`p`,{class:`text-sm`},` Create and save a schema before extracting data `,-1)]])):(e(),g(o,{key:1},[F.value===`text`?(e(),g(`div`,Le,[m(l(`textarea`,{"onUpdate:modelValue":s[8]||=e=>I.value=e,class:`flex-1 min-h-64 resize-none rounded-md border border-border bg-background p-3 text-sm text-foreground outline-none focus:border-primary`,placeholder:`Paste text to extract...`},null,512),[[ne,I.value]])])):(e(),g(`div`,Re,[s[27]||=l(`i`,{class:`pi pi-upload text-3xl text-muted-foreground`},null,-1),l(`input`,{type:`file`,class:`max-w-full text-sm text-muted-foreground`,accept:`.txt,.md,.csv,.json,.html,.xml,.yaml,.yml,.pdf,.png,.jpg,.jpeg,.gif,.webp,.bmp,.svg`,onChange:at},null,32),L.value?(e(),g(`div`,ze,n(L.value.name),1)):a(``,!0)])),z.value?(e(),g(`div`,Be,[l(`div`,Ve,[z.value.outputName?(e(),g(`span`,He,`Saved: `+n(z.value.outputName),1)):a(``,!0),z.value.tablesInserted?(e(),g(`span`,Ue,`Inserted: `+n(z.value.tablesInserted.length)+` table(s)`,1)):a(``,!0),z.value.notionPages?(e(),g(`span`,k,`Notion: `+n(z.value.notionPages.length)+` page(s)`,1)):a(``,!0),z.value.tokensUsed?(e(),g(`span`,We,`Tokens: `+n(z.value.tokensUsed.total),1)):a(``,!0)])])):a(``,!0)],64)),l(`div`,Ge,[l(`div`,Ke,[s[28]||=l(`h3`,{class:`m-0 text-sm font-semibold text-foreground`},` Extraction History `,-1),i(u(h),{icon:`pi pi-refresh`,severity:`secondary`,size:`small`,text:``,loading:V.value,onClick:J},null,8,[`loading`])]),V.value?(e(),g(`div`,qe,` Loading... `)):B.value.length===0?(e(),g(`div`,Je,` No extraction runs yet `)):(e(),g(`div`,Ye,[(e(!0),g(o,null,t(B.value,t=>(e(),g(`div`,{key:t.id,class:`grid grid-cols-[minmax(0,1fr)_auto] gap-3 px-3 py-2 text-sm hover:bg-secondary/60 cursor-pointer`,onClick:e=>Z(t)},[l(`div`,Ze,[l(`div`,Qe,[l(`span`,$e,n(t.schemaName),1),l(`span`,{class:r([`text-xs font-medium`,Q(t.status)])},n(t.status),3),t.retryOf?(e(),g(`span`,et,`retry`)):a(``,!0)]),l(`div`,tt,[v(n($(t.createdAt))+` · `+n(st(t))+` `,1),t.modelName?(e(),g(o,{key:0},[v(` · `+n(t.modelName),1)],64)):a(``,!0),t.outputName?(e(),g(o,{key:1},[v(` · `+n(t.outputName),1)],64)):a(``,!0)]),t.error?(e(),g(`div`,nt,n(t.error),1)):a(``,!0)]),l(`div`,rt,[i(u(h),{icon:`pi pi-eye`,severity:`secondary`,size:`small`,text:``,onClick:b(e=>Z(t),[`stop`])},null,8,[`onClick`]),i(u(h),{icon:`pi pi-replay`,severity:`secondary`,size:`small`,text:``,loading:H.value===t.id,onClick:b(e=>Y(t),[`stop`])},null,8,[`loading`,`onClick`]),i(u(h),{icon:`pi pi-trash`,severity:`danger`,size:`small`,text:``,loading:U.value===t.id,onClick:b(e=>X(t),[`stop`])},null,8,[`loading`,`onClick`])])],8,Xe))),128))]))])]))}});export{A as default};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import{B as e,Cn as t,Fn as n,G as r,Ht as i,K as a,Lt as o,M as s,Pt as c,Qt as l,S as u,Sn as d,Tn as f,U as p,W as m,Xt as h,_ as g,a as _,bn as v,c as y,d as ee,dn as te,f as b,g as x,gn as ne,h as S,i as C,in as w,ln as re,m as T,mn as ie,n as ae,nt as E,o as D,pn as O,qt as oe,rt as se,sn as ce,t as le,v as k,x as ue,xn as de}from"./button-Cdgr9Igy.js";import{t as fe}from"./runtime-dom.esm-bundler-DZwuSnld.js";function pe(){let e=[],t=(t,n,r=999)=>{let a=i(t,n,r),o=a.value+(a.key===t?0:r)+1;return e.push({key:t,value:o}),o},n=t=>{e=e.filter(e=>e.value!==t)},r=(e,t)=>i(e,t).value,i=(t,n,r=0)=>[...e].reverse().find(e=>n?!0:e.key===t)||{key:t,value:r},a=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:a,set:(e,n,r)=>{n&&(n.style.zIndex=String(t(e,!0,r)))},clear:e=>{e&&(n(a(e)),e.style.zIndex=``)},getCurrent:e=>r(e,!0)}}var A=pe(),j={name:`TimesIcon`,extends:C};function M(e){return I(e)||F(e)||P(e)||N()}function N(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(e,t){if(e){if(typeof e==`string`)return L(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}function F(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function I(e){if(Array.isArray(e))return L(e)}function L(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(t,n,r,i,a,o){return e(),k(`svg`,s({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),M(n[0]||=[S(`path`,{d:`M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z`,fill:`currentColor`},null,-1)]),16)}j.render=R;var z={name:`WindowMaximizeIcon`,extends:C};function B(e){return _e(e)||ge(e)||he(e)||me()}function me(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function he(e,t){if(e){if(typeof e==`string`)return V(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}function ge(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _e(e){if(Array.isArray(e))return V(e)}function V(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ve(t,n,r,i,a,o){return e(),k(`svg`,s({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),B(n[0]||=[S(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z`,fill:`currentColor`},null,-1)]),16)}z.render=ve;var H={name:`WindowMinimizeIcon`,extends:C};function ye(e){return Ce(e)||Se(e)||xe(e)||be()}function be(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(e,t){if(e){if(typeof e==`string`)return U(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}function Se(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ce(e){if(Array.isArray(e))return U(e)}function U(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function we(t,n,r,i,a,o){return e(),k(`svg`,s({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),ye(n[0]||=[S(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z`,fill:`currentColor`},null,-1)]),16)}H.render=we;var Te=y.extend({name:`focustrap-directive`}),Ee=D.extend({style:Te});function W(e){"@babel/helpers - typeof";return W=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},W(e)}function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?G(Object(n),!0).forEach(function(t){De(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function De(e,t,n){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e){var t=ke(e,`string`);return W(t)==`symbol`?t:t+``}function ke(e,t){if(W(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(W(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ae=Ee.extend(`focustrap`,{mounted:function(e,t){(t.value||{}).disabled||(this.createHiddenFocusableElements(e,t),this.bind(e,t),this.autoElementFocus(e,t)),e.setAttribute(`data-pd-focustrap`,!0),this.$el=e},updated:function(e,t){(t.value||{}).disabled&&this.unbind(e)},unmounted:function(e){this.unbind(e)},methods:{getComputedSelector:function(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??``}`},bind:function(e,r){var i=this,a=r.value||{},o=a.onFocusIn,s=a.onFocusOut;e.$_pfocustrap_mutationobserver=new MutationObserver(function(r){r.forEach(function(r){if(r.type===`childList`&&!e.contains(document.activeElement)){var a=function(r){var o=h(r)?h(r,i.getComputedSelector(e.$_pfocustrap_focusableselector))?r:t(e,i.getComputedSelector(e.$_pfocustrap_focusableselector)):t(r);return n(o)?o:r.nextSibling&&a(r.nextSibling)};O(a(r.nextSibling))}})}),e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_mutationobserver.observe(e,{childList:!0}),e.$_pfocustrap_focusinlistener=function(e){return o&&o(e)},e.$_pfocustrap_focusoutlistener=function(e){return s&&s(e)},e.addEventListener(`focusin`,e.$_pfocustrap_focusinlistener),e.addEventListener(`focusout`,e.$_pfocustrap_focusoutlistener)},unbind:function(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener(`focusin`,e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener(`focusout`,e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)},autoFocus:function(e){this.autoElementFocus(this.$el,{value:K(K({},e),{},{autoFocus:!0})})},autoElementFocus:function(e,n){var r=n.value||{},i=r.autoFocusSelector,a=i===void 0?``:i,o=r.firstFocusableSelector,s=o===void 0?``:o,c=r.autoFocus,l=c===void 0?!1:c,u=t(e,`[autofocus]${this.getComputedSelector(a)}`);l&&!u&&(u=t(e,this.getComputedSelector(s))),O(u)},onFirstHiddenElementFocus:function(e){var n,r=e.currentTarget,i=e.relatedTarget;O(i===r.$_pfocustrap_lasthiddenfocusableelement||!((n=this.$el)!=null&&n.contains(i))?t(r.parentElement,this.getComputedSelector(r.$_pfocustrap_focusableselector)):r.$_pfocustrap_lasthiddenfocusableelement)},onLastHiddenElementFocus:function(e){var t,n=e.currentTarget,r=e.relatedTarget;O(r===n.$_pfocustrap_firsthiddenfocusableelement||!((t=this.$el)!=null&&t.contains(r))?l(n.parentElement,this.getComputedSelector(n.$_pfocustrap_focusableselector)):n.$_pfocustrap_firsthiddenfocusableelement)},createHiddenFocusableElements:function(e,t){var n=this,r=t.value||{},i=r.tabIndex,a=i===void 0?0:i,o=r.firstFocusableSelector,s=o===void 0?``:o,c=r.lastFocusableSelector,l=c===void 0?``:c,u=function(e){return ce(`span`,{class:`p-hidden-accessible p-hidden-focusable`,tabIndex:a,role:`presentation`,"aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e?.bind(n)})},d=u(this.onFirstHiddenElementFocus),f=u(this.onLastHiddenElementFocus);d.$_pfocustrap_lasthiddenfocusableelement=f,d.$_pfocustrap_focusableselector=s,d.setAttribute(`data-pc-section`,`firstfocusableelement`),f.$_pfocustrap_firsthiddenfocusableelement=d,f.$_pfocustrap_focusableselector=l,f.setAttribute(`data-pc-section`,`lastfocusableelement`),e.prepend(d),e.append(f)}}}),q={name:`Portal`,props:{appendTo:{type:[String,Object],default:`body`},disabled:{type:Boolean,default:!1}},data:function(){return{mounted:!1}},mounted:function(){this.mounted=de()},computed:{inline:function(){return this.disabled||this.appendTo===`self`}}};function je(t,n,r,i,a,o){return o.inline?p(t.$slots,`default`,{key:0}):a.mounted?(e(),x(b,{key:1,to:r.appendTo},[p(t.$slots,`default`)],8,[`to`])):g(``,!0)}q.render=je;function J(){v({variableName:i(`scrollbar.width`).name})}function Y(){ie({variableName:i(`scrollbar.width`).name})}var Me=y.extend({name:`dialog`,style:`
|
|
5
|
-
.p-dialog {
|
|
6
|
-
max-height: 90%;
|
|
7
|
-
transform: scale(1);
|
|
8
|
-
border-radius: dt('dialog.border.radius');
|
|
9
|
-
box-shadow: dt('dialog.shadow');
|
|
10
|
-
background: dt('dialog.background');
|
|
11
|
-
border: 1px solid dt('dialog.border.color');
|
|
12
|
-
color: dt('dialog.color');
|
|
13
|
-
will-change: transform;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.p-dialog-content {
|
|
17
|
-
overflow-y: auto;
|
|
18
|
-
padding: dt('dialog.content.padding');
|
|
19
|
-
flex-grow: 1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.p-dialog-header {
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: space-between;
|
|
26
|
-
flex-shrink: 0;
|
|
27
|
-
padding: dt('dialog.header.padding');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.p-dialog-title {
|
|
31
|
-
font-weight: dt('dialog.title.font.weight');
|
|
32
|
-
font-size: dt('dialog.title.font.size');
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.p-dialog-footer {
|
|
36
|
-
flex-shrink: 0;
|
|
37
|
-
padding: dt('dialog.footer.padding');
|
|
38
|
-
display: flex;
|
|
39
|
-
justify-content: flex-end;
|
|
40
|
-
gap: dt('dialog.footer.gap');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.p-dialog-header-actions {
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
gap: dt('dialog.header.gap');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.p-dialog-top .p-dialog,
|
|
50
|
-
.p-dialog-bottom .p-dialog,
|
|
51
|
-
.p-dialog-left .p-dialog,
|
|
52
|
-
.p-dialog-right .p-dialog,
|
|
53
|
-
.p-dialog-topleft .p-dialog,
|
|
54
|
-
.p-dialog-topright .p-dialog,
|
|
55
|
-
.p-dialog-bottomleft .p-dialog,
|
|
56
|
-
.p-dialog-bottomright .p-dialog {
|
|
57
|
-
margin: 1rem;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.p-dialog-maximized {
|
|
61
|
-
width: 100vw !important;
|
|
62
|
-
height: 100vh !important;
|
|
63
|
-
top: 0px !important;
|
|
64
|
-
left: 0px !important;
|
|
65
|
-
max-height: 100%;
|
|
66
|
-
height: 100%;
|
|
67
|
-
border-radius: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.p-dialog .p-resizable-handle {
|
|
71
|
-
position: absolute;
|
|
72
|
-
font-size: 0.1px;
|
|
73
|
-
display: block;
|
|
74
|
-
cursor: se-resize;
|
|
75
|
-
width: 12px;
|
|
76
|
-
height: 12px;
|
|
77
|
-
right: 1px;
|
|
78
|
-
bottom: 1px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.p-dialog-enter-active {
|
|
82
|
-
animation: p-animate-dialog-enter 300ms cubic-bezier(.19,1,.22,1);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.p-dialog-leave-active {
|
|
86
|
-
animation: p-animate-dialog-leave 300ms cubic-bezier(.19,1,.22,1);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@keyframes p-animate-dialog-enter {
|
|
90
|
-
from {
|
|
91
|
-
opacity: 0;
|
|
92
|
-
transform: scale(0.93);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
@keyframes p-animate-dialog-leave {
|
|
97
|
-
to {
|
|
98
|
-
opacity: 0;
|
|
99
|
-
transform: scale(0.93);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
`,classes:{mask:function(e){var t=e.props,n=[`left`,`right`,`top`,`topleft`,`topright`,`bottom`,`bottomleft`,`bottomright`].find(function(e){return e===t.position});return[`p-dialog-mask`,{"p-overlay-mask p-overlay-mask-enter-active":t.modal},n?`p-dialog-${n}`:``]},root:function(e){var t=e.props,n=e.instance;return[`p-dialog p-component`,{"p-dialog-maximized":t.maximizable&&n.maximized}]},header:`p-dialog-header`,title:`p-dialog-title`,headerActions:`p-dialog-header-actions`,pcMaximizeButton:`p-dialog-maximize-button`,pcCloseButton:`p-dialog-close-button`,content:`p-dialog-content`,footer:`p-dialog-footer`},inlineStyles:{mask:function(e){var t=e.position,n=e.modal;return{position:`fixed`,height:`100%`,width:`100%`,left:0,top:0,display:`flex`,justifyContent:t===`left`||t===`topleft`||t===`bottomleft`?`flex-start`:t===`right`||t===`topright`||t===`bottomright`?`flex-end`:`center`,alignItems:t===`top`||t===`topleft`||t===`topright`?`flex-start`:t===`bottom`||t===`bottomleft`||t===`bottomright`?`flex-end`:`center`,pointerEvents:n?`auto`:`none`}},root:{display:`flex`,flexDirection:`column`,pointerEvents:`auto`}}}),X={name:`Dialog`,extends:{name:`BaseDialog`,extends:_,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:`center`},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:`body`},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},maximizeButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},_instance:null},style:Me,provide:function(){return{$pcDialog:this,$parentInstance:this}}},inheritAttrs:!1,emits:[`update:visible`,`show`,`hide`,`after-hide`,`maximize`,`unmaximize`,`dragstart`,`dragend`],provide:function(){var e=this;return{dialogRef:T(function(){return e._instance})}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null,target:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,maskMouseDownTarget:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&A.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit(`update:visible`,!1)},onEnter:function(){this.$emit(`show`),this.target=document.activeElement,this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&A.set(`modal`,this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.focus()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&re(this.mask,`p-overlay-mask-leave-active`),this.dragging&&this.documentDragEndListener&&this.documentDragEndListener()},onLeave:function(){this.$emit(`hide`),O(this.target),this.target=null,this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&A.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit(`after-hide`)},onMaskMouseDown:function(e){this.maskMouseDownTarget=e.target},onMaskMouseUp:function(){this.dismissableMask&&this.modal&&this.mask===this.maskMouseDownTarget&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector(`[autofocus]`)},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=this.$slots.default&&e(this.content),t||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)))),t&&O(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit(`unmaximize`,e)):(this.maximized=!0,this.$emit(`maximize`,e)),this.modal||(this.maximized?J():Y())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&J()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&Y()},onKeyDown:function(e){e.code===`Escape`&&this.closeOnEscape&&!e.isComposing&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener(`keydown`,this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&=(window.document.removeEventListener(`keydown`,this.documentKeydownListener),null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e?e.$el:void 0},closeButtonRef:function(e){this.closeButton=e?e.$el:void 0},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement(`style`),this.styleElement.type=`text/css`,te(this.styleElement,`nonce`,(e=this.$primevue)==null||(e=e.config)==null||(e=e.csp)==null?void 0:e.nonce),document.head.appendChild(this.styleElement);var t=``;for(var n in this.breakpoints)t+=`
|
|
103
|
-
@media screen and (max-width: ${n}) {
|
|
104
|
-
.p-dialog[${this.$attrSelector}] {
|
|
105
|
-
width: ${this.breakpoints[n]} !important;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
`;this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&=(document.head.removeChild(this.styleElement),null)},initDrag:function(e){e.target.closest(`div`).getAttribute(`data-pc-section`)!==`headeractions`&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin=`0`,document.body.setAttribute(`data-p-unselectable-text`,`true`),!this.isUnstyled&&w(document.body,{"user-select":`none`}),this.$emit(`dragstart`,e))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=d(e.container),r=oe(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,o=e.container.getBoundingClientRect(),s=o.left+i,c=o.top+a,l=ne(),u=getComputedStyle(e.container),f=parseFloat(u.marginLeft),p=parseFloat(u.marginTop);e.container.style.position=`fixed`,e.keepInViewport?(s>=e.minX&&s+n<l.width&&(e.lastPageX=t.pageX,e.container.style.left=s-f+`px`),c>=e.minY&&c+r<l.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+`px`)):(e.lastPageX=t.pageX,e.container.style.left=s-f+`px`,e.lastPageY=t.pageY,e.container.style.top=c-p+`px`)}},window.document.addEventListener(`mousemove`,this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&=(window.document.removeEventListener(`mousemove`,this.documentDragListener),null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,document.body.removeAttribute(`data-p-unselectable-text`),!e.isUnstyled&&(document.body.style[`user-select`]=``),e.$emit(`dragend`,t))},window.document.addEventListener(`mouseup`,this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&=(window.document.removeEventListener(`mouseup`,this.documentDragEndListener),null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?`span`:`WindowMinimizeIcon`:this.maximizeIcon?`span`:`WindowMaximizeIcon`},ariaLabelledById:function(){return this.header!=null||this.$attrs[`aria-labelledby`]!==null?this.$id+`_header`:null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},dataP:function(){return f({maximized:this.maximized,modal:this.modal})}},directives:{ripple:ae,focustrap:Ae},components:{Button:le,Portal:q,WindowMinimizeIcon:H,WindowMaximizeIcon:z,TimesIcon:j}};function Z(e){"@babel/helpers - typeof";return Z=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Z(e)}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Q(Object(n),!0).forEach(function(t){Ne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ne(e,t,n){return(t=Pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e){var t=Fe(e,`string`);return Z(t)==`symbol`?t:t+``}function Fe(e,t){if(Z(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Z(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ie=[`data-p`],Le=[`aria-labelledby`,`aria-modal`,`data-p`],Re=[`id`],ze=[`data-p`];function Be(t,n,i,l,d,f){var h=m(`Button`),_=m(`Portal`),v=r(`focustrap`);return e(),x(_,{appendTo:t.appendTo},{default:E(function(){return[d.containerVisible?(e(),k(`div`,s({key:0,ref:f.maskRef,class:t.cx(`mask`),style:t.sx(`mask`,!0,{position:t.position,modal:t.modal}),onMousedown:n[1]||=function(){return f.onMaskMouseDown&&f.onMaskMouseDown.apply(f,arguments)},onMouseup:n[2]||=function(){return f.onMaskMouseUp&&f.onMaskMouseUp.apply(f,arguments)},"data-p":f.dataP},t.ptm(`mask`)),[u(fe,s({name:`p-dialog`,onEnter:f.onEnter,onAfterEnter:f.onAfterEnter,onBeforeLeave:f.onBeforeLeave,onLeave:f.onLeave,onAfterLeave:f.onAfterLeave,appear:``},t.ptm(`transition`)),{default:E(function(){return[t.visible?se((e(),k(`div`,s({key:0,ref:f.containerRef,class:t.cx(`root`),style:t.sx(`root`),role:`dialog`,"aria-labelledby":f.ariaLabelledById,"aria-modal":t.modal,"data-p":f.dataP},t.ptmi(`root`)),[t.$slots.container?p(t.$slots,`container`,{key:0,closeCallback:f.close,maximizeCallback:function(e){return f.maximize(e)},initDragCallback:f.initDrag}):(e(),k(ee,{key:1},[t.showHeader?(e(),k(`div`,s({key:0,ref:f.headerContainerRef,class:t.cx(`header`),onMousedown:n[0]||=function(){return f.initDrag&&f.initDrag.apply(f,arguments)}},t.ptm(`header`)),[p(t.$slots,`header`,{class:c(t.cx(`title`))},function(){return[t.header?(e(),k(`span`,s({key:0,id:f.ariaLabelledById,class:t.cx(`title`)},t.ptm(`title`)),o(t.header),17,Re)):g(``,!0)]}),S(`div`,s({class:t.cx(`headerActions`)},t.ptm(`headerActions`)),[t.maximizable?p(t.$slots,`maximizebutton`,{key:0,maximized:d.maximized,maximizeCallback:function(e){return f.maximize(e)}},function(){return[u(h,s({ref:f.maximizableRef,autofocus:d.focusableMax,class:t.cx(`pcMaximizeButton`),onClick:f.maximize,tabindex:t.maximizable?`0`:`-1`,unstyled:t.unstyled},t.maximizeButtonProps,{pt:t.ptm(`pcMaximizeButton`),"data-pc-group-section":`headericon`}),{icon:E(function(n){return[p(t.$slots,`maximizeicon`,{maximized:d.maximized},function(){return[(e(),x(a(f.maximizeIconComponent),s({class:[n.class,d.maximized?t.minimizeIcon:t.maximizeIcon]},t.ptm(`pcMaximizeButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`autofocus`,`class`,`onClick`,`tabindex`,`unstyled`,`pt`])]}):g(``,!0),t.closable?p(t.$slots,`closebutton`,{key:1,closeCallback:f.close},function(){return[u(h,s({ref:f.closeButtonRef,autofocus:d.focusableClose,class:t.cx(`pcCloseButton`),onClick:f.close,"aria-label":f.closeAriaLabel,unstyled:t.unstyled},t.closeButtonProps,{pt:t.ptm(`pcCloseButton`),"data-pc-group-section":`headericon`}),{icon:E(function(n){return[p(t.$slots,`closeicon`,{},function(){return[(e(),x(a(t.closeIcon?`span`:`TimesIcon`),s({class:[t.closeIcon,n.class]},t.ptm(`pcCloseButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`autofocus`,`class`,`onClick`,`aria-label`,`unstyled`,`pt`])]}):g(``,!0)],16)],16)):g(``,!0),S(`div`,s({ref:f.contentRef,class:[t.cx(`content`),t.contentClass],style:t.contentStyle,"data-p":f.dataP},$($({},t.contentProps),t.ptm(`content`))),[p(t.$slots,`default`)],16,ze),t.footer||t.$slots.footer?(e(),k(`div`,s({key:1,ref:f.footerContainerRef,class:t.cx(`footer`)},t.ptm(`footer`)),[p(t.$slots,`footer`,{},function(){return[ue(o(t.footer),1)]})],16)):g(``,!0)],64))],16,Le)),[[v,{disabled:!t.modal}]]):g(``,!0)]}),_:3},16,[`onEnter`,`onAfterEnter`,`onBeforeLeave`,`onLeave`,`onAfterLeave`])],16,Ie)):g(``,!0)]}),_:3},8,[`appendTo`])}X.render=Be;export{A as i,q as n,j as r,X as t};
|