@nocobase/app 2.0.0-beta.10 → 2.0.0-beta.12
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/client/1529.f3ff6dfe.async.js +62 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/{npm.antd.601f2259.async.js → npm.antd.1d24863b.async.js} +1 -1
- package/dist/client/npm.mathjs.187b1c28.async.js +53 -0
- package/dist/client/npm.typed-function.9df0469b.async.js +1 -0
- package/dist/client/p__index.2fd596ee.async.js +2520 -0
- package/dist/client/{umi.cab9869e.js → umi.20d3edd9.js} +2 -2
- package/package.json +6 -6
- package/dist/client/3885.fd54a10c.async.js +0 -50
- package/dist/client/npm.mathjs.fd97f3b7.async.js +0 -52
- package/dist/client/p__index.b132d633.async.js +0 -2517
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8595],{44814:function(ue){(function(L,T){ue.exports=T()})(this,function(){"use strict";function L(){return!0}function T(){return!1}function P(){}const G="Argument is not a typed-function.";function H(){function J(e){return typeof e=="object"&&e!==null&&e.constructor===Object}const pe=[{name:"number",test:function(e){return typeof e=="number"}},{name:"string",test:function(e){return typeof e=="string"}},{name:"boolean",test:function(e){return typeof e=="boolean"}},{name:"Function",test:function(e){return typeof e=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:J},{name:"null",test:function(e){return e===null}},{name:"undefined",test:function(e){return e===void 0}}],he={name:"any",test:L,isAny:!0};let E,C,D=0,p={createCount:0};function v(e){const t=E.get(e);if(t)return t;let n='Unknown type "'+e+'"';const r=e.toLowerCase();let i;for(i of C)if(i.toLowerCase()===r){n+='. Did you mean "'+i+'" ?';break}throw new TypeError(n)}function U(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const n=t?v(t).index:C.length,r=[];for(let o=0;o<e.length;++o){if(!e[o]||typeof e[o].name!="string"||typeof e[o].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");const f=e[o].name;if(E.has(f))throw new TypeError('Duplicate type name "'+f+'"');r.push(f),E.set(f,{name:f,test:e[o].test,isAny:e[o].isAny,index:n+o,conversionsTo:[]})}const i=C.slice(n);C=C.slice(0,n).concat(r).concat(i);for(let o=n+r.length;o<C.length;++o)E.get(C[o]).index=o}function K(){E=new Map,C=[],D=0,U([he],!1)}K(),U(pe);function me(){let e;for(e of C)E.get(e).conversionsTo=[];D=0}function Q(e){const t=C.filter(n=>{const r=E.get(n);return!r.isAny&&r.test(e)});return t.length?t:["any"]}function I(e){return e&&typeof e=="function"&&"_typedFunctionData"in e}function V(e,t,n){if(!I(e))throw new TypeError(G);const r=n&&n.exact,i=Array.isArray(t)?t.join(","):t,o=N(i),f=S(o);if(!r||f in e.signatures){const u=e._typedFunctionData.signatureMap.get(f);if(u)return u}const c=o.length;let a;if(r){a=[];let u;for(u in e.signatures)a.push(e._typedFunctionData.signatureMap.get(u))}else a=e._typedFunctionData.signatures;for(let u=0;u<c;++u){const l=o[u],m=[];let w;for(w of a){const d=Y(w.params,u);if(!(!d||l.restParam&&!d.restParam)){if(!d.hasAny){const A=W(d);if(l.types.some(b=>!A.has(b.name)))continue}m.push(w)}}if(a=m,a.length===0)break}let s;for(s of a)if(s.params.length<=c)return s;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+S(o,", ")+"))")}function ge(e,t,n){return V(e,t,n).implementation}function ye(e,t){const n=v(t);if(n.test(e))return e;const r=n.conversionsTo;if(r.length===0)throw new Error("There are no conversions to "+t+" defined.");for(let i=0;i<r.length;i++)if(v(r[i].from).test(e))return r[i].convert(e);throw new Error("Cannot convert "+e+" to "+t)}function S(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return e.map(n=>n.name).join(t)}function de(e){const t=e.indexOf("...")===0,r=(t?e.length>3?e.slice(3):"any":e).split("|").map(c=>v(c.trim()));let i=!1,o=t?"...":"";return{types:r.map(function(c){return i=c.isAny||i,o+=c.name+"|",{name:c.name,typeIndex:c.index,test:c.test,isAny:c.isAny,conversion:null,conversionIndex:-1}}),name:o.slice(0,-1),hasAny:i,hasConversion:!1,restParam:t}}function Te(e){const t=e.types.map(f=>f.name),n=Ae(t);let r=e.hasAny,i=e.name;const o=n.map(function(f){const c=v(f.from);return r=c.isAny||r,i+="|"+f.from,{name:f.from,typeIndex:c.index,test:c.test,isAny:c.isAny,conversion:f,conversionIndex:f.index}});return{types:e.types.concat(o),name:i,hasAny:r,hasConversion:o.length>0,restParam:e.restParam}}function W(e){return e.typeSet||(e.typeSet=new Set,e.types.forEach(t=>e.typeSet.add(t.name))),e.typeSet}function N(e){const t=[];if(typeof e!="string")throw new TypeError("Signatures must be strings");const n=e.trim();if(n==="")return t;const r=n.split(",");for(let i=0;i<r.length;++i){const o=de(r[i].trim());if(o.restParam&&i!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+r[i]+'": only allowed for the last parameter');if(o.types.length===0)return null;t.push(o)}return t}function y(e){const t=k(e);return t?t.restParam:!1}function g(e){if(!e||e.types.length===0)return L;if(e.types.length===1)return v(e.types[0].name).test;if(e.types.length===2){const t=v(e.types[0].name).test,n=v(e.types[1].name).test;return function(i){return t(i)||n(i)}}else{const t=e.types.map(function(n){return v(n.name).test});return function(r){for(let i=0;i<t.length;i++)if(t[i](r))return!0;return!1}}}function ve(e){let t,n,r;if(y(e)){t=re(e).map(g);const i=t.length,o=g(k(e)),f=function(c){for(let a=i;a<c.length;a++)if(!o(c[a]))return!1;return!0};return function(a){for(let s=0;s<t.length;s++)if(!t[s](a[s]))return!1;return f(a)&&a.length>=i+1}}else return e.length===0?function(o){return o.length===0}:e.length===1?(n=g(e[0]),function(o){return n(o[0])&&o.length===1}):e.length===2?(n=g(e[0]),r=g(e[1]),function(o){return n(o[0])&&r(o[1])&&o.length===2}):(t=e.map(g),function(o){for(let f=0;f<t.length;f++)if(!t[f](o[f]))return!1;return o.length===t.length})}function Y(e,t){return t<e.length?e[t]:y(e)?k(e):null}function q(e,t){const n=Y(e,t);return n?W(n):new Set}function X(e){return e.conversion===null||e.conversion===void 0}function Z(e,t){const n=new Set;return e.forEach(r=>{const i=q(r.params,t);let o;for(o of i)n.add(o)}),n.has("any")?["any"]:Array.from(n)}function $(e,t,n){let r,i;const o=e||"unnamed";let f=n,c;for(c=0;c<t.length;c++){const l=[];if(f.forEach(m=>{const w=Y(m.params,c),d=g(w);(c<m.params.length||y(m.params))&&d(t[c])&&l.push(m)}),l.length===0){if(i=Z(f,c),i.length>0){const m=Q(t[c]);return r=new TypeError("Unexpected type of argument in function "+o+" (expected: "+i.join(" or ")+", actual: "+m.join(" | ")+", index: "+c+")"),r.data={category:"wrongType",fn:o,index:c,actual:m,expected:i},r}}else f=l}const a=f.map(function(l){return y(l.params)?1/0:l.params.length});if(t.length<Math.min.apply(null,a))return i=Z(f,c),r=new TypeError("Too few arguments in function "+o+" (expected: "+i.join(" or ")+", index: "+t.length+")"),r.data={category:"tooFewArgs",fn:o,index:t.length,expected:i},r;const s=Math.max.apply(null,a);if(t.length>s)return r=new TypeError("Too many arguments in function "+o+" (expected: "+s+", actual: "+t.length+")"),r.data={category:"tooManyArgs",fn:o,index:t.length,expectedLength:s},r;const u=[];for(let l=0;l<t.length;++l)u.push(Q(t[l]).join("|"));return r=new TypeError('Arguments of type "'+u.join(", ")+'" do not match any of the defined signatures of function '+o+"."),r.data={category:"mismatch",actual:u},r}function ee(e){let t=C.length+1;for(let n=0;n<e.types.length;n++)t=Math.min(t,e.types[n].typeIndex);return t}function te(e){let t=D+1;for(let n=0;n<e.types.length;n++)X(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function we(e,t){if(e.hasAny){if(!t.hasAny)return .1}else if(t.hasAny)return-.1;if(e.restParam){if(!t.restParam)return .01}else if(t.restParam)return-.01;const n=ee(e)-ee(t);if(n<0)return-.001;if(n>0)return .001;const r=te(e),i=te(t);if(e.hasConversion){if(!t.hasConversion)return(1+r)*1e-6}else if(t.hasConversion)return-(1+i)*1e-6;const o=r-i;return o<0?-1e-7:o>0?1e-7:0}function xe(e,t){const n=e.params,r=t.params,i=k(n),o=k(r),f=y(n),c=y(r);if(f&&i.hasAny){if(!c||!o.hasAny)return 1e7}else if(c&&o.hasAny)return-1e7;let a=0,s=0,u;for(u of n)u.hasAny&&++a,u.hasConversion&&++s;let l=0,m=0;for(u of r)u.hasAny&&++l,u.hasConversion&&++m;if(a!==l)return(a-l)*1e6;if(f&&i.hasConversion){if(!c||!o.hasConversion)return 1e5}else if(c&&o.hasConversion)return-1e5;if(s!==m)return(s-m)*1e4;if(f){if(!c)return 1e3}else if(c)return-1e3;const w=(n.length-r.length)*(f?-100:100);if(w!==0)return w;const d=[];let A=0;for(let j=0;j<n.length;++j){const _=we(n[j],r[j]);d.push(_),A+=_}if(A!==0)return(A<0?-10:10)+A;let b,O=9;const B=O/(d.length+1);for(b of d){if(b!==0)return(b<0?-O:O)+b;O-=B}return 0}function Ae(e){if(e.length===0)return[];const t=e.map(v);if(e.length===1)return t[0].conversionsTo;const n=new Set(e),r=new Set;for(let o=0;o<t.length;++o)for(const f of t[o].conversionsTo)n.has(f.from)||r.add(f.from);const i=[];for(const o of r){let f=D+1,c=null;for(let a=0;a<t.length;++a)for(const s of t[a].conversionsTo)s.from===o&&s.index<f&&(f=s.index,c=s);i.push(c)}return i}function be(e,t){let n=t,r="";if(e.some(o=>o.hasConversion)){const o=y(e),f=e.map(Ce);r=f.map(c=>c.name).join(";"),n=function(){const a=[],s=o?arguments.length-1:arguments.length;for(let u=0;u<s;u++)a[u]=f[u](arguments[u]);return o&&(a[s]=arguments[s].map(f[s])),t.apply(this,a)}}let i=n;if(y(e)){const o=e.length-1;i=function(){return n.apply(this,z(arguments,0,o).concat([z(arguments,o)]))}}return r&&Object.defineProperty(i,"name",{value:r}),i}function Ce(e){let t,n,r,i;const o=[],f=[];let c="";e.types.forEach(function(s){s.conversion&&(c+=s.conversion.from+"~>"+s.conversion.to+",",o.push(v(s.conversion.from).test),f.push(s.conversion.convert))}),c?c=c.slice(0,-1):c="pass";let a=s=>s;switch(f.length){case 0:break;case 1:t=o[0],r=f[0],a=function(u){return t(u)?r(u):u};break;case 2:t=o[0],n=o[1],r=f[0],i=f[1],a=function(u){return t(u)?r(u):n(u)?i(u):u};break;default:a=function(u){for(let l=0;l<f.length;l++)if(o[l](u))return f[l](u);return u}}return Object.defineProperty(a,"name",{value:c}),a}function Ee(e){function t(n,r,i){if(r<n.length){const o=n[r];let f=[];if(o.restParam){const c=o.types.filter(X);c.length<o.types.length&&f.push({types:c,name:"..."+c.map(a=>a.name).join("|"),hasAny:c.some(a=>a.isAny),hasConversion:!1,restParam:!0}),f.push(o)}else f=o.types.map(function(c){return{types:[c],name:c.name,hasAny:c.isAny,hasConversion:c.conversion,restParam:!1}});return Re(f,function(c){return t(n,r+1,i.concat([c]))})}else return[i]}return t(e,0,[])}function Pe(e,t){const n=Math.max(e.length,t.length);for(let c=0;c<n;c++){const a=q(e,c),s=q(t,c);let u=!1,l;for(l of s)if(a.has(l)){u=!0;break}if(!u)return!1}const r=e.length,i=t.length,o=y(e),f=y(t);return o?f?r===i:i>=r:f?r>=i:r===i}function Se(e){return e.map(t=>ce(t)?se(t.referToSelf.callback):ie(t)?oe(t.referTo.references,t.referTo.callback):t)}function ke(e,t,n){const r=[];let i;for(i of e){let o=n[i];if(typeof o!="number")throw new TypeError('No definition for referenced signature "'+i+'"');if(o=t[o],typeof o!="function")return!1;r.push(o)}return r}function Oe(e,t,n){const r=Se(e),i=new Array(r.length).fill(!1);let o=!0;for(;o;){o=!1;let f=!0;for(let c=0;c<r.length;++c){if(i[c])continue;const a=r[c];if(ce(a))r[c]=a.referToSelf.callback(n),r[c].referToSelf=a.referToSelf,i[c]=!0,f=!1;else if(ie(a)){const s=ke(a.referTo.references,r,t);s?(r[c]=a.referTo.callback.apply(this,s),r[c].referTo=a.referTo,i[c]=!0,f=!1):o=!0}}if(f&&o)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return r}function je(e){const t=/\bthis(\(|\.signatures\b)/;Object.keys(e).forEach(n=>{const r=e[n];if(t.test(r.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function De(e,t){if(p.createCount++,Object.keys(t).length===0)throw new SyntaxError("No signatures provided");p.warnAgainstDeprecatedThis&&je(t);const n=[],r=[],i={},o=[];let f;for(f in t){if(!Object.prototype.hasOwnProperty.call(t,f))continue;const h=N(f);if(!h)continue;n.forEach(function(M){if(Pe(M,h))throw new TypeError('Conflicting signatures "'+S(M)+'" and "'+S(h)+'".')}),n.push(h);const x=r.length;r.push(t[f]);const ut=h.map(Te);let F;for(F of Ee(ut)){const M=S(F);o.push({params:F,name:M,fn:x}),F.every(lt=>!lt.hasConversion)&&(i[M]=x)}}o.sort(xe);const c=Oe(r,i,R);let a;for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=c[i[a]]);const s=[],u=new Map;for(a of o)u.has(a.name)||(a.fn=c[a.fn],s.push(a),u.set(a.name,a));const l=s[0]&&s[0].params.length<=2&&!y(s[0].params),m=s[1]&&s[1].params.length<=2&&!y(s[1].params),w=s[2]&&s[2].params.length<=2&&!y(s[2].params),d=s[3]&&s[3].params.length<=2&&!y(s[3].params),A=s[4]&&s[4].params.length<=2&&!y(s[4].params),b=s[5]&&s[5].params.length<=2&&!y(s[5].params),O=l&&m&&w&&d&&A&&b;for(let h=0;h<s.length;++h)s[h].test=ve(s[h].params);const B=l?g(s[0].params[0]):T,j=m?g(s[1].params[0]):T,_=w?g(s[2].params[0]):T,Ue=d?g(s[3].params[0]):T,Ne=A?g(s[4].params[0]):T,Ye=b?g(s[5].params[0]):T,qe=l?g(s[0].params[1]):T,ze=m?g(s[1].params[1]):T,Be=w?g(s[2].params[1]):T,Ge=d?g(s[3].params[1]):T,He=A?g(s[4].params[1]):T,Je=b?g(s[5].params[1]):T;for(let h=0;h<s.length;++h)s[h].implementation=be(s[h].params,s[h].fn);const Ke=l?s[0].implementation:P,Qe=m?s[1].implementation:P,Ve=w?s[2].implementation:P,We=d?s[3].implementation:P,Xe=A?s[4].implementation:P,Ze=b?s[5].implementation:P,$e=l?s[0].params.length:-1,et=m?s[1].params.length:-1,tt=w?s[2].params.length:-1,nt=d?s[3].params.length:-1,rt=A?s[4].params.length:-1,ot=b?s[5].params.length:-1,st=O?6:0,it=s.length,ct=s.map(h=>h.test),ft=s.map(h=>h.implementation),at=function(){for(let x=st;x<it;x++)if(ct[x](arguments))return ft[x].apply(this,arguments);return p.onMismatch(e,arguments,s)};function R(h,x){return arguments.length===$e&&B(h)&&qe(x)?Ke.apply(this,arguments):arguments.length===et&&j(h)&&ze(x)?Qe.apply(this,arguments):arguments.length===tt&&_(h)&&Be(x)?Ve.apply(this,arguments):arguments.length===nt&&Ue(h)&&Ge(x)?We.apply(this,arguments):arguments.length===rt&&Ne(h)&&He(x)?Xe.apply(this,arguments):arguments.length===ot&&Ye(h)&&Je(x)?Ze.apply(this,arguments):at.apply(this,arguments)}try{Object.defineProperty(R,"name",{value:e})}catch{}return R.signatures=i,R._typedFunctionData={signatures:s,signatureMap:u},R}function ne(e,t,n){throw $(e,t,n)}function re(e){return z(e,0,e.length-1)}function k(e){return e[e.length-1]}function z(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ie(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Re(e,t){return Array.prototype.concat.apply([],e.map(t))}function Me(){const e=re(arguments).map(n=>S(N(n))),t=k(arguments);if(typeof t!="function")throw new TypeError("Callback function expected as last argument");return oe(e,t)}function oe(e,t){return{referTo:{references:e,callback:t}}}function se(e){if(typeof e!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:e}}}function ie(e){return e&&typeof e.referTo=="object"&&Array.isArray(e.referTo.references)&&typeof e.referTo.callback=="function"}function ce(e){return e&&typeof e.referToSelf=="object"&&typeof e.referToSelf.callback=="function"}function fe(e,t){if(!e)return t;if(t&&t!==e){const n=new Error("Function names do not match (expected: "+e+", actual: "+t+")");throw n.data={actual:t,expected:e},n}return e}function _e(e){let t;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(I(e[n])||typeof e[n].signature=="string")&&(t=fe(t,e[n].name));return t}function Fe(e,t){let n;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(n in e&&t[n]!==e[n]){const r=new Error('Signature "'+n+'" is defined twice');throw r.data={signature:n,sourceFunction:t[n],destFunction:e[n]},r}e[n]=t[n]}}const Le=p;p=function(e){const t=typeof e=="string",n=t?1:0;let r=t?e:"";const i={};for(let o=n;o<arguments.length;++o){const f=arguments[o];let c={},a;if(typeof f=="function"?(a=f.name,typeof f.signature=="string"?c[f.signature]=f:I(f)&&(c=f.signatures)):J(f)&&(c=f,t||(a=_e(f))),Object.keys(c).length===0){const s=new TypeError("Argument to 'typed' at index "+o+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw s.data={index:o,argument:f},s}t||(r=fe(r,a)),Fe(i,c)}return De(r||"",i)},p.create=H,p.createCount=Le.createCount,p.onMismatch=ne,p.throwMismatchError=ne,p.createError=$,p.clear=K,p.clearConversions=me,p.addTypes=U,p._findType=v,p.referTo=Me,p.referToSelf=se,p.convert=ye,p.findSignature=V,p.find=ge,p.isTypedFunction=I,p.warnAgainstDeprecatedThis=!0,p.addType=function(e,t){let n="any";t!==!1&&E.has("Object")&&(n="Object"),p.addTypes([e],n)};function ae(e){if(!e||typeof e.from!="string"||typeof e.to!="string"||typeof e.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(e.to===e.from)throw new SyntaxError('Illegal to define conversion from "'+e.from+'" to itself.')}return p.addConversion=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{override:!1};ae(e);const n=v(e.to),r=n.conversionsTo.find(i=>i.from===e.from);if(r)if(t&&t.override)p.removeConversion({from:r.from,to:e.to,convert:r.convert});else throw new Error('There is already a conversion from "'+e.from+'" to "'+n.name+'"');n.conversionsTo.push({from:e.from,to:n.name,convert:e.convert,index:D++})},p.addConversions=function(e,t){e.forEach(n=>p.addConversion(n,t))},p.removeConversion=function(e){ae(e);const t=v(e.to),n=Ie(t.conversionsTo,i=>i.from===e.from);if(!n)throw new Error("Attempt to remove nonexistent conversion from "+e.from+" to "+e.to);if(n.convert!==e.convert)throw new Error("Conversion to remove does not match existing conversion");const r=t.conversionsTo.indexOf(n);t.conversionsTo.splice(r,1)},p.resolve=function(e,t){if(!I(e))throw new TypeError(G);const n=e._typedFunctionData.signatures;for(let r=0;r<n.length;++r)if(n[r].test(t))return n[r];return null},p}var le=H();return le})}}]);
|