@factorialco/rjsf-f0 2.2.0 → 2.2.1

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 CHANGED
@@ -66,7 +66,7 @@ The host app must render f0's `F0Provider` above the form and import `@factorial
66
66
 
67
67
  Two deliberate consequences of that mapping:
68
68
 
69
- - **RJSF keeps ownership of validation.** f0 fields normally validate with zod; here they are told about errors (`error`, `errorMessage`) rather than deriving them, so the schema stays the single source of truth.
69
+ - **RJSF keeps ownership of validation.** f0 fields normally validate with zod; here they are told they are in an error state (`error`) rather than deriving one, so the schema stays the single source of truth. The messages are rendered by the theme's `FieldErrorTemplate`, not by the control: half of this mapping is not an `F0FormField` at all — checkboxes, the file dropzone, and the object and array levels a global form error lands on — so a control-rendered message would be dropped for exactly those.
70
70
  - **Labels are rendered by the theme, not by f0.** Factorial Code form labels may contain markdown, which f0 takes as a plain string. The theme renders the markdown label itself and hands f0 the plain text so the control keeps an accessible name.
71
71
 
72
72
  ### File fields
@@ -26,6 +26,6 @@
26
26
  `))+1))}const l="#".repeat(i),a=t.enter("headingAtx"),s=t.enter("phrasing");o.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
27
27
  `,...o.current()});return/^[\t ]/.test(u)&&(u=Ze(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),s(),a(),u}ri.peek=nc;function ri(e){return e.value||""}function nc(){return"<"}ii.peek=tc;function ii(e,n,t,r){const i=pt(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("![");return u+=s.move(t.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function tc(){return"!"}li.peek=rc;function li(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("![");const u=t.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function rc(){return"!"}oi.peek=ic;function oi(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){const l=t.unsafe[o],a=t.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function ic(){return"`"}function ai(e,n){const t=it(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ui.peek=lc;function ui(e,n,t,r){const i=pt(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,s;if(ai(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),t.stack=f,c}a=t.enter("link"),s=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function lc(e,n,t){return ai(e,t)?"<":"["}si.peek=oc;function si(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("[");const u=t.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function oc(){return"["}function mt(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function ac(e){const n=mt(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function uc(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function ci(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function sc(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?uc(t):mt(t);const a=e.ordered?l==="."?")":".":ac(t);let s=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(s=!0),ci(t)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),u}function cc(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function fc(e,n,t,r){const i=cc(t);let o=t.bulletCurrent||mt(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),f);return s(),u;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function hc(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}const pc=kn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mc(e,n,t,r){return(e.children.some(function(l){return pc(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function dc(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}fi.peek=gc;function fi(e,n,t,r){const i=dc(t),o=t.enter("strong"),l=t.createTracker(r),a=l.move(i+i);let s=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=mn(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=Ze(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=mn(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+Ze(c));const h=l.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function gc(e,n,t){return t.options.strong||"*"}function yc(e,n,t,r){return t.safe(e.value,r)}function xc(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function kc(e,n,t){const r=(ci(t)+(t.options.ruleSpaces?" ":"")).repeat(xc(t));return t.options.ruleSpaces?r.slice(0,-1):r}const hi={blockquote:qs,break:ur,code:Xs,definition:Qs,emphasis:ti,hardBreak:ur,heading:ec,html:ri,image:ii,imageReference:li,inlineCode:oi,link:ui,linkReference:si,list:sc,listItem:fc,paragraph:hc,root:mc,strong:fi,text:yc,thematicBreak:kc};function bc(){return{enter:{table:wc,tableData:sr,tableHeader:sr,tableRow:Cc},exit:{codeText:Tc,table:Sc,tableData:Mn,tableHeader:Mn,tableRow:Mn}}}function wc(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Sc(e){this.exit(e),this.data.inTable=void 0}function Cc(e){this.enter({type:"tableRow",children:[]},e)}function Mn(e){this.exit(e)}function sr(e){this.enter({type:"tableCell",children:[]},e)}function Tc(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Ec));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Ec(e,n){return n==="|"?n:e}function Ic(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
28
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:s,tableRow:a}};function l(h,g,k,C){return u(f(h,k,C),h.align)}function a(h,g,k,C){const y=c(h,k,C),E=u([y]);return E.slice(0,E.indexOf(`
29
- `))}function s(h,g,k,C){const y=k.enter("tableCell"),E=k.enter("phrasing"),T=k.containerPhrasing(h,{...C,before:o,after:o});return E(),y(),T}function u(h,g){return Bs(h,{align:g,alignDelimiters:r,padding:t,stringLength:i})}function f(h,g,k){const C=h.children;let y=-1;const E=[],T=g.enter("table");for(;++y<C.length;)E[y]=c(C[y],g,k);return T(),E}function c(h,g,k){const C=h.children;let y=-1;const E=[],T=g.enter("tableRow");for(;++y<C.length;)E[y]=s(C[y],h,g,k);return T(),E}function p(h,g,k){let C=hi.inlineCode(h,g,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function vc(){return{exit:{taskListCheckValueChecked:cr,taskListCheckValueUnchecked:cr,paragraph:Fc}}}function Ac(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dc}}}function cr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Fc(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Dc(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let s=hi.listItem(e,n,t,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function Pc(){return[ss(),Ds(),zs(),bc(),vc()]}function jc(e){return{extensions:[cs(),Ps(e),Os(),Ic(e),Ac()]}}const Lc={tokenize:Mc,partial:!0},pi={tokenize:Bc,partial:!0},mi={tokenize:Uc,partial:!0},di={tokenize:qc,partial:!0},zc={tokenize:Hc,partial:!0},gi={name:"wwwAutolink",tokenize:Nc,previous:xi},yi={name:"protocolAutolink",tokenize:_c,previous:ki},we={name:"emailAutolink",tokenize:Rc,previous:bi},ge={};function Oc(){return{text:ge}}let ve=48;for(;ve<123;)ge[ve]=we,ve++,ve===58?ve=65:ve===91&&(ve=97);ge[43]=we;ge[45]=we;ge[46]=we;ge[95]=we;ge[72]=[we,yi];ge[104]=[we,yi];ge[87]=[we,gi];ge[119]=[we,gi];function Rc(e,n,t){const r=this;let i,o;return l;function l(c){return!Qn(c)||!bi.call(r,r.previous)||dt(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Qn(c)?(e.consume(c),a):c===64?(e.consume(c),s):t(c)}function s(c){return c===46?e.check(zc,f,u)(c):c===45||c===95||Z(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function Nc(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!xi.call(r,r.previous)||dt(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lc,e.attempt(pi,e.attempt(mi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function _c(e,n,t){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&ki.call(r,r.previous)&&!dt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(ne(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return t(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):t(c)}function u(c){return c===null||fn(c)||X(c)||De(c)||gn(c)?t(c):e.attempt(pi,e.attempt(mi,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function Mc(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function Bc(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(di,s,a)(u):u===null||X(u)||De(u)||u!==45&&gn(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?t(u):n(u)}}function Uc(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(di,n,o)(l):l===null||X(l)||De(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function qc(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||X(a)||De(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||X(a)||De(a)?n(a):r(a)}function o(a){return ne(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):ne(a)?(e.consume(a),l):t(a)}}function Hc(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return Z(o)?t(o):n(o)}}function xi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function ki(e){return!ne(e)}function bi(e){return!(e===47||Qn(e))}function Qn(e){return e===43||e===45||e===46||e===95||Z(e)}function dt(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Vc={tokenize:Jc,partial:!0};function $c(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gc,continuation:{tokenize:Qc},exit:Kc}},text:{91:{name:"gfmFootnoteCall",tokenize:Xc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wc,resolveTo:Yc}}}}function Wc(e,n,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return t(s);const u=me(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),n(s))}}function Yc(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Xc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||X(c))return t(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(me(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return X(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Gc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||X(g))return t(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=me(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return X(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),H(e,h,"gfmFootnoteDefinitionWhitespace")):t(g)}function h(g){return n(g)}}function Qc(e,n,t){return e.check(nn,n,e.attempt(Vc,n,t))}function Kc(e){e.exit("gfmFootnoteDefinition")}function Jc(e,n,t){const r=this;return H(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):t(o)}}function Zc(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},p=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ue(p,p.length,0,yn(h,l.slice(u+1,s),a)),ue(p,p.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ue(l,u-1,s-u+3,p),s=u+p.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return p;function p(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const k=_e(u);if(g===126)return c>1?s(g):(l.consume(g),c++,h);if(c<2&&!t)return s(g);const C=l.exit("strikethroughSequenceTemporary"),y=_e(g);return C._open=!y||y===2&&!!k,C._close=!k||k===2&&!!y,a(g)}}}class ef{constructor(){this.map=[]}add(n,t,r){nf(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function nf(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function tf(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function rf(){return{flow:{null:{name:"table",tokenize:lf,resolveAll:of}}}}function lf(e,n,t){const r=this;let i=0,o=0,l;return a;function a(x){let A=r.events.length-1;for(;A>-1;){const L=r.events[A][1].type;if(L==="lineEnding"||L==="linePrefix")A--;else break}const D=A>-1?r.events[A][1].type:null,V=D==="tableHead"||D==="tableRow"?w:s;return V===w&&r.parser.lazy[r.now().line]?t(x):V(x)}function s(x){return e.enter("tableHead"),e.enter("tableRow"),u(x)}function u(x){return x===124||(l=!0,o+=1),f(x)}function f(x){return x===null?t(x):P(x)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):t(x):M(x)?H(e,f,"whitespace")(x):(o+=1,l&&(l=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(x)))}function c(x){return x===null||x===124||X(x)?(e.exit("data"),f(x)):(e.consume(x),x===92?p:c)}function p(x){return x===92||x===124?(e.consume(x),c):c(x)}function h(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(x):(e.enter("tableDelimiterRow"),l=!1,M(x)?H(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):g(x))}function g(x){return x===45||x===58?C(x):x===124?(l=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),k):z(x)}function k(x){return M(x)?H(e,C,"whitespace")(x):C(x)}function C(x){return x===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),y):x===45?(o+=1,y(x)):x===null||P(x)?j(x):z(x)}function y(x){return x===45?(e.enter("tableDelimiterFiller"),E(x)):z(x)}function E(x){return x===45?(e.consume(x),E):x===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(x))}function T(x){return M(x)?H(e,j,"whitespace")(x):j(x)}function j(x){return x===124?g(x):x===null||P(x)?!l||i!==o?z(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(x)):z(x)}function z(x){return t(x)}function w(x){return e.enter("tableRow"),N(x)}function N(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),N):x===null||P(x)?(e.exit("tableRow"),n(x)):M(x)?H(e,N,"whitespace")(x):(e.enter("data"),U(x))}function U(x){return x===null||x===124||X(x)?(e.exit("data"),N(x)):(e.consume(x),x===92?q:U)}function q(x){return x===92||x===124?(e.consume(x),U):U(x)}}function of(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const p=new ef;for(;++t<e.length;){const h=e[t],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(fr(p,n,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(t,0,[["enter",u,n]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(t,0,[["enter",f,n]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=sn(p,n,o,i,void 0,c),o=[0,0,0,0]),l[2]=t)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=sn(p,n,o,i,void 0,c)),o=l,l=[o[1],t,0,0])):g.type==="tableHead"?(a=!0,s=t):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=t,o[1]!==0?(l[0]=l[1],c=sn(p,n,o,i,t,c)):l[1]!==0&&(c=sn(p,n,l,i,t,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=t)}for(s!==0&&fr(p,n,s,u,f),p.consume(n.events),t=-1;++t<n.events.length;){const h=n.events[t];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=tf(n.events,t))}return e}function sn(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Ne(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const s=Ne(n.events,t[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=Ne(n.events,t[2]),f=Ne(n.events,t[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const p=n.events[t[2]],h=n.events[t[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",t[3]>t[2]+1){const g=t[2]+1,k=t[3]-t[2]-1;e.add(g,k,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(o.end=Object.assign({},Ne(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function fr(e,n,t,r,i){const o=[],l=Ne(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function Ne(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const af={name:"tasklistCheck",tokenize:sf};function uf(){return{text:{91:af}}}function sf(e,n,t){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return X(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):t(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(s)}function a(s){return P(s)?n(s):M(s)?e.check({tokenize:cf},n,t)(s):t(s)}}function cf(e,n,t){return H(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function ff(e){return Pr([Oc(),$c(),Zc(e),rf(),uf()])}const hf={};function pf(e){const n=this,t=e||hf,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ff(t)),o.push(Pc()),l.push(jc(t))}const wi=Zu,Si=e=>b.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer",children:e.children});function Me(e){const n=e.components||{};return n.a||(n.a=Si),b.jsx(wi,{...e,components:n,allowedElements:["a","p","em","img","strong","ul","ol","li"]})}const mf=["a","p","em","strong","img","ul","ol","li","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","th","td","code","pre","blockquote","hr","del","br","input"];function hr(e){const n=e.components||{};return n.a||(n.a=Si),b.jsx(wi,{...e,remarkPlugins:[pf],components:n,allowedElements:mf})}const df={NOTE:{variant:"info",icon:ae.Info},TIP:{variant:"positive",icon:ae.Lightbulb},IMPORTANT:{variant:"info",icon:ae.AlertCircle},WARNING:{variant:"warning",icon:ae.Warning},CAUTION:{variant:"critical",icon:ae.AlertCircle}},Ci=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*\n?/;function gf(e){const[n]=G.Children.toArray(e);return typeof n=="string"?n:""}function yf(e){const n=G.Children.toArray(e).filter(u=>!(typeof u=="string"&&u.trim()==="")),t=n.findIndex(u=>G.isValidElement(u));if(t===-1)return e;const r=n[t],i=G.Children.toArray(r.props.children),[o]=i;if(typeof o!="string")return e;const l=o.replace(Ci,""),a=i.slice(1);if(l===""&&a.length===0)return n.filter((u,f)=>f!==t);const s=G.cloneElement(r,{children:l===""?a:[l,...a]});return n.map((u,f)=>f===t?s:u)}function xf(e){const t=G.Children.toArray(e).find(o=>G.isValidElement(o));if(!G.isValidElement(t))return null;const r=t.props,i=Ci.exec(gf(r.children));return i===null?null:i[1]}function kf({children:e,fallback:n,node:t,...r}){const i=xf(e);if(i===null)return n?b.jsx(n,{...r,children:e}):b.jsx("blockquote",{...r,children:e});const{variant:o,icon:l}=df[i];return b.jsxs("div",{className:"rjsf-f0-callout","data-variant":o,children:[b.jsx(te.F0Icon,{icon:l,size:"sm"}),b.jsx("div",{className:"rjsf-f0-callout-body",children:yf(e)})]})}const wn={...te.markdownRenderers};delete wn["entity-ref"];const bf=wn.blockquote;wn.blockquote=e=>G.createElement(kf,{...e,fallback:bf});const Kn=wn;function wf(e){var z,w,N;const{id:n,children:t,displayLabel:r,rawErrors:i=[],errors:o,help:l,rawDescription:a,hidden:s,label:u,required:f,schema:c,uiSchema:p,registry:h,fieldPathId:g}=e,k=_.getUiOptions(p),C=_.getTemplate("WrapIfAdditionalTemplate",h,k);if(s)return b.jsx("div",{className:"rjsf-f0-hidden",children:t});const y=k.widget==="checkbox"||c.type==="boolean",T=typeof((z=g==null?void 0:g.path)==null?void 0:z[g.path.length-1])=="number"&&c.type!=="object"&&c.type!=="array",j=r&&!y&&!T&&!!u;return b.jsxs(b.Fragment,{children:[((w=c==null?void 0:c.markdown)==null?void 0:w.before)&&b.jsx("div",{className:"fcode-form-markdown",children:b.jsx(hr,{components:Kn,children:c.markdown.before})}),b.jsx(C,{...e,children:b.jsxs("div",{className:"rjsf-f0-field",children:[j&&b.jsxs("label",{className:"rjsf-f0-label",htmlFor:n,children:[b.jsx(Me,{components:{p:"span"},children:u}),f&&b.jsx("span",{"aria-hidden":"true",children:" *"})]}),t,r&&a&&b.jsx("div",{className:"rjsf-f0-help",children:b.jsx(Me,{children:a})}),i.length>0&&o,l]})}),((N=c==null?void 0:c.markdown)==null?void 0:N.after)&&b.jsx("div",{className:"fcode-form-markdown",children:b.jsx(hr,{components:Kn,children:c.markdown.after})})]})}function gt(e){return G.useCallback(n=>{n.preventDefault(),e==null||e(n)},[e])}function rn({icon:e,label:n,variant:t="outline",disabled:r,onClick:i,id:o,registry:l,uiSchema:a,iconType:s,...u}){const f=gt(i);return b.jsx(te.F0Button,{...u,"data-testid":o,label:n,hideLabel:!0,icon:e,size:"sm",variant:t,disabled:r,onClick:f})}function Sf(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.Files,label:n(_.TranslatableString.CopyButton)})}function Cf(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.ArrowUp,label:n(_.TranslatableString.MoveUpButton)})}function Tf(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.ArrowDown,label:n(_.TranslatableString.MoveDownButton)})}function Ef(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.Delete,variant:"critical",label:n(_.TranslatableString.RemoveButton)})}function If(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.Delete,variant:"ghost",label:n(_.TranslatableString.ClearButton)})}function vf(e){const{translateString:n}=e.registry,{disabled:t,onClick:r,id:i}=e,o=gt(r),l=n(_.TranslatableString.AddItemButton);return b.jsx(te.F0Button,{"data-testid":i,label:l,icon:ae.Add,size:"sm",variant:"outline",disabled:t,onClick:o})}function Af({uiSchema:e}){const{submitText:n,norender:t,props:r={}}=_.getSubmitButtonOptions(e);return t?null:b.jsx("div",{className:"rjsf-f0-submit",children:b.jsx(te.F0Button,{label:n,variant:"default",disabled:r.disabled})})}const Ff={SubmitButton:Af,AddButton:vf,CopyButton:Sf,MoveDownButton:Tf,MoveUpButton:Cf,RemoveButton:Ef,ClearButton:If};function Df({id:e,title:n,uiSchema:t,optionalDataControl:r}){const o=_.getUiOptions(t).title||n;return o?b.jsxs("div",{id:e,className:"rjsf-f0-title",children:[b.jsx(te.F0Heading,{as:"h5",variant:"heading",content:o}),r]}):null}function Pf({id:e,description:n}){return n?b.jsx("div",{id:e,className:"rjsf-f0-section-description",children:typeof n=="string"?b.jsx(Me,{children:n}):n}):null}function jf({errors:e=[],fieldPathId:n}){const t=e.filter(Boolean);return t.length<2?null:b.jsx("ul",{className:"rjsf-f0-errors",id:_.errorId(n),children:t.map((r,i)=>b.jsx("li",{children:typeof r=="string"?b.jsx(Me,{components:{p:"span"},children:r}):r},`${r}-${i}`))})}function Lf({fieldPathId:e,help:n}){return n?b.jsx("div",{className:"rjsf-f0-help",id:_.helpId(e),children:n}):null}function zf({errors:e,registry:n}){const{translateString:t}=n;return b.jsx("div",{className:"rjsf-f0-error-list",children:b.jsx(te.F0Alert,{variant:"critical",title:t(_.TranslatableString.ErrorsLabel),description:e.map(r=>r.stack).join(`
30
- `)})})}function Of(e){const{id:n,classNames:t,style:r,disabled:i,label:o,onKeyRename:l,onRemoveProperty:a,readonly:s,required:u,schema:f,children:c,uiSchema:p,registry:h}=e,{templates:g,translateString:k}=h,{RemoveButton:C}=g.ButtonTemplates,[y,E]=G.useState(o);if(!(_.ADDITIONAL_PROPERTY_FLAG in f))return b.jsx("div",{className:t,style:r,children:c});const T=`${n}-key`;return b.jsx("div",{className:t,style:r,children:b.jsxs("div",{className:"rjsf-f0-additional-property",children:[b.jsx(te.F0TextInput,{id:T,name:T,label:k(_.TranslatableString.KeyLabel,[o]),value:y,required:u,disabled:i||s,onChange:E,onBlur:s?void 0:()=>{y!==o&&l(y)}}),c,b.jsx(C,{disabled:i||s,onClick:a,uiSchema:p,registry:h})]})})}function Rf(e){const{description:n,disabled:t,formData:r,fieldPathId:i,onAddProperty:o,optionalDataControl:l,properties:a,readonly:s,registry:u,required:f,schema:c,title:p,uiSchema:h}=e,g=_.getUiOptions(h),k=_.getTemplate("TitleFieldTemplate",u,g),C=_.getTemplate("DescriptionFieldTemplate",u,g),{AddButton:y}=u.templates.ButtonTemplates;if((c.oneOf||c.anyOf)&&!c.properties&&a.length===0)return null;const E=!s&&!t;return b.jsxs("div",{className:"rjsf-f0-object",children:[p&&b.jsx(k,{id:_.titleId(i),title:p,required:f,schema:c,uiSchema:h,registry:u,optionalDataControl:E?l:void 0}),n&&b.jsx(C,{id:_.descriptionId(i),description:n,schema:c,uiSchema:h,registry:u}),E?void 0:l,a.map(T=>b.jsx("div",{className:T.hidden?"rjsf-f0-hidden":"rjsf-f0-row",children:T.content},T.name)),_.canExpand(c,h,r)&&b.jsx("div",{className:"rjsf-f0-add",children:b.jsx(y,{id:_.buttonId(i,"add"),onClick:o,disabled:t||s,uiSchema:h,registry:u})})]})}function Nf(e){const{canAdd:n,disabled:t,fieldPathId:r,items:i,optionalDataControl:o,onAddClick:l,readonly:a,registry:s,required:u,schema:f,title:c,uiSchema:p}=e,h=_.getUiOptions(p),g=_.getTemplate("ArrayFieldTitleTemplate",s,h),k=_.getTemplate("ArrayFieldDescriptionTemplate",s,h),{AddButton:C}=s.templates.ButtonTemplates,y=!a&&!t;return b.jsxs("div",{className:"rjsf-f0-array",children:[b.jsx(g,{fieldPathId:r,title:h.title||c,required:u,schema:f,uiSchema:p,registry:s,optionalDataControl:y?o:void 0}),b.jsx(k,{fieldPathId:r,description:h.description||f.description,schema:f,uiSchema:p,registry:s}),y?void 0:o,b.jsx("div",{className:"rjsf-f0-array-items",children:i}),n&&b.jsx("div",{className:"rjsf-f0-add",children:b.jsx(C,{id:_.buttonId(r,"add"),onClick:l,disabled:t||a,uiSchema:p,registry:s})})]})}function _f(e){const{children:n,buttonsProps:t,hasToolbar:r,registry:i,schema:o,uiSchema:l}=e,a=_.getUiOptions(l),s=_.getTemplate("ArrayFieldItemButtonsTemplate",i,a),u=o.type==="object"||o.type==="array";return b.jsxs("div",{className:u?"rjsf-f0-array-item rjsf-f0-array-item-composite":"rjsf-f0-array-item",children:[b.jsx("div",{className:"rjsf-f0-array-item-content",children:n}),r&&b.jsx("div",{className:"rjsf-f0-array-item-toolbar",children:b.jsx(s,{...t})})]})}function Mf(e){const{disabled:n,hasCopy:t,hasMoveDown:r,hasMoveUp:i,hasRemove:o,fieldPathId:l,onCopyItem:a,onRemoveItem:s,onMoveDownItem:u,onMoveUpItem:f,readonly:c,registry:p,uiSchema:h}=e,{CopyButton:g,MoveDownButton:k,MoveUpButton:C,RemoveButton:y}=p.templates.ButtonTemplates,E={uiSchema:h,registry:p};return b.jsxs(b.Fragment,{children:[(i||r)&&b.jsx(C,{id:_.buttonId(l,"moveUp"),disabled:n||c||!i,onClick:f,...E}),(i||r)&&b.jsx(k,{id:_.buttonId(l,"moveDown"),disabled:n||c||!r,onClick:u,...E}),t&&b.jsx(g,{id:_.buttonId(l,"copy"),disabled:n||c,onClick:a,...E}),o&&b.jsx(y,{id:_.buttonId(l,"remove"),disabled:n||c,onClick:s,...E})]})}function Bf({children:e,className:n,column:t,...r}){return b.jsx("div",{className:n??(t?void 0:"rjsf-f0-grid"),...r,children:e})}function Uf({selector:e,optionSchemaField:n}){return b.jsxs("div",{className:"rjsf-f0-multischema",children:[b.jsx("div",{className:"rjsf-f0-row",children:e}),n]})}function Sn(e){return e?e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[*_~`]/g,"").replace(/\s+/g," ").trim():""}function Ti(e){return!!e&&Sn(e)!==e.trim()}function Ae({field:e,toFieldValue:n,fromFieldValue:t,id:r,label:i,value:o,required:l,disabled:a,readonly:s,placeholder:u,rawErrors:f,onChange:c,onBlur:p}){const h=G.useCallback(y=>c(t?t(y):y),[c,t]),g=G.useCallback(()=>p(r,o),[p,r,o]),k=G.useMemo(()=>({id:r,label:Sn(i)||r,placeholder:u,helpText:void 0,...e}),[r,i,u,e]),[C]=f??[];return b.jsx(te.F0FormField,{field:k,value:n?n(o):o,onChange:h,onBlur:g,error:!!C,errorMessage:C,required:l,disabled:a||s,hideLabel:!0})}const pr=e=>{if(!e||typeof e!="string")return;const n=new Date(e);return Number.isNaN(n.getTime())?void 0:n},dn=e=>String(e).padStart(2,"0"),Ei=e=>{if(!(!(e instanceof Date)||Number.isNaN(e.getTime())))return`${e.getFullYear()}-${dn(e.getMonth()+1)}-${dn(e.getDate())}`},qf=e=>{const n=Ei(e);if(!(!n||!(e instanceof Date)))return`${n}T${dn(e.getHours())}:${dn(e.getMinutes())}`},Hf={number:"number",integer:"number",range:"number",date:"date","datetime-local":"datetime",time:"time"},Vf=new Set(["password","email","tel","url"]);function $f(e){const{id:n,htmlName:t,autofocus:r,disabled:i,readonly:o,required:l,multiple:a,accept:s,onChangeOverride:u,onBlur:f,onFocus:c}=e;return b.jsx("input",{id:n,name:t||n,className:"rjsf-f0-native-file",type:"file",autoFocus:r,disabled:i||o,required:l,multiple:a,accept:s,onChange:u,onBlur:p=>f(n,p.target.value),onFocus:p=>c(n,p.target.value)})}function Wf(e){const{type:n,schema:t,options:r}=e,i=n||(t.type==="number"||t.type==="integer"?"number":"text");if(i==="file")return b.jsx($f,{...e});const o=Hf[i]??"text";return o==="date"?b.jsx(Ae,{...e,field:{type:"date"},toFieldValue:pr,fromFieldValue:Ei}):o==="datetime"?b.jsx(Ae,{...e,field:{type:"datetime"},toFieldValue:pr,fromFieldValue:qf}):o==="number"?b.jsx(Ae,{...e,field:{type:"number",...t.minimum!==void 0&&{min:t.minimum},...t.maximum!==void 0&&{max:t.maximum},...t.type==="integer"&&{maxDecimals:0}},fromFieldValue:l=>l===""||l===null?void 0:l}):b.jsx(Ae,{...e,field:{type:o,...Vf.has(i)&&{inputType:i}},fromFieldValue:l=>l===""?r.emptyValue:l})}const Yf=5;function Xf(e){const{options:n}=e;return b.jsx(Ae,{...e,field:{type:"textarea",rows:n.rows||Yf},fromFieldValue:t=>t===""?n.emptyValue:t})}const Gf="Drag a file here, or click to choose one",Qf="Drag files here, or click to choose them",mr=["B","KB","MB","GB"];function Kf(e){if(!Number.isFinite(e)||e<0)return"";let n=e,t=0;for(;n>=1024&&t<mr.length-1;)n/=1024,t+=1;return`${t===0?n:Math.round(n*10)/10} ${mr[t]}`}function Jf(e){const{id:n,options:t,registry:r,uiSchema:i,required:o,disabled:l,readonly:a,autofocus:s,multiple:u,value:f,onChange:c,onBlur:p,onFocus:h}=e,{filesInfo:g,handleChange:k,handleRemove:C}=_.useFileWidgetProps(f,c,u),[y,E]=G.useState(!1),{RemoveButton:T}=_.getTemplate("ButtonTemplates",r,t),j=l||a,z=t.accept?String(t.accept):void 0,w=t.dropzoneText??r.translateString(u?Qf:Gf),N=G.useCallback(A=>{var D;E(!1),(D=A.target.files)!=null&&D.length&&k(A.target.files),A.target.value=""},[k]),U=G.useCallback(A=>{j||(A.preventDefault(),E(!0))},[j]),q=G.useCallback(A=>{A.currentTarget.contains(A.relatedTarget)||E(!1)},[]),x=G.useCallback(A=>{var V;if(E(!1),j)return;A.preventDefault();const D=(V=A.dataTransfer)==null?void 0:V.files;D!=null&&D.length&&k(D)},[k,j]);return b.jsxs("div",{className:"rjsf-f0-file",children:[b.jsxs("div",{className:"rjsf-f0-dropzone","data-dragging":y?"true":void 0,"data-disabled":j?"true":void 0,onDragOver:U,onDragEnter:U,onDragLeave:q,onDrop:x,children:[b.jsx("input",{id:n,name:n,className:"rjsf-f0-dropzone-input",type:"file",accept:z,multiple:u,autoFocus:s,disabled:j,required:f?!1:o,onChange:N,onBlur:A=>p(n,A.target.value),onFocus:A=>h(n,A.target.value)}),b.jsxs("div",{className:"rjsf-f0-dropzone-body","aria-hidden":"true",children:[b.jsx(te.F0Icon,{icon:ae.Upload,size:"md"}),b.jsx("span",{className:"rjsf-f0-dropzone-text",children:w}),z&&b.jsx("span",{className:"rjsf-f0-dropzone-hint",children:z})]})]}),g.length>0&&b.jsx("ul",{className:"rjsf-f0-files",children:g.map((A,D)=>b.jsxs("li",{className:"rjsf-f0-file-chip",children:[b.jsx(te.F0Icon,{icon:ae.File,size:"sm"}),b.jsx("span",{className:"rjsf-f0-file-name",children:A.name}),b.jsx("span",{className:"rjsf-f0-file-size",children:Kf(A.size)}),b.jsx(T,{id:`${n}-remove-${D}`,disabled:j,onClick:()=>C(D),registry:r,uiSchema:i})]},`${A.name}-${D}`))})]})}const Zf=e=>(Array.isArray(e)?e:[]).map((n,t)=>({value:String(t),label:String(n.label)}));function eh(e){const{options:n,multiple:t,value:r,schema:i}=e,{enumOptions:o,enumDisabled:l}=n,a=Array.isArray(o)?o:[],s=c=>a.findIndex(p=>_.enumOptionsIsSelected(p.value,c)),u=G.useCallback(c=>{if(t)return(Array.isArray(c)?c:[]).map(g=>s(g)).filter(g=>g>=0).map(String);const p=s(c);return p>=0?String(p):void 0},[t,a]),f=G.useCallback(c=>{var p;return t?(Array.isArray(c)?c:[]).map(g=>{var k;return(k=a[Number(g)])==null?void 0:k.value}):c==null||c===""?n.emptyValue:(p=a[Number(c)])==null?void 0:p.value},[t,a,n.emptyValue]);return b.jsx(Ae,{...e,field:{type:"select",options:Zf(o).filter((c,p)=>{var h;return!(Array.isArray(l)&&l.includes((h=a[p])==null?void 0:h.value))}),multiple:t,clearable:!i.default&&!e.required,showSearchBox:a.length>8},value:r,toFieldValue:u,fromFieldValue:f})}function nh({id:e,value:n,label:t,hideLabel:r,disabled:i,readonly:o,onChange:l}){const a=!r&&Ti(t);return b.jsxs("div",{className:"rjsf-f0-checkbox",children:[b.jsx(te.F0Checkbox,{id:e,title:Sn(t),checked:n===!0,hideLabel:r||a,disabled:i||o,onCheckedChange:s=>l(s===!0)}),a&&b.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:e,children:b.jsx(Me,{components:{p:"span"},children:t})})]})}function th({id:e,disabled:n,readonly:t,options:r,value:i,onChange:o}){const{enumOptions:l,enumDisabled:a}=r,s=Array.isArray(i)?i:[];return b.jsx("div",{className:"rjsf-f0-checkboxes",children:(Array.isArray(l)?l:[]).map((u,f)=>{const c=_.enumOptionsIsSelected(u.value,s),p=Array.isArray(a)&&a.includes(u.value),h=_.optionId(e,f),g=String(u.label),k=Ti(g);return b.jsxs("div",{className:"rjsf-f0-checkbox",children:[b.jsx(te.F0Checkbox,{id:h,title:Sn(g),checked:c,hideLabel:k,disabled:n||t||p,onCheckedChange:C=>o(C===!0?_.enumOptionsSelectValue(f,s,l):_.enumOptionsDeselectValue(f,s,l))}),k&&b.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:h,children:b.jsx(Me,{components:{p:"span"},children:g})})]},String(u.value))})})}function rh(e){const{options:n,required:t}=e,r=Array.isArray(n.enumOptions)?n.enumOptions:[];return b.jsx(Ae,{...e,field:{type:"cardSelect",grouped:!0,options:r.map((i,o)=>{var l;return{value:String(o),label:String(i.label),...(l=i.schema)!=null&&l.description?{description:String(i.schema.description)}:{}}})},toFieldValue:i=>{const o=r.findIndex(l=>_.enumOptionsIsSelected(l.value,i));return o>=0?String(o):void 0},fromFieldValue:i=>{var o;return i===void 0||i===""?n.emptyValue:(o=r[Number(i)])==null?void 0:o.value},required:t})}const Ii=e=>!e.clickable&&e.status!=="current",ih=({items:e,onNavigate:n})=>b.jsx("nav",{className:"rjsf-f0-steps-tabs","aria-label":"Form steps",children:e.map(t=>b.jsx("div",{className:`rjsf-f0-steps-tab rjsf-f0-steps-tab-${t.status}`,...t.status==="current"&&{"aria-current":"step"},children:b.jsx(te.F0Button,{label:`${t.index+1}. ${t.title}`,size:"sm",variant:t.status==="current"?"neutral":"ghost",disabled:Ii(t),onClick:r=>{r.preventDefault(),n(t.index)}})},t.index))}),lh=({items:e,currentIndex:n,onNavigate:t})=>b.jsx("nav",{className:"rjsf-f0-steps-nav","aria-label":"Form steps",children:b.jsx(Bi.F0TableOfContent,{items:e.map(r=>({id:String(r.index),label:r.title,disabled:Ii(r),onClick:i=>t(Number(i))})),activeItem:String(n),scrollable:!1})}),oh=({layout:e,items:n,currentIndex:t,onNavigate:r,children:i})=>{const o=n[t];return b.jsxs("div",{className:`rjsf-f0-steps rjsf-f0-steps-layout-${e}`,children:[e==="sidebar"?b.jsx(lh,{items:n,currentIndex:t,onNavigate:r}):b.jsx(ih,{items:n,onNavigate:r}),b.jsxs("div",{className:"rjsf-f0-steps-main",children:[o&&b.jsxs("div",{className:"rjsf-f0-steps-header",children:[b.jsx("h3",{className:"rjsf-f0-steps-title",children:o.title}),o.description&&b.jsx("p",{className:"rjsf-f0-steps-description",children:o.description})]}),b.jsx("div",{className:"rjsf-f0-steps-panel",children:i})]})]})},ah=({label:e,onClick:n,disabled:t})=>{const r=gt(n);return b.jsx("div",{className:"rjsf-f0-steps-back",children:b.jsx(te.F0Button,{label:e,variant:"outline",disabled:t,onClick:r})})},vi={StepsNavigation:oh,BackButton:ah},Ai={ArrayFieldItemButtonsTemplate:Mf,ArrayFieldItemTemplate:_f,ArrayFieldTemplate:Nf,BaseInputTemplate:Wf,ButtonTemplates:Ff,DescriptionFieldTemplate:Pf,ErrorListTemplate:zf,FieldErrorTemplate:jf,FieldHelpTemplate:Lf,FieldTemplate:wf,GridTemplate:Bf,MultiSchemaFieldTemplate:Uf,ObjectFieldTemplate:Rf,TitleFieldTemplate:Df,WrapIfAdditionalTemplate:Of},Fi={CheckboxWidget:nh,CheckboxesWidget:th,FileWidget:Jf,RadioWidget:rh,SelectWidget:eh,TextareaWidget:Xf};function yt(){return{templates:Ai,widgets:Fi,multistep:vi}}const Di=yt();function uh(){return dr.withTheme(yt())}const sh=dr.withTheme(Di);exports.Form=sh;exports.Multistep=vi;exports.Templates=Ai;exports.Theme=Di;exports.Widgets=Fi;exports.generateForm=uh;exports.generateTheme=yt;exports.markdownComponents=Kn;
29
+ `))}function s(h,g,k,C){const y=k.enter("tableCell"),E=k.enter("phrasing"),T=k.containerPhrasing(h,{...C,before:o,after:o});return E(),y(),T}function u(h,g){return Bs(h,{align:g,alignDelimiters:r,padding:t,stringLength:i})}function f(h,g,k){const C=h.children;let y=-1;const E=[],T=g.enter("table");for(;++y<C.length;)E[y]=c(C[y],g,k);return T(),E}function c(h,g,k){const C=h.children;let y=-1;const E=[],T=g.enter("tableRow");for(;++y<C.length;)E[y]=s(C[y],h,g,k);return T(),E}function p(h,g,k){let C=hi.inlineCode(h,g,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function vc(){return{exit:{taskListCheckValueChecked:cr,taskListCheckValueUnchecked:cr,paragraph:Fc}}}function Ac(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dc}}}function cr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Fc(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Dc(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let s=hi.listItem(e,n,t,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function Pc(){return[ss(),Ds(),zs(),bc(),vc()]}function jc(e){return{extensions:[cs(),Ps(e),Os(),Ic(e),Ac()]}}const Lc={tokenize:Mc,partial:!0},pi={tokenize:Bc,partial:!0},mi={tokenize:Uc,partial:!0},di={tokenize:qc,partial:!0},zc={tokenize:Hc,partial:!0},gi={name:"wwwAutolink",tokenize:Nc,previous:xi},yi={name:"protocolAutolink",tokenize:_c,previous:ki},we={name:"emailAutolink",tokenize:Rc,previous:bi},ge={};function Oc(){return{text:ge}}let ve=48;for(;ve<123;)ge[ve]=we,ve++,ve===58?ve=65:ve===91&&(ve=97);ge[43]=we;ge[45]=we;ge[46]=we;ge[95]=we;ge[72]=[we,yi];ge[104]=[we,yi];ge[87]=[we,gi];ge[119]=[we,gi];function Rc(e,n,t){const r=this;let i,o;return l;function l(c){return!Qn(c)||!bi.call(r,r.previous)||dt(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Qn(c)?(e.consume(c),a):c===64?(e.consume(c),s):t(c)}function s(c){return c===46?e.check(zc,f,u)(c):c===45||c===95||Z(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ne(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function Nc(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!xi.call(r,r.previous)||dt(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Lc,e.attempt(pi,e.attempt(mi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function _c(e,n,t){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&ki.call(r,r.previous)&&!dt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(ne(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return t(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):t(c)}function u(c){return c===null||fn(c)||X(c)||De(c)||gn(c)?t(c):e.attempt(pi,e.attempt(mi,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function Mc(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function Bc(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(di,s,a)(u):u===null||X(u)||De(u)||u!==45&&gn(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?t(u):n(u)}}function Uc(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(di,n,o)(l):l===null||X(l)||De(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function qc(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||X(a)||De(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||X(a)||De(a)?n(a):r(a)}function o(a){return ne(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):ne(a)?(e.consume(a),l):t(a)}}function Hc(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return Z(o)?t(o):n(o)}}function xi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function ki(e){return!ne(e)}function bi(e){return!(e===47||Qn(e))}function Qn(e){return e===43||e===45||e===46||e===95||Z(e)}function dt(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Vc={tokenize:Jc,partial:!0};function $c(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gc,continuation:{tokenize:Qc},exit:Kc}},text:{91:{name:"gfmFootnoteCall",tokenize:Xc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wc,resolveTo:Yc}}}}function Wc(e,n,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return t(s);const u=me(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),n(s))}}function Yc(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Xc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||X(c))return t(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(me(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return X(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Gc(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||X(g))return t(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=me(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return X(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),H(e,h,"gfmFootnoteDefinitionWhitespace")):t(g)}function h(g){return n(g)}}function Qc(e,n,t){return e.check(nn,n,e.attempt(Vc,n,t))}function Kc(e){e.exit("gfmFootnoteDefinition")}function Jc(e,n,t){const r=this;return H(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):t(o)}}function Zc(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},p=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ue(p,p.length,0,yn(h,l.slice(u+1,s),a)),ue(p,p.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ue(l,u-1,s-u+3,p),s=u+p.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return p;function p(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const k=_e(u);if(g===126)return c>1?s(g):(l.consume(g),c++,h);if(c<2&&!t)return s(g);const C=l.exit("strikethroughSequenceTemporary"),y=_e(g);return C._open=!y||y===2&&!!k,C._close=!k||k===2&&!!y,a(g)}}}class ef{constructor(){this.map=[]}add(n,t,r){nf(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function nf(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function tf(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function rf(){return{flow:{null:{name:"table",tokenize:lf,resolveAll:of}}}}function lf(e,n,t){const r=this;let i=0,o=0,l;return a;function a(x){let A=r.events.length-1;for(;A>-1;){const L=r.events[A][1].type;if(L==="lineEnding"||L==="linePrefix")A--;else break}const D=A>-1?r.events[A][1].type:null,V=D==="tableHead"||D==="tableRow"?w:s;return V===w&&r.parser.lazy[r.now().line]?t(x):V(x)}function s(x){return e.enter("tableHead"),e.enter("tableRow"),u(x)}function u(x){return x===124||(l=!0,o+=1),f(x)}function f(x){return x===null?t(x):P(x)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):t(x):M(x)?H(e,f,"whitespace")(x):(o+=1,l&&(l=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(x)))}function c(x){return x===null||x===124||X(x)?(e.exit("data"),f(x)):(e.consume(x),x===92?p:c)}function p(x){return x===92||x===124?(e.consume(x),c):c(x)}function h(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(x):(e.enter("tableDelimiterRow"),l=!1,M(x)?H(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):g(x))}function g(x){return x===45||x===58?C(x):x===124?(l=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),k):z(x)}function k(x){return M(x)?H(e,C,"whitespace")(x):C(x)}function C(x){return x===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),y):x===45?(o+=1,y(x)):x===null||P(x)?j(x):z(x)}function y(x){return x===45?(e.enter("tableDelimiterFiller"),E(x)):z(x)}function E(x){return x===45?(e.consume(x),E):x===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(x))}function T(x){return M(x)?H(e,j,"whitespace")(x):j(x)}function j(x){return x===124?g(x):x===null||P(x)?!l||i!==o?z(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(x)):z(x)}function z(x){return t(x)}function w(x){return e.enter("tableRow"),N(x)}function N(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),N):x===null||P(x)?(e.exit("tableRow"),n(x)):M(x)?H(e,N,"whitespace")(x):(e.enter("data"),U(x))}function U(x){return x===null||x===124||X(x)?(e.exit("data"),N(x)):(e.consume(x),x===92?q:U)}function q(x){return x===92||x===124?(e.consume(x),U):U(x)}}function of(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const p=new ef;for(;++t<e.length;){const h=e[t],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(fr(p,n,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(t,0,[["enter",u,n]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(t,0,[["enter",f,n]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=sn(p,n,o,i,void 0,c),o=[0,0,0,0]),l[2]=t)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=sn(p,n,o,i,void 0,c)),o=l,l=[o[1],t,0,0])):g.type==="tableHead"?(a=!0,s=t):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=t,o[1]!==0?(l[0]=l[1],c=sn(p,n,o,i,t,c)):l[1]!==0&&(c=sn(p,n,l,i,t,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=t)}for(s!==0&&fr(p,n,s,u,f),p.consume(n.events),t=-1;++t<n.events.length;){const h=n.events[t];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=tf(n.events,t))}return e}function sn(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Ne(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const s=Ne(n.events,t[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=Ne(n.events,t[2]),f=Ne(n.events,t[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const p=n.events[t[2]],h=n.events[t[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",t[3]>t[2]+1){const g=t[2]+1,k=t[3]-t[2]-1;e.add(g,k,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(o.end=Object.assign({},Ne(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function fr(e,n,t,r,i){const o=[],l=Ne(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function Ne(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const af={name:"tasklistCheck",tokenize:sf};function uf(){return{text:{91:af}}}function sf(e,n,t){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return X(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):t(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(s)}function a(s){return P(s)?n(s):M(s)?e.check({tokenize:cf},n,t)(s):t(s)}}function cf(e,n,t){return H(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function ff(e){return Pr([Oc(),$c(),Zc(e),rf(),uf()])}const hf={};function pf(e){const n=this,t=e||hf,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ff(t)),o.push(Pc()),l.push(jc(t))}const wi=Zu,Si=e=>b.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer",children:e.children});function Me(e){const n=e.components||{};return n.a||(n.a=Si),b.jsx(wi,{...e,components:n,allowedElements:["a","p","em","img","strong","ul","ol","li"]})}const mf=["a","p","em","strong","img","ul","ol","li","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","th","td","code","pre","blockquote","hr","del","br","input"];function hr(e){const n=e.components||{};return n.a||(n.a=Si),b.jsx(wi,{...e,remarkPlugins:[pf],components:n,allowedElements:mf})}const df={NOTE:{variant:"info",icon:ae.Info},TIP:{variant:"positive",icon:ae.Lightbulb},IMPORTANT:{variant:"info",icon:ae.AlertCircle},WARNING:{variant:"warning",icon:ae.Warning},CAUTION:{variant:"critical",icon:ae.AlertCircle}},Ci=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*\n?/;function gf(e){const[n]=G.Children.toArray(e);return typeof n=="string"?n:""}function yf(e){const n=G.Children.toArray(e).filter(u=>!(typeof u=="string"&&u.trim()==="")),t=n.findIndex(u=>G.isValidElement(u));if(t===-1)return e;const r=n[t],i=G.Children.toArray(r.props.children),[o]=i;if(typeof o!="string")return e;const l=o.replace(Ci,""),a=i.slice(1);if(l===""&&a.length===0)return n.filter((u,f)=>f!==t);const s=G.cloneElement(r,{children:l===""?a:[l,...a]});return n.map((u,f)=>f===t?s:u)}function xf(e){const t=G.Children.toArray(e).find(o=>G.isValidElement(o));if(!G.isValidElement(t))return null;const r=t.props,i=Ci.exec(gf(r.children));return i===null?null:i[1]}function kf({children:e,fallback:n,node:t,...r}){const i=xf(e);if(i===null)return n?b.jsx(n,{...r,children:e}):b.jsx("blockquote",{...r,children:e});const{variant:o,icon:l}=df[i];return b.jsxs("div",{className:"rjsf-f0-callout","data-variant":o,children:[b.jsx(te.F0Icon,{icon:l,size:"sm"}),b.jsx("div",{className:"rjsf-f0-callout-body",children:yf(e)})]})}const wn={...te.markdownRenderers};delete wn["entity-ref"];const bf=wn.blockquote;wn.blockquote=e=>G.createElement(kf,{...e,fallback:bf});const Kn=wn;function wf(e){var z,w,N;const{id:n,children:t,displayLabel:r,rawErrors:i=[],errors:o,help:l,rawDescription:a,hidden:s,label:u,required:f,schema:c,uiSchema:p,registry:h,fieldPathId:g}=e,k=_.getUiOptions(p),C=_.getTemplate("WrapIfAdditionalTemplate",h,k);if(s)return b.jsx("div",{className:"rjsf-f0-hidden",children:t});const y=k.widget==="checkbox"||c.type==="boolean",T=typeof((z=g==null?void 0:g.path)==null?void 0:z[g.path.length-1])=="number"&&c.type!=="object"&&c.type!=="array",j=r&&!y&&!T&&!!u;return b.jsxs(b.Fragment,{children:[((w=c==null?void 0:c.markdown)==null?void 0:w.before)&&b.jsx("div",{className:"fcode-form-markdown",children:b.jsx(hr,{components:Kn,children:c.markdown.before})}),b.jsx(C,{...e,children:b.jsxs("div",{className:"rjsf-f0-field",children:[j&&b.jsxs("label",{className:"rjsf-f0-label",htmlFor:n,children:[b.jsx(Me,{components:{p:"span"},children:u}),f&&b.jsx("span",{"aria-hidden":"true",children:" *"})]}),t,r&&a&&b.jsx("div",{className:"rjsf-f0-help",children:b.jsx(Me,{children:a})}),i.length>0&&o,l]})}),((N=c==null?void 0:c.markdown)==null?void 0:N.after)&&b.jsx("div",{className:"fcode-form-markdown",children:b.jsx(hr,{components:Kn,children:c.markdown.after})})]})}function gt(e){return G.useCallback(n=>{n.preventDefault(),e==null||e(n)},[e])}function rn({icon:e,label:n,variant:t="outline",disabled:r,onClick:i,id:o,registry:l,uiSchema:a,iconType:s,...u}){const f=gt(i);return b.jsx(te.F0Button,{...u,"data-testid":o,label:n,hideLabel:!0,icon:e,size:"sm",variant:t,disabled:r,onClick:f})}function Sf(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.Files,label:n(_.TranslatableString.CopyButton)})}function Cf(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.ArrowUp,label:n(_.TranslatableString.MoveUpButton)})}function Tf(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.ArrowDown,label:n(_.TranslatableString.MoveDownButton)})}function Ef(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.Delete,variant:"critical",label:n(_.TranslatableString.RemoveButton)})}function If(e){const{translateString:n}=e.registry;return b.jsx(rn,{...e,icon:ae.Delete,variant:"ghost",label:n(_.TranslatableString.ClearButton)})}function vf(e){const{translateString:n}=e.registry,{disabled:t,onClick:r,id:i}=e,o=gt(r),l=n(_.TranslatableString.AddItemButton);return b.jsx(te.F0Button,{"data-testid":i,label:l,icon:ae.Add,size:"sm",variant:"outline",disabled:t,onClick:o})}function Af({uiSchema:e}){const{submitText:n,norender:t,props:r={}}=_.getSubmitButtonOptions(e);return t?null:b.jsx("div",{className:"rjsf-f0-submit",children:b.jsx(te.F0Button,{label:n,variant:"default",disabled:r.disabled})})}const Ff={SubmitButton:Af,AddButton:vf,CopyButton:Sf,MoveDownButton:Tf,MoveUpButton:Cf,RemoveButton:Ef,ClearButton:If};function Df({id:e,title:n,uiSchema:t,optionalDataControl:r}){const o=_.getUiOptions(t).title||n;return o?b.jsxs("div",{id:e,className:"rjsf-f0-title",children:[b.jsx(te.F0Heading,{as:"h5",variant:"heading",content:o}),r]}):null}function Pf({id:e,description:n}){return n?b.jsx("div",{id:e,className:"rjsf-f0-section-description",children:typeof n=="string"?b.jsx(Me,{children:n}):n}):null}function jf({errors:e=[],fieldPathId:n}){const t=e.filter(Boolean);return t.length===0?null:b.jsx("ul",{className:"rjsf-f0-errors",id:_.errorId(n),children:t.map((r,i)=>b.jsx("li",{children:typeof r=="string"?b.jsx(Me,{components:{p:"span"},children:r}):r},`${r}-${i}`))})}function Lf({fieldPathId:e,help:n}){return n?b.jsx("div",{className:"rjsf-f0-help",id:_.helpId(e),children:n}):null}function zf({errors:e,registry:n}){const{translateString:t}=n;return b.jsx("div",{className:"rjsf-f0-error-list",children:b.jsx(te.F0Alert,{variant:"critical",title:t(_.TranslatableString.ErrorsLabel),description:e.map(r=>r.stack).join(`
30
+ `)})})}function Of(e){const{id:n,classNames:t,style:r,disabled:i,label:o,onKeyRename:l,onRemoveProperty:a,readonly:s,required:u,schema:f,children:c,uiSchema:p,registry:h}=e,{templates:g,translateString:k}=h,{RemoveButton:C}=g.ButtonTemplates,[y,E]=G.useState(o);if(!(_.ADDITIONAL_PROPERTY_FLAG in f))return b.jsx("div",{className:t,style:r,children:c});const T=`${n}-key`;return b.jsx("div",{className:t,style:r,children:b.jsxs("div",{className:"rjsf-f0-additional-property",children:[b.jsx(te.F0TextInput,{id:T,name:T,label:k(_.TranslatableString.KeyLabel,[o]),value:y,required:u,disabled:i||s,onChange:E,onBlur:s?void 0:()=>{y!==o&&l(y)}}),c,b.jsx(C,{disabled:i||s,onClick:a,uiSchema:p,registry:h})]})})}function Rf(e){const{description:n,disabled:t,formData:r,fieldPathId:i,onAddProperty:o,optionalDataControl:l,properties:a,readonly:s,registry:u,required:f,schema:c,title:p,uiSchema:h}=e,g=_.getUiOptions(h),k=_.getTemplate("TitleFieldTemplate",u,g),C=_.getTemplate("DescriptionFieldTemplate",u,g),{AddButton:y}=u.templates.ButtonTemplates;if((c.oneOf||c.anyOf)&&!c.properties&&a.length===0)return null;const E=!s&&!t;return b.jsxs("div",{className:"rjsf-f0-object",children:[p&&b.jsx(k,{id:_.titleId(i),title:p,required:f,schema:c,uiSchema:h,registry:u,optionalDataControl:E?l:void 0}),n&&b.jsx(C,{id:_.descriptionId(i),description:n,schema:c,uiSchema:h,registry:u}),E?void 0:l,a.map(T=>b.jsx("div",{className:T.hidden?"rjsf-f0-hidden":"rjsf-f0-row",children:T.content},T.name)),_.canExpand(c,h,r)&&b.jsx("div",{className:"rjsf-f0-add",children:b.jsx(y,{id:_.buttonId(i,"add"),onClick:o,disabled:t||s,uiSchema:h,registry:u})})]})}function Nf(e){const{canAdd:n,disabled:t,fieldPathId:r,items:i,optionalDataControl:o,onAddClick:l,readonly:a,registry:s,required:u,schema:f,title:c,uiSchema:p}=e,h=_.getUiOptions(p),g=_.getTemplate("ArrayFieldTitleTemplate",s,h),k=_.getTemplate("ArrayFieldDescriptionTemplate",s,h),{AddButton:C}=s.templates.ButtonTemplates,y=!a&&!t;return b.jsxs("div",{className:"rjsf-f0-array",children:[b.jsx(g,{fieldPathId:r,title:h.title||c,required:u,schema:f,uiSchema:p,registry:s,optionalDataControl:y?o:void 0}),b.jsx(k,{fieldPathId:r,description:h.description||f.description,schema:f,uiSchema:p,registry:s}),y?void 0:o,b.jsx("div",{className:"rjsf-f0-array-items",children:i}),n&&b.jsx("div",{className:"rjsf-f0-add",children:b.jsx(C,{id:_.buttonId(r,"add"),onClick:l,disabled:t||a,uiSchema:p,registry:s})})]})}function _f(e){const{children:n,buttonsProps:t,hasToolbar:r,registry:i,schema:o,uiSchema:l}=e,a=_.getUiOptions(l),s=_.getTemplate("ArrayFieldItemButtonsTemplate",i,a),u=o.type==="object"||o.type==="array";return b.jsxs("div",{className:u?"rjsf-f0-array-item rjsf-f0-array-item-composite":"rjsf-f0-array-item",children:[b.jsx("div",{className:"rjsf-f0-array-item-content",children:n}),r&&b.jsx("div",{className:"rjsf-f0-array-item-toolbar",children:b.jsx(s,{...t})})]})}function Mf(e){const{disabled:n,hasCopy:t,hasMoveDown:r,hasMoveUp:i,hasRemove:o,fieldPathId:l,onCopyItem:a,onRemoveItem:s,onMoveDownItem:u,onMoveUpItem:f,readonly:c,registry:p,uiSchema:h}=e,{CopyButton:g,MoveDownButton:k,MoveUpButton:C,RemoveButton:y}=p.templates.ButtonTemplates,E={uiSchema:h,registry:p};return b.jsxs(b.Fragment,{children:[(i||r)&&b.jsx(C,{id:_.buttonId(l,"moveUp"),disabled:n||c||!i,onClick:f,...E}),(i||r)&&b.jsx(k,{id:_.buttonId(l,"moveDown"),disabled:n||c||!r,onClick:u,...E}),t&&b.jsx(g,{id:_.buttonId(l,"copy"),disabled:n||c,onClick:a,...E}),o&&b.jsx(y,{id:_.buttonId(l,"remove"),disabled:n||c,onClick:s,...E})]})}function Bf({children:e,className:n,column:t,...r}){return b.jsx("div",{className:n??(t?void 0:"rjsf-f0-grid"),...r,children:e})}function Uf({selector:e,optionSchemaField:n}){return b.jsxs("div",{className:"rjsf-f0-multischema",children:[b.jsx("div",{className:"rjsf-f0-row",children:e}),n]})}function Sn(e){return e?e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[*_~`]/g,"").replace(/\s+/g," ").trim():""}function Ti(e){return!!e&&Sn(e)!==e.trim()}function Ae({field:e,toFieldValue:n,fromFieldValue:t,id:r,label:i,value:o,required:l,disabled:a,readonly:s,placeholder:u,rawErrors:f,onChange:c,onBlur:p}){const h=G.useCallback(y=>c(t?t(y):y),[c,t]),g=G.useCallback(()=>p(r,o),[p,r,o]),k=G.useMemo(()=>({id:r,label:Sn(i)||r,placeholder:u,helpText:void 0,...e}),[r,i,u,e]),[C]=f??[];return b.jsx(te.F0FormField,{field:k,value:n?n(o):o,onChange:h,onBlur:g,error:!!C,required:l,disabled:a||s,hideLabel:!0})}const pr=e=>{if(!e||typeof e!="string")return;const n=new Date(e);return Number.isNaN(n.getTime())?void 0:n},dn=e=>String(e).padStart(2,"0"),Ei=e=>{if(!(!(e instanceof Date)||Number.isNaN(e.getTime())))return`${e.getFullYear()}-${dn(e.getMonth()+1)}-${dn(e.getDate())}`},qf=e=>{const n=Ei(e);if(!(!n||!(e instanceof Date)))return`${n}T${dn(e.getHours())}:${dn(e.getMinutes())}`},Hf={number:"number",integer:"number",range:"number",date:"date","datetime-local":"datetime",time:"time"},Vf=new Set(["password","email","tel","url"]);function $f(e){const{id:n,htmlName:t,autofocus:r,disabled:i,readonly:o,required:l,multiple:a,accept:s,onChangeOverride:u,onBlur:f,onFocus:c}=e;return b.jsx("input",{id:n,name:t||n,className:"rjsf-f0-native-file",type:"file",autoFocus:r,disabled:i||o,required:l,multiple:a,accept:s,onChange:u,onBlur:p=>f(n,p.target.value),onFocus:p=>c(n,p.target.value)})}function Wf(e){const{type:n,schema:t,options:r}=e,i=n||(t.type==="number"||t.type==="integer"?"number":"text");if(i==="file")return b.jsx($f,{...e});const o=Hf[i]??"text";return o==="date"?b.jsx(Ae,{...e,field:{type:"date"},toFieldValue:pr,fromFieldValue:Ei}):o==="datetime"?b.jsx(Ae,{...e,field:{type:"datetime"},toFieldValue:pr,fromFieldValue:qf}):o==="number"?b.jsx(Ae,{...e,field:{type:"number",...t.minimum!==void 0&&{min:t.minimum},...t.maximum!==void 0&&{max:t.maximum},...t.type==="integer"&&{maxDecimals:0}},fromFieldValue:l=>l===""||l===null?void 0:l}):b.jsx(Ae,{...e,field:{type:o,...Vf.has(i)&&{inputType:i}},fromFieldValue:l=>l===""?r.emptyValue:l})}const Yf=5;function Xf(e){const{options:n}=e;return b.jsx(Ae,{...e,field:{type:"textarea",rows:n.rows||Yf},fromFieldValue:t=>t===""?n.emptyValue:t})}const Gf="Drag a file here, or click to choose one",Qf="Drag files here, or click to choose them",mr=["B","KB","MB","GB"];function Kf(e){if(!Number.isFinite(e)||e<0)return"";let n=e,t=0;for(;n>=1024&&t<mr.length-1;)n/=1024,t+=1;return`${t===0?n:Math.round(n*10)/10} ${mr[t]}`}function Jf(e){const{id:n,options:t,registry:r,uiSchema:i,required:o,disabled:l,readonly:a,autofocus:s,multiple:u,value:f,onChange:c,onBlur:p,onFocus:h}=e,{filesInfo:g,handleChange:k,handleRemove:C}=_.useFileWidgetProps(f,c,u),[y,E]=G.useState(!1),{RemoveButton:T}=_.getTemplate("ButtonTemplates",r,t),j=l||a,z=t.accept?String(t.accept):void 0,w=t.dropzoneText??r.translateString(u?Qf:Gf),N=G.useCallback(A=>{var D;E(!1),(D=A.target.files)!=null&&D.length&&k(A.target.files),A.target.value=""},[k]),U=G.useCallback(A=>{j||(A.preventDefault(),E(!0))},[j]),q=G.useCallback(A=>{A.currentTarget.contains(A.relatedTarget)||E(!1)},[]),x=G.useCallback(A=>{var V;if(E(!1),j)return;A.preventDefault();const D=(V=A.dataTransfer)==null?void 0:V.files;D!=null&&D.length&&k(D)},[k,j]);return b.jsxs("div",{className:"rjsf-f0-file",children:[b.jsxs("div",{className:"rjsf-f0-dropzone","data-dragging":y?"true":void 0,"data-disabled":j?"true":void 0,onDragOver:U,onDragEnter:U,onDragLeave:q,onDrop:x,children:[b.jsx("input",{id:n,name:n,className:"rjsf-f0-dropzone-input",type:"file",accept:z,multiple:u,autoFocus:s,disabled:j,required:f?!1:o,onChange:N,onBlur:A=>p(n,A.target.value),onFocus:A=>h(n,A.target.value)}),b.jsxs("div",{className:"rjsf-f0-dropzone-body","aria-hidden":"true",children:[b.jsx(te.F0Icon,{icon:ae.Upload,size:"md"}),b.jsx("span",{className:"rjsf-f0-dropzone-text",children:w}),z&&b.jsx("span",{className:"rjsf-f0-dropzone-hint",children:z})]})]}),g.length>0&&b.jsx("ul",{className:"rjsf-f0-files",children:g.map((A,D)=>b.jsxs("li",{className:"rjsf-f0-file-chip",children:[b.jsx(te.F0Icon,{icon:ae.File,size:"sm"}),b.jsx("span",{className:"rjsf-f0-file-name",children:A.name}),b.jsx("span",{className:"rjsf-f0-file-size",children:Kf(A.size)}),b.jsx(T,{id:`${n}-remove-${D}`,disabled:j,onClick:()=>C(D),registry:r,uiSchema:i})]},`${A.name}-${D}`))})]})}const Zf=e=>(Array.isArray(e)?e:[]).map((n,t)=>({value:String(t),label:String(n.label)}));function eh(e){const{options:n,multiple:t,value:r,schema:i}=e,{enumOptions:o,enumDisabled:l}=n,a=Array.isArray(o)?o:[],s=c=>a.findIndex(p=>_.enumOptionsIsSelected(p.value,c)),u=G.useCallback(c=>{if(t)return(Array.isArray(c)?c:[]).map(g=>s(g)).filter(g=>g>=0).map(String);const p=s(c);return p>=0?String(p):void 0},[t,a]),f=G.useCallback(c=>{var p;return t?(Array.isArray(c)?c:[]).map(g=>{var k;return(k=a[Number(g)])==null?void 0:k.value}):c==null||c===""?n.emptyValue:(p=a[Number(c)])==null?void 0:p.value},[t,a,n.emptyValue]);return b.jsx(Ae,{...e,field:{type:"select",options:Zf(o).filter((c,p)=>{var h;return!(Array.isArray(l)&&l.includes((h=a[p])==null?void 0:h.value))}),multiple:t,clearable:!i.default&&!e.required,showSearchBox:a.length>8},value:r,toFieldValue:u,fromFieldValue:f})}function nh({id:e,value:n,label:t,hideLabel:r,disabled:i,readonly:o,onChange:l}){const a=!r&&Ti(t);return b.jsxs("div",{className:"rjsf-f0-checkbox",children:[b.jsx(te.F0Checkbox,{id:e,title:Sn(t),checked:n===!0,hideLabel:r||a,disabled:i||o,onCheckedChange:s=>l(s===!0)}),a&&b.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:e,children:b.jsx(Me,{components:{p:"span"},children:t})})]})}function th({id:e,disabled:n,readonly:t,options:r,value:i,onChange:o}){const{enumOptions:l,enumDisabled:a}=r,s=Array.isArray(i)?i:[];return b.jsx("div",{className:"rjsf-f0-checkboxes",children:(Array.isArray(l)?l:[]).map((u,f)=>{const c=_.enumOptionsIsSelected(u.value,s),p=Array.isArray(a)&&a.includes(u.value),h=_.optionId(e,f),g=String(u.label),k=Ti(g);return b.jsxs("div",{className:"rjsf-f0-checkbox",children:[b.jsx(te.F0Checkbox,{id:h,title:Sn(g),checked:c,hideLabel:k,disabled:n||t||p,onCheckedChange:C=>o(C===!0?_.enumOptionsSelectValue(f,s,l):_.enumOptionsDeselectValue(f,s,l))}),k&&b.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:h,children:b.jsx(Me,{components:{p:"span"},children:g})})]},String(u.value))})})}function rh(e){const{options:n,required:t}=e,r=Array.isArray(n.enumOptions)?n.enumOptions:[];return b.jsx(Ae,{...e,field:{type:"cardSelect",grouped:!0,options:r.map((i,o)=>{var l;return{value:String(o),label:String(i.label),...(l=i.schema)!=null&&l.description?{description:String(i.schema.description)}:{}}})},toFieldValue:i=>{const o=r.findIndex(l=>_.enumOptionsIsSelected(l.value,i));return o>=0?String(o):void 0},fromFieldValue:i=>{var o;return i===void 0||i===""?n.emptyValue:(o=r[Number(i)])==null?void 0:o.value},required:t})}const Ii=e=>!e.clickable&&e.status!=="current",ih=({items:e,onNavigate:n})=>b.jsx("nav",{className:"rjsf-f0-steps-tabs","aria-label":"Form steps",children:e.map(t=>b.jsx("div",{className:`rjsf-f0-steps-tab rjsf-f0-steps-tab-${t.status}`,...t.status==="current"&&{"aria-current":"step"},children:b.jsx(te.F0Button,{label:`${t.index+1}. ${t.title}`,size:"sm",variant:t.status==="current"?"neutral":"ghost",disabled:Ii(t),onClick:r=>{r.preventDefault(),n(t.index)}})},t.index))}),lh=({items:e,currentIndex:n,onNavigate:t})=>b.jsx("nav",{className:"rjsf-f0-steps-nav","aria-label":"Form steps",children:b.jsx(Bi.F0TableOfContent,{items:e.map(r=>({id:String(r.index),label:r.title,disabled:Ii(r),onClick:i=>t(Number(i))})),activeItem:String(n),scrollable:!1})}),oh=({layout:e,items:n,currentIndex:t,onNavigate:r,children:i})=>{const o=n[t];return b.jsxs("div",{className:`rjsf-f0-steps rjsf-f0-steps-layout-${e}`,children:[e==="sidebar"?b.jsx(lh,{items:n,currentIndex:t,onNavigate:r}):b.jsx(ih,{items:n,onNavigate:r}),b.jsxs("div",{className:"rjsf-f0-steps-main",children:[o&&b.jsxs("div",{className:"rjsf-f0-steps-header",children:[b.jsx("h3",{className:"rjsf-f0-steps-title",children:o.title}),o.description&&b.jsx("p",{className:"rjsf-f0-steps-description",children:o.description})]}),b.jsx("div",{className:"rjsf-f0-steps-panel",children:i})]})]})},ah=({label:e,onClick:n,disabled:t})=>{const r=gt(n);return b.jsx("div",{className:"rjsf-f0-steps-back",children:b.jsx(te.F0Button,{label:e,variant:"outline",disabled:t,onClick:r})})},vi={StepsNavigation:oh,BackButton:ah},Ai={ArrayFieldItemButtonsTemplate:Mf,ArrayFieldItemTemplate:_f,ArrayFieldTemplate:Nf,BaseInputTemplate:Wf,ButtonTemplates:Ff,DescriptionFieldTemplate:Pf,ErrorListTemplate:zf,FieldErrorTemplate:jf,FieldHelpTemplate:Lf,FieldTemplate:wf,GridTemplate:Bf,MultiSchemaFieldTemplate:Uf,ObjectFieldTemplate:Rf,TitleFieldTemplate:Df,WrapIfAdditionalTemplate:Of},Fi={CheckboxWidget:nh,CheckboxesWidget:th,FileWidget:Jf,RadioWidget:rh,SelectWidget:eh,TextareaWidget:Xf};function yt(){return{templates:Ai,widgets:Fi,multistep:vi}}const Di=yt();function uh(){return dr.withTheme(yt())}const sh=dr.withTheme(Di);exports.Form=sh;exports.Multistep=vi;exports.Templates=Ai;exports.Theme=Di;exports.Widgets=Fi;exports.generateForm=uh;exports.generateTheme=yt;exports.markdownComponents=Kn;
31
31
  //# sourceMappingURL=rjsf-f0.cjs.js.map