@reformer/builder 3.0.0-beta.1 → 3.0.0-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/README.md +42 -0
- package/dist/assets/{App-EWxVyd71.js → App-DDHZ1u4r.js} +259 -271
- package/dist/assets/{BootError-8gklkOEj.js → BootError-BocATCDq.js} +1 -1
- package/dist/assets/ChatPanel-CLGfEFwO.js +82 -0
- package/dist/assets/CodeEditor-D2CN7Y0Y.js +1 -0
- package/dist/assets/MarkdownPreview-DeF2kLYf.js +31 -0
- package/dist/assets/RawJsonEditor-CAn-6k60.js +1 -0
- package/dist/assets/{boot-CGsYMAQp.js → boot-CGXL9DvO.js} +1 -1
- package/dist/assets/byok-AwgW0TGr.js +120 -0
- package/dist/assets/{monaco-setup-BytXwQeQ.js → editor.api-D0kmPZPG.js} +151 -162
- package/dist/assets/{freemarker2-BQAfMb99.js → freemarker2-KoU2HZ3i.js} +2 -2
- package/dist/assets/handlebars-z9wljS-d.js +1 -0
- package/dist/assets/html-Dm_WSorp.js +1 -0
- package/dist/assets/{index-CSZOipZ8.js → index-7XdLAZ8M.js} +2 -2
- package/dist/assets/{index-BgGwGI4q.js → index-BcXYSsF-.js} +9 -9
- package/dist/assets/index-Bz9Zy-iu.js +1 -0
- package/dist/assets/index-CQSolIG8.js +3 -0
- package/dist/assets/{index-Uhx9KLCG.js → index-CQzoXBah.js} +1 -1
- package/dist/assets/{index-BLqONGUt.js → index-CwkqyHY1.js} +2 -2
- package/dist/assets/index-TeGkT1-d.css +1 -0
- package/dist/assets/javascript-CLIFL9TE.js +1 -0
- package/dist/assets/{jsonMode-D3mpWOQQ.js → jsonMode-BWN-M-0M.js} +3 -3
- package/dist/assets/liquid-DMbcy3LU.js +1 -0
- package/dist/assets/{load-DQmdgTkV.js → load-DneTPRH1.js} +4 -4
- package/dist/assets/mdx-CYOwcijj.js +1 -0
- package/dist/assets/monaco-languages-ShM1TEHM.js +2 -0
- package/dist/assets/monaco-setup-Bf10EGeB.js +12 -0
- package/dist/assets/python-HPf0NxJ6.js +1 -0
- package/dist/assets/razor-DEx2UEDo.js +1 -0
- package/dist/assets/reformer-ui-kit-11-DgIIndbm.js +1 -0
- package/dist/assets/reformer-ui-kit-DZ57GxjM.js +1 -0
- package/dist/assets/{typescript-Bjd-gS8c.js → typescript-CMnYDCrh.js} +1 -1
- package/dist/assets/typescript-D5hvGSDM.js +1 -0
- package/dist/assets/useFormField-BLbvmpme-BbA23MvM.js +1 -0
- package/dist/assets/xml-DNgl0Df8.js +1 -0
- package/dist/assets/yaml-CyW3nQo2.js +1 -0
- package/dist/index.html +2 -2
- package/package.json +11 -1
- package/dist/assets/CodeEditor-152n3d6e.js +0 -2
- package/dist/assets/RawJsonEditor-CkDLPhsI.js +0 -1
- package/dist/assets/handlebars-Brdeuzw5.js +0 -1
- package/dist/assets/html-BjYaOi8p.js +0 -1
- package/dist/assets/index-4oDdZ-Yj.js +0 -3
- package/dist/assets/index-CFDCSwb2.js +0 -1
- package/dist/assets/index-DIgOR-JL.css +0 -1
- package/dist/assets/javascript-CTKhG5-q.js +0 -1
- package/dist/assets/liquid-CSjp0MaB.js +0 -1
- package/dist/assets/mdx-Bc5quPBk.js +0 -1
- package/dist/assets/python-DuAl67Eo.js +0 -1
- package/dist/assets/razor-BbXkrvwj.js +0 -1
- package/dist/assets/reformer-ui-kit-11-DNMUPUyd.js +0 -1
- package/dist/assets/reformer-ui-kit-1LAJcT8b.js +0 -1
- package/dist/assets/typescript-0wJoIq5V.js +0 -1
- package/dist/assets/useFormField-BLbvmpme-4e6SCAMU.js +0 -1
- package/dist/assets/xml-bMgZPd2t.js +0 -1
- package/dist/assets/yaml-yApvoFdI.js +0 -1
- /package/dist/assets/{monaco-setup-BzOv8av-.css → editor-BzOv8av-.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e}from"./monaco-setup-BytXwQeQ.js";import"./index-CSZOipZ8.js";import"./App-EWxVyd71.js";import"./reformer-ui-kit-1LAJcT8b.js";import"./index-BLqONGUt.js";import"./useFormField-BLbvmpme-4e6SCAMU.js";import"./index-CFDCSwb2.js";import"./load-DQmdgTkV.js";import"./boot-CGsYMAQp.js";const g={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.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:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},d={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"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],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{g as conf,d as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as ue,e as ce,r as f,W as he,j as S}from"./index-CSZOipZ8.js";var de=ce();const yr=ue(de);function fe(...e){return t=>{for(const r of e)typeof r=="function"?r(t):r!=null&&(r.current=t)}}function ve(e){return Object.getOwnPropertyDescriptor(e.props,"ref")?.get?.isReactWarning?e.ref:Object.getOwnPropertyDescriptor(e,"ref")?.get?.isReactWarning?e.props.ref:e.props.ref??e.ref}function pe(e,t){const r={...e};for(const s of Object.keys(t)){const i=e[s],n=t[s];s.startsWith("on")&&typeof i=="function"&&typeof n=="function"?r[s]=(...o)=>{n(...o),i(...o)}:s==="className"&&typeof i=="string"&&typeof n=="string"?r[s]=[n,i].filter(Boolean).join(" "):s==="style"&&typeof i=="object"&&typeof n=="object"?r[s]={...n,...i}:s==="disabled"?r[s]=!!i||!!n:n!==void 0&&(r[s]=n)}return r}const q=f.forwardRef(({children:e,...t},r)=>{const s=f.Children.only(e);if(!f.isValidElement(s))return null;const i=s.props,n=pe(t,i),o=ve(s),a=fe(r,o);return f.cloneElement(s,{...n,ref:a})});q.displayName="Slot";var me=Symbol.for("preact-signals");function et(){if(x>1)x--;else{var e,t=!1;for((function(){var i=H;for(H=void 0;i!==void 0;)i.S.v===i.v&&(i.S.i=i.i),i=i.o})();U!==void 0;){var r=U;for(U=void 0,Z++;r!==void 0;){var s=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&Ct(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=s}}if(Z=0,x--,t)throw e}}function ft(e){if(x>0)return e();at=++ye,x++;try{return e()}finally{et()}}var m=void 0;function rt(e){var t=m;m=void 0;try{return e()}finally{m=t}}var $,U=void 0,x=0,Z=0,ye=0,at=0,H=void 0,Q=0;function Mt(e){if(m!==void 0){var t=e.n;if(t===void 0||t.t!==m)return t={i:0,S:e,p:m.s,n:void 0,t:m,e:void 0,x:void 0,r:t},m.s!==void 0&&(m.s.n=t),m.s=t,e.n=t,32&m.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=m.s,t.n=void 0,m.s.n=t,m.s=t),t}}function E(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}E.prototype.brand=me;E.prototype.h=function(){return!0};E.prototype.S=function(e){var t=this,r=this.t;r!==e&&e.e===void 0&&(e.x=r,this.t=e,r!==void 0?r.e=e:rt(function(){var s;(s=t.W)==null||s.call(t)}))};E.prototype.U=function(e){var t=this;if(this.t!==void 0){var r=e.e,s=e.x;r!==void 0&&(r.x=s,e.e=void 0),s!==void 0&&(s.e=r,e.x=void 0),e===this.t&&(this.t=s,s===void 0&&rt(function(){var i;(i=t.Z)==null||i.call(t)}))}};E.prototype.subscribe=function(e){var t=this;return b(function(){var r=t.value,s=m;m=void 0;try{e(r)}finally{m=s}},{name:"sub"})};E.prototype.valueOf=function(){return this.value};E.prototype.toString=function(){return this.value+""};E.prototype.toJSON=function(){return this.value};E.prototype.peek=function(){var e=m;m=void 0;try{return this.value}finally{m=e}};Object.defineProperty(E.prototype,"value",{get:function(){var e=Mt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Z>100)throw new Error("Cycle detected");(function(r){x!==0&&Z===0&&r.l!==at&&(r.l=at,H={S:r,v:r.v,i:r.i,o:H})})(this),this.v=e,this.i++,Q++,x++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{et()}}}});function w(e,t){return new E(e,t)}function Ct(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Pt(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ot(e){for(var t=e.s,r=void 0;t!==void 0;){var s=t.p;t.i===-1?(t.S.U(t),s!==void 0&&(s.n=t.n),t.n!==void 0&&(t.n.p=s)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=s}e.s=r}function P(e,t){E.call(this,void 0),this.x=e,this.s=void 0,this.g=Q-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}P.prototype=new E;P.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Q))return!0;if(this.g=Q,this.f|=1,this.i>0&&!Ct(this))return this.f&=-2,!0;var e=m;try{Pt(this),m=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return m=e,Ot(this),this.f&=-2,!0};P.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}E.prototype.S.call(this,e)};P.prototype.U=function(e){if(this.t!==void 0&&(E.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};P.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(P.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Mt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function v(e,t){return new P(e,t)}function jt(e){var t=e.m;if(e.m=void 0,typeof t=="function"){x++;var r=m;m=void 0;try{t()}catch(s){throw e.f&=-2,e.f|=8,vt(e),s}finally{m=r,et()}}}function vt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,jt(e)}function ge(e){if(m!==this)throw new Error("Out-of-order effect");Ot(this),m=e,this.f&=-2,8&this.f&&vt(this),et()}function j(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,$&&$.push(this)}j.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};j.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,jt(this),Pt(this),x++;var e=m;return m=this,ge.bind(this,e)};j.prototype.N=function(){2&this.f||(this.f|=2,this.u=U,U=this)};j.prototype.d=function(){this.f|=8,1&this.f||vt(this)};j.prototype.dispose=function(){this.d()};function b(e,t){var r=new j(e,t);try{r.c()}catch(i){throw r.d(),i}var s=r.d.bind(r);return s[Symbol.dispose]=s,s}function pt(e){return function(){var t=arguments,r=this;return ft(function(){return rt(function(){return e.apply(r,[].slice.call(t))})})}}function be(){var e=$;return $=[],function(){var t=$;return $&&e&&(e=e.concat($)),$=e,t}}var Dt=function(e){for(var t in e){var r=e[t];typeof r=="function"?e[t]=pt(r):typeof r=="object"&&r!==null&&!("brand"in r)&&Dt(r)}};function we(e){return function(){var t,r,s=be();try{r=e.apply(void 0,[].slice.call(arguments))}catch(i){throw $=void 0,i}finally{t=s()}return Dt(r),r[Symbol.dispose]=pt(function(){if(t)for(var i=0;i<t.length;i++)t[i].dispose();t=void 0}),r}}const gr=Object.freeze(Object.defineProperty({__proto__:null,Computed:P,Effect:j,Signal:E,action:pt,batch:ft,computed:v,createModel:we,effect:b,signal:w,untracked:rt},Symbol.toStringTag,{value:"Module"})),I=new WeakMap;function Ee(e){I.set(e,(I.get(e)??0)+1)}function ke(e){const t=I.get(e);t!==void 0&&(t<=1?I.delete(e):I.set(e,t-1))}function Y(e){return I.has(e)}const X=e=>!(e===null||typeof e!="object"||Array.isArray(e)||e instanceof Date||typeof Blob<"u"&&e instanceof Blob||typeof File<"u"&&e instanceof File),F=(e,t)=>e===""?String(t):`${e}.${t}`,lt=e=>/^\d+$/.test(e),V=e=>{if(Array.isArray(e))return e.map(V);if(X(e)){const t={};for(const r of Object.keys(e))t[r]=V(e[r]);return t}return e},tt=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((r,s)=>tt(r,t[s]));if(X(e)&&X(t)){const r=Object.keys(e),s=Object.keys(t);return r.length!==s.length?!1:r.every(i=>tt(e[i],t[i]))}return!1};let _e=class{constructor(t,r){this.path=r;const s=w(t);s.__path=r,this.signal=s,this.initial=V(t)}kind="leaf";signal;initial;rebase(t){this.path=t,this.signal.__path=t}read(){return this.signal.value}peek(){return this.signal.peek()}set(t){this.signal.value=t}resetToInitial(){this.signal.value=V(this.initial)}captureInitial(){this.initial=V(this.signal.peek())}dirty(){return!tt(this.signal.peek(),this.initial)}},It=class{constructor(t,r){this.path=r;for(const s of Object.keys(t))this.children.set(s,W(t[s],F(r,s)))}kind="group";children=new Map;rebase(t){this.path=t;for(const[r,s]of this.children)s.rebase(F(t,r))}peek(){const t={};for(const[r,s]of this.children)t[r]=s.peek();return t}set(t){if(t==null||typeof t!="object")return;const r=t;for(const[s,i]of this.children)s in r&&(i.kind==="leaf"&&Y(i.signal)||i.set(r[s]))}resetToInitial(){for(const t of this.children.values())t.resetToInitial()}captureInitial(){for(const t of this.children.values())t.captureInitial()}dirty(){for(const t of this.children.values())if(t.dirty())return!0;return!1}};class Ae{constructor(t,r){this.path=r,this.items=w(t.map((s,i)=>W(s,F(r,i)))),this.initial=V(t)}kind="array";items;initial;rebase(t){this.path=t,this.items.peek().forEach((r,s)=>r.rebase(F(t,s)))}reindex(){this.items.peek().forEach((t,r)=>t.rebase(F(this.path,r)))}push(t){const r=this.items.peek();this.items.value=[...r,W(t,F(this.path,r.length))]}insertAt(t,r){const s=[...this.items.peek()];s.splice(t,0,W(r,F(this.path,t))),this.items.value=s,this.reindex()}removeAt(t){const r=[...this.items.peek()];r.splice(t,1),this.items.value=r,this.reindex()}move(t,r){const s=[...this.items.peek()],[i]=s.splice(t,1);i&&s.splice(r,0,i),this.items.value=s,this.reindex()}swap(t,r){const s=[...this.items.peek()];t<0||r<0||t>=s.length||r>=s.length||t===r||([s[t],s[r]]=[s[r],s[t]],this.items.value=s,this.reindex())}clear(){this.items.value=[]}peek(){return this.items.peek().map(t=>t.peek())}set(t){const r=Array.isArray(t)?t:[];this.items.value=r.map((s,i)=>W(s,F(this.path,i)))}resetToInitial(){this.set(V(this.initial))}captureInitial(){this.initial=V(this.peek())}dirty(){return!tt(this.peek(),this.initial)}}function W(e,t){return Array.isArray(e)?new Ae(e,t):X(e)?new It(e,t):new _e(e,t)}function D(e){if(e)return e.kind==="group"?Rt(e):e.kind==="array"?Se(e):e.read()}function Se(e){const t={get length(){return e.items.value.length},push:r=>e.push(r),insertAt:(r,s)=>e.insertAt(r,s),removeAt:r=>e.removeAt(r),move:(r,s)=>e.move(r,s),swap:(r,s)=>e.swap(r,s),clear:()=>e.clear(),at:r=>D(e.items.value[r]),map:r=>e.items.value.map((s,i)=>r(D(s),i)),forEach:r=>e.items.value.forEach((s,i)=>r(D(s),i)),toArray:()=>e.peek(),[Symbol.iterator]:function*(){const r=e.items.value;for(let s=0;s<r.length;s++)yield D(r[s])}};return new Proxy(t,{get:(r,s,i)=>s==="__path"?e.path:typeof s=="string"&<(s)?D(e.items.value[Number(s)]):Reflect.get(r,s,i),has:(r,s)=>typeof s=="string"&<(s)?Number(s)<e.items.value.length:Reflect.has(r,s)})}function ut(e){if(e.kind==="leaf")return e.signal;if(e.kind==="group")return new Proxy({},{get:(r,s)=>{if(s==="__path")return e.path;if(typeof s!="string")return;const i=e.children.get(s);return i?ut(i):void 0},has:(r,s)=>typeof s=="string"&&e.children.has(s),ownKeys:()=>[...e.children.keys()],getOwnPropertyDescriptor:(r,s)=>typeof s=="string"&&e.children.has(s)?{enumerable:!0,configurable:!0}:void 0});const t=e;return new Proxy({get length(){return t.items.value.length}},{get:(r,s,i)=>{if(s==="__path")return t.path;if(typeof s=="string"&<(s)){const n=t.items.value[Number(s)];return n?ut(n):void 0}return Reflect.get(r,s,i)}})}function $e(e,t){if(!t)return;let r=e;for(const s of t.split(".")){if(!r)return;if(r.kind==="group")r=r.children.get(s);else if(r.kind==="array")r=r.items.peek()[Number(s)];else return}return r&&r.kind==="leaf"?r.signal:void 0}const _t=new Set(["$","get","set","patch","isDirty","reset","captureInitial","signalAt"]),At=new WeakMap,Tt=new WeakMap;function Rt(e){const t=At.get(e);if(t)return t;const r={$:ut(e),get:()=>e.peek(),set:i=>e.set(i),patch:i=>e.set(i),isDirty:()=>e.dirty(),reset:()=>e.resetToInitial(),captureInitial:()=>e.captureInitial(),signalAt:i=>$e(e,i)},s=new Proxy({},{get:(i,n)=>{if(n==="__path")return e.path;if(typeof n!="string")return;const o=e.children.get(n);if(o)return D(o);if(_t.has(n))return r[n]},set:(i,n,o)=>{if(typeof n!="string")return!1;const a=e.children.get(n);return a?(a.set(o),!0):!1},has:(i,n)=>typeof n=="string"&&(e.children.has(n)||_t.has(n)),ownKeys:()=>[...e.children.keys()],getOwnPropertyDescriptor:(i,n)=>typeof n=="string"&&e.children.has(n)?{enumerable:!0,configurable:!0}:void 0});return At.set(e,s),Tt.set(s,e),s}function ct(e,t){if(e.kind==="leaf"){t(e.signal);return}if(e.kind==="group"){for(const r of e.children.values())ct(r,t);return}for(const r of e.items.value)ct(r,t)}function xe(e,t){const r=Tt.get(e);r&&ct(r,t)}function Fe(e){const t=new It(e,"");return Rt(t)}const Ne="runOutsideEffect";function Ve(e){return typeof e=="object"&&e!==null&&typeof e.then=="function"}function Wt(e,t){try{const r=e();Ve(r)&&r.then(void 0,s=>void 0)}catch{}}function Me(e){return(...t)=>{M(()=>e(...t))}}function M(e){let t=!1;return queueMicrotask(()=>{t||Wt(e,Ne)}),()=>{t=!0}}function Ce(e,t){return()=>{t(()=>Wt(e,"safeDebouncedCallback"))}}function Pe(e,t,r,s){return b(()=>{const i=e.map(o=>o.value);if(s?.when&&!s.when(...i))return;const n=r(...i);t.peek()!==n&&(t.value=n)})}function Oe(e,t,r){return b(()=>{const s=e.value;if(r?.when&&!r.when())return;const i=r?.transform?r.transform(s):s;t.peek()!==i&&(t.value=i)})}function je(e,t,r){let s=!0;return b(()=>{const i=e.value;s&&(s=!1,!r?.immediate)||t(i)})}function De(e,t){let r=!1;return b(()=>{const s=e.value;r||M(()=>{const i=t(s);if(e.peek()!==i){r=!0;try{e.value=i}finally{r=!1}}})})}function Ie(e,t,r){const s=r?.resetValue??null;return b(()=>{const i=t();M(()=>{i&&e.peek()!==s&&(e.value=s)})})}function Te(e,t,r){const s=r?.transform;let i=!1;const n=b(()=>{const a=e.value;i||M(()=>{i=!0;try{const u=s?s(a):a;t.peek()!==u&&(t.value=u)}finally{i=!1}})}),o=b(()=>{const a=t.value;i||M(()=>{i=!0;try{e.peek()!==a&&(e.value=a)}finally{i=!1}})});return()=>{n(),o()}}function Re(e,t){let r=!0;return b(()=>{if(e.forEach(s=>s.value),r){r=!1;return}M(()=>t())})}let st=class{subscriptions=new Map;add(t,r){return this.subscriptions.has(t)&&this.subscriptions.get(t)?.(),this.subscriptions.set(t,r),()=>this.remove(t)}remove(t){const r=this.subscriptions.get(t);return r?(r(),this.subscriptions.delete(t),!0):!1}clear(){this.subscriptions.forEach(t=>{t()}),this.subscriptions.clear()}size(){return this.subscriptions.size}has(t){return this.subscriptions.has(t)}getKeys(){return Array.from(this.subscriptions.keys())}dispose(){this.clear()}};const Ut=new WeakMap;function Gt(e,t){Ut.set(e,t)}function T(e){return Ut.get(e)}function Bt(e,t,r){return b(()=>{const s=t(),i=T(e);i&&M(()=>{s?i.enable():(i.disable(),r?.resetOnDisable&&i.reset())})})}function We(e,t,r){return Bt(e,()=>!t(),r)}let G=null;function R(e){if(!G)throw new Error(`[@reformer/core/validation] "${e}" вызван вне схемы валидации — операторы валидации можно вызывать только внутри прогона validateModel(...) (напрямую или через apply/each).`);return G}function mt(e,t){let r=e.errors.get(t);return r||e.errors.set(t,r=[]),r}const yt=e=>e.whenStack.every(t=>t());function Ue(e,t){const r=R("validate"),s=mt(r,e);if(!yt(r))return;const i=e.peek();for(const n of t){const o=n(i,r.model,r.model);o&&s.push(o)}}function Ge(e,t){const r=R("validateAsync"),s=mt(r,e);if(!yt(r))return;const i=e.peek(),n=r.signal;for(const o of t)r.pending.push(o(i,{signal:n}).then(a=>{a&&!n.aborted&&s.push(a)},()=>{}))}function Be(e,t){const r=R("validateWhen");r.whenStack.push(e);try{t()}finally{r.whenStack.pop()}}function Le(e,t){const r=R("cross"),s=mt(r,e);if(!yt(r))return;const i=t(r.model.get());i&&s.push(i)}function qe(e,t){R("each");const r=e.length;for(let s=0;s<r;s++)t(e.at(s))}function ze(...e){const t=R("apply").model;for(const r of e)r({model:t})}function Ke(e){return e}const St=new WeakMap;function Je(e,t){let r=St.get(e);r||St.set(e,r=new WeakMap);let s=r.get(t);return s||r.set(t,s={fields:new Set,ac:null}),s}const Ze=e=>{for(const t of e.values())for(const r of t)if(r.severity!=="warning")return!0;return!1};function He(e){return e.aborted?Promise.resolve():new Promise(t=>{e.addEventListener("abort",()=>t(),{once:!0})})}async function Lt(e,t,r){const s=Je(e,t);s.ac?.abort();const i=new AbortController;s.ac=i;const n={model:e,errors:new Map,pending:[],whenStack:[],signal:i.signal},o=G;G=n;try{t({model:e})}finally{G=o}if(n.pending.length&&await Promise.race([Promise.all(n.pending),He(i.signal)]),i.signal.aborted)return!1;const a=new Set(n.errors.keys());for(const u of s.fields)a.has(u)||T(u)?.setErrors([]);for(const u of a)T(u)?.setErrors(n.errors.get(u)??[]);if(r?.touch)for(const u of a)T(u)?.markAsTouched();return s.fields=a,!Ze(n.errors)}function qt(e,t,r={}){const{strategy:s="submit",debounce:i=0,liveAfterSubmit:n="change"}=r,o=w(!1);let a=0,u=!1,d=!1,c,l;const h=async k=>{a++,o.value=!0;try{return await Lt(e,t,{touch:k})}finally{--a===0&&(o.value=!1)}},p=()=>{h(!1)},g=()=>{if(!i){p();return}l&&clearTimeout(l),l=setTimeout(p,i)},y=(k,_)=>{let kt=!0;return b(()=>{if(xe(e,k),kt){kt=!1;return}s==="afterFirstSubmit"&&!u||_()})},A={async validate(){return u=!0,h(!0)},start(){if(d||c)return()=>A.dispose();const k=s==="afterFirstSubmit"?n:s;return k==="change"?c=y(_=>void _.value,g):k==="blur"&&(c=y(_=>void T(_)?.touched.value,p)),()=>A.dispose()},dispose(){d=!0,l&&(clearTimeout(l),l=void 0),c?.(),c=void 0},get isValidating(){return o.value},get validating(){return o}};return A}const kr=Object.freeze(Object.defineProperty({__proto__:null,apply:ze,createFormValidation:qt,cross:Le,defineValidationSchema:Ke,each:qe,validate:Ue,validateAsync:Ge,validateModel:Lt,validateWhen:Be},Symbol.toStringTag,{value:"Module"}));class z{_touched=w(!1);_dirty=w(!1);_status=w("valid");touched=v(()=>this._touched.value);dirty=v(()=>this._dirty.value);status=v(()=>this._status.value);disabled=v(()=>this._status.value==="disabled");getErrors(t){const r=this.errors.value;return t?r.filter(s=>{if(t.code!==void 0&&!(Array.isArray(t.code)?t.code:[t.code]).includes(s.code)||t.message!==void 0&&!s.message.toLowerCase().includes(t.message.toLowerCase()))return!1;if(t.params!==void 0){if(!s.params)return!1;for(const[i,n]of Object.entries(t.params))if(s.params[i]!==n)return!1}return!(t.predicate!==void 0&&!t.predicate(s))}):r}markAsTouched(){this._touched.value=!0,this.onMarkAsTouched()}markAsUntouched(){this._touched.value=!1,this.onMarkAsUntouched()}markAsDirty(){this._dirty.value=!0,this.onMarkAsDirty()}markAsPristine(){this._dirty.value=!1,this.onMarkAsPristine()}touchAll(){this.markAsTouched()}disable(){this._status.value="disabled",this.onDisable()}enable(){this._status.value="valid",this.onEnable()}onMarkAsTouched(){}onMarkAsUntouched(){}onMarkAsDirty(){}onMarkAsPristine(){}onDisable(){}onEnable(){}}const B={Watch:"watch",ComputeFrom:"computeFrom",LinkFields:"linkFields",WatchField:"watchField"};let Qe=0;function L(e){return`${e}-${++Qe}`}var N=(e=>(e.THROW="throw",e.LOG="log",e.CONVERT="convert",e))(N||{});let O=class{static handle(t,r,s="throw"){const i=this.extractMessage(t);switch(s){case"throw":throw t;case"log":return;case"convert":return{code:"validator_error",message:i,params:{field:r}}}}static extractMessage(t){return t instanceof Error?t.message:typeof t=="string"?t:typeof t=="object"&&t!==null&&"message"in t?String(t.message):String(t)}static createValidationError(t,r,s){return{code:t,message:r,params:s?{field:s}:void 0}}static isValidationError(t){return typeof t=="object"&&t!==null&&"code"in t&&"message"in t&&typeof t.code=="string"&&typeof t.message=="string"}};class Ye{_status;status;valid;invalid;pending;disabled;constructor(t="valid"){this._status=w(t),this.status=v(()=>this._status.value),this.valid=v(()=>this._status.value==="valid"),this.invalid=v(()=>this._status.value==="invalid"),this.pending=v(()=>this._status.value==="pending"),this.disabled=v(()=>this._status.value==="disabled")}startValidation(){this._status.value!=="disabled"&&(this._status.value="pending")}completeValidation(t){this._status.value!=="disabled"&&(this._status.value=t?"invalid":"valid")}setErrors(t){this._status.value!=="disabled"&&(this._status.value=t?"invalid":"valid")}disable(){this._status.value="disabled"}enable(t=!1){this._status.value=t?"invalid":"valid"}}class zt extends z{_value;_errors;_componentProps;statusMachine;value;valid;invalid;pending;status;disabled;errors;componentProps;shouldShowError;validators;asyncValidators;updateOn;initialValue;currentAbortController;debounceMs;validateDebounceTimer;pendingValidation;disposers=new st;component;constructor(t){super(),this.validators=t.validators||[],this.asyncValidators=t.asyncValidators||[],this.updateOn=t.updateOn||"blur",this.debounceMs=t.debounce||0,this.component=t.component,this._value=t.valueSignal??w(t.value),this.initialValue=this._value.peek(),this._errors=w([]),this._componentProps=w(t.componentProps||{}),this.statusMachine=new Ye(t.disabled?"disabled":"valid"),this.value=v(()=>this._value.value),this.valid=v(()=>this.statusMachine.valid.value),this.invalid=v(()=>this.statusMachine.invalid.value),this.pending=v(()=>this.statusMachine.pending.value),this.status=v(()=>this.statusMachine.status.value),this.disabled=v(()=>this.statusMachine.disabled.value),this.errors=v(()=>this._errors.value),this.componentProps=v(()=>this._componentProps.value),this.shouldShowError=v(()=>this.statusMachine.invalid.value&&(this._touched.value||this._dirty.value))}getValue(){return this._value.peek()}setValue(t,r){if(this._value.value=t,this._dirty.value=!0,r?.emitEvent===!1)return;const s=this.validators.length>0||this.asyncValidators.length>0,i=this._errors.value.length>0;if(this.updateOn==="change"){this.validate();return}i&&s&&this.validate()}patchValue(t){this.setValue(t)}reset(t){this._value.value=t!==void 0?t:this.initialValue,this._errors.value=[],this._touched.value=!1,this._dirty.value=!1,this.statusMachine.setErrors(!1)}resetToInitial(){this.reset(this.initialValue)}cancelPendingValidation(){this.pendingValidation&&(this.pendingValidation.abortController.abort(),this.pendingValidation.resolve(!1),this.pendingValidation=void 0),this.validateDebounceTimer&&(clearTimeout(this.validateDebounceTimer),this.validateDebounceTimer=void 0),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=void 0)}async validate(t){const r=t?.debounce??this.debounceMs;if(this.cancelPendingValidation(),r<=0||this.asyncValidators.length===0)return this.validateImmediate();const s=new AbortController;return new Promise(i=>{this.pendingValidation={resolve:i,abortController:s},this.validateDebounceTimer=setTimeout(async()=>{if(this.validateDebounceTimer=void 0,s.signal.aborted){i(!1);return}this.pendingValidation=void 0;const n=await this.validateImmediate(s);i(n)},r),s.signal.addEventListener("abort",()=>{this.validateDebounceTimer&&(clearTimeout(this.validateDebounceTimer),this.validateDebounceTimer=void 0),i(!1)},{once:!0})})}async validateImmediate(t){const r=t??new AbortController;t||this.currentAbortController?.abort(),this.currentAbortController=r;const{signal:s}=r,i=[];for(const n of this.validators){const o=n(this._value.value);o&&i.push(o)}if(s.aborted)return!1;if(i.length>0){this._errors.value=i;const n=i.some(o=>o.severity!=="warning");if(this.statusMachine.setErrors(n),n)return!1}if(this.asyncValidators.length>0){if(s.aborted)return!1;this.statusMachine.startValidation();try{const n=await Promise.all(this.asyncValidators.map(async a=>{if(s.aborted)throw new DOMException("Validation aborted","AbortError");try{const u=await a(this._value.value,{signal:s});if(s.aborted)throw new DOMException("Validation aborted","AbortError");return u}catch(u){if(u instanceof DOMException&&u.name==="AbortError")throw u;return O.handle(u,"FieldNode AsyncValidator",N.CONVERT)}}));if(s.aborted)return!1;const o=n.filter(a=>a!==null);if(o.length>0){this._errors.value=o;const a=o.some(u=>u.severity!=="warning");if(this.statusMachine.completeValidation(a),a)return!1}}catch(n){if(n instanceof DOMException&&n.name==="AbortError")return!1;throw n}}return s.aborted?!1:((this.validators.length>0||this.asyncValidators.length>0)&&(this._errors.value=[],this.statusMachine.completeValidation(!1)),!this._errors.value.some(n=>n.severity!=="warning"))}setErrors(t){this._errors.value=t;const r=t.some(s=>s.severity!=="warning");this.statusMachine.setErrors(r)}clearErrors(){this._errors.value=[],this.statusMachine.setErrors(!1)}onMarkAsTouched(){this.updateOn==="blur"&&this.validate()}onDisable(){this.statusMachine.disable(),this._errors.value=[]}onEnable(){this.statusMachine.enable(this._errors.value.length>0),this.validate()}updateComponentProps(t){this._componentProps.value={...this._componentProps.value,...t}}setUpdateOn(t){this.updateOn=t}getUpdateOn(){return this.updateOn}watch(t){const r=new AbortController,s=b(()=>{const n=this.value.value;t(n,r.signal)}),i=L(B.Watch);return this.disposers.add(i,()=>{r.abort(),s()})}computeFrom(t,r){const s=b(()=>{const n=t.map(a=>a.value),o=r(...n);this.setValue(o,{emitEvent:!1})}),i=L(B.ComputeFrom);return this.disposers.add(i,s)}dispose(){try{this.disposers.dispose()}finally{this.cancelPendingValidation()}}}function gt(e){const{getChildren:t,ownErrors:r,disabled:s}=e,i=v(()=>r.value.length>0?!1:t().every(l=>l.disabled.value||l.valid.value)),n=v(()=>!i.value),o=v(()=>t().some(l=>l.pending.value)),a=v(()=>t().some(l=>l.touched.value)),u=v(()=>t().some(l=>l.dirty.value)),d=v(()=>{const l=[...r.value];for(const h of t())l.push(...h.errors.value);return l}),c=v(()=>s?.value?"disabled":o.value?"pending":n.value?"invalid":"valid");return{valid:i,invalid:n,pending:o,touched:a,dirty:u,errors:d,status:c}}function $t(e){return typeof e=="object"&&e!==null&&"getProxy"in e&&typeof e.getProxy=="function"}const xt="$";function Xe(e,t){let r;const s=()=>{if(!r){const i={};t.forEach((n,o)=>{i[o]=n&&$t(n)?n.getProxy():n}),r=i}return r};return new Proxy(e,{get:(i,n)=>{if(n===xt)return s();if(n in i)return i[n];if(typeof n=="string"&&t.has(n)){const o=t.get(n);return o&&$t(o)?o.getProxy():o}},set:(i,n,o)=>typeof n=="string"&&t.has(n)?!1:(i[n]=o,!0),has:(i,n)=>n===xt||typeof n=="string"&&t.has(n)?!0:n in i,ownKeys:i=>{const n=Reflect.ownKeys(i),o=Array.from(t.keys());return[...new Set([...n,...o])]},getOwnPropertyDescriptor:(i,n)=>typeof n=="string"&&t.has(n)?{enumerable:!0,configurable:!0}:Reflect.getOwnPropertyDescriptor(i,n)})}class Kt{constructor(t){this.form=t}_submitting=w(!1);submitting=v(()=>this._submitting.value);async submit(t,r){const{skipValidation:s=!1,skipTouch:i=!1}=r||{};if(i||this.form.markAsTouched(),!s&&!await this.form.validate())return null;this._submitting.value=!0;try{return await t(this.form.getValue())}finally{this._submitting.value=!1}}async submitWithResult(t,r){const{skipValidation:s=!1,skipTouch:i=!1}=r||{};if(i||this.form.markAsTouched(),!s&&!await this.form.validate())return{success:!1,data:null};this._submitting.value=!0;try{return{success:!0,data:await t(this.form.getValue())}}catch(n){return{success:!1,data:null,error:n instanceof Error?n:new Error(String(n))}}finally{this._submitting.value=!1}}}function tr(e){const t=[];for(const r of e.split(".")){const s=/^([^[\]]+)(?:\[(\d+)\])?$/.exec(r);if(!s)return[];t.push(s[2]!==void 0?{key:s[1],index:Number(s[2])}:{key:s[1]})}return t}class C extends z{id=crypto.randomUUID();_fields=new Map;disposers=new st;_proxyInstance;_behaviorCleanup;nodeFactory=new Jt;formSubmitter;_disabled=w(!1);_formErrors=w([]);_fieldSignals=new WeakMap;value;valid;invalid;touched;dirty;pending;errors;status;submitting;constructor(t){super(),this.formSubmitter=new Kt(this);const r=t.form,s=r!=null&&typeof r=="object"&&("valueSignal"in r||"value"in r),i="form"in t&&!s?t.form:t;for(const[o,a]of Object.entries(i)){const u=this.createNode(a);this._fields.set(o,u)}this.value=v(()=>{const o={};return this._fields.forEach((a,u)=>{o[u]=a.value.value}),o});const n=gt({getChildren:()=>Array.from(this._fields.values()),ownErrors:this._formErrors,disabled:this._disabled});this.valid=n.valid,this.invalid=n.invalid,this.pending=n.pending,this.touched=n.touched,this.dirty=n.dirty,this.errors=n.errors,this.status=n.status,this.submitting=this.formSubmitter.submitting}buildProxy(){return Xe(this,this._fields)}getValue(){const t={};return this._fields.forEach((r,s)=>{t[s]=r.getValue()}),t}setValue(t,r){for(const[s,i]of Object.entries(t)){const n=this._fields.get(s);if(n){const o=this._fieldSignals.get(n)??n.value;if(Y(o))continue;n.setValue(i,r)}}}patchValue(t){ft(()=>{for(const[r,s]of Object.entries(t)){const i=this._fields.get(r);if(i&&s!==void 0){const n=this._fieldSignals.get(i)??i.value;if(Y(n))continue;i.setValue(s,{emitEvent:!1})}}})}reset(t){this._formErrors.value=[],this._fields.forEach((r,s)=>{const i=t?.[s];r.reset(i)})}resetToInitial(){this._formErrors.value=[],this._fields.forEach(t=>{"resetToInitial"in t&&typeof t.resetToInitial=="function"?t.resetToInitial():t.reset()})}async validate(){return this.clearErrors(),await Promise.all(Array.from(this._fields.values()).map(t=>t.validate())),Array.from(this._fields.values()).every(t=>t.valid.value||t.disabled.value)}setErrors(t){this._formErrors.value=t}clearErrors(){this._formErrors.value=[],this._fields.forEach(t=>t.clearErrors())}getField(t){return this._fields.get(t)}get fields(){return this._fields}getProxy(){return this._proxyInstance||(this._proxyInstance=this.buildProxy()),this._proxyInstance}getAllFields(){return this._fields.values()}onMarkAsTouched(){this._fields.forEach(t=>t.markAsTouched())}onMarkAsUntouched(){this._fields.forEach(t=>t.markAsUntouched())}onMarkAsDirty(){this._fields.forEach(t=>t.markAsDirty())}onMarkAsPristine(){this._fields.forEach(t=>t.markAsPristine())}async submit(t,r){return this.formSubmitter.submit(t,r)}async submitWithResult(t,r){return this.formSubmitter.submitWithResult(t,r)}getFieldByPath(t){if(t.startsWith(".")||t.endsWith("."))return;const r=tr(t);if(r.length===0)return;let s=this;for(const i of r){if(!(s instanceof C)||(s=s.getField(i.key),!s))return;if(i.index!==void 0)if("at"in s&&"length"in s&&typeof s.at=="function"){const n=s.at(i.index);if(!n)return;s=n}else return}return s}createNode(t){return this.nodeFactory.createNode(t)}linkFields(t,r,s){const i=this._fields.get(t),n=this._fields.get(r);if(!i||!n){const u=i?r:t;throw new Error(`GroupNode.linkFields: field "${String(u)}" not found`)}const o=b(()=>{const u=i.value.value,d=s?s(u):u;n.setValue(d,{emitEvent:!1})}),a=L(B.LinkFields);return this.disposers.add(a,o)}watchField(t,r){const s=this.getFieldByPath(t);if(!s)throw new Error(`GroupNode.watchField: field "${t}" not found`);const i=b(()=>{r(s.value.value)}),n=L(B.WatchField);return this.disposers.add(n,i)}watchFieldByPath(t,r){const s=this.getFieldByPath(t);if(!s)throw new Error(`GroupNode.watchFieldByPath: field "${t}" not found`);const i=b(()=>{r(s.value.value)}),n=L(B.WatchField);return this.disposers.add(n,i)}onDisable(){this._disabled.value=!0,this._fields.forEach(t=>t.disable())}onEnable(){this._disabled.value=!1,this._fields.forEach(t=>t.enable())}attachBehaviorCleanup(t){this._behaviorCleanup=t}registerFieldSignal(t,r){this._fieldSignals.set(t,r)}dispose(){this._behaviorCleanup?.(),this._behaviorCleanup=void 0,this.disposers.dispose(),this._fields.forEach(t=>{"dispose"in t&&typeof t.dispose=="function"&&t.dispose()})}}class ht extends z{items;itemSchema;initialItems;disposers=new st;_arrayErrors=w([]);value;valid;invalid;touched;dirty;pending;errors;status;length;constructor(t,r=[]){super(),this.itemSchema=t,this.initialItems=r,this.items=w([]);for(const i of r)this.push(i);this.length=v(()=>this.items.value.length),this.value=v(()=>this.items.value.map(i=>i.value.value));const s=gt({getChildren:()=>this.items.value,ownErrors:this._arrayErrors});this.valid=s.valid,this.invalid=s.invalid,this.pending=s.pending,this.touched=s.touched,this.dirty=s.dirty,this.errors=s.errors,this.status=s.status}push(t){const r=this.createItem(t);this.items.value=[...this.items.value,r]}removeAt(t){if(t<0||t>=this.items.value.length){O.handle(new Error(`ArrayNode.removeAt: index ${t} out of bounds (length: ${this.items.value.length})`),"ArrayNode.removeAt",N.LOG);return}const r=this.items.value[t];this.items.value=this.items.value.filter((s,i)=>i!==t),r&&"dispose"in r&&typeof r.dispose=="function"&&r.dispose()}insert(t,r){if(t<0||t>this.items.value.length){O.handle(new Error(`ArrayNode.insert: index ${t} out of bounds (length: ${this.items.value.length})`),"ArrayNode.insert",N.LOG);return}const s=this.createItem(r),i=[...this.items.value];i.splice(t,0,s),this.items.value=i}move(t,r){const s=this.items.value.length;if(t<0||t>=s||r<0||r>=s){O.handle(new Error(`ArrayNode.move: index out of bounds (from=${t}, to=${r}, length=${s})`),"ArrayNode.move",N.LOG);return}if(t===r)return;const i=[...this.items.value],[n]=i.splice(t,1);i.splice(r,0,n),this.items.value=i}swap(t,r){const s=this.items.value.length;if(t<0||t>=s||r<0||r>=s){O.handle(new Error(`ArrayNode.swap: index out of bounds (a=${t}, b=${r}, length=${s})`),"ArrayNode.swap",N.LOG);return}if(t===r)return;const i=[...this.items.value];[i[t],i[r]]=[i[r],i[t]],this.items.value=i}clear(){const t=[...this.items.value];this.items.value=[],t.forEach(r=>{"dispose"in r&&typeof r.dispose=="function"&&r.dispose()})}at(t){const r=this.items.value[t];if(r)return r.getProxy()}getValue(){return this.items.value.map(t=>t.getValue())}setValue(t,r){this.clear(),t.forEach(s=>this.push(s)),r?.emitEvent!==!1&&this.validate().catch(s=>{O.handle(s,"ArrayNode.setValue",N.LOG)})}patchValue(t){t.forEach((r,s)=>{this.items.value[s]&&r!==void 0&&this.items.value[s].patchValue(r)})}reset(t){this._arrayErrors.value=[],this.clear(),t&&t.forEach(r=>this.push(r))}resetToInitial(){this._arrayErrors.value=[],this.clear(),this.initialItems.forEach(t=>this.push(t))}async validate(){return(await Promise.all(this.items.value.map(t=>t.validate()))).every(Boolean)&&this._arrayErrors.value.length===0}setErrors(t){this._arrayErrors.value=t}clearErrors(){this._arrayErrors.value=[],this.items.value.forEach(t=>t.clearErrors())}onMarkAsTouched(){this.items.value.forEach(t=>t.markAsTouched())}onMarkAsUntouched(){this.items.value.forEach(t=>t.markAsUntouched())}onMarkAsDirty(){this.items.value.forEach(t=>t.markAsDirty())}onMarkAsPristine(){this.items.value.forEach(t=>t.markAsPristine())}forEach(t){this.items.value.forEach((r,s)=>{const i=r.getProxy();t(i,s)})}map(t){return this.items.value.map((r,s)=>{const i=r.getProxy();return t(i,s)})}createItem(t){if(this.isGroupSchema(this.itemSchema)){const r=new C(this.itemSchema);return t&&r.patchValue(t),r}throw new Error("ArrayNode поддерживает только GroupNode элементы. Для массива примитивов используйте обычное поле с типом массива.")}isGroupSchema(t){return typeof t=="object"&&t!==null&&!("component"in t)&&!Array.isArray(t)}dispose(){this.disposers.dispose(),this.items.value.forEach(t=>{"dispose"in t&&typeof t.dispose=="function"&&t.dispose()})}onDisable(){this.items.value.forEach(t=>{t.disable()})}onEnable(){this.items.value.forEach(t=>{t.enable()})}}class Jt{createNode(t){if(Array.isArray(t)&&t.length>=1)return this.createArrayNodeFromArray(t);if(this.isFieldConfig(t))return new zt(t);if(this.isArrayConfig(t))return new ht(t.schema,t.initialItems);if(this.isGroupConfig(t))return new C(t);throw new Error(`NodeFactory: Unknown node config. Expected FieldConfig, GroupConfig, or ArrayConfig, but got: ${JSON.stringify(t)}`)}createArrayNodeFromArray(t){const[r,...s]=t,i=[];this.isGroupConfig(r)&&i.push(this.extractValues(r));for(const n of s)this.isGroupConfig(n)?i.push(this.extractValues(n)):i.push(n);return new ht(r,i)}extractValues(t){if(this.isFieldConfig(t))return t.value;if(Array.isArray(t))return t.map(r=>this.extractValues(r));if(this.isGroupConfig(t)){const r={};for(const[s,i]of Object.entries(t))r[s]=this.extractValues(i);return r}return t}isFieldConfig(t){return t==null||typeof t!="object"?!1:"valueSignal"in t?!0:"value"in t?"component"in t||"componentProps"in t||"validators"in t||"asyncValidators"in t||"updateOn"in t||"debounce"in t:!1}isArrayConfig(t){return t!=null&&typeof t=="object"&&"schema"in t&&!("value"in t)}isGroupConfig(t){return t!=null&&typeof t=="object"&&!this.isFieldConfig(t)&&!this.isArrayConfig(t)}}class Zt extends z{constructor(t,r){super(),this.control=t,this.buildItem=r,this.initial=t.toArray(),this.disposeSync=b(()=>{const i=t.length,n=[],o=[];for(let d=0;d<i;d++){const c=t.at(d);if(!c)continue;let l=this.cache.get(c);l||(l=r(c),this.cache.set(c,l)),n.push(c),o.push(l)}const a=new Set(n),u=[];for(const d of this.mountedModels){if(a.has(d))continue;const c=this.cache.get(d);this.cache.delete(d),c&&u.push(c)}this.mountedModels=n,this.itemNodes.value=o,u.forEach(d=>this.disposeItemNode(d))}),this.length=v(()=>this.itemNodes.value.length),this.value=v(()=>this.itemNodes.value.map(i=>i.value.value));const s=gt({getChildren:()=>this.itemNodes.value,ownErrors:this._arrayErrors});this.valid=s.valid,this.invalid=s.invalid,this.pending=s.pending,this.touched=s.touched,this.dirty=s.dirty,this.errors=s.errors,this.status=s.status}itemNodes=w([]);cache=new WeakMap;mountedModels=[];initial;_arrayErrors=w([]);disposeSync;get items(){return this.itemNodes}value;valid;invalid;pending;touched;dirty;errors;status;length;at(t){return this.itemNodes.value[t]}map(t){return this.itemNodes.value.map((r,s)=>t(r,s))}forEach(t){this.itemNodes.value.forEach((r,s)=>t(r,s))}push(t){this.control.push(t??{})}insert(t,r){this.control.insertAt(t,r??{})}removeAt(t){this.control.removeAt(t)}move(t,r){this.control.move(t,r)}swap(t,r){this.control.swap(t,r)}clear(){this.control.clear()}getValue(){return this.control.toArray()}setValue(t){this.control.clear(),(t??[]).forEach(r=>this.control.push(r))}patchValue(t){this.setValue(t)}reset(t){this._arrayErrors.value=[],this.setValue(t??this.initial)}resetToInitial(){this.reset(this.initial)}async validate(){return(await Promise.all(this.itemNodes.value.map(t=>t.validate()))).every(Boolean)&&this._arrayErrors.value.length===0}setErrors(t){this._arrayErrors.value=t}clearErrors(){this._arrayErrors.value=[],this.itemNodes.value.forEach(t=>t.clearErrors?.())}onMarkAsTouched(){this.itemNodes.value.forEach(t=>t.markAsTouched?.())}onMarkAsUntouched(){this.itemNodes.value.forEach(t=>t.markAsUntouched?.())}onMarkAsDirty(){this.itemNodes.value.forEach(t=>t.markAsDirty?.())}onMarkAsPristine(){this.itemNodes.value.forEach(t=>t.markAsPristine?.())}onDisable(){this.itemNodes.value.forEach(t=>t.disable?.())}onEnable(){this.itemNodes.value.forEach(t=>t.enable?.())}disposeItemNode(t){t.dispose?.()}dispose(){this.disposeSync(),this.itemNodes.value.forEach(t=>this.disposeItemNode(t)),this.mountedModels=[]}}const Ht=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)&&!(typeof Blob<"u"&&e instanceof Blob)&&!(typeof File<"u"&&e instanceof File);function dt(e,t,r){if(e==null||typeof e!="object"||e instanceof E)return;if(Array.isArray(e)){for(const n of e)dt(n,t,r);return}const s=e,i=s.array;if(i&&typeof i.__path=="string"&&typeof s.item=="function"){r.set(i.__path,s.item);return}s.value instanceof E&&t.set(s.value,{component:s.component,componentProps:s.componentProps,updateOn:s.updateOn,disabled:s.disabled,debounce:s.debounce});for(const[n,o]of Object.entries(s))n!=="value"&&dt(o,t,r)}function Qt(e,t,r,s){const i={};for(const[n,o]of Object.entries(t)){const a=r===""?n:`${r}.${n}`;if(Array.isArray(o))continue;if(Ht(o)){i[n]=Qt(e,o,a,s);continue}const u=e.signalAt(a);if(!u)throw new Error(`createForm({ model }): не найден сигнал для пути "${a}"`);const d=s.get(u)??{};i[n]={...d,valueSignal:u}}return i}function Yt(e,t,r){for(const[s,i]of Object.entries(e)){const n=t===""?s:`${t}.${s}`;Array.isArray(i)||(Ht(i)?Yt(i,n,r):r.push(n))}}function bt(e){const{model:t,schema:r,behavior:s}=e,i=new Map,n=new Map;r!==void 0&&dt(r,i,n);const o=Qt(t,t.get(),"",i),a=new C(o),u=t.get();for(const[l,h]of Object.entries(u)){if(!Array.isArray(h))continue;const p=n.get(l);if(!p)continue;const g=t[l],y=k=>bt({model:k,schema:p(k)}),A=new Zt(g,y);a.fields.set(l,A)}const d=a.getProxy(),c=[];Yt(t.get(),"",c);for(const l of c){const h=t.signalAt(l),p=a.getFieldByPath(l);if(h&&p){Gt(h,p);const g=l.lastIndexOf("."),y=g===-1?a:a.getFieldByPath(l.slice(0,g));y instanceof C&&y.registerFieldSignal(p,h)}}return s&&a.attachBehaviorCleanup(s.__run(t,d)),d}const er=e=>e!=null&&typeof e=="object"&&"model"in e&&typeof e.model?.signalAt=="function";function rr(e){return er(e)?bt(e):new C(e).getProxy()}function K(e){return e==null?!1:typeof e=="object"&&"value"in e&&"setValue"in e&&"getValue"in e&&"validate"in e}function Xt(e){return K(e)&&"validators"in e&&"asyncValidators"in e&&typeof e.markAsTouched=="function"&&!("fields"in e)&&!("items"in e)}function te(e){return K(e)&&"getFieldByPath"in e&&"fields"in e&&!("items"in e)&&!("push"in e)&&!("removeAt"in e)}function ee(e){return K(e)&&"items"in e&&"length"in e&&"push"in e&&"removeAt"in e&&"at"in e&&typeof e.push=="function"&&typeof e.removeAt=="function"}function sr(e){return Xt(e)?"FieldNode":te(e)?"GroupNode":ee(e)?"ArrayNode":K(e)?"FormNode":"Unknown"}var Ft={exports:{}},ot={},Nt;function ir(){if(Nt)return ot;Nt=1;var e=he;function t(l,h){return l===h&&(l!==0||1/l===1/h)||l!==l&&h!==h}var r=typeof Object.is=="function"?Object.is:t,s=e.useState,i=e.useEffect,n=e.useLayoutEffect,o=e.useDebugValue;function a(l,h){var p=h(),g=s({inst:{value:p,getSnapshot:h}}),y=g[0].inst,A=g[1];return n(function(){y.value=p,y.getSnapshot=h,u(y)&&A({inst:y})},[l,p,h]),i(function(){return u(y)&&A({inst:y}),l(function(){u(y)&&A({inst:y})})},[l]),o(p),p}function u(l){var h=l.getSnapshot;l=l.value;try{var p=h();return!r(l,p)}catch{return!0}}function d(l,h){return h()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return ot.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,ot}var Vt;function nr(){return Vt||(Vt=1,Ft.exports=ir()),Ft.exports}var it=nr();function or(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function wt(e,t,r,s){const i=f.useRef(null),n=f.useRef(e);n.current=e;const o=f.useRef(t);o.current=t;const a=f.useRef(r);if(a.current=r,i.current===null){const c={};for(const l in e)c[l]=e[l].value;i.current={...c,__snapshot:null}}const u=f.useCallback(c=>{let l=!0;return b(()=>{const h=n.current;for(const p in h)h[p].value;if(l){l=!1;return}c()})},[s]),d=f.useCallback(()=>{const c=i.current,l=n.current,h={};for(const g in l)h[g]=l[g].value;let p=!1;for(const g of o.current){const{key:y,useShallowArrayEqual:A}=g,k=h[y],_=c[y];if(A){if(!or(_,k)){p=!0;break}}else if(_!==k){p=!0;break}}if(!p&&c.__snapshot)return c.__snapshot;for(const g in l)c[g]=h[g];return c.__snapshot=a.current(h),c.__snapshot},[s]);return it.useSyncExternalStore(u,d,d)}function ar(e){const t={value:e.value,disabled:e.disabled,errors:e.errors,pending:e.pending,valid:e.valid,invalid:e.invalid,touched:e.touched,dirty:e.dirty,shouldShowError:e.shouldShowError,componentProps:e.componentProps},r=[{key:"value"},{key:"disabled"},{key:"errors",useShallowArrayEqual:!0},{key:"pending"},{key:"valid"},{key:"invalid"},{key:"touched"},{key:"dirty"},{key:"shouldShowError"},{key:"componentProps"}],s=f.useCallback(i=>({value:i.value,pending:i.pending,disabled:i.disabled,errors:i.errors,valid:i.valid,invalid:i.invalid,touched:i.touched,dirty:i.dirty,shouldShowError:i.shouldShowError,componentProps:i.componentProps}),[]);return wt(t,r,s,e)}function lr(e){const t={value:e.value,length:e.length,errors:e.errors,pending:e.pending,valid:e.valid,invalid:e.invalid,touched:e.touched,dirty:e.dirty,disabled:e.disabled},r=[{key:"value"},{key:"length"},{key:"errors",useShallowArrayEqual:!0},{key:"pending"},{key:"valid"},{key:"invalid"},{key:"touched"},{key:"dirty"},{key:"disabled"}],s=f.useCallback(i=>({value:i.value,length:i.length,pending:i.pending,errors:i.errors,valid:i.valid,invalid:i.invalid,touched:i.touched,dirty:i.dirty,disabled:i.disabled}),[]);return wt(t,r,s,e)}function ur(){const e=f.useCallback(()=>({value:[],length:0,pending:!1,errors:[],valid:!0,invalid:!1,touched:!1,dirty:!1,disabled:!1}),[]);return wt({},[],e)}function re(e){const t=e&&"length"in e&&"map"in e;return e?t?lr(e):ar(e):ur()}function cr(e){const t=f.useRef({value:e.value.value}),r=f.useCallback(i=>{let n=!0;return b(()=>{if(e.value.value,n){n=!1;return}i()})},[e]),s=f.useCallback(()=>{const i=e.value.value;return t.current.value===i?t.current.value:(t.current.value=i,i)},[e]);return it.useSyncExternalStore(r,s,s)}function hr(e){const t=f.useRef({length:e.length.value}),r=f.useCallback(i=>{let n=!0;return b(()=>{if(e.length.value,n){n=!1;return}i()})},[e]),s=f.useCallback(()=>{const i=e.length.value;return t.current.length===i?t.current.length:(t.current.length=i,i)},[e]);return it.useSyncExternalStore(r,s,s)}function dr(e){const{model:t,schema:r,strategy:s,debounce:i,liveAfterSubmit:n}=e,o=f.useMemo(()=>qt(t,r,{strategy:s,debounce:i,liveAfterSubmit:n}),[t,r,s,i,n]);f.useEffect(()=>o.start(),[o]);const a=it.useSyncExternalStore(f.useCallback(d=>o.validating.subscribe(d),[o]),()=>o.validating.peek(),()=>!1),u=f.useCallback(()=>o.validate(),[o]);return{submit:u,validate:u,isValidating:a}}const fr=Object.freeze({runtime:"reformer-core",v:1}),Ar=Object.freeze(Object.defineProperty({__proto__:null,ArrayNode:ht,CORE_RUNTIME_TOKEN:fr,ErrorStrategy:N,FieldNode:zt,FormErrorHandler:O,FormNode:z,FormSubmitter:Kt,GroupNode:C,ModelArrayNode:Zt,NodeFactory:Jt,SubscriptionManager:st,computeFrom:Pe,copyFrom:Oe,createForm:rr,createFormFromModel:bt,createModel:Fe,disableWhen:We,enableWhen:Bt,getNodeForSignal:T,getNodeType:sr,isArrayNode:ee,isDerived:Y,isFieldNode:Xt,isFormNode:K,isGroupNode:te,markDerived:Ee,registerSignalNode:Gt,resetWhen:Ie,revalidateWhen:Re,runOutsideEffect:M,safeCallback:Me,safeDebouncedCallback:Ce,syncFields:Te,transformValue:De,unmarkDerived:ke,useArrayLength:hr,useFormControl:re,useFormControlValue:cr,useFormValidation:dr,watchField:je},Symbol.toStringTag,{value:"Module"})),vr=e=>e.message||e.code,pr=f.createContext(vr);function se(){return f.useContext(pr)}const ie=f.createContext(null);function nt(){const e=f.useContext(ie);if(!e)throw new Error("FormField.* components must be used within <FormField.Root>. Wrap your field with <FormField.Root control={control}>.");return e}function Et({control:e,children:t,id:r,hasDescription:s=!1}){const i=f.useId(),n=r??i,o=f.useMemo(()=>({controlId:`control-${n}`,labelId:`label-${n}`,descriptionId:`desc-${n}`,errorId:`error-${n}`}),[n]),a=re(e),u=se(),d=f.useMemo(()=>{const{value:c,errors:l,pending:h,disabled:p,valid:g,invalid:y,touched:A,shouldShowError:k,componentProps:_}=a;return{value:c,errors:l,pending:h,disabled:p,valid:g,invalid:y,touched:A,shouldShowError:k,error:k&&l[0]?u(l[0]):void 0,label:_.label,required:!!_.required,componentProps:_,control:e,ids:o,hasDescription:s}},[a,e,o,s,u]);return S.jsx(ie.Provider,{value:d,children:t})}Et.displayName="FormField.Root";const ne=f.forwardRef(({asChild:e=!1,children:t,forceRender:r=!1,...s},i)=>{const{label:n,required:o,ids:a}=nt(),u=t??n;return!u&&!r?null:S.jsxs(e?q:"label",{ref:i,id:a.labelId,htmlFor:e?void 0:a.controlId,...s,children:[u,o&&S.jsx("span",{"aria-hidden":"true",children:" *"})]})});ne.displayName="FormField.Label";const oe=f.forwardRef(({asChild:e=!1,children:t,...r},s)=>{const{control:i,value:n,disabled:o,shouldShowError:a,errors:u,required:d,ids:c,hasDescription:l,componentProps:h}=nt(),p=[l?c.descriptionId:null,a&&u.length>0?c.errorId:null].filter(Boolean).join(" ")||void 0,g={id:c.controlId,"aria-labelledby":c.labelId,"aria-invalid":a?!0:void 0,"aria-describedby":p,"aria-errormessage":a&&u.length>0?c.errorId:void 0,"aria-required":d?!0:void 0};if(t||e)return S.jsx(q,{ref:s,...g,...r,value:n,disabled:o,onChange:_=>i.setValue(_),onBlur:()=>i.markAsTouched(),children:t});const y=i.component,{testId:A,...k}=h??{};return S.jsx(y,{ref:s,...k,...g,...r,value:n,disabled:o,onChange:_=>i.setValue(_),onBlur:()=>i.markAsTouched()})});oe.displayName="FormField.Control";const ae=f.forwardRef(({asChild:e=!1,multi:t=!1,render:r,children:s,...i},n)=>{const{shouldShowError:o,errors:a,ids:u}=nt(),d=se();if(!o||a.length===0)return null;const c=e?q:"p";return r?S.jsx(S.Fragment,{children:a.map((l,h)=>S.jsx(c,{ref:h===0?n:void 0,id:h===0?u.errorId:void 0,role:"alert",...i,children:r(l,h)},l.code??h))}):t?S.jsx(S.Fragment,{children:a.map((l,h)=>{const p=d(l);return S.jsx(c,{ref:h===0?n:void 0,id:h===0?u.errorId:void 0,role:"alert",...i,children:e?S.jsx("span",{children:p}):p},l.code??h)})}):S.jsx(c,{ref:n,id:u.errorId,role:"alert",...i,children:s??d(a[0])})});ae.displayName="FormField.Error";const le=f.forwardRef(({asChild:e=!1,children:t,...r},s)=>{const{ids:i}=nt();return S.jsx(e?q:"p",{ref:s,id:i.descriptionId,...r,children:t})});le.displayName="FormField.Description";const J=Et;J.Root=Et;J.Label=ne;J.Control=oe;J.Error=ae;J.Description=le;export{gr as A,Ie as D,Oe as E,Te as F,qt as G,re as M,rr as N,Fe as O,yr as R,q as a,J as b,v as c,Ee as d,M as e,Bt as f,T as g,Re as h,De as i,b as j,ke as k,E as l,Pe as m,ft as n,rt as o,Y as p,Me as q,de as r,Ce as s,st as t,se as u,kr as v,je as w,nt as x,w as y,Ar as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e}from"./monaco-setup-BytXwQeQ.js";import"./index-CSZOipZ8.js";import"./App-EWxVyd71.js";import"./reformer-ui-kit-1LAJcT8b.js";import"./index-BLqONGUt.js";import"./useFormField-BLbvmpme-4e6SCAMU.js";import"./index-CFDCSwb2.js";import"./load-DQmdgTkV.js";import"./boot-CGsYMAQp.js";const c={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},p={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,p as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e}from"./monaco-setup-BytXwQeQ.js";import"./index-CSZOipZ8.js";import"./App-EWxVyd71.js";import"./reformer-ui-kit-1LAJcT8b.js";import"./index-BLqONGUt.js";import"./useFormField-BLbvmpme-4e6SCAMU.js";import"./index-CFDCSwb2.js";import"./load-DQmdgTkV.js";import"./boot-CGsYMAQp.js";const s={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:e.IndentAction.Indent}}]},m={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{s as conf,m as language};
|
|
File without changes
|