@factorialco/rjsf-f0 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rjsf-f0.cjs.js +1 -1
- package/dist/rjsf-f0.cjs.js.map +1 -1
- package/dist/rjsf-f0.es.js +34 -31
- package/dist/rjsf-f0.es.js.map +1 -1
- package/package.json +1 -1
package/dist/rjsf-f0.cjs.js
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
`},i),l}function vu(e,t){return e&&"run"in e?async function(n,r){const i=ci(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ci(n,{file:r,...e||t})}}function fi(e){if(e)throw e}var Ln,pi;function Mu(){if(pi)return Ln;pi=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):t.call(s)==="[object Array]"},l=function(s){if(!s||t.call(s)!=="[object Object]")return!1;var c=e.call(s,"constructor"),f=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!c&&!f)return!1;var m;for(m in s);return typeof m>"u"||e.call(s,m)},o=function(s,c){n&&c.name==="__proto__"?n(s,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):s[c.name]=c.newValue},a=function(s,c){if(c==="__proto__")if(e.call(s,c)){if(r)return r(s,c).value}else return;return s[c]};return Ln=function u(){var s,c,f,m,h,T,E=arguments[0],I=1,b=arguments.length,R=!1;for(typeof E=="boolean"&&(R=E,E=arguments[1]||{},I=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});I<b;++I)if(s=arguments[I],s!=null)for(c in s)f=a(E,c),m=a(s,c),E!==m&&(R&&m&&(l(m)||(h=i(m)))?(h?(h=!1,T=f&&i(f)?f:[]):T=f&&l(f)?f:{},o(E,{name:c,newValue:u(R,T,m)})):typeof m<"u"&&o(E,{name:c,newValue:m}));return E},Ln}var Fu=Mu();const vn=Vi(Fu);function tr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zu(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(u,...s){const c=e[++l];let f=-1;if(u){o(u);return}for(;++f<i.length;)(s[f]===null||s[f]===void 0)&&(s[f]=i[f]);i=s,c?ju(c,a)(...s):o(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function ju(e,t){let n;return r;function r(...o){const a=e.length>o.length;let u;a&&o.push(i);try{u=e.apply(this,o)}catch(s){const c=s;if(a&&n)throw c;return i(c)}a||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(o,...a){n||(n=!0,t(o,...a))}function l(o){i(null,o)}}const Ye={basename:Bu,dirname:Uu,extname:Hu,join:Vu,sep:"/"};function Bu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gt(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Uu(e){if(Gt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Hu(e){Gt(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Vu(...e){let t=-1,n;for(;++t<e.length;)Gt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qu(n)}function qu(e){Gt(e);const t=e.codePointAt(0)===47;let n=Wu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Wu(e,t){let n="",r=0,i=-1,l=0,o=-1,a,u;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return n}function Gt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $u={cwd:Gu};function Gu(){return"/"}function nr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Yu(e){if(typeof e=="string")e=new URL(e);else if(!nr(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Xu(e)}function Xu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Mn=["history","path","basename","stem","extname","dirname"];class yl{constructor(t){let n;t?nr(t)?n={path:t}:typeof t=="string"||Ku(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":$u.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Mn.length;){const l=Mn[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)Mn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(t){zn(t,"basename"),Fn(t,"basename"),this.path=Ye.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ye.dirname(this.path):void 0}set dirname(t){hi(this.basename,"dirname"),this.path=Ye.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ye.extname(this.path):void 0}set extname(t){if(Fn(t,"extname"),hi(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ye.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){nr(t)&&(t=Yu(t)),zn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ye.basename(this.path,this.extname):void 0}set stem(t){zn(t,"stem"),Fn(t,"stem"),this.path=Ye.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ke(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Fn(e,t){if(e&&e.includes(Ye.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ye.sep+"`")}function zn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Ku(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qu=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Ju={}.hasOwnProperty;class xr extends Qu{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zu()}copy(){const t=new xr;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(vn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Un("data",this.frozen),this.namespace[t]=n,this):Ju.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Un("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=sn(t),r=this.parser||this.Parser;return jn("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jn("process",this.parser||this.Parser),Bn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const a=sn(t),u=r.parse(a);r.run(u,a,function(c,f,m){if(c||!f||!m)return s(c);const h=f,T=r.stringify(h,m);tc(T)?m.value=T:m.result=T,s(c,m)});function s(c,f){c||!f?o(c):l?l(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),jn("processSync",this.parser||this.Parser),Bn("processSync",this.compiler||this.Compiler),this.process(t,i),di("processSync","process",n),r;function i(l,o){n=!0,fi(l),r=o}}run(t,n,r){mi(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const u=sn(n);i.run(t,u,s);function s(c,f,m){const h=f||t;c?a(c):o?o(h):r(void 0,h,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),di("runSync","run",r),i;function l(o,a){fi(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=sn(n),i=this.compiler||this.Compiler;return Bn("stringify",i),mi(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Un("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[c,...f]=s;u(c,f)}else o(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function o(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(s.plugins),s.settings&&(i.settings=vn(!0,i.settings,s.settings))}function a(s){let c=-1;if(s!=null)if(Array.isArray(s))for(;++c<s.length;){const f=s[c];l(f)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,c){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===s){m=f;break}if(m===-1)r.push([s,...c]);else if(c.length>0){let[h,...T]=c;const E=r[m][1];tr(E)&&tr(h)&&(h=vn(!0,E,h)),r[m]=[s,h,...T]}}}}const Zu=new xr().freeze();function jn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Un(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mi(e){if(!tr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function di(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sn(e){return ec(e)?e:new yl(e)}function ec(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tc(e){return typeof e=="string"||nc(e)}function nc(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rc="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gi=[],yi={allowDangerousHtml:!0},ic=/^(https?|ircs?|mailto|xmpp)$/i,lc=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oc(e){const t=ac(e),n=sc(e);return uc(t.runSync(t.parse(n),n),e)}function ac(e){const t=e.rehypePlugins||gi,n=e.remarkPlugins||gi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...yi}:yi;return Zu().use(js).use(n).use(vu,r).use(t)}function sc(e){const t=e.children||"",n=new yl;return typeof t=="string"&&(n.value=t),n}function uc(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||cc;for(const c of lc)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+rc+c.id,void 0);return gl(e,s),xo(e,{Fragment:A.Fragment,components:i,ignoreInvalidStyle:!0,jsx:A.jsx,jsxs:A.jsxs,passKeys:!0,passNode:!0});function s(c,f,m){if(c.type==="raw"&&m&&typeof f=="number")return o?m.children.splice(f,1):m.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let h;for(h in Dn)if(Object.hasOwn(Dn,h)&&Object.hasOwn(c.properties,h)){const T=c.properties[h],E=Dn[h];(E===null||E.includes(c.tagName))&&(c.properties[h]=u(String(T||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):l?l.includes(c.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(c,f,m)),h&&m&&typeof f=="number")return a&&c.children?m.children.splice(f,1,...c.children):m.children.splice(f,1),f}}}function cc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ic.test(e.slice(0,t))?e:""}const fc=oc,pc=e=>A.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer",children:e.children});function Ct(e){const t=e.components||{};return t.a||(t.a=pc),A.jsx(fc,{...e,components:t,allowedElements:["a","p","em","img","strong","ul","ol","li"]})}/*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */function xi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hc(e){if(Array.isArray(e))return e}function mc(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,o,a=[],u=!0,s=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(u=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(c){s=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return a}}function dc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
15
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gc(e,t){return hc(e)||mc(e,t)||yc(e,t)||dc()}function yc(e,t){if(e){if(typeof e=="string")return xi(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xi(e,t):void 0}}const xl=Object.entries,bi=Object.setPrototypeOf,xc=Object.isFrozen,bc=Object.getPrototypeOf,kc=Object.getOwnPropertyDescriptor;let de=Object.freeze,ge=Object.seal,At=Object.create,bl=typeof Reflect<"u"&&Reflect,rr=bl.apply,ir=bl.construct;de||(de=function(t){return t});ge||(ge=function(t){return t});rr||(rr=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),l=2;l<r;l++)i[l-2]=arguments[l];return t.apply(n,i)});ir||(ir=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const wt=ce(Array.prototype.forEach),Tc=ce(Array.prototype.lastIndexOf),ki=ce(Array.prototype.pop),Et=ce(Array.prototype.push),Sc=ce(Array.prototype.splice),st=Array.isArray,Ut=ce(String.prototype.toLowerCase),Hn=ce(String.prototype.toString),Ti=ce(String.prototype.match),jt=ce(String.prototype.replace),Si=ce(String.prototype.indexOf),wc=ce(String.prototype.trim),Ec=ce(Number.prototype.toString),Ac=ce(Boolean.prototype.toString),wi=typeof BigInt>"u"?null:ce(BigInt.prototype.toString),Ei=typeof Symbol>"u"?null:ce(Symbol.prototype.toString),he=ce(Object.prototype.hasOwnProperty),Bt=ce(Object.prototype.toString),pe=ce(RegExp.prototype.test),ht=_c(TypeError);function ce(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return rr(e,t,r)}}function _c(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ir(e,n)}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ut;if(bi&&bi(e,null),!st(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const l=n(i);l!==i&&(xc(t)||(t[r]=l),i=l)}e[i]=!0}return e}function Cc(e){for(let t=0;t<e.length;t++)he(e,t)||(e[t]=null);return e}function Se(e){const t=At(null);for(const r of xl(e)){var n=gc(r,2);const i=n[0],l=n[1];he(e,i)&&(st(l)?t[i]=Cc(l):l&&typeof l=="object"&&l.constructor===Object?t[i]=Se(l):t[i]=l)}return t}function Ic(e){switch(typeof e){case"string":return e;case"number":return Ec(e);case"boolean":return Ac(e);case"bigint":return wi?wi(e):"0";case"symbol":return Ei?Ei(e):"Symbol()";case"undefined":return Bt(e);case"function":case"object":{if(e===null)return Bt(e);const t=e,n=Ge(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Bt(r)}return Bt(e)}default:return Bt(e)}}function Ge(e,t){for(;e!==null;){const r=kc(e,t);if(r){if(r.get)return ce(r.get);if(typeof r.value=="function")return ce(r.value)}e=bc(e)}function n(){return null}return n}function Oc(e){try{return pe(e,""),!0}catch{return!1}}const Ai=de(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vn=de(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qn=de(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Nc=de(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wn=de(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Dc=de(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_i=de(["#text"]),Ci=de(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),$n=de(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ii=de(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),un=de(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rc=ge(/{{[\w\W]*|^[\w\W]*}}/g),Pc=ge(/<%[\w\W]*|^[\w\W]*%>/g),Lc=ge(/\${[\w\W]*/g),vc=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mc=ge(/^aria-[\-\w]+$/),Oi=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fc=ge(/^(?:\w+script|data):/i),zc=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jc=ge(/^html$/i),Bc=ge(/^[a-z][.\w]*(-[.\w]+)+$/i),Ni=ge(/<[/\w!]/g),Di=ge(/<[/\w]/g),Uc=ge(/<\/no(script|embed|frames)/i),Hc=ge(/\/>/i),Oe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Vc=function(){return typeof window>"u"?null:window},qc=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Ri=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},at=function(t,n,r,i){return he(t,n)&&st(t[n])?X(i.base?Se(i.base):{},t[n],i.transform):r};function kl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vc();const t=_=>kl(_);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==Oe.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,o=e.Node,a=e.Element,u=e.NodeFilter,s=e.NamedNodeMap;s===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,f=e.trustedTypes,m=a.prototype,h=Ge(m,"cloneNode"),T=Ge(m,"remove"),E=Ge(m,"nextSibling"),I=Ge(m,"childNodes"),b=Ge(m,"parentNode"),R=Ge(m,"shadowRoot"),O=Ge(m,"attributes"),U=o&&o.prototype?Ge(o.prototype,"nodeType"):null,W=o&&o.prototype?Ge(o.prototype,"nodeName"):null;if(typeof l=="function"){const _=n.createElement("template");_.content&&_.content.ownerDocument&&(n=_.content.ownerDocument)}let k,H="",Z,K=!1,$=0;const L=function(){if($>0)throw ht('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},P=function(p){L(),$++;try{return k.createHTML(p)}finally{$--}},ee=function(p){L(),$++;try{return k.createScriptURL(p)}finally{$--}},v=function(){return K||(Z=qc(f,i),K=!0),Z},N=n,Q=N.implementation,ae=N.createNodeIterator,Ce=N.createDocumentFragment,ve=N.getElementsByTagName,d=r.importNode;let G=Ri();t.isSupported=typeof xl=="function"&&typeof b=="function"&&Q&&Q.createHTMLDocument!==void 0;const Me=Rc,g=Pc,Ie=Lc,Qe=vc,fe=Mc,ft=Fc,Fe=zc,tt=Bc;let Je=Oi,te=null;const Xt=X({},[...Ai,...Vn,...qn,...Wn,..._i]);let le=null;const Kt=X({},[...Ci,...$n,...Ii,...un]);let ie=Object.seal(At(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),nt=null,Dt=null;const Be=Object.seal(At(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Rt=!0,yt=!0,Qt=!1,Jt=!0,Ue=!1,He=!0,Ze=!1,x=!1,C=null,F=null,V=!1,Y=!1,ye=!1,Re=!1,Pe=!0,rt=!1;const it="user-content-";let me=!0,Ve=!1,xe={},qe=null;const bn=X({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let kr=null;const Tr=X({},["audio","video","img","source","image","track"]);let kn=null;const Sr=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",en="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let xt=We,Tn=!1,Sn=null;const Cl=X({},[Zt,en,We],Hn),wr=de(["mi","mo","mn","ms","mtext"]);let wn=X({},wr);const Er=de(["annotation-xml"]);let En=X({},Er);const Il=X({},["title","style","font","a","script"]);let Pt=null;const Ol=["application/xhtml+xml","text/html"],Nl="text/html";let oe=null,bt=null;const Dl=n.createElement("form"),Ar=function(p){return p instanceof RegExp||p instanceof Function},An=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(bt&&bt===p)return;(!p||typeof p!="object")&&(p={}),p=Se(p),Pt=Ol.indexOf(p.PARSER_MEDIA_TYPE)===-1?Nl:p.PARSER_MEDIA_TYPE,oe=Pt==="application/xhtml+xml"?Hn:Ut,te=at(p,"ALLOWED_TAGS",Xt,{transform:oe}),le=at(p,"ALLOWED_ATTR",Kt,{transform:oe}),Sn=at(p,"ALLOWED_NAMESPACES",Cl,{transform:Hn}),kn=at(p,"ADD_URI_SAFE_ATTR",Sr,{transform:oe,base:Sr}),kr=at(p,"ADD_DATA_URI_TAGS",Tr,{transform:oe,base:Tr}),qe=at(p,"FORBID_CONTENTS",bn,{transform:oe}),nt=at(p,"FORBID_TAGS",Se({}),{transform:oe}),Dt=at(p,"FORBID_ATTR",Se({}),{transform:oe}),xe=he(p,"USE_PROFILES")?p.USE_PROFILES&&typeof p.USE_PROFILES=="object"?Se(p.USE_PROFILES):p.USE_PROFILES:!1,Rt=p.ALLOW_ARIA_ATTR!==!1,yt=p.ALLOW_DATA_ATTR!==!1,Qt=p.ALLOW_UNKNOWN_PROTOCOLS||!1,Jt=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ue=p.SAFE_FOR_TEMPLATES||!1,He=p.SAFE_FOR_XML!==!1,Ze=p.WHOLE_DOCUMENT||!1,Y=p.RETURN_DOM||!1,ye=p.RETURN_DOM_FRAGMENT||!1,Re=p.RETURN_TRUSTED_TYPE||!1,V=p.FORCE_BODY||!1,Pe=p.SANITIZE_DOM!==!1,rt=p.SANITIZE_NAMED_PROPS||!1,me=p.KEEP_CONTENT!==!1,Ve=p.IN_PLACE||!1,Je=Oc(p.ALLOWED_URI_REGEXP)?p.ALLOWED_URI_REGEXP:Oi,xt=typeof p.NAMESPACE=="string"?p.NAMESPACE:We,wn=he(p,"MATHML_TEXT_INTEGRATION_POINTS")&&p.MATHML_TEXT_INTEGRATION_POINTS&&typeof p.MATHML_TEXT_INTEGRATION_POINTS=="object"?Se(p.MATHML_TEXT_INTEGRATION_POINTS):X({},wr),En=he(p,"HTML_INTEGRATION_POINTS")&&p.HTML_INTEGRATION_POINTS&&typeof p.HTML_INTEGRATION_POINTS=="object"?Se(p.HTML_INTEGRATION_POINTS):X({},Er);const y=he(p,"CUSTOM_ELEMENT_HANDLING")&&p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING=="object"?Se(p.CUSTOM_ELEMENT_HANDLING):At(null);if(ie=At(null),he(y,"tagNameCheck")&&Ar(y.tagNameCheck)&&(ie.tagNameCheck=y.tagNameCheck),he(y,"attributeNameCheck")&&Ar(y.attributeNameCheck)&&(ie.attributeNameCheck=y.attributeNameCheck),he(y,"allowCustomizedBuiltInElements")&&typeof y.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=y.allowCustomizedBuiltInElements),ge(ie),Ue&&(yt=!1),ye&&(Y=!0),xe&&(te=X({},_i),le=At(null),xe.html===!0&&(X(te,Ai),X(le,Ci)),xe.svg===!0&&(X(te,Vn),X(le,$n),X(le,un)),xe.svgFilters===!0&&(X(te,qn),X(le,$n),X(le,un)),xe.mathMl===!0&&(X(te,Wn),X(le,Ii),X(le,un))),Be.tagCheck=null,Be.attributeCheck=null,he(p,"ADD_TAGS")&&(typeof p.ADD_TAGS=="function"?Be.tagCheck=p.ADD_TAGS:st(p.ADD_TAGS)&&(te===Xt&&(te=Se(te)),X(te,p.ADD_TAGS,oe))),he(p,"ADD_ATTR")&&(typeof p.ADD_ATTR=="function"?Be.attributeCheck=p.ADD_ATTR:st(p.ADD_ATTR)&&(le===Kt&&(le=Se(le)),X(le,p.ADD_ATTR,oe))),he(p,"ADD_URI_SAFE_ATTR")&&st(p.ADD_URI_SAFE_ATTR)&&X(kn,p.ADD_URI_SAFE_ATTR,oe),he(p,"FORBID_CONTENTS")&&st(p.FORBID_CONTENTS)&&(qe===bn&&(qe=Se(qe)),X(qe,p.FORBID_CONTENTS,oe)),he(p,"ADD_FORBID_CONTENTS")&&st(p.ADD_FORBID_CONTENTS)&&(qe===bn&&(qe=Se(qe)),X(qe,p.ADD_FORBID_CONTENTS,oe)),me&&(te["#text"]=!0),Ze&&X(te,["html","head","body"]),te.table&&(X(te,["tbody"]),delete nt.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const S=k;k=p.TRUSTED_TYPES_POLICY;try{H=P("")}catch(D){throw k=S,D}}else p.TRUSTED_TYPES_POLICY===null?(k=void 0,H=""):(k===void 0&&(k=v()),k&&typeof H=="string"&&(H=P("")));de&&de(p),bt=p},_r=X({},[...Vn,...qn,...Nc]),Cr=X({},[...Wn,...Dc]),Rl=function(p,y,S){return y.namespaceURI===We?p==="svg":y.namespaceURI===Zt?p==="svg"&&(S==="annotation-xml"||wn[S]):!!_r[p]},Pl=function(p,y,S){return y.namespaceURI===We?p==="math":y.namespaceURI===en?p==="math"&&En[S]:!!Cr[p]},Ll=function(p,y,S){return y.namespaceURI===en&&!En[S]||y.namespaceURI===Zt&&!wn[S]?!1:!Cr[p]&&(Il[p]||!_r[p])},vl=function(p){let y=b(p);(!y||!y.tagName)&&(y={namespaceURI:xt,tagName:"template"});const S=Ut(p.tagName),D=Ut(y.tagName);return Sn[p.namespaceURI]?p.namespaceURI===en?Rl(S,y,D):p.namespaceURI===Zt?Pl(S,y,D):p.namespaceURI===We?Ll(S,y,D):!!(Pt==="application/xhtml+xml"&&Sn[p.namespaceURI]):!1},lt=function(p){Et(t.removed,{element:p});try{b(p).removeChild(p)}catch{if(T(p),!b(p))throw ht("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tn=function(p){_n(p);const y=I(p);if(y){const D=[];wt(y,M=>{Et(D,M)}),wt(D,M=>{try{T(M)}catch{}})}const S=O(p);if(S)for(let D=S.length-1;D>=0;--D){const M=S[D],j=M&&M.name;if(typeof j=="string")try{p.removeAttribute(j)}catch{}}},pt=function(p,y){try{Et(t.removed,{attribute:y.getAttributeNode(p),from:y})}catch{Et(t.removed,{attribute:null,from:y})}if(y.removeAttribute(p),p==="is")if(Y||ye)try{lt(y)}catch{}else try{y.setAttribute(p,"")}catch{}},Ml=function(p){const y=O(p);if(y)for(let S=y.length-1;S>=0;--S){const D=y[S],M=D&&D.name;if(!(typeof M!="string"||le[oe(M)]))try{p.removeAttribute(M)}catch{}}},_n=function(p){const y=[p];for(;y.length>0;){const S=y.pop();(U?U(S):S.nodeType)===Oe.element&&Ml(S);const M=I(S);if(M)for(let j=M.length-1;j>=0;--j)y.push(M[j])}},Fl=function(p){if(!He)return;const y=[p];for(;y.length>0;){const S=y.pop(),D=U?U(S):S.nodeType;if(D===Oe.processingInstruction||D===Oe.comment&&pe(Di,S.data)){try{T(S)}catch{}continue}if(D===Oe.element){const j=S,se=oe(W?W(S):S.nodeName);try{j.hasAttribute&&j.hasAttribute("patchsrc")&&j.removeAttribute("patchsrc"),j.hasAttribute&&j.hasAttribute("for")&&se!=="label"&&se!=="output"&&j.removeAttribute("for")}catch{}}const M=I(S);if(M)for(let j=M.length-1;j>=0;--j)y.push(M[j])}},Ir=function(p){let y=null,S=null;if(V)p="<remove></remove>"+p;else{const j=Ti(p,/^[\r\n\t ]+/);S=j&&j[0]}Pt==="application/xhtml+xml"&&xt===We&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");const D=k?P(p):p;if(xt===We)try{y=new c().parseFromString(D,Pt)}catch{}if(!y||!y.documentElement){y=Q.createDocument(xt,"template",null);try{y.documentElement.innerHTML=Tn?H:D}catch{}}const M=y.body||y.documentElement;return p&&S&&M.insertBefore(n.createTextNode(S),M.childNodes[0]||null),xt===We?ve.call(y,Ze?"html":"body")[0]:Ze?y.documentElement:M},Or=function(p){return ae.call(p.ownerDocument||p,p,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},nn=function(p){return p=jt(p,Me," "),p=jt(p,g," "),p=jt(p,Ie," "),p},Cn=function(p){var y;p.normalize();const S=ae.call(p.ownerDocument||p,p,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let D=S.nextNode();for(;D;)D.data=nn(D.data),D=S.nextNode();const M=(y=p.querySelectorAll)===null||y===void 0?void 0:y.call(p,"template");M&&wt(M,j=>{kt(j.content)&&Cn(j.content)})},rn=function(p){const y=W?W(p):null;return typeof y!="string"||oe(y)!=="form"?!1:typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||p.attributes!==O(p)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function"||p.nodeType!==U(p)||p.childNodes!==I(p)},kt=function(p){if(!U||typeof p!="object"||p===null)return!1;try{return U(p)===Oe.documentFragment}catch{return!1}},Lt=function(p){if(!U||typeof p!="object"||p===null)return!1;try{return typeof U(p)=="number"}catch{return!1}};function $e(_,p,y){_.length!==0&&wt(_,S=>{S.call(t,p,y,bt)})}const zl=function(p,y){return!!(He&&p.hasChildNodes()&&!Lt(p.firstElementChild)&&pe(Ni,p.textContent)&&pe(Ni,p.innerHTML)||He&&p.namespaceURI===We&&y==="style"&&Lt(p.firstElementChild)||p.nodeType===Oe.processingInstruction||He&&p.nodeType===Oe.comment&&pe(Di,p.data))},jl=function(p,y){if(!nt[y]&&Rr(y)&&(ie.tagNameCheck instanceof RegExp&&pe(ie.tagNameCheck,y)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(y)))return!1;if(me&&!qe[y]){const S=b(p),D=I(p);if(D&&S){const M=D.length;for(let j=M-1;j>=0;--j){const se=Ve?D[j]:h(D[j],!0);S.insertBefore(se,E(p))}}}return lt(p),!0},Nr=function(p,y){if($e(G.beforeSanitizeElements,p,null),p!==y&&b(p)===null)return!0;if(rn(p))return lt(p),!0;const S=oe(W?W(p):p.nodeName);if($e(G.uponSanitizeElement,p,{tagName:S,allowedTags:te}),p!==y&&b(p)===null)return!0;if(zl(p,S))return lt(p),!0;if(nt[S]||!(Be.tagCheck instanceof Function&&Be.tagCheck(S))&&!te[S]){const M=jl(p,S);return M===!1&&$e(G.afterSanitizeElements,p,null),M}if((U?U(p):p.nodeType)===Oe.element&&!vl(p)||(S==="noscript"||S==="noembed"||S==="noframes")&&pe(Uc,p.innerHTML))return lt(p),!0;if(Ue&&p.nodeType===Oe.text){const M=nn(p.textContent);p.textContent!==M&&(Et(t.removed,{element:p.cloneNode()}),p.textContent=M)}return $e(G.afterSanitizeElements,p,null),!1},Dr=function(p,y,S){if(Dt[y]||He&&y==="patchsrc"||He&&y==="for"&&p!=="label"&&p!=="output"||Pe&&(y==="id"||y==="name")&&(S in n||S in Dl))return!1;const D=le[y]||Be.attributeCheck instanceof Function&&Be.attributeCheck(y,p);if(!(yt&&pe(Qe,y))){if(!(Rt&&pe(fe,y))){if(D){if(!kn[y]){if(!pe(Je,jt(S,Fe,""))){if(!((y==="src"||y==="xlink:href"||y==="href")&&p!=="script"&&Si(S,"data:")===0&&kr[p])){if(!(Qt&&!pe(ft,jt(S,Fe,"")))){if(S)return!1}}}}}else if(!(Rr(p)&&(ie.tagNameCheck instanceof RegExp&&pe(ie.tagNameCheck,p)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(p))&&(ie.attributeNameCheck instanceof RegExp&&pe(ie.attributeNameCheck,y)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(y,p))||y==="is"&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&pe(ie.tagNameCheck,S)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(S))))return!1}}return!0},Bl=X({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Rr=function(p){return!Bl[Ut(p)]&&pe(tt,p)},Ul=function(p,y,S,D){if(k&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!S)switch(f.getAttributeType(p,y)){case"TrustedHTML":return P(D);case"TrustedScriptURL":return ee(D)}return D},Hl=function(p,y,S,D){try{S?p.setAttributeNS(S,y,D):p.setAttribute(y,D),rn(p)?lt(p):ki(t.removed)}catch{pt(y,p)}},Pr=function(p){$e(G.beforeSanitizeAttributes,p,null);const y=p.attributes;if(!y||rn(p))return;const S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0};let D=y.length;const M=oe(p.nodeName);for(;D--;){const j=y[D],se=j.name,be=j.namespaceURI,ze=j.value,we=oe(se),je=ze;let Te=se==="value"?je:wc(je);if(S.attrName=we,S.attrValue=Te,S.keepAttr=!0,S.forceKeepAttr=void 0,$e(G.uponSanitizeAttribute,p,S),Te=S.attrValue,rt&&(we==="id"||we==="name")&&Si(Te,it)!==0&&(pt(se,p),Te=it+Te),He&&pe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){pt(se,p);continue}if(we==="attributename"&&Ti(Te,"href")){pt(se,p);continue}if(!S.forceKeepAttr){if(!S.keepAttr){pt(se,p);continue}if(!Jt&&pe(Hc,Te)){pt(se,p);continue}if(Ue&&(Te=nn(Te)),!Dr(M,we,Te)){pt(se,p);continue}Te=Ul(M,we,be,Te),Te!==je&&Hl(p,se,be,Te)}}$e(G.afterSanitizeAttributes,p,null)},ln=function(p){let y=null;const S=Or(p);for($e(G.beforeSanitizeShadowDOM,p,null);y=S.nextNode();)if($e(G.uponSanitizeShadowNode,y,null),Nr(y,p),Pr(y),kt(y.content)&&ln(y.content),(U?U(y):y.nodeType)===Oe.element){const M=R(y);kt(M)&&(In(M),ln(M))}$e(G.afterSanitizeShadowDOM,p,null)},In=function(p){const y=[{node:p,shadow:null}];for(;y.length>0;){const S=y.pop();if(S.shadow){ln(S.shadow);continue}const D=S.node,j=(U?U(D):D.nodeType)===Oe.element,se=I(D);if(se)for(let be=se.length-1;be>=0;--be)y.push({node:se[be],shadow:null});if(j){const be=W?W(D):null;if(typeof be=="string"&&oe(be)==="template"){const ze=D.content;kt(ze)&&y.push({node:ze,shadow:null})}}if(j){const be=R(D);kt(be)&&y.push({node:null,shadow:be},{node:be,shadow:null})}}};return t.sanitize=function(_){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=null,S=null,D=null,M=null;if(Tn=!_,Tn&&(_="<!-->"),typeof _!="string"&&!Lt(_)&&(_=Ic(_),typeof _!="string"))throw ht("dirty is not a string, aborting");if(!t.isSupported)return _;x?(te=C,le=F):An(p),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(te=Se(te)),G.uponSanitizeAttribute.length>0&&(le=Se(le)),t.removed=[];const j=Ve&&typeof _!="string"&&Lt(_);if(j){Fl(_);const we=W?W(_):_.nodeName;if(typeof we=="string"){const je=oe(we);if(!te[je]||nt[je])throw tn(_),ht("root node is forbidden and cannot be sanitized in-place")}if(rn(_))throw tn(_),ht("root node is clobbered and cannot be sanitized in-place");try{In(_)}catch(je){throw tn(_),je}}else if(Lt(_))y=Ir("<!---->"),S=y.ownerDocument.importNode(_,!0),S.nodeType===Oe.element&&S.nodeName==="BODY"||S.nodeName==="HTML"?y=S:y.appendChild(S),In(S);else{if(!Y&&!Ue&&!Ze&&_.indexOf("<")===-1)return k&&Re?P(_):_;if(y=Ir(_),!y)return Y?null:Re?H:""}y&&V&<(y.firstChild);const se=j?_:y,be=Or(se);try{for(;D=be.nextNode();)Nr(D,se),Pr(D),kt(D.content)&&ln(D.content)}catch(we){throw j&&(tn(_),wt(t.removed,je=>{je.element&&_n(je.element)})),we}if(j)return wt(t.removed,we=>{we.element&&_n(we.element)}),Ue&&Cn(_),_;if(Y){if(Ue&&Cn(y),ye)for(M=Ce.call(y.ownerDocument);y.firstChild;)M.appendChild(y.firstChild);else M=y;return(le.shadowroot||le.shadowrootmode)&&(M=d.call(r,M,!0)),M}let ze=Ze?y.outerHTML:y.innerHTML;return Ze&&te["!doctype"]&&y.ownerDocument&&y.ownerDocument.doctype&&y.ownerDocument.doctype.name&&pe(jc,y.ownerDocument.doctype.name)&&(ze="<!DOCTYPE "+y.ownerDocument.doctype.name+`>
|
|
16
16
|
`+ze),Ue&&(ze=nn(ze)),k&&Re?P(ze):ze},t.setConfig=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};An(_),x=!0,C=te,F=le},t.clearConfig=function(){bt=null,x=!1,C=null,F=null,k=Z,H=""},t.isValidAttribute=function(_,p,y){bt||An({});const S=oe(_),D=oe(p);return Dr(S,D,y)},t.addHook=function(_,p){typeof p=="function"&&he(G,_)&&Et(G[_],p)},t.removeHook=function(_,p){if(he(G,_)){if(p!==void 0){const y=Tc(G[_],p);return y===-1?void 0:Sc(G[_],y,1)[0]}return ki(G[_])}},t.removeHooks=function(_){he(G,_)&&(G[_]=[])},t.removeAllHooks=function(){G=Ri()},t}var hn=kl();const Wc=["script","iframe","object","embed","base","form"],$c=["srcdoc","formaction"];hn.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noreferrer")});const Gc=(e,t)=>hn.removed.length>0||t===""&&e.trim()!=="";function Yc(e){const t=hn.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:Wc,FORBID_ATTR:$c,ADD_ATTR:["target"]});return Gc(e,t)&&console.warn("Factorial Code forms: removed unsafe HTML while rendering authored content. Scripts, event handlers and javascript: URLs are not executed — use the onSuccess/onNextStep/onError callbacks for behaviour.",hn.removed),t}const Pi=({content:e})=>{const t=ut.useMemo(()=>Yc(e),[e]);return A.jsx("div",{dangerouslySetInnerHTML:{__html:t}})};function Xc(e){var R,O;const{id:t,children:n,displayLabel:r,rawErrors:i=[],errors:l,help:o,rawDescription:a,hidden:u,label:s,required:c,schema:f,uiSchema:m,registry:h}=e,T=q.getUiOptions(m),E=q.getTemplate("WrapIfAdditionalTemplate",h,T);if(u)return A.jsx("div",{className:"rjsf-f0-hidden",children:n});const I=T.widget==="checkbox"||f.type==="boolean",b=r&&!I&&!!s;return A.jsxs(A.Fragment,{children:[((R=f==null?void 0:f.rawHtml)==null?void 0:R.before)&&A.jsx(Pi,{content:f.rawHtml.before}),A.jsx(E,{...e,children:A.jsxs("div",{className:"rjsf-f0-field",children:[b&&A.jsxs("label",{className:"rjsf-f0-label",htmlFor:t,children:[A.jsx(Ct,{components:{p:"span"},children:s}),c&&A.jsx("span",{"aria-hidden":"true",children:" *"})]}),n,r&&a&&A.jsx("div",{className:"rjsf-f0-help",children:A.jsx(Ct,{children:a})}),i.length>0&&l,o]})}),((O=f==null?void 0:f.rawHtml)==null?void 0:O.after)&&A.jsx(Pi,{content:f.rawHtml.after})]})}function Tl(e){return ut.useCallback(t=>{t.preventDefault(),e==null||e(t)},[e])}function Yt({icon:e,label:t,variant:n="outline",disabled:r,onClick:i,id:l,registry:o,uiSchema:a,iconType:u,...s}){const c=Tl(i);return A.jsx(et.F0Button,{...s,"data-testid":l,label:t,hideLabel:!0,icon:e,size:"sm",variant:n,disabled:r,onClick:c})}function Kc(e){const{translateString:t}=e.registry;return A.jsx(Yt,{...e,icon:It.Files,label:t(q.TranslatableString.CopyButton)})}function Qc(e){const{translateString:t}=e.registry;return A.jsx(Yt,{...e,icon:It.ArrowUp,label:t(q.TranslatableString.MoveUpButton)})}function Jc(e){const{translateString:t}=e.registry;return A.jsx(Yt,{...e,icon:It.ArrowDown,label:t(q.TranslatableString.MoveDownButton)})}function Zc(e){const{translateString:t}=e.registry;return A.jsx(Yt,{...e,icon:It.Delete,variant:"critical",label:t(q.TranslatableString.RemoveButton)})}function ef(e){const{translateString:t}=e.registry;return A.jsx(Yt,{...e,icon:It.Delete,variant:"ghost",label:t(q.TranslatableString.ClearButton)})}function tf(e){const{translateString:t}=e.registry,{disabled:n,onClick:r,id:i}=e,l=Tl(r),o=t(q.TranslatableString.AddItemButton);return A.jsx(et.F0Button,{"data-testid":i,label:o,icon:It.Add,size:"sm",variant:"outline",disabled:n,onClick:l})}function nf({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=q.getSubmitButtonOptions(e);return n?null:A.jsx("div",{className:"rjsf-f0-submit",children:A.jsx(et.F0Button,{label:t,variant:"default",disabled:r.disabled})})}const rf={SubmitButton:nf,AddButton:tf,CopyButton:Kc,MoveDownButton:Jc,MoveUpButton:Qc,RemoveButton:Zc,ClearButton:ef};function lf({id:e,title:t,uiSchema:n,optionalDataControl:r}){const l=q.getUiOptions(n).title||t;return l?A.jsxs("div",{id:e,className:"rjsf-f0-title",children:[A.jsx(et.F0Heading,{as:"h5",variant:"heading",content:l}),r]}):null}function of({id:e,description:t}){return t?A.jsx("div",{id:e,className:"rjsf-f0-section-description",children:typeof t=="string"?A.jsx(Ct,{children:t}):t}):null}function af({errors:e=[],fieldPathId:t}){const n=e.filter(Boolean);return n.length<2?null:A.jsx("ul",{className:"rjsf-f0-errors",id:q.errorId(t),children:n.map((r,i)=>A.jsx("li",{children:typeof r=="string"?A.jsx(Ct,{components:{p:"span"},children:r}):r},`${r}-${i}`))})}function sf({fieldPathId:e,help:t}){return t?A.jsx("div",{className:"rjsf-f0-help",id:q.helpId(e),children:t}):null}function uf({errors:e,registry:t}){const{translateString:n}=t;return A.jsx("div",{className:"rjsf-f0-error-list",children:A.jsx(et.F0Alert,{variant:"critical",title:n(q.TranslatableString.ErrorsLabel),description:e.map(r=>r.stack).join(`
|
|
17
|
-
`)})})}function cf(e){const{id:t,classNames:n,style:r,disabled:i,label:l,onKeyRename:o,onRemoveProperty:a,readonly:u,required:s,schema:c,children:f,uiSchema:m,registry:h}=e,{templates:T,translateString:E}=h,{RemoveButton:I}=T.ButtonTemplates,[b,R]=ut.useState(l);if(!(q.ADDITIONAL_PROPERTY_FLAG in c))return A.jsx("div",{className:n,style:r,children:f});const O=`${t}-key`;return A.jsx("div",{className:n,style:r,children:A.jsxs("div",{className:"rjsf-f0-additional-property",children:[A.jsx(et.F0TextInput,{id:O,name:O,label:E(q.TranslatableString.KeyLabel,[l]),value:b,required:s,disabled:i||u,onChange:R,onBlur:u?void 0:()=>{b!==l&&o(b)}}),f,A.jsx(I,{disabled:i||u,onClick:a,uiSchema:m,registry:h})]})})}function ff(e){const{description:t,disabled:n,formData:r,fieldPathId:i,onAddProperty:l,optionalDataControl:o,properties:a,readonly:u,registry:s,required:c,schema:f,title:m,uiSchema:h}=e,T=q.getUiOptions(h),E=q.getTemplate("TitleFieldTemplate",s,T),I=q.getTemplate("DescriptionFieldTemplate",s,T),{AddButton:b}=s.templates.ButtonTemplates;if((f.oneOf||f.anyOf)&&!f.properties&&a.length===0)return null;const R=!u&&!n;return A.jsxs("div",{className:"rjsf-f0-object",children:[m&&A.jsx(E,{id:q.titleId(i),title:m,required:c,schema:f,uiSchema:h,registry:s,optionalDataControl:R?o:void 0}),t&&A.jsx(I,{id:q.descriptionId(i),description:t,schema:f,uiSchema:h,registry:s}),R?void 0:o,a.map(O=>A.jsx("div",{className:O.hidden?"rjsf-f0-hidden":"rjsf-f0-row",children:O.content},O.name)),q.canExpand(f,h,r)&&A.jsx("div",{className:"rjsf-f0-add",children:A.jsx(b,{id:q.buttonId(i,"add"),onClick:l,disabled:n||u,uiSchema:h,registry:s})})]})}function pf(e){const{canAdd:t,disabled:n,fieldPathId:r,items:i,optionalDataControl:l,onAddClick:o,readonly:a,registry:u,required:s,schema:c,title:f,uiSchema:m}=e,h=q.getUiOptions(m),T=q.getTemplate("ArrayFieldTitleTemplate",u,h),E=q.getTemplate("ArrayFieldDescriptionTemplate",u,h),{AddButton:I}=u.templates.ButtonTemplates,b=!a&&!n;return A.jsxs("div",{className:"rjsf-f0-array",children:[A.jsx(T,{fieldPathId:r,title:h.title||f,required:s,schema:c,uiSchema:m,registry:u,optionalDataControl:b?l:void 0}),A.jsx(E,{fieldPathId:r,description:h.description||c.description,schema:c,uiSchema:m,registry:u}),b?void 0:l,A.jsx("div",{className:"rjsf-f0-array-items",children:i}),t&&A.jsx("div",{className:"rjsf-f0-add",children:A.jsx(I,{id:q.buttonId(r,"add"),onClick:o,disabled:n||a,uiSchema:m,registry:u})})]})}function hf(e){const{children:t,buttonsProps:n,hasToolbar:r,registry:i,schema:l,uiSchema:o}=e,a=q.getUiOptions(o),u=q.getTemplate("ArrayFieldItemButtonsTemplate",i,a),s=l.type==="object"||l.type==="array";return A.jsxs("div",{className:s?"rjsf-f0-array-item rjsf-f0-array-item-composite":"rjsf-f0-array-item",children:[A.jsx("div",{className:"rjsf-f0-array-item-content",children:t}),r&&A.jsx("div",{className:"rjsf-f0-array-item-toolbar",children:A.jsx(u,{...n})})]})}function mf(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:l,fieldPathId:o,onCopyItem:a,onRemoveItem:u,onMoveDownItem:s,onMoveUpItem:c,readonly:f,registry:m,uiSchema:h}=e,{CopyButton:T,MoveDownButton:E,MoveUpButton:I,RemoveButton:b}=m.templates.ButtonTemplates,R={uiSchema:h,registry:m};return A.jsxs(A.Fragment,{children:[(i||r)&&A.jsx(I,{id:q.buttonId(o,"moveUp"),disabled:t||f||!i,onClick:c,...R}),(i||r)&&A.jsx(E,{id:q.buttonId(o,"moveDown"),disabled:t||f||!r,onClick:s,...R}),n&&A.jsx(T,{id:q.buttonId(o,"copy"),disabled:t||f,onClick:a,...R}),l&&A.jsx(b,{id:q.buttonId(o,"remove"),disabled:t||f,onClick:u,...R})]})}function df({children:e,className:t,column:n,...r}){return A.jsx("div",{className:t??(n?void 0:"rjsf-f0-grid"),...r,children:e})}function gf({selector:e,optionSchemaField:t}){return A.jsxs("div",{className:"rjsf-f0-multischema",children:[A.jsx("div",{className:"rjsf-f0-row",children:e}),t]})}function xn(e){return e?e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[*_~`]/g,"").replace(/\s+/g," ").trim():""}function Sl(e){return!!e&&xn(e)!==e.trim()}function mt({field:e,toFieldValue:t,fromFieldValue:n,id:r,label:i,value:l,required:o,disabled:a,readonly:u,placeholder:s,rawErrors:c,onChange:f,onBlur:m}){const h=ut.useCallback(b=>f(n?n(b):b),[f,n]),T=ut.useCallback(()=>m(r,l),[m,r,l]),E=ut.useMemo(()=>({id:r,label:xn(i)||r,placeholder:s,helpText:void 0,...e}),[r,i,s,e]),[I]=c??[];return A.jsx(et.F0FormField,{field:E,value:t?t(l):l,onChange:h,onBlur:T,error:!!I,errorMessage:I,required:o,disabled:a||u,hideLabel:!0})}const Li=e=>{if(!e||typeof e!="string")return;const t=new Date(e);return Number.isNaN(t.getTime())?void 0:t},mn=e=>String(e).padStart(2,"0"),wl=e=>{if(!(!(e instanceof Date)||Number.isNaN(e.getTime())))return`${e.getFullYear()}-${mn(e.getMonth()+1)}-${mn(e.getDate())}`},yf=e=>{const t=wl(e);if(!(!t||!(e instanceof Date)))return`${t}T${mn(e.getHours())}:${mn(e.getMinutes())}`},xf={number:"number",integer:"number",range:"number",date:"date","datetime-local":"datetime",time:"time"};function
|
|
17
|
+
`)})})}function cf(e){const{id:t,classNames:n,style:r,disabled:i,label:l,onKeyRename:o,onRemoveProperty:a,readonly:u,required:s,schema:c,children:f,uiSchema:m,registry:h}=e,{templates:T,translateString:E}=h,{RemoveButton:I}=T.ButtonTemplates,[b,R]=ut.useState(l);if(!(q.ADDITIONAL_PROPERTY_FLAG in c))return A.jsx("div",{className:n,style:r,children:f});const O=`${t}-key`;return A.jsx("div",{className:n,style:r,children:A.jsxs("div",{className:"rjsf-f0-additional-property",children:[A.jsx(et.F0TextInput,{id:O,name:O,label:E(q.TranslatableString.KeyLabel,[l]),value:b,required:s,disabled:i||u,onChange:R,onBlur:u?void 0:()=>{b!==l&&o(b)}}),f,A.jsx(I,{disabled:i||u,onClick:a,uiSchema:m,registry:h})]})})}function ff(e){const{description:t,disabled:n,formData:r,fieldPathId:i,onAddProperty:l,optionalDataControl:o,properties:a,readonly:u,registry:s,required:c,schema:f,title:m,uiSchema:h}=e,T=q.getUiOptions(h),E=q.getTemplate("TitleFieldTemplate",s,T),I=q.getTemplate("DescriptionFieldTemplate",s,T),{AddButton:b}=s.templates.ButtonTemplates;if((f.oneOf||f.anyOf)&&!f.properties&&a.length===0)return null;const R=!u&&!n;return A.jsxs("div",{className:"rjsf-f0-object",children:[m&&A.jsx(E,{id:q.titleId(i),title:m,required:c,schema:f,uiSchema:h,registry:s,optionalDataControl:R?o:void 0}),t&&A.jsx(I,{id:q.descriptionId(i),description:t,schema:f,uiSchema:h,registry:s}),R?void 0:o,a.map(O=>A.jsx("div",{className:O.hidden?"rjsf-f0-hidden":"rjsf-f0-row",children:O.content},O.name)),q.canExpand(f,h,r)&&A.jsx("div",{className:"rjsf-f0-add",children:A.jsx(b,{id:q.buttonId(i,"add"),onClick:l,disabled:n||u,uiSchema:h,registry:s})})]})}function pf(e){const{canAdd:t,disabled:n,fieldPathId:r,items:i,optionalDataControl:l,onAddClick:o,readonly:a,registry:u,required:s,schema:c,title:f,uiSchema:m}=e,h=q.getUiOptions(m),T=q.getTemplate("ArrayFieldTitleTemplate",u,h),E=q.getTemplate("ArrayFieldDescriptionTemplate",u,h),{AddButton:I}=u.templates.ButtonTemplates,b=!a&&!n;return A.jsxs("div",{className:"rjsf-f0-array",children:[A.jsx(T,{fieldPathId:r,title:h.title||f,required:s,schema:c,uiSchema:m,registry:u,optionalDataControl:b?l:void 0}),A.jsx(E,{fieldPathId:r,description:h.description||c.description,schema:c,uiSchema:m,registry:u}),b?void 0:l,A.jsx("div",{className:"rjsf-f0-array-items",children:i}),t&&A.jsx("div",{className:"rjsf-f0-add",children:A.jsx(I,{id:q.buttonId(r,"add"),onClick:o,disabled:n||a,uiSchema:m,registry:u})})]})}function hf(e){const{children:t,buttonsProps:n,hasToolbar:r,registry:i,schema:l,uiSchema:o}=e,a=q.getUiOptions(o),u=q.getTemplate("ArrayFieldItemButtonsTemplate",i,a),s=l.type==="object"||l.type==="array";return A.jsxs("div",{className:s?"rjsf-f0-array-item rjsf-f0-array-item-composite":"rjsf-f0-array-item",children:[A.jsx("div",{className:"rjsf-f0-array-item-content",children:t}),r&&A.jsx("div",{className:"rjsf-f0-array-item-toolbar",children:A.jsx(u,{...n})})]})}function mf(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:l,fieldPathId:o,onCopyItem:a,onRemoveItem:u,onMoveDownItem:s,onMoveUpItem:c,readonly:f,registry:m,uiSchema:h}=e,{CopyButton:T,MoveDownButton:E,MoveUpButton:I,RemoveButton:b}=m.templates.ButtonTemplates,R={uiSchema:h,registry:m};return A.jsxs(A.Fragment,{children:[(i||r)&&A.jsx(I,{id:q.buttonId(o,"moveUp"),disabled:t||f||!i,onClick:c,...R}),(i||r)&&A.jsx(E,{id:q.buttonId(o,"moveDown"),disabled:t||f||!r,onClick:s,...R}),n&&A.jsx(T,{id:q.buttonId(o,"copy"),disabled:t||f,onClick:a,...R}),l&&A.jsx(b,{id:q.buttonId(o,"remove"),disabled:t||f,onClick:u,...R})]})}function df({children:e,className:t,column:n,...r}){return A.jsx("div",{className:t??(n?void 0:"rjsf-f0-grid"),...r,children:e})}function gf({selector:e,optionSchemaField:t}){return A.jsxs("div",{className:"rjsf-f0-multischema",children:[A.jsx("div",{className:"rjsf-f0-row",children:e}),t]})}function xn(e){return e?e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[*_~`]/g,"").replace(/\s+/g," ").trim():""}function Sl(e){return!!e&&xn(e)!==e.trim()}function mt({field:e,toFieldValue:t,fromFieldValue:n,id:r,label:i,value:l,required:o,disabled:a,readonly:u,placeholder:s,rawErrors:c,onChange:f,onBlur:m}){const h=ut.useCallback(b=>f(n?n(b):b),[f,n]),T=ut.useCallback(()=>m(r,l),[m,r,l]),E=ut.useMemo(()=>({id:r,label:xn(i)||r,placeholder:s,helpText:void 0,...e}),[r,i,s,e]),[I]=c??[];return A.jsx(et.F0FormField,{field:E,value:t?t(l):l,onChange:h,onBlur:T,error:!!I,errorMessage:I,required:o,disabled:a||u,hideLabel:!0})}const Li=e=>{if(!e||typeof e!="string")return;const t=new Date(e);return Number.isNaN(t.getTime())?void 0:t},mn=e=>String(e).padStart(2,"0"),wl=e=>{if(!(!(e instanceof Date)||Number.isNaN(e.getTime())))return`${e.getFullYear()}-${mn(e.getMonth()+1)}-${mn(e.getDate())}`},yf=e=>{const t=wl(e);if(!(!t||!(e instanceof Date)))return`${t}T${mn(e.getHours())}:${mn(e.getMinutes())}`},xf={number:"number",integer:"number",range:"number",date:"date","datetime-local":"datetime",time:"time"},bf=new Set(["password","email","tel","url"]);function kf(e){const{id:t,htmlName:n,autofocus:r,disabled:i,readonly:l,required:o,multiple:a,accept:u,onChangeOverride:s,onBlur:c,onFocus:f}=e;return A.jsx("input",{id:t,name:n||t,className:"rjsf-f0-file",type:"file",autoFocus:r,disabled:i||l,required:o,multiple:a,accept:u,onChange:s,onBlur:m=>c(t,m.target.value),onFocus:m=>f(t,m.target.value)})}function Tf(e){const{type:t,schema:n,options:r}=e,i=t||(n.type==="number"||n.type==="integer"?"number":"text");if(i==="file")return A.jsx(kf,{...e});const l=xf[i]??"text";return l==="date"?A.jsx(mt,{...e,field:{type:"date"},toFieldValue:Li,fromFieldValue:wl}):l==="datetime"?A.jsx(mt,{...e,field:{type:"datetime"},toFieldValue:Li,fromFieldValue:yf}):l==="number"?A.jsx(mt,{...e,field:{type:"number",...n.minimum!==void 0&&{min:n.minimum},...n.maximum!==void 0&&{max:n.maximum},...n.type==="integer"&&{maxDecimals:0}},fromFieldValue:o=>o===""||o===null?void 0:o}):A.jsx(mt,{...e,field:{type:l,...bf.has(i)&&{inputType:i}},fromFieldValue:o=>o===""?r.emptyValue:o})}const Sf=5;function wf(e){const{options:t}=e;return A.jsx(mt,{...e,field:{type:"textarea",rows:t.rows||Sf},fromFieldValue:n=>n===""?t.emptyValue:n})}const Ef=e=>(Array.isArray(e)?e:[]).map((t,n)=>({value:String(n),label:String(t.label)}));function Af(e){const{options:t,multiple:n,value:r,schema:i}=e,{enumOptions:l,enumDisabled:o}=t,a=Array.isArray(l)?l:[],u=f=>a.findIndex(m=>q.enumOptionsIsSelected(m.value,f)),s=ut.useCallback(f=>{if(n)return(Array.isArray(f)?f:[]).map(T=>u(T)).filter(T=>T>=0).map(String);const m=u(f);return m>=0?String(m):void 0},[n,a]),c=ut.useCallback(f=>{var m;return n?(Array.isArray(f)?f:[]).map(T=>{var E;return(E=a[Number(T)])==null?void 0:E.value}):f==null||f===""?t.emptyValue:(m=a[Number(f)])==null?void 0:m.value},[n,a,t.emptyValue]);return A.jsx(mt,{...e,field:{type:"select",options:Ef(l).filter((f,m)=>{var h;return!(Array.isArray(o)&&o.includes((h=a[m])==null?void 0:h.value))}),multiple:n,clearable:!i.default&&!e.required,showSearchBox:a.length>8},value:r,toFieldValue:s,fromFieldValue:c})}function _f({id:e,value:t,label:n,hideLabel:r,disabled:i,readonly:l,onChange:o}){const a=!r&&Sl(n);return A.jsxs("div",{className:"rjsf-f0-checkbox",children:[A.jsx(et.F0Checkbox,{id:e,title:xn(n),checked:t===!0,hideLabel:r||a,disabled:i||l,onCheckedChange:u=>o(u===!0)}),a&&A.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:e,children:A.jsx(Ct,{components:{p:"span"},children:n})})]})}function Cf({id:e,disabled:t,readonly:n,options:r,value:i,onChange:l}){const{enumOptions:o,enumDisabled:a}=r,u=Array.isArray(i)?i:[];return A.jsx("div",{className:"rjsf-f0-checkboxes",children:(Array.isArray(o)?o:[]).map((s,c)=>{const f=q.enumOptionsIsSelected(s.value,u),m=Array.isArray(a)&&a.includes(s.value),h=q.optionId(e,c),T=String(s.label),E=Sl(T);return A.jsxs("div",{className:"rjsf-f0-checkbox",children:[A.jsx(et.F0Checkbox,{id:h,title:xn(T),checked:f,hideLabel:E,disabled:t||n||m,onCheckedChange:I=>l(I===!0?q.enumOptionsSelectValue(c,u,o):q.enumOptionsDeselectValue(c,u,o))}),E&&A.jsx("label",{className:"rjsf-f0-checkbox-label",htmlFor:h,children:A.jsx(Ct,{components:{p:"span"},children:T})})]},String(s.value))})})}function If(e){const{options:t,required:n}=e,r=Array.isArray(t.enumOptions)?t.enumOptions:[];return A.jsx(mt,{...e,field:{type:"cardSelect",grouped:!0,options:r.map((i,l)=>{var o;return{value:String(l),label:String(i.label),...(o=i.schema)!=null&&o.description?{description:String(i.schema.description)}:{}}})},toFieldValue:i=>{const l=r.findIndex(o=>q.enumOptionsIsSelected(o.value,i));return l>=0?String(l):void 0},fromFieldValue:i=>{var l;return i===void 0||i===""?t.emptyValue:(l=r[Number(i)])==null?void 0:l.value},required:n})}const El={ArrayFieldItemButtonsTemplate:mf,ArrayFieldItemTemplate:hf,ArrayFieldTemplate:pf,BaseInputTemplate:Tf,ButtonTemplates:rf,DescriptionFieldTemplate:of,ErrorListTemplate:uf,FieldErrorTemplate:af,FieldHelpTemplate:sf,FieldTemplate:Xc,GridTemplate:df,MultiSchemaFieldTemplate:gf,ObjectFieldTemplate:ff,TitleFieldTemplate:lf,WrapIfAdditionalTemplate:cf},Al={CheckboxWidget:_f,CheckboxesWidget:Cf,RadioWidget:If,SelectWidget:Af,TextareaWidget:wf};function br(){return{templates:El,widgets:Al}}const _l=br();function Of(){return vi.withTheme(br())}const Nf=vi.withTheme(_l);exports.Form=Nf;exports.Templates=El;exports.Theme=_l;exports.Widgets=Al;exports.generateForm=Of;exports.generateTheme=br;
|
|
18
18
|
//# sourceMappingURL=rjsf-f0.cjs.js.map
|