aiex-cli 0.0.4-beta.1 → 0.0.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +763 -603
- package/dist/{doctor-collector-xRnW5Rj3.mjs → doctor-collector-8fLyh9lK.mjs} +17 -4
- package/dist/index.mjs +1 -1
- package/dist/web/assets/AISettings-DfoDfxk9.js +272 -0
- package/dist/web/assets/{index-CGZLSwt2.js → index-sK43vSj1.js} +2 -2
- package/dist/web/index.html +1 -1
- package/dist/{zh-CN-DAlmQ2hb.mjs → zh-CN-B5QVQVm-.mjs} +2 -0
- package/package.json +1 -1
- package/dist/web/assets/AISettings-BmCr8Kj4.js +0 -272
|
@@ -74,7 +74,7 @@ function doctorDiagnosticsTableRows(d) {
|
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region package.json
|
|
76
76
|
var name = "aiex-cli";
|
|
77
|
-
var version = "0.0.4-beta.
|
|
77
|
+
var version = "0.0.4-beta.3";
|
|
78
78
|
var description = "JSON Schema → SQLite with AI-powered data extraction";
|
|
79
79
|
var package_default = {
|
|
80
80
|
name,
|
|
@@ -272,6 +272,11 @@ const NotionConfigSchema = z.object({
|
|
|
272
272
|
token: z.string(),
|
|
273
273
|
schemas: z.record(NotionSchemaConfigSchema).default({})
|
|
274
274
|
});
|
|
275
|
+
const WebhookConfigSchema = z.object({
|
|
276
|
+
enabled: z.boolean(),
|
|
277
|
+
url: z.string(),
|
|
278
|
+
secret: z.string().optional()
|
|
279
|
+
});
|
|
275
280
|
const AIConfigSchema = z.object({
|
|
276
281
|
provider: AIProviderConfigSchema,
|
|
277
282
|
prompt: PromptConfigSchema,
|
|
@@ -279,7 +284,8 @@ const AIConfigSchema = z.object({
|
|
|
279
284
|
image: ImageOcrConfigSchema.optional(),
|
|
280
285
|
pdf: PdfConfigSchema.optional(),
|
|
281
286
|
langfuse: LangfuseConfigSchema.optional(),
|
|
282
|
-
notion: NotionConfigSchema.optional()
|
|
287
|
+
notion: NotionConfigSchema.optional(),
|
|
288
|
+
webhook: WebhookConfigSchema.optional()
|
|
283
289
|
});
|
|
284
290
|
|
|
285
291
|
//#endregion
|
|
@@ -371,7 +377,12 @@ const DEFAULT_AI_CONFIG = {
|
|
|
371
377
|
prompt: DEFAULT_PROMPT_CONFIG,
|
|
372
378
|
extraction: DEFAULT_EXTRACTION_CONFIG,
|
|
373
379
|
image: DEFAULT_IMAGE_OCR_CONFIG,
|
|
374
|
-
pdf: DEFAULT_PDF_CONFIG
|
|
380
|
+
pdf: DEFAULT_PDF_CONFIG,
|
|
381
|
+
webhook: {
|
|
382
|
+
enabled: false,
|
|
383
|
+
url: "",
|
|
384
|
+
secret: ""
|
|
385
|
+
}
|
|
375
386
|
};
|
|
376
387
|
|
|
377
388
|
//#endregion
|
|
@@ -549,6 +560,8 @@ const en = {
|
|
|
549
560
|
processSuccess: "Processed: {{file}}",
|
|
550
561
|
notionSynced: "Synced to Notion: {{count}} page(s)",
|
|
551
562
|
notionSyncFail: "Notion sync failed: {{error}}",
|
|
563
|
+
webhookSynced: "Webhook payload sent successfully",
|
|
564
|
+
webhookSyncFail: "Webhook push failed: {{error}}",
|
|
552
565
|
extractionFailed: "Failed: {{error}}"
|
|
553
566
|
}
|
|
554
567
|
},
|
|
@@ -926,7 +939,7 @@ async function initI18n(lng) {
|
|
|
926
939
|
fallbackLng: "en",
|
|
927
940
|
resources: {
|
|
928
941
|
"en": { translation: en },
|
|
929
|
-
"zh-CN": { translation: await import("./zh-CN-
|
|
942
|
+
"zh-CN": { translation: await import("./zh-CN-B5QVQVm-.mjs").then((m) => m.zhCN) }
|
|
930
943
|
},
|
|
931
944
|
interpolation: { escapeValue: false },
|
|
932
945
|
returnNull: false
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as formatDoctorDiagnosticsJson, O as buildDoctorDiagnostics, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, k as doctorDiagnosticsTableRows, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics } from "./doctor-collector-
|
|
1
|
+
import { A as formatDoctorDiagnosticsJson, O as buildDoctorDiagnostics, a as parseJsonSchema, i as JsonSchemaDefinitionSchema, k as doctorDiagnosticsTableRows, n as createMigrationConfig, r as generateDrizzleConfig, s as generateDrizzleSchema, t as collectDoctorDiagnostics } from "./doctor-collector-8fLyh9lK.mjs";
|
|
2
2
|
|
|
3
3
|
export { JsonSchemaDefinitionSchema, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import{A as e,At as t,C as n,D as r,Gt as i,H as a,I as o,J as s,K as c,L as l,O as u,S as d,T as f,W as p,X as m,_ as h,d as g,et as _,fn as v,gt as y,hn as b,ht as x,kt as S,lt as C,n as ee,o as w,on as T,q as E,r as D,rn as O,rt as k,tt as A,u as j,w as M,x as N,y as P,yt as F,zt as I}from"./vue-i18n-Du42D0vb.js";import{i as L,n as R,r as z,s as B,t as V}from"./dialog-CnZ7jH1l.js";import{_ as H,a as U,f as W,m as te,n as ne,s as re}from"./api-client-b4ZBXpNH.js";import{a as G,i as K,n as q,r as ie,s as ae,t as J}from"./textarea-DMpqBhjw.js";var oe={name:`MinusIcon`,extends:w};function se(e){return de(e)||ue(e)||le(e)||ce()}function ce(){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 le(e,t){if(e){if(typeof e==`string`)return Y(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)?Y(e,t):void 0}}function ue(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function de(e){if(Array.isArray(e))return Y(e)}function Y(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 fe(e,t,n,r,i,a){return p(),f(`svg`,l({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),se(t[0]||=[d(`path`,{d:`M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z`,fill:`currentColor`},null,-1)]),16)}oe.render=fe;var X=j.extend({name:`checkbox`,style:`
|
|
3
|
+
.p-checkbox {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
user-select: none;
|
|
7
|
+
vertical-align: bottom;
|
|
8
|
+
width: dt('checkbox.width');
|
|
9
|
+
height: dt('checkbox.height');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.p-checkbox-input {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
appearance: none;
|
|
15
|
+
position: absolute;
|
|
16
|
+
inset-block-start: 0;
|
|
17
|
+
inset-inline-start: 0;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
opacity: 0;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
outline: 0 none;
|
|
25
|
+
border: 1px solid transparent;
|
|
26
|
+
border-radius: dt('checkbox.border.radius');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.p-checkbox-box {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
align-items: center;
|
|
33
|
+
border-radius: dt('checkbox.border.radius');
|
|
34
|
+
border: 1px solid dt('checkbox.border.color');
|
|
35
|
+
background: dt('checkbox.background');
|
|
36
|
+
width: dt('checkbox.width');
|
|
37
|
+
height: dt('checkbox.height');
|
|
38
|
+
transition:
|
|
39
|
+
background dt('checkbox.transition.duration'),
|
|
40
|
+
color dt('checkbox.transition.duration'),
|
|
41
|
+
border-color dt('checkbox.transition.duration'),
|
|
42
|
+
box-shadow dt('checkbox.transition.duration'),
|
|
43
|
+
outline-color dt('checkbox.transition.duration');
|
|
44
|
+
outline-color: transparent;
|
|
45
|
+
box-shadow: dt('checkbox.shadow');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.p-checkbox-icon {
|
|
49
|
+
transition-duration: dt('checkbox.transition.duration');
|
|
50
|
+
color: dt('checkbox.icon.color');
|
|
51
|
+
font-size: dt('checkbox.icon.size');
|
|
52
|
+
width: dt('checkbox.icon.size');
|
|
53
|
+
height: dt('checkbox.icon.size');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
57
|
+
border-color: dt('checkbox.hover.border.color');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.p-checkbox-checked .p-checkbox-box {
|
|
61
|
+
border-color: dt('checkbox.checked.border.color');
|
|
62
|
+
background: dt('checkbox.checked.background');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.p-checkbox-checked .p-checkbox-icon {
|
|
66
|
+
color: dt('checkbox.icon.checked.color');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
70
|
+
background: dt('checkbox.checked.hover.background');
|
|
71
|
+
border-color: dt('checkbox.checked.hover.border.color');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {
|
|
75
|
+
color: dt('checkbox.icon.checked.hover.color');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
|
|
79
|
+
border-color: dt('checkbox.focus.border.color');
|
|
80
|
+
box-shadow: dt('checkbox.focus.ring.shadow');
|
|
81
|
+
outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color');
|
|
82
|
+
outline-offset: dt('checkbox.focus.ring.offset');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
|
|
86
|
+
border-color: dt('checkbox.checked.focus.border.color');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-checkbox.p-invalid > .p-checkbox-box {
|
|
90
|
+
border-color: dt('checkbox.invalid.border.color');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.p-checkbox.p-variant-filled .p-checkbox-box {
|
|
94
|
+
background: dt('checkbox.filled.background');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.p-checkbox-checked.p-variant-filled .p-checkbox-box {
|
|
98
|
+
background: dt('checkbox.checked.background');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
102
|
+
background: dt('checkbox.checked.hover.background');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.p-checkbox.p-disabled {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.p-checkbox.p-disabled .p-checkbox-box {
|
|
110
|
+
background: dt('checkbox.disabled.background');
|
|
111
|
+
border-color: dt('checkbox.checked.disabled.border.color');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {
|
|
115
|
+
color: dt('checkbox.icon.disabled.color');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.p-checkbox-sm,
|
|
119
|
+
.p-checkbox-sm .p-checkbox-box {
|
|
120
|
+
width: dt('checkbox.sm.width');
|
|
121
|
+
height: dt('checkbox.sm.height');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.p-checkbox-sm .p-checkbox-icon {
|
|
125
|
+
font-size: dt('checkbox.icon.sm.size');
|
|
126
|
+
width: dt('checkbox.icon.sm.size');
|
|
127
|
+
height: dt('checkbox.icon.sm.size');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.p-checkbox-lg,
|
|
131
|
+
.p-checkbox-lg .p-checkbox-box {
|
|
132
|
+
width: dt('checkbox.lg.width');
|
|
133
|
+
height: dt('checkbox.lg.height');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.p-checkbox-lg .p-checkbox-icon {
|
|
137
|
+
font-size: dt('checkbox.icon.lg.size');
|
|
138
|
+
width: dt('checkbox.icon.lg.size');
|
|
139
|
+
height: dt('checkbox.icon.lg.size');
|
|
140
|
+
}
|
|
141
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-checkbox p-component`,{"p-checkbox-checked":t.checked,"p-disabled":n.disabled,"p-invalid":t.$pcCheckboxGroup?t.$pcCheckboxGroup.$invalid:t.$invalid,"p-variant-filled":t.$variant===`filled`,"p-checkbox-sm p-inputfield-sm":n.size===`small`,"p-checkbox-lg p-inputfield-lg":n.size===`large`}]},box:`p-checkbox-box`,input:`p-checkbox-input`,icon:`p-checkbox-icon`}}),pe={name:`BaseCheckbox`,extends:G,props:{value:null,binary:Boolean,indeterminate:{type:Boolean,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:X,provide:function(){return{$pcCheckbox:this,$parentInstance:this}}};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 me(e,t,n){return(t=he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(e){var t=ge(e,`string`);return Z(t)==`symbol`?t:t+``}function ge(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)}function _e(e){return xe(e)||be(e)||ye(e)||ve()}function ve(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
142
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ye(e,t){if(e){if(typeof e==`string`)return Q(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)?Q(e,t):void 0}}function be(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function xe(e){if(Array.isArray(e))return Q(e)}function Q(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}var $={name:`Checkbox`,extends:pe,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`update:indeterminate`],inject:{$pcCheckboxGroup:{default:void 0}},data:function(){return{d_indeterminate:this.indeterminate}},watch:{indeterminate:function(e){this.d_indeterminate=e,this.updateIndeterminate()}},mounted:function(){this.updateIndeterminate()},updated:function(){this.updateIndeterminate()},methods:{getPTOptions:function(e){return(e===`root`?this.ptmi:this.ptm)(e,{context:{checked:this.checked,indeterminate:this.d_indeterminate,disabled:this.disabled}})},onChange:function(e){var t=this;if(!this.disabled&&!this.readonly){var n=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value,r=this.binary?this.d_indeterminate?this.trueValue:this.checked?this.falseValue:this.trueValue:this.checked||this.d_indeterminate?n.filter(function(e){return!v(e,t.value)}):n?[].concat(_e(n),[this.value]):[this.value];this.d_indeterminate&&(this.d_indeterminate=!1,this.$emit(`update:indeterminate`,this.d_indeterminate)),this.$pcCheckboxGroup?this.$pcCheckboxGroup.writeValue(r,e):this.writeValue(r,e),this.$emit(`change`,e)}},onFocus:function(e){this.$emit(`focus`,e)},onBlur:function(e){var t,n;this.$emit(`blur`,e),(t=(n=this.formField).onBlur)==null||t.call(n,e)},updateIndeterminate:function(){this.$refs.input&&(this.$refs.input.indeterminate=this.d_indeterminate)}},computed:{groupName:function(){return this.$pcCheckboxGroup?this.$pcCheckboxGroup.groupName:this.$formName},checked:function(){var e=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value;return this.d_indeterminate?!1:this.binary?e===this.trueValue:b(this.value,e)},dataP:function(){return T(me({invalid:this.$invalid,checked:this.checked,disabled:this.disabled,filled:this.$variant===`filled`},this.size,this.size))}},components:{CheckIcon:ae,MinusIcon:oe}},Se=[`data-p-checked`,`data-p-indeterminate`,`data-p-disabled`,`data-p`],Ce=[`id`,`value`,`name`,`checked`,`tabindex`,`disabled`,`readonly`,`required`,`aria-labelledby`,`aria-label`,`aria-invalid`],we=[`data-p`];function Te(e,t,r,i,a,o){var c=s(`CheckIcon`),u=s(`MinusIcon`);return p(),f(`div`,l({class:e.cx(`root`)},o.getPTOptions(`root`),{"data-p-checked":o.checked,"data-p-indeterminate":a.d_indeterminate||void 0,"data-p-disabled":e.disabled,"data-p":o.dataP}),[d(`input`,l({ref:`input`,id:e.inputId,type:`checkbox`,class:[e.cx(`input`),e.inputClass],style:e.inputStyle,value:e.value,name:o.groupName,checked:o.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onFocus:t[0]||=function(){return o.onFocus&&o.onFocus.apply(o,arguments)},onBlur:t[1]||=function(){return o.onBlur&&o.onBlur.apply(o,arguments)},onChange:t[2]||=function(){return o.onChange&&o.onChange.apply(o,arguments)}},o.getPTOptions(`input`)),null,16,Ce),d(`div`,l({class:e.cx(`box`)},o.getPTOptions(`box`),{"data-p":o.dataP}),[E(e.$slots,`icon`,{checked:o.checked,indeterminate:a.d_indeterminate,class:y(e.cx(`icon`)),dataP:o.dataP},function(){return[o.checked?(p(),n(c,l({key:0,class:e.cx(`icon`)},o.getPTOptions(`icon`),{"data-p":o.dataP}),null,16,[`class`,`data-p`])):a.d_indeterminate?(p(),n(u,l({key:1,class:e.cx(`icon`)},o.getPTOptions(`icon`),{"data-p":o.dataP}),null,16,[`class`,`data-p`])):M(``,!0)]})],16,we)],16,Se)}$.render=Te;var Ee={name:`EyeIcon`,extends:w};function De(e){return je(e)||Ae(e)||ke(e)||Oe()}function Oe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
143
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ke(e,t){if(e){if(typeof e==`string`)return Me(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)?Me(e,t):void 0}}function Ae(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function je(e){if(Array.isArray(e))return Me(e)}function Me(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 Ne(e,t,n,r,i,a){return p(),f(`svg`,l({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),De(t[0]||=[d(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z`,fill:`currentColor`},null,-1)]),16)}Ee.render=Ne;var Pe={name:`EyeSlashIcon`,extends:w};function Fe(e){return ze(e)||Re(e)||Le(e)||Ie()}function Ie(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
144
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Le(e,t){if(e){if(typeof e==`string`)return Be(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)?Be(e,t):void 0}}function Re(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ze(e){if(Array.isArray(e))return Be(e)}function Be(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(e,t,n,r,i,a){return p(),f(`svg`,l({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),Fe(t[0]||=[d(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z`,fill:`currentColor`},null,-1)]),16)}Pe.render=Ve;var He=j.extend({name:`password`,style:`
|
|
145
|
+
.p-password {
|
|
146
|
+
display: inline-flex;
|
|
147
|
+
position: relative;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.p-password .p-password-overlay {
|
|
151
|
+
min-width: 100%;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.p-password-meter {
|
|
155
|
+
height: dt('password.meter.height');
|
|
156
|
+
background: dt('password.meter.background');
|
|
157
|
+
border-radius: dt('password.meter.border.radius');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.p-password-meter-label {
|
|
161
|
+
height: 100%;
|
|
162
|
+
width: 0;
|
|
163
|
+
transition: width 1s ease-in-out;
|
|
164
|
+
border-radius: dt('password.meter.border.radius');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.p-password-meter-weak {
|
|
168
|
+
background: dt('password.strength.weak.background');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.p-password-meter-medium {
|
|
172
|
+
background: dt('password.strength.medium.background');
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.p-password-meter-strong {
|
|
176
|
+
background: dt('password.strength.strong.background');
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.p-password-fluid {
|
|
180
|
+
display: flex;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.p-password-fluid .p-password-input {
|
|
184
|
+
width: 100%;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.p-password-input::-ms-reveal,
|
|
188
|
+
.p-password-input::-ms-clear {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.p-password-overlay {
|
|
193
|
+
padding: dt('password.overlay.padding');
|
|
194
|
+
background: dt('password.overlay.background');
|
|
195
|
+
color: dt('password.overlay.color');
|
|
196
|
+
border: 1px solid dt('password.overlay.border.color');
|
|
197
|
+
box-shadow: dt('password.overlay.shadow');
|
|
198
|
+
border-radius: dt('password.overlay.border.radius');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.p-password-content {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
gap: dt('password.content.gap');
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.p-password-toggle-mask-icon {
|
|
208
|
+
inset-inline-end: dt('form.field.padding.x');
|
|
209
|
+
color: dt('password.icon.color');
|
|
210
|
+
position: absolute;
|
|
211
|
+
top: 50%;
|
|
212
|
+
margin-top: calc(-1 * calc(dt('icon.size') / 2));
|
|
213
|
+
width: dt('icon.size');
|
|
214
|
+
height: dt('icon.size');
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.p-password-clear-icon {
|
|
218
|
+
position: absolute;
|
|
219
|
+
top: 50%;
|
|
220
|
+
margin-top: -0.5rem;
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
inset-inline-end: dt('form.field.padding.x');
|
|
223
|
+
color: dt('form.field.icon.color');
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.p-password:has(.p-password-toggle-mask-icon) .p-password-input {
|
|
227
|
+
padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.p-password:has(.p-password-toggle-mask-icon) .p-password-clear-icon {
|
|
231
|
+
inset-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.p-password:has(.p-password-clear-icon) .p-password-input {
|
|
235
|
+
padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.p-password:has(.p-password-clear-icon):has(.p-password-toggle-mask-icon) .p-password-input {
|
|
239
|
+
padding-inline-end: calc((dt('form.field.padding.x') * 3) + calc(dt('icon.size') * 2));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
`,classes:{root:function(e){var t=e.instance;return[`p-password p-component p-inputwrapper`,{"p-inputwrapper-filled":t.$filled,"p-inputwrapper-focus":t.focused,"p-password-fluid":t.$fluid}]},pcInputText:`p-password-input`,maskIcon:`p-password-toggle-mask-icon p-password-mask-icon`,unmaskIcon:`p-password-toggle-mask-icon p-password-unmask-icon`,clearIcon:`p-password-clear-icon`,overlay:`p-password-overlay p-component`,content:`p-password-content`,meter:`p-password-meter`,meterLabel:function(e){var t=e.instance;return`p-password-meter-label ${t.meter?`p-password-meter-`+t.meter.strength:``}`},meterText:`p-password-meter-text`},inlineStyles:{root:function(e){return{position:e.props.appendTo===`self`?`relative`:void 0}}}}),Ue={name:`BasePassword`,extends:G,props:{promptLabel:{type:String,default:null},mediumRegex:{type:[String,RegExp],default:`^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})`},strongRegex:{type:[String,RegExp],default:`^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})`},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:[String,Object],default:`body`},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},maskIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},unmaskIcon:{type:String,default:void 0},showClear:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},overlayId:{type:String,default:null},overlayClass:{type:[String,Object],default:null},overlayStyle:{type:Object,default:null},overlayProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},autofocus:{type:Boolean,default:null}},style:He,provide:function(){return{$pcPassword:this,$parentInstance:this}}};function We(e){"@babel/helpers - typeof";return We=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},We(e)}function Ge(e,t,n){return(t=Ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ke(e){var t=qe(e,`string`);return We(t)==`symbol`?t:t+``}function qe(e,t){if(We(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(We(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Je={name:`Password`,extends:Ue,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`invalid`],inject:{$pcFluid:{default:null}},data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&=(this.scrollHandler.destroy(),null),this.overlay&&=(B.clear(this.overlay),null)},methods:{onOverlayEnter:function(e){B.set(`overlay`,e,this.$primevue.config.zIndex.overlay),I(e,{position:`absolute`,top:`0`}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener(),this.$attrSelector&&e.setAttribute(this.$attrSelector,``)},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){B.clear(e)},alignOverlay:function(){this.appendTo===`self`?t(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=O(this.$refs.input.$el)+`px`,S(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.writeValue(e.target.value,e),this.$emit(`change`,e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.d_value),this.overlayVisible=!0),this.$emit(`focus`,e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit(`blur`,e)},onKeyUp:function(e){if(this.feedback){var t=e.target.value,n=this.checkPasswordStrength(t),r=n.meter,i=n.label;if(this.meter=r,this.infoText=i,e.code===`Escape`){this.overlayVisible&&=!1;return}this.overlayVisible||=!0}},setPasswordMeter:function(){if(!this.d_value){this.meter=null,this.infoText=this.promptText;return}var e=this.checkPasswordStrength(this.d_value),t=e.meter,n=e.label;this.meter=t,this.infoText=n,this.overlayVisible||=!0},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:`weak`,width:`33.33%`};break;case 2:t=this.mediumText,n={strength:`medium`,width:`66.66%`};break;case 3:t=this.strongText,n={strength:`strong`,width:`100%`};break;default:t=this.promptText,n=null;break}return{label:t,meter:n}},onInvalid:function(e){this.$emit(`invalid`,e)},bindScrollListener:function(){var e=this;this.scrollHandler||=new L(this.$refs.input.$el,function(){e.overlayVisible&&=!1}),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!i()&&(e.overlayVisible=!1)},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onClearClick:function(e){this.writeValue(null,{})},onOverlayClick:function(e){ie.emit(`overlay-click`,{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?`text`:`password`},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},isClearIconVisible:function(){return this.showClear&&this.$filled&&!this.disabled},overlayUniqueId:function(){return this.$id+`_overlay`},containerDataP:function(){return T({fluid:this.$fluid})},meterDataP:function(){return T(Ge({},this.meter?.strength,this.meter?.strength))},overlayDataP:function(){return T(Ge({},`portal-`+this.appendTo,`portal-`+this.appendTo))}},components:{InputText:K,Portal:R,EyeSlashIcon:Pe,EyeIcon:Ee,TimesIcon:z}};function Ye(e){"@babel/helpers - typeof";return Ye=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},Ye(e)}function Xe(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 Ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Xe(Object(n),!0).forEach(function(t){Qe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qe(e,t,n){return(t=$e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e){var t=et(e,`string`);return Ye(t)==`symbol`?t:t+``}function et(e,t){if(Ye(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ye(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var tt=[`data-p`],nt=[`id`,`data-p`],rt=[`data-p`];function it(e,t,r,i,a,o){var c=s(`InputText`),h=s(`TimesIcon`),_=s(`Portal`);return p(),f(`div`,l({class:e.cx(`root`),style:e.sx(`root`),"data-p":o.containerDataP},e.ptmi(`root`)),[u(c,l({ref:`input`,id:e.inputId,type:o.inputType,class:[e.cx(`pcInputText`),e.inputClass],style:e.inputStyle,defaultValue:e.d_value,name:e.$formName,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-expanded":a.overlayVisible,"aria-controls":a.overlayVisible?e.overlayProps&&e.overlayProps.id||e.overlayId||e.panelProps&&e.panelProps.id||e.panelId||o.overlayUniqueId:void 0,"aria-haspopup":e.feedback,placeholder:e.placeholder,required:e.required,fluid:e.fluid,disabled:e.disabled,variant:e.variant,invalid:e.invalid,size:e.size,autofocus:e.autofocus,onInput:o.onInput,onFocus:o.onFocus,onBlur:o.onBlur,onKeyup:o.onKeyUp,onInvalid:o.onInvalid},e.inputProps,{"data-p-has-e-icon":e.toggleMask,pt:e.ptm(`pcInputText`),unstyled:e.unstyled}),null,16,`id.type.class.style.defaultValue.name.aria-labelledby.aria-label.aria-expanded.aria-controls.aria-haspopup.placeholder.required.fluid.disabled.variant.invalid.size.autofocus.onInput.onFocus.onBlur.onKeyup.onInvalid.data-p-has-e-icon.pt.unstyled`.split(`.`)),e.toggleMask&&a.unmasked?E(e.$slots,e.$slots.maskicon?`maskicon`:`hideicon`,l({key:0,toggleCallback:o.onMaskToggle,class:[e.cx(`maskIcon`),e.maskIcon]},e.ptm(`maskIcon`)),function(){return[(p(),n(m(e.maskIcon?`i`:`EyeSlashIcon`),l({class:[e.cx(`maskIcon`),e.maskIcon],onClick:o.onMaskToggle},e.ptm(`maskIcon`)),null,16,[`class`,`onClick`]))]}):M(``,!0),e.toggleMask&&!a.unmasked?E(e.$slots,e.$slots.unmaskicon?`unmaskicon`:`showicon`,l({key:1,toggleCallback:o.onMaskToggle,class:[e.cx(`unmaskIcon`)]},e.ptm(`unmaskIcon`)),function(){return[(p(),n(m(e.unmaskIcon?`i`:`EyeIcon`),l({class:[e.cx(`unmaskIcon`),e.unmaskIcon],onClick:o.onMaskToggle},e.ptm(`unmaskIcon`)),null,16,[`class`,`onClick`]))]}):M(``,!0),o.isClearIconVisible?E(e.$slots,`clearicon`,l({key:2,class:e.cx(`clearIcon`),clearCallback:o.onClearClick},e.ptm(`clearIcon`)),function(){return[u(h,l({class:[e.cx(`clearIcon`)],onClick:o.onClearClick},e.ptm(`clearIcon`)),null,16,[`class`,`onClick`])]}):M(``,!0),d(`span`,l({class:`p-hidden-accessible`,"aria-live":`polite`},e.ptm(`hiddenAccesible`),{"data-p-hidden-accessible":!0}),F(a.infoText),17),u(_,{appendTo:e.appendTo},{default:k(function(){return[u(g,l({name:`p-anchored-overlay`,onEnter:o.onOverlayEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},e.ptm(`transition`)),{default:k(function(){return[a.overlayVisible?(p(),f(`div`,l({key:0,ref:o.overlayRef,id:e.overlayId||e.panelId||o.overlayUniqueId,class:[e.cx(`overlay`),e.panelClass,e.overlayClass],style:[e.overlayStyle,e.panelStyle],onClick:t[0]||=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)},"data-p":o.overlayDataP,role:`dialog`,"aria-live":`polite`},Ze(Ze(Ze({},e.panelProps),e.overlayProps),e.ptm(`overlay`))),[E(e.$slots,`header`),E(e.$slots,`content`,{},function(){return[d(`div`,l({class:e.cx(`content`)},e.ptm(`content`)),[d(`div`,l({class:e.cx(`meter`)},e.ptm(`meter`)),[d(`div`,l({class:e.cx(`meterLabel`),style:{width:a.meter?a.meter.width:``},"data-p":o.meterDataP},e.ptm(`meterLabel`)),null,16,rt)],16),d(`div`,l({class:e.cx(`meterText`)},e.ptm(`meterText`)),F(a.infoText),17)],16)]}),E(e.$slots,`footer`)],16,nt)):M(``,!0)]}),_:3},16,[`onEnter`,`onLeave`,`onAfterLeave`])]}),_:3},8,[`appendTo`])],16,tt)}Je.render=it;var at={class:`space-y-6`},ot={class:`text-sm font-semibold mb-3 text-foreground`},st={class:`space-y-3`},ct={class:`flex items-center gap-2`},lt={for:`lf-enabled`,class:`text-sm cursor-pointer`},ut={key:0,class:`space-y-3 pl-6 border-l-2 border-border`},dt={class:`flex flex-col gap-1`},ft={class:`text-xs text-muted-foreground`},pt={class:`flex flex-col gap-1`},mt={class:`text-xs text-muted-foreground`},ht={class:`flex flex-col gap-1`},gt={class:`text-xs text-muted-foreground`},_t={class:`text-sm font-semibold mb-3 text-foreground`},vt={class:`space-y-3`},yt={class:`flex items-center gap-2`},bt={for:`webhook-enabled`,class:`text-sm cursor-pointer`},xt={key:0,class:`space-y-3 pl-6 border-l-2 border-border`},St={class:`flex flex-col gap-1`},Ct={class:`text-xs text-muted-foreground`},wt={class:`flex flex-col gap-1`},Tt={class:`text-xs text-muted-foreground`},Et={class:`text-xs text-muted-foreground`},Dt={class:`text-sm font-semibold mb-3 text-foreground`},Ot={class:`space-y-3`},kt={class:`flex items-center gap-2`},At={for:`notion-enabled`,class:`text-sm cursor-pointer`},jt={class:`space-y-3 pl-6 border-l-2 border-border`},Mt={class:`flex flex-col gap-1`},Nt={class:`text-xs text-muted-foreground`},Pt={class:`flex flex-col gap-1`},Ft={class:`text-xs text-muted-foreground`},It={class:`flex flex-col gap-1`},Lt={class:`text-xs text-muted-foreground`},Rt={class:`flex items-center gap-2`},zt={key:0,class:`text-xs text-green-600`},Bt={class:`rounded border border-border`},Vt={key:0,class:`space-y-3 border-t border-border p-3`},Ht={class:`flex flex-col gap-1`},Ut={class:`text-xs text-muted-foreground`},Wt={class:`flex flex-col gap-1`},Gt={class:`flex items-center justify-between gap-2`},Kt={class:`text-xs text-muted-foreground`},qt={key:0,class:`text-xs text-muted-foreground`},Jt={key:0,class:`text-xs text-red-500 mt-1`},Yt={class:`text-xs text-muted-foreground p-2 rounded border border-border`},Xt=e({__name:`IntegrationSettings`,props:o({schemas:{}},{langfuseEnabled:{type:Boolean,required:!0},langfuseEnabledModifiers:{},langfusePublicKey:{required:!0},langfusePublicKeyModifiers:{},langfuseSecretKey:{required:!0},langfuseSecretKeyModifiers:{},langfuseHost:{required:!0},langfuseHostModifiers:{},webhookEnabled:{type:Boolean,required:!0},webhookEnabledModifiers:{},webhookUrl:{required:!0},webhookUrlModifiers:{},webhookSecret:{required:!0},webhookSecretModifiers:{},notionEnabled:{type:Boolean,required:!0},notionEnabledModifiers:{},notionToken:{required:!0},notionTokenModifiers:{},notionSchemas:{required:!0},notionSchemasModifiers:{},selectedNotionSchema:{required:!0},selectedNotionSchemaModifiers:{},notionDatabaseId:{required:!0},notionDatabaseIdModifiers:{},notionTitleProperty:{required:!0},notionTitlePropertyModifiers:{},notionFieldMap:{required:!0},notionFieldMapModifiers:{},notionProperties:{required:!0},notionPropertiesModifiers:{},notionSchemaFields:{required:!0},notionSchemaFieldsModifiers:{},notionAdvancedOpen:{type:Boolean,required:!0},notionAdvancedOpenModifiers:{}}),emits:[`update:langfuseEnabled`,`update:langfusePublicKey`,`update:langfuseSecretKey`,`update:langfuseHost`,`update:webhookEnabled`,`update:webhookUrl`,`update:webhookSecret`,`update:notionEnabled`,`update:notionToken`,`update:notionSchemas`,`update:selectedNotionSchema`,`update:notionDatabaseId`,`update:notionTitleProperty`,`update:notionFieldMap`,`update:notionProperties`,`update:notionSchemaFields`,`update:notionAdvancedOpen`],setup(e,{expose:t}){let n=e,r=_(e,`langfuseEnabled`),i=_(e,`langfusePublicKey`),a=_(e,`langfuseSecretKey`),o=_(e,`langfuseHost`),s=_(e,`webhookEnabled`),c=_(e,`webhookUrl`),l=_(e,`webhookSecret`),m=_(e,`notionEnabled`),h=_(e,`notionToken`),g=_(e,`notionSchemas`),v=_(e,`selectedNotionSchema`),b=_(e,`notionDatabaseId`),S=_(e,`notionTitleProperty`),w=_(e,`notionFieldMap`),T=_(e,`notionProperties`),E=_(e,`notionSchemaFields`),O=_(e,`notionAdvancedOpen`),{t:k}=ee(),j=C(!1),P=N(()=>n.schemas.map(e=>e.replace(`.json`,``))),I=N(()=>{let e=w.value.trim();if(!e)return``;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return k(`app.fieldMapObject`);for(let[e,n]of Object.entries(t))if(typeof n!=`string`)return k(`app.fieldMapString`,{key:e});return``}catch{return k(`app.fieldMapValidJson`)}}),L=N(()=>{try{return Object.keys(z()??{}).length}catch{return 0}}),R=N(()=>T.value.length===0?``:E.value.length===0?k(`app.notionPropertiesLoaded`,{count:T.value.length}):k(`app.notionFieldsMapped`,{count:L.value,total:E.value.length}));function z(){if(!w.value.trim())return;let e=JSON.parse(w.value),t=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t.trim():``]).filter(([e,t])=>!!e&&!!t));return Object.keys(t).length>0?t:void 0}function B(e){if(!e?.properties||typeof e.properties!=`object`)return[];let t=[];function n(e,r=``){for(let[i,a]of Object.entries(e)){let e=r?`${r}.${i}`:i;if(a?.type===`object`&&a?.properties&&typeof a.properties==`object`){n(a.properties,e);continue}a?.type===`array`&&a?.items?.type===`object`||t.push(e)}}return n(e.properties),t}function V(e){let t={};for(let n of E.value)t[n]=e?.[n]??``;for(let[n,r]of Object.entries(e??{}))n in t||(t[n]=r);return Object.keys(t).length>0?JSON.stringify(t,null,2):``}function W(e=v.value){if(!e||I.value)return;let t=b.value.trim(),n=S.value.trim(),r=z();if(!t){let t={...g.value};delete t[e],g.value=t;return}g.value={...g.value,[e]:{databaseId:t,titleProperty:n||void 0,fieldMap:r}}}function te(){let e=v.value?g.value[v.value]:void 0;b.value=e?.databaseId??``,S.value=e?.titleProperty??``,w.value=V(e?.fieldMap),T.value=[]}A(P,e=>{!v.value&&e.length>0&&(v.value=e[0])},{immediate:!0}),A(v,(e,t)=>{t&&W(t),ne()});async function ne(){let e=v.value;if(E.value=[],!e){te();return}try{E.value=B(await U(`${e}.json`))}catch{E.value=[]}te()}t({persistSelectedNotionSchema:W,loadSelectedNotionSchemaFields:ne,notionFieldMapError:I});async function G(){if(!v.value){H.error(k(`app.toastSelectSchema`));return}if(!h.value.trim()){H.error(k(`app.toastEnterToken`));return}if(!b.value.trim()){H.error(k(`app.toastEnterDatabaseId`));return}if(I.value){H.error(I.value);return}j.value=!0;try{let e=await re({token:h.value,databaseId:b.value,schemaName:v.value});(e.dataSourceId||e.databaseId)&&(b.value=e.dataSourceId??e.databaseId??``),!S.value&&e.titleProperty&&(S.value=e.titleProperty);let t=z()??{},n={...e.suggestedFieldMap??{},...t};w.value=Object.keys(n).length>0?JSON.stringify(n,null,2):``,T.value=e.properties??[],W(),H.success(k(`app.notionConnected`,{count:T.value.length}))}catch(e){H.error(e instanceof Error?e.message:k(`app.notionConnectionFailed`))}finally{j.value=!1}}return(e,t)=>(p(),f(`div`,at,[d(`section`,null,[d(`h3`,ot,F(e.$t(`app.langfuseTracing`)),1),d(`div`,st,[d(`div`,ct,[u(x($),{modelValue:r.value,"onUpdate:modelValue":t[0]||=e=>r.value=e,binary:!0,"input-id":`lf-enabled`},null,8,[`modelValue`]),d(`label`,lt,F(e.$t(`app.enabled`)),1)]),r.value?(p(),f(`div`,ut,[d(`div`,dt,[d(`label`,ft,F(e.$t(`app.secretKey`)),1),u(x(Je),{modelValue:a.value,"onUpdate:modelValue":t[1]||=e=>a.value=e,feedback:!1,"toggle-mask":``,size:`small`,placeholder:`sk-lf-...`,"input-class":`w-full`},null,8,[`modelValue`])]),d(`div`,pt,[d(`label`,mt,F(e.$t(`app.publicKey`)),1),u(x(K),{modelValue:i.value,"onUpdate:modelValue":t[2]||=e=>i.value=e,size:`small`,placeholder:`pk-lf-...`},null,8,[`modelValue`])]),d(`div`,ht,[d(`label`,gt,F(e.$t(`app.host`)),1),u(x(K),{modelValue:o.value,"onUpdate:modelValue":t[3]||=e=>o.value=e,size:`small`,placeholder:`https://us.cloud.langfuse.com`},null,8,[`modelValue`])])])):M(``,!0)])]),d(`section`,null,[d(`h3`,_t,F(e.$t(`app.webhookNotification`)),1),d(`div`,vt,[d(`div`,yt,[u(x($),{modelValue:s.value,"onUpdate:modelValue":t[4]||=e=>s.value=e,binary:!0,"input-id":`webhook-enabled`},null,8,[`modelValue`]),d(`label`,bt,F(e.$t(`app.enabled`)),1)]),s.value?(p(),f(`div`,xt,[d(`div`,St,[d(`label`,Ct,F(e.$t(`app.webhookUrl`)),1),u(x(K),{modelValue:c.value,"onUpdate:modelValue":t[5]||=e=>c.value=e,size:`small`,placeholder:`http://localhost:8080/webhook`,class:`w-full`},null,8,[`modelValue`])]),d(`div`,wt,[d(`label`,Tt,F(e.$t(`app.webhookSecret`)),1),u(x(Je),{modelValue:l.value,"onUpdate:modelValue":t[6]||=e=>l.value=e,feedback:!1,"toggle-mask":``,size:`small`,placeholder:`webhook-secret-key`,"input-class":`w-full`},null,8,[`modelValue`])]),d(`div`,Et,F(e.$t(`app.webhookHelp`)),1)])):M(``,!0)])]),d(`section`,null,[d(`h3`,Dt,F(e.$t(`app.notionExport`)),1),d(`div`,Ot,[d(`div`,kt,[u(x($),{modelValue:m.value,"onUpdate:modelValue":t[7]||=e=>m.value=e,binary:!0,"input-id":`notion-enabled`},null,8,[`modelValue`]),d(`label`,At,F(e.$t(`app.enabled`)),1)]),d(`div`,jt,[d(`div`,Mt,[d(`label`,Nt,F(e.$t(`app.integrationToken`)),1),u(x(Je),{modelValue:h.value,"onUpdate:modelValue":t[8]||=e=>h.value=e,feedback:!1,"toggle-mask":``,size:`small`,placeholder:`secret_...`,"input-class":`w-full`},null,8,[`modelValue`])]),d(`div`,Pt,[d(`label`,Ft,F(e.$t(`app.schemaBinding`)),1),u(x(q),{modelValue:v.value,"onUpdate:modelValue":t[9]||=e=>v.value=e,options:P.value,size:`small`,placeholder:e.$t(`app.selectSchema`),disabled:P.value.length===0},null,8,[`modelValue`,`options`,`placeholder`,`disabled`])]),d(`div`,It,[d(`label`,Lt,F(e.$t(`app.databaseUrl`)),1),u(x(K),{modelValue:b.value,"onUpdate:modelValue":t[10]||=e=>b.value=e,size:`small`,placeholder:`https://www.notion.so/... or xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`},null,8,[`modelValue`])]),d(`div`,Rt,[u(x(D),{label:e.$t(`app.connectAndMap`),icon:`pi pi-bolt`,severity:`secondary`,size:`small`,loading:j.value,disabled:!v.value||!h.value.trim()||!b.value.trim()||!!I.value,onClick:G},null,8,[`label`,`loading`,`disabled`]),R.value?(p(),f(`span`,zt,F(R.value),1)):M(``,!0)]),d(`div`,Bt,[d(`button`,{type:`button`,class:`w-full flex items-center justify-between gap-2 px-3 py-2 text-left text-xs text-muted-foreground hover:bg-secondary`,onClick:t[11]||=e=>O.value=!O.value},[d(`span`,null,F(e.$t(`app.advancedMapping`)),1),d(`i`,{class:y([O.value?`pi pi-chevron-up`:`pi pi-chevron-down`,`text-[10px]`])},null,2)]),O.value?(p(),f(`div`,Vt,[d(`div`,Ht,[d(`label`,Ut,F(e.$t(`app.titleProperty`)),1),u(x(K),{modelValue:S.value,"onUpdate:modelValue":t[12]||=e=>S.value=e,size:`small`,placeholder:e.$t(`app.titleProperty`)},null,8,[`modelValue`,`placeholder`])]),d(`div`,Wt,[d(`div`,Gt,[d(`label`,Kt,F(e.$t(`app.fieldMapJson`)),1),E.value.length>0?(p(),f(`span`,qt,F(e.$t(`app.fieldsMapped`,{count:L.value,total:E.value.length})),1)):M(``,!0)]),u(x(J),{modelValue:w.value,"onUpdate:modelValue":t[13]||=e=>w.value=e,rows:`5`,"auto-resize":``,class:`text-xs font-mono`,placeholder:`{
|
|
243
|
+
"invoiceNo": "Invoice No",
|
|
244
|
+
"issuedAt": "Issued At"
|
|
245
|
+
}`},null,8,[`modelValue`]),I.value?(p(),f(`p`,Jt,F(I.value),1)):M(``,!0)]),d(`div`,Yt,F(e.$t(`app.notionMappingHint`)),1)])):M(``,!0)])])])])]))}}),Zt={class:`space-y-6`},Qt={class:`text-sm font-semibold mb-3 text-foreground`},$t={class:`space-y-3`},en={class:`flex items-center justify-between gap-3`},tn={class:`font-medium`},nn={key:0,class:`text-xs`},rn={key:1,class:`text-xs`},an={class:`mt-1 text-xs leading-relaxed`},on={key:0,class:`space-y-3 pl-6 border-l-2 border-border`},sn={class:`flex flex-col gap-1`},cn={class:`text-xs text-muted-foreground`},ln={class:`flex flex-col gap-1`},un={class:`text-xs text-muted-foreground`},dn={class:`flex flex-col gap-1`},fn={class:`text-xs text-muted-foreground`},pn={class:`text-xs text-muted-foreground p-2 rounded border border-border`},mn={class:`text-sm font-semibold mb-3 text-foreground`},hn={class:`space-y-3`},gn={class:`flex flex-col gap-1`},_n={class:`text-xs text-muted-foreground`},vn={key:0,class:`space-y-3 pl-6 border-l-2 border-border`},yn={class:`flex flex-col gap-1`},bn={class:`text-xs text-muted-foreground`},xn={class:`flex flex-col gap-1`},Sn={class:`text-xs text-muted-foreground`},Cn={class:`flex flex-col gap-1`},wn={class:`text-xs text-muted-foreground`},Tn={class:`flex items-center gap-2`},En={for:`mineru-fallback`,class:`text-sm cursor-pointer`},Dn={class:`flex items-center gap-2`},On={for:`mineru-keep-output`,class:`text-sm cursor-pointer`},kn={class:`text-xs text-muted-foreground p-2 rounded border border-border`},An={key:1,class:`space-y-3 pl-6 border-l-2 border-border`},jn={class:`flex flex-col gap-1`},Mn={class:`text-xs text-muted-foreground`},Nn={class:`flex flex-col gap-1`},Pn={class:`text-xs text-muted-foreground`},Fn={class:`flex flex-col gap-1`},In={class:`text-xs text-muted-foreground`},Ln={class:`flex flex-col gap-1`},Rn={class:`text-xs text-muted-foreground`},zn={class:`flex items-center gap-2`},Bn={for:`markitdown-fallback`,class:`text-sm cursor-pointer`},Vn={class:`flex items-center gap-2`},Hn={for:`markitdown-keep-output`,class:`text-sm cursor-pointer`},Un={class:`text-xs text-muted-foreground p-2 rounded border border-border`},Wn={key:2,class:`space-y-3 pl-6 border-l-2 border-border`},Gn={class:`flex flex-col gap-1`},Kn={class:`text-xs text-muted-foreground`},qn={class:`flex flex-col gap-1`},Jn={class:`text-xs text-muted-foreground`},Yn={class:`flex flex-col gap-1`},Xn={class:`text-xs text-muted-foreground`},Zn={class:`flex flex-col gap-1`},Qn={class:`text-xs text-muted-foreground`},$n={class:`flex items-center gap-2`},er={for:`marker-fallback`,class:`text-sm cursor-pointer`},tr={class:`flex items-center gap-2`},nr={for:`marker-keep-output`,class:`text-sm cursor-pointer`},rr={class:`text-xs text-muted-foreground p-2 rounded border border-border`},ir={key:3,class:`space-y-3 pl-6 border-l-2 border-border`},ar={class:`flex flex-col gap-1`},or={class:`text-xs text-muted-foreground`},sr={class:`flex flex-col gap-1`},cr={class:`text-xs text-muted-foreground`},lr={class:`flex flex-col gap-1`},ur={class:`text-xs text-muted-foreground`},dr={class:`flex flex-col gap-1`},fr={class:`text-xs text-muted-foreground`},pr={class:`flex items-center gap-2`},mr={for:`external-fallback`,class:`text-sm cursor-pointer`},hr={class:`flex items-center gap-2`},gr={for:`external-keep-output`,class:`text-sm cursor-pointer`},_r={class:`text-xs text-muted-foreground p-2 rounded border border-border`},vr=e({__name:`PdfSettings`,props:o({hasVisionModel:{type:Boolean}},{pdfConverter:{required:!0},pdfConverterModifiers:{},mineruCommand:{required:!0},mineruCommandModifiers:{},mineruArgs:{required:!0},mineruArgsModifiers:{},mineruTimeout:{required:!0},mineruTimeoutModifiers:{},mineruFallbackToUnpdf:{type:Boolean,required:!0},mineruFallbackToUnpdfModifiers:{},mineruKeepOutput:{type:Boolean,required:!0},mineruKeepOutputModifiers:{},markitdownCommand:{required:!0},markitdownCommandModifiers:{},markitdownArgs:{required:!0},markitdownArgsModifiers:{},markitdownOutputFile:{required:!0},markitdownOutputFileModifiers:{},markitdownTimeout:{required:!0},markitdownTimeoutModifiers:{},markitdownFallbackToUnpdf:{type:Boolean,required:!0},markitdownFallbackToUnpdfModifiers:{},markitdownKeepOutput:{type:Boolean,required:!0},markitdownKeepOutputModifiers:{},markerCommand:{required:!0},markerCommandModifiers:{},markerArgs:{required:!0},markerArgsModifiers:{},markerOutputFile:{required:!0},markerOutputFileModifiers:{},markerTimeout:{required:!0},markerTimeoutModifiers:{},markerFallbackToUnpdf:{type:Boolean,required:!0},markerFallbackToUnpdfModifiers:{},markerKeepOutput:{type:Boolean,required:!0},markerKeepOutputModifiers:{},externalCommand:{required:!0},externalCommandModifiers:{},externalArgs:{required:!0},externalArgsModifiers:{},externalOutputFile:{required:!0},externalOutputFileModifiers:{},externalTimeout:{required:!0},externalTimeoutModifiers:{},externalFallbackToUnpdf:{type:Boolean,required:!0},externalFallbackToUnpdfModifiers:{},externalKeepOutput:{type:Boolean,required:!0},externalKeepOutputModifiers:{},imageOcrFallback:{required:!0},imageOcrFallbackModifiers:{},imageOcrLanguages:{required:!0},imageOcrLanguagesModifiers:{},imageOcrMinConfidence:{required:!0},imageOcrMinConfidenceModifiers:{},imageOcrAdvancedOpen:{type:Boolean,required:!0},imageOcrAdvancedOpenModifiers:{}}),emits:`update:pdfConverter.update:mineruCommand.update:mineruArgs.update:mineruTimeout.update:mineruFallbackToUnpdf.update:mineruKeepOutput.update:markitdownCommand.update:markitdownArgs.update:markitdownOutputFile.update:markitdownTimeout.update:markitdownFallbackToUnpdf.update:markitdownKeepOutput.update:markerCommand.update:markerArgs.update:markerOutputFile.update:markerTimeout.update:markerFallbackToUnpdf.update:markerKeepOutput.update:externalCommand.update:externalArgs.update:externalOutputFile.update:externalTimeout.update:externalFallbackToUnpdf.update:externalKeepOutput.update:imageOcrFallback.update:imageOcrLanguages.update:imageOcrMinConfidence.update:imageOcrAdvancedOpen`.split(`.`),setup(e){let t=e,n=_(e,`pdfConverter`),i=_(e,`mineruCommand`),a=_(e,`mineruArgs`),o=_(e,`mineruTimeout`),s=_(e,`mineruFallbackToUnpdf`),c=_(e,`mineruKeepOutput`),l=_(e,`markitdownCommand`),m=_(e,`markitdownArgs`),h=_(e,`markitdownOutputFile`),g=_(e,`markitdownTimeout`),v=_(e,`markitdownFallbackToUnpdf`),b=_(e,`markitdownKeepOutput`),S=_(e,`markerCommand`),C=_(e,`markerArgs`),w=_(e,`markerOutputFile`),T=_(e,`markerTimeout`),E=_(e,`markerFallbackToUnpdf`),D=_(e,`markerKeepOutput`),O=_(e,`externalCommand`),k=_(e,`externalArgs`),A=_(e,`externalOutputFile`),j=_(e,`externalTimeout`),P=_(e,`externalFallbackToUnpdf`),I=_(e,`externalKeepOutput`),L=_(e,`imageOcrFallback`),R=_(e,`imageOcrLanguages`),z=_(e,`imageOcrMinConfidence`),B=_(e,`imageOcrAdvancedOpen`),{t:V}=ee(),H=N(()=>[{label:V(`app.pdfConverterUnpdf`),value:`unpdf`},{label:V(`app.pdfConverterMineru`),value:`mineru`},{label:V(`app.pdfConverterMarkitdown`),value:`markitdown`},{label:V(`app.pdfConverterMarker`),value:`marker`},{label:V(`app.pdfConverterExternal`),value:`external`}]),U=N(()=>[{label:V(`app.ocrFallbackAuto`),value:`auto`},{label:V(`app.ocrFallbackOff`),value:`off`},{label:V(`app.ocrFallbackLocal`),value:`local`}]),W=N(()=>L.value===`off`?V(`app.ocrDisabled`):L.value===`local`?V(`app.requireLocalOcr`):V(`app.ocrAuto`)),te=N(()=>t.hasVisionModel?V(`app.imageSummaryVisionModel`):L.value===`off`?V(`app.imageSummaryOcrOff`):L.value===`local`?V(`app.imageSummaryOcrLocal`):V(`app.imageSummaryNoVision`)),ne=N(()=>t.hasVisionModel?`border-green-200 bg-green-50 text-green-800`:L.value===`off`?`border-yellow-200 bg-yellow-50 text-yellow-800`:`border-blue-200 bg-blue-50 text-blue-800`);return(t,_)=>(p(),f(`div`,Zt,[d(`section`,null,[d(`h3`,Qt,F(t.$t(`app.imageInput`)),1),d(`div`,$t,[d(`div`,{class:y([`rounded border p-3 text-sm`,ne.value])},[d(`div`,en,[d(`span`,tn,F(W.value),1),e.hasVisionModel?(p(),f(`span`,nn,F(t.$t(`app.visionModelConfigured`)),1)):(p(),f(`span`,rn,F(t.$t(`app.noVisionModel`)),1))]),d(`p`,an,F(te.value),1)],2),d(`button`,{type:`button`,class:`text-xs text-muted-foreground hover:text-foreground transition-colors`,onClick:_[0]||=e=>B.value=!B.value},F(B.value?t.$t(`app.hideAdvancedImageSettings`):t.$t(`app.advancedImageSettings`)),1),B.value?(p(),f(`div`,on,[d(`div`,sn,[d(`label`,cn,F(t.$t(`app.ocrFallback`)),1),u(x(q),{modelValue:L.value,"onUpdate:modelValue":_[1]||=e=>L.value=e,options:U.value,"option-label":`label`,"option-value":`value`,size:`small`},null,8,[`modelValue`,`options`])]),d(`div`,ln,[d(`label`,un,F(t.$t(`app.ocrLanguages`)),1),u(x(K),{modelValue:R.value,"onUpdate:modelValue":_[2]||=e=>R.value=e,size:`small`,placeholder:`en-US, zh-Hans`,disabled:L.value===`off`},null,8,[`modelValue`,`disabled`])]),d(`div`,dn,[d(`label`,fn,F(t.$t(`app.ocrMinConfidence`)),1),u(x(K),{value:String(z.value),type:`number`,size:`small`,placeholder:`0`,min:0,max:1,step:.05,disabled:L.value===`off`,onInput:_[3]||=e=>z.value=Math.min(1,Math.max(0,Number(e.target.value)||0))},null,8,[`value`,`disabled`])]),d(`div`,pn,F(t.$t(`app.ocrHint`)),1)])):M(``,!0)])]),d(`section`,null,[d(`h3`,mn,F(t.$t(`app.pdfConversion`)),1),d(`div`,hn,[d(`div`,gn,[d(`label`,_n,F(t.$t(`app.converter`)),1),u(x(q),{modelValue:n.value,"onUpdate:modelValue":_[4]||=e=>n.value=e,options:H.value,"option-label":`label`,"option-value":`value`,size:`small`},null,8,[`modelValue`,`options`])]),n.value===`mineru`?(p(),f(`div`,vn,[d(`div`,yn,[d(`label`,bn,F(t.$t(`app.command`)),1),u(x(K),{modelValue:i.value,"onUpdate:modelValue":_[5]||=e=>i.value=e,size:`small`,placeholder:`mineru`},null,8,[`modelValue`])]),d(`div`,xn,[d(`label`,Sn,F(t.$t(`app.arguments`)),1),u(x(J),{modelValue:a.value,"onUpdate:modelValue":_[6]||=e=>a.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`])]),d(`div`,Cn,[d(`label`,wn,F(t.$t(`app.timeoutLabel`)),1),u(x(K),{value:String(o.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:_[7]||=e=>o.value=Number(e.target.value)||600},null,8,[`value`])]),d(`div`,Tn,[u(x($),{modelValue:s.value,"onUpdate:modelValue":_[8]||=e=>s.value=e,binary:!0,"input-id":`mineru-fallback`},null,8,[`modelValue`]),d(`label`,En,F(t.$t(`app.fallbackToBuiltin`)),1)]),d(`div`,Dn,[u(x($),{modelValue:c.value,"onUpdate:modelValue":_[9]||=e=>c.value=e,binary:!0,"input-id":`mineru-keep-output`},null,8,[`modelValue`]),d(`label`,On,F(t.$t(`app.keepConvertedFiles`)),1)]),d(`div`,kn,[r(F(t.$t(`app.placeholders`))+`: `,1),_[28]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{input}`,-1),_[29]||=r(`, `,-1),_[30]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`,-1),_[31]||=r(`, `,-1),_[32]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`,-1)])])):M(``,!0),n.value===`markitdown`?(p(),f(`div`,An,[d(`div`,jn,[d(`label`,Mn,F(t.$t(`app.command`)),1),u(x(K),{modelValue:l.value,"onUpdate:modelValue":_[10]||=e=>l.value=e,size:`small`,placeholder:`markitdown`},null,8,[`modelValue`])]),d(`div`,Nn,[d(`label`,Pn,F(t.$t(`app.arguments`)),1),u(x(J),{modelValue:m.value,"onUpdate:modelValue":_[11]||=e=>m.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`])]),d(`div`,Fn,[d(`label`,In,F(t.$t(`app.outputFile`)),1),u(x(K),{modelValue:h.value,"onUpdate:modelValue":_[12]||=e=>h.value=e,size:`small`,class:`text-xs font-mono`,placeholder:`{outputDir}/{basename}.md`},null,8,[`modelValue`])]),d(`div`,Ln,[d(`label`,Rn,F(t.$t(`app.timeoutLabel`)),1),u(x(K),{value:String(g.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:_[13]||=e=>g.value=Number(e.target.value)||600},null,8,[`value`])]),d(`div`,zn,[u(x($),{modelValue:v.value,"onUpdate:modelValue":_[14]||=e=>v.value=e,binary:!0,"input-id":`markitdown-fallback`},null,8,[`modelValue`]),d(`label`,Bn,F(t.$t(`app.fallbackToBuiltin`)),1)]),d(`div`,Vn,[u(x($),{modelValue:b.value,"onUpdate:modelValue":_[15]||=e=>b.value=e,binary:!0,"input-id":`markitdown-keep-output`},null,8,[`modelValue`]),d(`label`,Hn,F(t.$t(`app.keepConvertedFiles`)),1)]),d(`div`,Un,[r(F(t.$t(`app.placeholders`))+`: `,1),_[33]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{input}`,-1),_[34]||=r(`, `,-1),_[35]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`,-1),_[36]||=r(`, `,-1),_[37]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`,-1)])])):M(``,!0),n.value===`marker`?(p(),f(`div`,Wn,[d(`div`,Gn,[d(`label`,Kn,F(t.$t(`app.command`)),1),u(x(K),{modelValue:S.value,"onUpdate:modelValue":_[16]||=e=>S.value=e,size:`small`,placeholder:`marker_single`},null,8,[`modelValue`])]),d(`div`,qn,[d(`label`,Jn,F(t.$t(`app.arguments`)),1),u(x(J),{modelValue:C.value,"onUpdate:modelValue":_[17]||=e=>C.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`])]),d(`div`,Yn,[d(`label`,Xn,F(t.$t(`app.outputFile`)),1),u(x(K),{modelValue:w.value,"onUpdate:modelValue":_[18]||=e=>w.value=e,size:`small`,class:`text-xs font-mono`,placeholder:`{outputDir}/{basename}/{basename}.md`},null,8,[`modelValue`])]),d(`div`,Zn,[d(`label`,Qn,F(t.$t(`app.timeoutLabel`)),1),u(x(K),{value:String(T.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:_[19]||=e=>T.value=Number(e.target.value)||600},null,8,[`value`])]),d(`div`,$n,[u(x($),{modelValue:E.value,"onUpdate:modelValue":_[20]||=e=>E.value=e,binary:!0,"input-id":`marker-fallback`},null,8,[`modelValue`]),d(`label`,er,F(t.$t(`app.fallbackToBuiltin`)),1)]),d(`div`,tr,[u(x($),{modelValue:D.value,"onUpdate:modelValue":_[21]||=e=>D.value=e,binary:!0,"input-id":`marker-keep-output`},null,8,[`modelValue`]),d(`label`,nr,F(t.$t(`app.keepConvertedFiles`)),1)]),d(`div`,rr,[r(F(t.$t(`app.placeholders`))+`: `,1),_[38]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{input}`,-1),_[39]||=r(`, `,-1),_[40]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`,-1),_[41]||=r(`, `,-1),_[42]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`,-1)])])):M(``,!0),n.value===`external`?(p(),f(`div`,ir,[d(`div`,ar,[d(`label`,or,F(t.$t(`app.command`)),1),u(x(K),{modelValue:O.value,"onUpdate:modelValue":_[22]||=e=>O.value=e,size:`small`,placeholder:`pdf2markdown`},null,8,[`modelValue`])]),d(`div`,sr,[d(`label`,cr,F(t.$t(`app.arguments`)),1),u(x(J),{modelValue:k.value,"onUpdate:modelValue":_[23]||=e=>k.value=e,rows:`4`,"auto-resize":``,class:`text-xs font-mono`,placeholder:`-i
|
|
246
|
+
{input}
|
|
247
|
+
-o
|
|
248
|
+
{outputDir}/{basename}.md`},null,8,[`modelValue`])]),d(`div`,lr,[d(`label`,ur,F(t.$t(`app.outputFile`)),1),u(x(K),{modelValue:A.value,"onUpdate:modelValue":_[24]||=e=>A.value=e,size:`small`,class:`text-xs font-mono`,placeholder:`{outputDir}/{basename}.md`},null,8,[`modelValue`])]),d(`div`,dr,[d(`label`,fr,F(t.$t(`app.timeoutLabel`)),1),u(x(K),{value:String(j.value),type:`number`,size:`small`,placeholder:`600`,min:1,onInput:_[25]||=e=>j.value=Number(e.target.value)||600},null,8,[`value`])]),d(`div`,pr,[u(x($),{modelValue:P.value,"onUpdate:modelValue":_[26]||=e=>P.value=e,binary:!0,"input-id":`external-fallback`},null,8,[`modelValue`]),d(`label`,mr,F(t.$t(`app.fallbackToBuiltin`)),1)]),d(`div`,hr,[u(x($),{modelValue:I.value,"onUpdate:modelValue":_[27]||=e=>I.value=e,binary:!0,"input-id":`external-keep-output`},null,8,[`modelValue`]),d(`label`,gr,F(t.$t(`app.keepConvertedFiles`)),1)]),d(`div`,_r,[r(F(t.$t(`app.placeholders`))+`: `,1),_[43]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{input}`,-1),_[44]||=r(`, `,-1),_[45]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{outputDir}`,-1),_[46]||=r(`, `,-1),_[47]||=d(`code`,{class:`bg-secondary px-1 rounded`},`{basename}`,-1),r(`. `+F(t.$t(`app.externalHint`)),1)])])):M(``,!0)])])]))}}),yr={class:`space-y-6`},br={class:`text-sm font-semibold mb-3 text-foreground`},xr={class:`space-y-3`},Sr={class:`flex flex-col gap-1`},Cr={class:`text-xs text-muted-foreground`},wr={key:0,class:`text-xs text-red-500 mt-1`},Tr={class:`flex flex-col gap-1`},Er={class:`text-xs text-muted-foreground`},Dr={key:0,class:`text-xs text-red-500 mt-1`},Or={class:`text-xs text-muted-foreground p-2 rounded border border-border`},kr=e({__name:`PromptSettings`,props:{systemTemplate:{required:!0},systemTemplateModifiers:{},userTemplate:{required:!0},userTemplateModifiers:{}},emits:[`update:systemTemplate`,`update:userTemplate`],setup(e,{expose:t}){let n=_(e,`systemTemplate`),r=_(e,`userTemplate`),{t:i}=ee(),a=N(()=>n.value.includes(`{schema}`)?``:i(`app.systemPromptValidation`)),o=N(()=>r.value.includes(`{text}`)?``:i(`app.userPromptValidation`));return t({systemSchemaError:a,userSchemaError:o}),(e,t)=>(p(),f(`div`,yr,[d(`section`,null,[d(`h3`,br,F(e.$t(`app.promptTemplates`)),1),d(`div`,xr,[d(`div`,Sr,[d(`label`,Cr,F(e.$t(`app.systemPrompt`)),1),u(x(J),{modelValue:n.value,"onUpdate:modelValue":t[0]||=e=>n.value=e,rows:`6`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`]),a.value?(p(),f(`p`,wr,F(a.value),1)):M(``,!0)]),d(`div`,Tr,[d(`label`,Er,F(e.$t(`app.userPromptTemplate`)),1),u(x(J),{modelValue:r.value,"onUpdate:modelValue":t[1]||=e=>r.value=e,rows:`6`,"auto-resize":``,class:`text-xs font-mono`},null,8,[`modelValue`]),o.value?(p(),f(`p`,Dr,F(o.value),1)):M(``,!0)]),d(`div`,Or,F(e.$t(`app.promptPlaceholderHint`)),1)])])]))}}),Ar={class:`space-y-6`},jr={class:`text-sm font-semibold mb-3 text-foreground`},Mr={class:`space-y-3`},Nr={class:`flex flex-col gap-1`},Pr={class:`text-xs text-muted-foreground`},Fr={class:`flex flex-col gap-1`},Ir={class:`text-xs text-muted-foreground`},Lr={class:`flex flex-col gap-1`},Rr={class:`text-xs text-muted-foreground`},zr={class:`text-sm font-semibold mb-3 text-foreground`},Br={class:`space-y-2`},Vr={class:`text-sm font-mono flex-1`},Hr={key:0,class:`flex flex-col gap-2 px-3 py-2 rounded border border-border bg-card`},Ur={class:`flex items-center gap-2`},Wr={class:`flex items-center gap-4 text-xs`},Gr={class:`flex items-center gap-1.5 cursor-pointer`},Kr={class:`flex items-center gap-1.5 cursor-pointer`},qr={key:0,class:`text-muted-foreground ml-auto`},Jr=e({__name:`ProviderSettings`,props:{baseURL:{required:!0},baseURLModifiers:{},apiKey:{required:!0},apiKeyModifiers:{},timeout:{required:!0},timeoutModifiers:{},models:{required:!0},modelsModifiers:{}},emits:[`update:baseURL`,`update:apiKey`,`update:timeout`,`update:models`],setup(e){let t=_(e,`baseURL`),i=_(e,`apiKey`),a=_(e,`timeout`),o=_(e,`models`),s=C(!1),l=C(``),m=C({vision:!1,structuredOutput:!1}),g=C(`manual`);function v(){g.value=`manual`,m.value={vision:!1,structuredOutput:!1},l.value&&W(l.value).then(e=>{e&&(m.value={...e},g.value=`registry`)})}function b(){l.value&&(o.value.push({name:l.value,capabilities:{...m.value}}),ee())}function S(){ee()}function ee(){l.value=``,m.value={vision:!1,structuredOutput:!1},g.value=`manual`,s.value=!1}function w(e){o.value.splice(e,1)}return(e,_)=>(p(),f(`div`,Ar,[d(`section`,null,[d(`h3`,jr,F(e.$t(`app.provider`)),1),d(`div`,Mr,[d(`div`,Nr,[d(`label`,Pr,F(e.$t(`app.baseUrl`)),1),u(x(K),{modelValue:t.value,"onUpdate:modelValue":_[0]||=e=>t.value=e,size:`small`,placeholder:`https://dashscope.aliyuncs.com/compatible-mode/v1`},null,8,[`modelValue`])]),d(`div`,Fr,[d(`label`,Ir,F(e.$t(`app.apiKey`)),1),u(x(Je),{modelValue:i.value,"onUpdate:modelValue":_[1]||=e=>i.value=e,feedback:!1,"toggle-mask":``,size:`small`,placeholder:`sk-xxx`,"input-class":`w-full`},null,8,[`modelValue`])]),d(`div`,Lr,[d(`label`,Rr,F(e.$t(`app.timeoutLabel`)),1),u(x(K),{value:String(a.value),type:`number`,size:`small`,placeholder:`300`,min:1,onInput:_[2]||=e=>a.value=Number(e.target.value)||300},null,8,[`value`])])])]),d(`section`,null,[d(`h3`,zr,F(e.$t(`app.models`)),1),d(`div`,Br,[(p(!0),f(P,null,c(o.value,(t,n)=>(p(),f(`div`,{key:n,class:`flex items-center gap-2 px-3 py-2 rounded border border-border bg-card`},[d(`code`,Vr,F(t.name),1),d(`span`,{class:y([`inline-flex items-center gap-1 text-xs px-1.5 py-0.5 rounded`,t.capabilities.structuredOutput?`bg-green-500/10 text-green-600`:`bg-yellow-500/10 text-yellow-600`])},[d(`i`,{class:y([t.capabilities.structuredOutput?`pi pi-check-circle`:`pi pi-exclamation-triangle`,`text-[10px]`])},null,2),r(` `+F(t.capabilities.structuredOutput?e.$t(`app.structuredOutput`):e.$t(`app.textOnlyOutput`)),1)],2),d(`span`,{class:y([`inline-flex items-center gap-1 text-xs px-1.5 py-0.5 rounded`,t.capabilities.vision?`bg-green-500/10 text-green-600`:`bg-red-500/10 text-red-600`])},[d(`i`,{class:y([t.capabilities.vision?`pi pi-check-circle`:`pi pi-times-circle`,`text-[10px]`])},null,2),r(` `+F(t.capabilities.vision?e.$t(`app.visionSupported`):e.$t(`app.visionUnsupported`)),1)],2),u(x(D),{icon:`pi pi-times`,severity:`danger`,text:``,size:`small`,onClick:e=>w(n)},null,8,[`onClick`])]))),128)),s.value?(p(),f(`div`,Hr,[d(`div`,Ur,[u(x(K),{modelValue:l.value,"onUpdate:modelValue":_[3]||=e=>l.value=e,size:`small`,placeholder:e.$t(`app.modelName`),class:`flex-1 font-mono`,onInput:v,onKeyup:h(b,[`enter`])},null,8,[`modelValue`,`placeholder`]),u(x(D),{icon:`pi pi-check`,severity:`success`,text:``,size:`small`,disabled:!l.value,onClick:b},null,8,[`disabled`]),u(x(D),{icon:`pi pi-times`,severity:`secondary`,text:``,size:`small`,onClick:S})]),d(`div`,Wr,[d(`label`,Gr,[u(x($),{modelValue:m.value.structuredOutput,"onUpdate:modelValue":_[4]||=e=>m.value.structuredOutput=e,binary:!0,"input-id":`add-so`},null,8,[`modelValue`]),d(`span`,{class:y(m.value.structuredOutput?`text-green-600`:`text-muted-foreground`)},F(e.$t(`app.structuredOutput`)),3)]),d(`label`,Kr,[u(x($),{modelValue:m.value.vision,"onUpdate:modelValue":_[5]||=e=>m.value.vision=e,binary:!0,"input-id":`add-vision`},null,8,[`modelValue`]),d(`span`,{class:y(m.value.vision?`text-green-600`:`text-muted-foreground`)},F(e.$t(`app.visionSupported`)),3)]),g.value===`registry`?(p(),f(`span`,qr,[_[7]||=d(`i`,{class:`pi pi-database mr-0.5`},null,-1),r(F(e.$t(`app.modelCapsRegistry`)),1)])):M(``,!0)])])):(p(),n(x(D),{key:1,label:e.$t(`app.addModel`),icon:`pi pi-plus`,severity:`secondary`,text:``,size:`small`,onClick:_[6]||=e=>s.value=!0},null,8,[`label`]))])])]))}}),Yr={key:0,class:`flex items-center justify-center py-8`},Xr={key:1,class:`space-y-6`},Zr={class:`flex justify-end gap-2`},Qr=`You are a professional data extraction assistant. Your task is to extract structured data from text and return a JSON object based on the data structure definition provided below.
|
|
249
|
+
|
|
250
|
+
{schema}
|
|
251
|
+
|
|
252
|
+
Extraction requirements:
|
|
253
|
+
1. Extract data strictly according to the field names and types defined in the structure
|
|
254
|
+
2. If a field's information is missing from the text, set that field to null
|
|
255
|
+
3. Do not add fields that are not in the structure definition
|
|
256
|
+
4. Maintain data accuracy and completeness`,$r=`Please extract data from the following text:
|
|
257
|
+
{text}`,ei=e({__name:`AISettings`,props:o({schemas:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:[`update:visible`],setup(e){let t=_(e,`visible`),{t:r}=ee(),i=C(!1),o=C(!1),s=C(``),c=C(``),l=C(300),m=C([]),h=C(``),g=C(``),v=C(`unpdf`),y=C(`mineru`),b=C(`-p
|
|
258
|
+
{input}
|
|
259
|
+
-o
|
|
260
|
+
{outputDir}`),S=C(600),w=C(!0),T=C(!0),E=C(`markitdown`),O=C(`{input}
|
|
261
|
+
-o
|
|
262
|
+
{outputDir}/{basename}.md`),A=C(`{outputDir}/{basename}.md`),j=C(600),M=C(!0),P=C(!0),F=C(`marker_single`),I=C(`{input}
|
|
263
|
+
--output_dir
|
|
264
|
+
{outputDir}`),L=C(`{outputDir}/{basename}/{basename}.md`),R=C(600),z=C(!0),B=C(!0),U=C(``),W=C(``),re=C(``),G=C(600),K=C(!0),q=C(!0),ie=C(`auto`),ae=C(`en-US, zh-Hans`),J=C(0),oe=C(!1),se=C(!1),ce=C(``),le=C(``),ue=C(``),de=C(!1),Y=C(``),fe=C(``),X=C(!1),pe=C(``),Z=C({}),me=C(``),he=C(``),ge=C(``),_e=C(``),ve=C([]),ye=C([]),be=C(!1),xe=C(null),Q=C(null),$=N(()=>m.value.some(e=>e.capabilities.vision)),Se=N(()=>{let e=xe.value?.systemSchemaError||``,t=xe.value?.userSchemaError||``,n=Q.value?.notionFieldMapError||``;return!e&&!t&&!n&&!i.value&&m.value.length>0&&(!X.value||!!pe.value.trim())&&(v.value!==`mineru`||!!y.value.trim())&&(v.value!==`markitdown`||!!E.value.trim())&&(v.value!==`marker`||!!F.value.trim())&&(v.value!==`external`||!!U.value.trim())});async function Ce(){i.value=!0;try{let e=await ne();s.value=e.provider.baseURL,c.value=e.provider.apiKey,l.value=e.provider.timeout??300,m.value=e.provider.models??[],h.value=e.prompt.systemTemplate,g.value=e.prompt.userTemplate,v.value=e.pdf?.converter??`unpdf`,y.value=e.pdf?.mineru?.command??`mineru`,b.value=(e.pdf?.mineru?.args??[`-p`,`{input}`,`-o`,`{outputDir}`]).join(`
|
|
265
|
+
`),S.value=e.pdf?.mineru?.timeout??600,w.value=e.pdf?.mineru?.fallbackToUnpdf??!0,T.value=e.pdf?.mineru?.keepOutput??!0,E.value=e.pdf?.markitdown?.command??`markitdown`,O.value=(e.pdf?.markitdown?.args??[`{input}`,`-o`,`{outputDir}/{basename}.md`]).join(`
|
|
266
|
+
`),A.value=e.pdf?.markitdown?.outputFile??`{outputDir}/{basename}.md`,j.value=e.pdf?.markitdown?.timeout??600,M.value=e.pdf?.markitdown?.fallbackToUnpdf??!0,P.value=e.pdf?.markitdown?.keepOutput??!0,F.value=e.pdf?.marker?.command??`marker_single`,I.value=(e.pdf?.marker?.args??[`{input}`,`--output_dir`,`{outputDir}`]).join(`
|
|
267
|
+
`),L.value=e.pdf?.marker?.outputFile??`{outputDir}/{basename}/{basename}.md`,R.value=e.pdf?.marker?.timeout??600,z.value=e.pdf?.marker?.fallbackToUnpdf??!0,B.value=e.pdf?.marker?.keepOutput??!0,U.value=e.pdf?.external?.command??``,W.value=(e.pdf?.external?.args??[]).join(`
|
|
268
|
+
`),re.value=e.pdf?.external?.outputFile??``,G.value=e.pdf?.external?.timeout??600,K.value=e.pdf?.external?.fallbackToUnpdf??!0,q.value=e.pdf?.external?.keepOutput??!0,ie.value=e.image?.ocrFallback??`auto`,ae.value=e.image?.ocrLanguages??`en-US, zh-Hans`,J.value=e.image?.ocrMinConfidence??0,se.value=!!e.langfuse,ce.value=e.langfuse?.publicKey??``,le.value=e.langfuse?.secretKey??``,ue.value=e.langfuse?.host??``,de.value=!!e.webhook?.enabled,Y.value=e.webhook?.url??``,fe.value=e.webhook?.secret??``,X.value=!!e.notion?.enabled,pe.value=e.notion?.token??``,Z.value=e.notion?.schemas??{},await Q.value?.loadSelectedNotionSchemaFields()}catch{c.value=``,m.value=[],h.value=Qr,g.value=$r}finally{i.value=!1}}async function we(){if(Se.value){o.value=!0;try{Q.value?.persistSelectedNotionSchema(),await te({provider:{baseURL:s.value,apiKey:c.value,timeout:l.value,models:m.value},prompt:{systemTemplate:h.value,userTemplate:g.value},extraction:{outputDir:`.aiex/extracted`},image:{ocrFallback:ie.value,ocrLanguages:ae.value.trim()||void 0,ocrMinConfidence:J.value},pdf:{converter:v.value,mineru:y.value.trim()?{command:y.value,args:b.value.split(`
|
|
269
|
+
`).map(e=>e.trim()).filter(Boolean),timeout:S.value,fallbackToUnpdf:w.value,keepOutput:T.value||void 0}:void 0,markitdown:E.value.trim()?{command:E.value,args:O.value.split(`
|
|
270
|
+
`).map(e=>e.trim()).filter(Boolean),outputFile:A.value.trim()||void 0,timeout:j.value,fallbackToUnpdf:M.value,keepOutput:P.value||void 0}:void 0,marker:F.value.trim()?{command:F.value,args:I.value.split(`
|
|
271
|
+
`).map(e=>e.trim()).filter(Boolean),outputFile:L.value.trim()||void 0,timeout:R.value,fallbackToUnpdf:z.value,keepOutput:B.value||void 0}:void 0,external:U.value.trim()?{command:U.value,args:W.value.split(`
|
|
272
|
+
`).map(e=>e.trim()).filter(Boolean),outputFile:re.value.trim()||void 0,timeout:G.value,fallbackToUnpdf:K.value,keepOutput:q.value||void 0}:void 0},langfuse:se.value?{publicKey:ce.value,secretKey:le.value,host:ue.value||void 0}:void 0,notion:{enabled:X.value,token:pe.value,schemas:Z.value},webhook:{enabled:de.value,url:Y.value.trim(),secret:fe.value.trim()||void 0}}),t.value=!1}catch(e){H.error(e.message||r(`app.toastSaveFailed`))}finally{o.value=!1}}}return a(()=>{Ce()}),(r,a)=>(p(),n(x(V),{visible:t.value,"onUpdate:visible":a[52]||=e=>t.value=e,modal:``,header:r.$t(`app.aiSettings`),style:{width:`680px`},draggable:!1},{footer:k(()=>[d(`div`,Zr,[u(x(D),{label:r.$t(`app.cancel`),severity:`secondary`,text:``,onClick:a[51]||=e=>t.value=!1},null,8,[`label`]),u(x(D),{label:r.$t(`app.save`),icon:`pi pi-check`,loading:o.value,disabled:!Se.value,onClick:we},null,8,[`label`,`loading`,`disabled`])])]),default:k(()=>[i.value?(p(),f(`div`,Yr,[...a[53]||=[d(`i`,{class:`pi pi-spin pi-spinner text-xl`},null,-1)]])):(p(),f(`div`,Xr,[u(Jr,{"base-u-r-l":s.value,"onUpdate:baseURL":a[0]||=e=>s.value=e,"api-key":c.value,"onUpdate:apiKey":a[1]||=e=>c.value=e,timeout:l.value,"onUpdate:timeout":a[2]||=e=>l.value=e,models:m.value,"onUpdate:models":a[3]||=e=>m.value=e},null,8,[`base-u-r-l`,`api-key`,`timeout`,`models`]),u(vr,{"has-vision-model":$.value,"pdf-converter":v.value,"onUpdate:pdfConverter":a[4]||=e=>v.value=e,"mineru-command":y.value,"onUpdate:mineruCommand":a[5]||=e=>y.value=e,"mineru-args":b.value,"onUpdate:mineruArgs":a[6]||=e=>b.value=e,"mineru-timeout":S.value,"onUpdate:mineruTimeout":a[7]||=e=>S.value=e,"mineru-fallback-to-unpdf":w.value,"onUpdate:mineruFallbackToUnpdf":a[8]||=e=>w.value=e,"mineru-keep-output":T.value,"onUpdate:mineruKeepOutput":a[9]||=e=>T.value=e,"markitdown-command":E.value,"onUpdate:markitdownCommand":a[10]||=e=>E.value=e,"markitdown-args":O.value,"onUpdate:markitdownArgs":a[11]||=e=>O.value=e,"markitdown-output-file":A.value,"onUpdate:markitdownOutputFile":a[12]||=e=>A.value=e,"markitdown-timeout":j.value,"onUpdate:markitdownTimeout":a[13]||=e=>j.value=e,"markitdown-fallback-to-unpdf":M.value,"onUpdate:markitdownFallbackToUnpdf":a[14]||=e=>M.value=e,"markitdown-keep-output":P.value,"onUpdate:markitdownKeepOutput":a[15]||=e=>P.value=e,"marker-command":F.value,"onUpdate:markerCommand":a[16]||=e=>F.value=e,"marker-args":I.value,"onUpdate:markerArgs":a[17]||=e=>I.value=e,"marker-output-file":L.value,"onUpdate:markerOutputFile":a[18]||=e=>L.value=e,"marker-timeout":R.value,"onUpdate:markerTimeout":a[19]||=e=>R.value=e,"marker-fallback-to-unpdf":z.value,"onUpdate:markerFallbackToUnpdf":a[20]||=e=>z.value=e,"marker-keep-output":B.value,"onUpdate:markerKeepOutput":a[21]||=e=>B.value=e,"external-command":U.value,"onUpdate:externalCommand":a[22]||=e=>U.value=e,"external-args":W.value,"onUpdate:externalArgs":a[23]||=e=>W.value=e,"external-output-file":re.value,"onUpdate:externalOutputFile":a[24]||=e=>re.value=e,"external-timeout":G.value,"onUpdate:externalTimeout":a[25]||=e=>G.value=e,"external-fallback-to-unpdf":K.value,"onUpdate:externalFallbackToUnpdf":a[26]||=e=>K.value=e,"external-keep-output":q.value,"onUpdate:externalKeepOutput":a[27]||=e=>q.value=e,"image-ocr-fallback":ie.value,"onUpdate:imageOcrFallback":a[28]||=e=>ie.value=e,"image-ocr-languages":ae.value,"onUpdate:imageOcrLanguages":a[29]||=e=>ae.value=e,"image-ocr-min-confidence":J.value,"onUpdate:imageOcrMinConfidence":a[30]||=e=>J.value=e,"image-ocr-advanced-open":oe.value,"onUpdate:imageOcrAdvancedOpen":a[31]||=e=>oe.value=e},null,8,`has-vision-model.pdf-converter.mineru-command.mineru-args.mineru-timeout.mineru-fallback-to-unpdf.mineru-keep-output.markitdown-command.markitdown-args.markitdown-output-file.markitdown-timeout.markitdown-fallback-to-unpdf.markitdown-keep-output.marker-command.marker-args.marker-output-file.marker-timeout.marker-fallback-to-unpdf.marker-keep-output.external-command.external-args.external-output-file.external-timeout.external-fallback-to-unpdf.external-keep-output.image-ocr-fallback.image-ocr-languages.image-ocr-min-confidence.image-ocr-advanced-open`.split(`.`)),u(Xt,{ref_key:`integrationSettingsRef`,ref:Q,schemas:e.schemas,"langfuse-enabled":se.value,"onUpdate:langfuseEnabled":a[32]||=e=>se.value=e,"langfuse-public-key":ce.value,"onUpdate:langfusePublicKey":a[33]||=e=>ce.value=e,"langfuse-secret-key":le.value,"onUpdate:langfuseSecretKey":a[34]||=e=>le.value=e,"langfuse-host":ue.value,"onUpdate:langfuseHost":a[35]||=e=>ue.value=e,"webhook-enabled":de.value,"onUpdate:webhookEnabled":a[36]||=e=>de.value=e,"webhook-url":Y.value,"onUpdate:webhookUrl":a[37]||=e=>Y.value=e,"webhook-secret":fe.value,"onUpdate:webhookSecret":a[38]||=e=>fe.value=e,"notion-enabled":X.value,"onUpdate:notionEnabled":a[39]||=e=>X.value=e,"notion-token":pe.value,"onUpdate:notionToken":a[40]||=e=>pe.value=e,"notion-schemas":Z.value,"onUpdate:notionSchemas":a[41]||=e=>Z.value=e,"selected-notion-schema":me.value,"onUpdate:selectedNotionSchema":a[42]||=e=>me.value=e,"notion-database-id":he.value,"onUpdate:notionDatabaseId":a[43]||=e=>he.value=e,"notion-title-property":ge.value,"onUpdate:notionTitleProperty":a[44]||=e=>ge.value=e,"notion-field-map":_e.value,"onUpdate:notionFieldMap":a[45]||=e=>_e.value=e,"notion-properties":ve.value,"onUpdate:notionProperties":a[46]||=e=>ve.value=e,"notion-schema-fields":ye.value,"onUpdate:notionSchemaFields":a[47]||=e=>ye.value=e,"notion-advanced-open":be.value,"onUpdate:notionAdvancedOpen":a[48]||=e=>be.value=e},null,8,[`schemas`,`langfuse-enabled`,`langfuse-public-key`,`langfuse-secret-key`,`langfuse-host`,`webhook-enabled`,`webhook-url`,`webhook-secret`,`notion-enabled`,`notion-token`,`notion-schemas`,`selected-notion-schema`,`notion-database-id`,`notion-title-property`,`notion-field-map`,`notion-properties`,`notion-schema-fields`,`notion-advanced-open`]),u(kr,{ref_key:`promptSettingsRef`,ref:xe,"system-template":h.value,"onUpdate:systemTemplate":a[49]||=e=>h.value=e,"user-template":g.value,"onUpdate:userTemplate":a[50]||=e=>g.value=e},null,8,[`system-template`,`user-template`])]))]),_:1},8,[`visible`,`header`]))}});export{ei as default};
|