jobsys-explore 1.0.1 → 1.0.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.
@@ -8,7 +8,7 @@ import { defaultFieldProps } from "../utils"
8
8
  * @version 1.0.0
9
9
  */
10
10
  export default defineComponent({
11
- name: "ExDate",
11
+ name: "ExTime",
12
12
  props: {
13
13
  ...defaultFieldProps,
14
14
 
@@ -0,0 +1,5 @@
1
+ const e = {};
2
+ export {
3
+ e as default
4
+ };
5
+ //# sourceMappingURL=__vite-browser-external-2447137e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__vite-browser-external-2447137e.js","sources":["../__vite-browser-external"],"sourcesContent":["export default {}"],"names":["__viteBrowserExternal"],"mappings":"AAAA,MAAeA,IAAA,CAAA;"}
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={};exports.default=e;
2
- //# sourceMappingURL=__vite-browser-external-b3701507.js.map
2
+ //# sourceMappingURL=__vite-browser-external-b3701507.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__vite-browser-external-b3701507.cjs","sources":["../__vite-browser-external"],"sourcesContent":["export default {}"],"names":["__viteBrowserExternal"],"mappings":"gFAAA,MAAeA,EAAA,CAAA"}
package/dist/hooks.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-b8729555.js");require("lodash-es");require("axios");require("vant");function t(){return e.sm2_exports}function o(s,u){return e.sm32(s,u)}function n(s,u,r){return e.sm4_exports.encrypt(s,u,r)}function m(s,u,r){return e.sm4_exports.encrypt(s,u,r)}exports.STATUS=e.STATUS;exports.useFetch=e.useFetch;exports.useFindLabelsFromPath=e.useFindLabelsFromPath;exports.useFindTextsFromPath=e.useFindTextsFromPath;exports.useFormFail=e.useFormFail;exports.useFormFormat=e.useFormFormat;exports.useHiddenForm=e.useHiddenForm;exports.usePage=e.usePage;exports.useProcessStatus=e.useProcessStatus;exports.useProcessStatusSuccess=e.useProcessStatusSuccess;exports.useTextFromOptionsValue=e.useTextFromOptionsValue;exports.useSm2=t;exports.useSm3=o;exports.useSm4Decrypt=m;exports.useSm4Encrypt=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-88ed539a.cjs");require("lodash-es");require("axios");require("vant");function t(){return e.sm2_exports}function o(s,u){return e.sm32(s,u)}function n(s,u,r){return e.sm4_exports.encrypt(s,u,r)}function m(s,u,r){return e.sm4_exports.encrypt(s,u,r)}exports.STATUS=e.STATUS;exports.useFetch=e.useFetch;exports.useFindLabelsFromPath=e.useFindLabelsFromPath;exports.useFindTextsFromPath=e.useFindTextsFromPath;exports.useFormFail=e.useFormFail;exports.useFormFormat=e.useFormFormat;exports.useHiddenForm=e.useHiddenForm;exports.usePage=e.usePage;exports.useProcessStatus=e.useProcessStatus;exports.useProcessStatusSuccess=e.useProcessStatusSuccess;exports.useTextFromOptionsValue=e.useTextFromOptionsValue;exports.useSm2=t;exports.useSm3=o;exports.useSm4Decrypt=m;exports.useSm4Encrypt=n;
2
2
  //# sourceMappingURL=hooks.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.cjs","sources":["../hooks/cipher.js"],"sourcesContent":["import { sm2, sm3, sm4 } from \"sm-crypto-v2\"\n\n/**\n * 国密 sm2\n */\nexport function useSm2() {\n\treturn sm2\n}\n\n/**\n * 国密 sm3 加密\n * @param msg\n * @param {Object} [options]\n * @return {*}\n */\nexport function useSm3(msg, options) {\n\treturn sm3(msg, options) // 杂凑\n}\n\n/**\n * 国密 sm4 加密\n * @param msg\n * @param key\n * @param {Object} [options]\n * @return {Uint8Array}\n */\nexport function useSm4Encrypt(msg, key, options) {\n\treturn sm4.encrypt(msg, key, options)\n}\n\n/**\n * 国密 sm4 解密\n * @param encryptData\n * @param key\n * @param {Object} [options]\n * @return {Uint8Array}\n */\nexport function useSm4Decrypt(encryptData, key, options) {\n\treturn sm4.encrypt(encryptData, key, options)\n}\n"],"names":["useSm2","sm2","useSm3","msg","options","sm3","useSm4Encrypt","key","sm4","useSm4Decrypt","encryptData"],"mappings":"6KAKO,SAASA,GAAS,CACxB,OAAOC,EAAG,WACX,CAQO,SAASC,EAAOC,EAAKC,EAAS,CACpC,OAAOC,EAAG,KAACF,EAAKC,CAAO,CACxB,CASO,SAASE,EAAcH,EAAKI,EAAKH,EAAS,CAChD,OAAOI,EAAG,YAAC,QAAQL,EAAKI,EAAKH,CAAO,CACrC,CASO,SAASK,EAAcC,EAAaH,EAAKH,EAAS,CACxD,OAAOI,EAAG,YAAC,QAAQE,EAAaH,EAAKH,CAAO,CAC7C"}
1
+ {"version":3,"file":"hooks.cjs","sources":["../hooks/cipher.js"],"sourcesContent":["import { sm2, sm3, sm4 } from \"sm-crypto-v2\"\n\n/**\n * 国密 sm2\n */\nexport function useSm2() {\n\treturn sm2\n}\n\n/**\n * 国密 sm3 加密\n * @param msg\n * @param {Object} [options]\n * @return {*}\n */\nexport function useSm3(msg, options) {\n\treturn sm3(msg, options) // 杂凑\n}\n\n/**\n * 国密 sm4 加密\n * @param msg\n * @param key\n * @param {Object} [options]\n * @return {Uint8Array}\n */\nexport function useSm4Encrypt(msg, key, options) {\n\treturn sm4.encrypt(msg, key, options)\n}\n\n/**\n * 国密 sm4 解密\n * @param encryptData\n * @param key\n * @param {Object} [options]\n * @return {Uint8Array}\n */\nexport function useSm4Decrypt(encryptData, key, options) {\n\treturn sm4.encrypt(encryptData, key, options)\n}\n"],"names":["useSm2","sm2","useSm3","msg","options","sm3","useSm4Encrypt","key","sm4","useSm4Decrypt","encryptData"],"mappings":"8KAKO,SAASA,GAAS,CACxB,OAAOC,EAAG,WACX,CAQO,SAASC,EAAOC,EAAKC,EAAS,CACpC,OAAOC,EAAG,KAACF,EAAKC,CAAO,CACxB,CASO,SAASE,EAAcH,EAAKI,EAAKH,EAAS,CAChD,OAAOI,EAAG,YAAC,QAAQL,EAAKI,EAAKH,CAAO,CACrC,CASO,SAASK,EAAcC,EAAaH,EAAKH,EAAS,CACxD,OAAOI,EAAG,YAAC,QAAQE,EAAaH,EAAKH,CAAO,CAC7C"}
package/dist/hooks.js CHANGED
@@ -1,5 +1,5 @@
1
- import { s as u, f as a, g as t } from "./index-82d74e5f.mjs";
2
- import { S as d, u as P, i as h, a as y, d as T, c as l, j as b, e as g, k as _, b as j, h as k } from "./index-82d74e5f.mjs";
1
+ import { s as u, f as a, g as t } from "./index-adf51424.js";
2
+ import { S as d, u as P, i as h, a as y, d as T, c as l, j as b, e as g, k as _, b as j, h as k } from "./index-adf51424.js";
3
3
  import "lodash-es";
4
4
  import "axios";
5
5
  import "vant";
@@ -1,2 +1,2 @@
1
- "use strict";var Fe=Object.defineProperty;var ke=(t,n,e)=>n in t?Fe(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var L=(t,n,e)=>(ke(t,typeof n!="symbol"?n+"":n,e),e);const j=require("lodash-es"),ce=require("axios"),yt=require("vant"),jt={STATE_CODE_SUCCESS:"SUCCESS",STATE_CODE_FAIL:"FAIL",STATE_CODE_NOT_FOUND:"NOT_FOUND",STATE_CODE_INFO_NOT_COMPLETE:"INCOMPLETE",STATE_CODE_NOT_ALLOWED:"NOT_ALLOWED"};function Ee(t){return t||(t={}),t.loading=!0,{get(n,e){return new Promise((o,r)=>{ce.get(n,e).then(s=>{o(s)}).catch(s=>{r(s)}).finally(()=>{t.loading=!1})})},post(n,e,o){return new Promise((r,s)=>{ce.post(n,e,o).then(c=>{r(c)}).catch(c=>{s(c)}).finally(()=>{t.loading=!1})})}}}const Ze=async(t,n,e)=>{if(t.finishedText=t.finishedText||"加载完毕",t.loading=!0,!t.uri){console.error("URI is required in pagination");return}let o={};try{yt.showToast({type:"loading",message:"加载中...",forbidClick:!0,overlay:!0,duration:0}),o=await Ee().get(t.uri,{params:{...t.params||{},page:n||!t.page?1:t.page+1}})}catch{t.loading=!1,t.finished=!1,t.error=!0;return}finally{yt.closeToast(!0)}if(o.status!==jt.STATE_CODE_SUCCESS){t.loading=!1,t.error=!0,t.errorText=o.result;return}let r;e?r=e(o):r=o.result;let s=r.data;!n&&t.items&&(s=t.items.concat(s));const c=r.current_page||r.current||r.page||1,i=r.last_page||r.lastPage||r.pages||0,l=r.total_size||r.totalSize||r.total||0;t.loading=!1,t.error=!1,t.page=c,t.items=s,t.finished=i===0||i===c,t.empty=l===0};function De(t,n){if(!n)return"";const e=n.find(o=>o.value===t);return e?e.text:""}function be(t,n,e){e=e||{value:"value",label:"label",children:"children"};let o=[];return j.reduce(n,(r,s)=>{const c=j.find(r,{[e.value]:s});if(c)return o.push(c[e.label]),c[e.children]},t),o}function Ke(t,n,e){return e=e||{value:"value",label:"text",children:"children"},be(t,n,e)}const{STATE_CODE_FAIL:ze,STATE_CODE_INFO_NOT_COMPLETE:je,STATE_CODE_NOT_FOUND:Ye,STATE_CODE_NOT_ALLOWED:Me,STATE_CODE_SUCCESS:le}=jt;function Ge(t){const{url:n,data:e,csrfToken:o}=t;let{method:r}=t;r=r||"post";const s=document.createElement("form");if(s.action=n,s.method=r,s.target="_blank",s.style.display="none",Object.keys(e).forEach(c=>{const i=document.createElement("input");i.type="hidden",i.name=c,i.value=e[c],s.appendChild(i)}),!o){const c=document.createElement("input");c.type="hidden",c.name="_token",c.value=document.querySelector('meta[name="csrf-token"]').getAttribute("content"),s.appendChild(c)}return document.body.appendChild(s),s}function ve(t,n){const{status:e}=t,o=t.result,r={};r.default="请求失败, 请检查数据并重试",r[ze]="系统错误,请稍候再试",r[Ye]="请求的内容不存在",r[je]="信息不完整",r[Me]="没有权限";const s={[le]:"success"},c=n[e]||n[s[e]]||r[e]||r.def;j.isString(c)?e===le?yt.showSuccessToast(c):yt.showFailToast(o||c):j.isFunction(c)&&c()}function We(t,n){ve(t,{success:n})}function Qe(t){t&&t.errorFields?t.errorFields.forEach(n=>{yt.showFailToast(n.errors.join(" "))}):t&&t.response?yt.showFailToast("网络异常"):yt.showFailToast("请检查填写项")}function Xe(t,n){const e=j.cloneDeep(t);n=n||{};const o=r=>{for(let s in r){if(n.date&&j.isDate(r[s])){r[s]=Math.ceil(r[s].getTime()/1e3);continue}if(n.boolean&&j.isBoolean(r[s])){r[s]=r[s]?1:0;continue}if(n.attachment){const c=n.attachment;if(j.isObject(r[s])&&j.isString(c)&&!j.isUndefined(r[s][c])){r[s]=r[s][c];continue}else if(j.isObject(r[s])&&j.isFunction(c)){r[s]=c(r[s]);continue}}if(j.isArray(r[s]))for(let c in r[s])r[s][c]=o(r[s][c])}return r};return o(e)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xe=BigInt(0),_t=BigInt(1),Je=BigInt(2),qt=t=>t instanceof Uint8Array,tn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function rt(t){if(!qt(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=tn[t[e]];return n}function $(t){const n=t.toString(16);return n.length&1?`0${n}`:n}function _(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function Bt(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const n=t.length;if(n%2)throw new Error("padded hex string expected, got unpadded hex of length "+n);const e=new Uint8Array(n/2);for(let o=0;o<e.length;o++){const r=o*2,s=t.slice(r,r+2),c=Number.parseInt(s,16);if(Number.isNaN(c)||c<0)throw new Error("Invalid byte sequence");e[o]=c}return e}function pt(t){return _(rt(t))}function Yt(t){if(!qt(t))throw new Error("Uint8Array expected");return _(rt(Uint8Array.from(t).reverse()))}function mt(t,n){return Bt(t.toString(16).padStart(n*2,"0"))}function Se(t,n){return mt(t,n).reverse()}function en(t){return Bt($(t))}function G(t,n,e){let o;if(typeof n=="string")try{o=Bt(n)}catch(s){throw new Error(`${t} must be valid hex string, got "${n}". Cause: ${s}`)}else if(qt(n))o=Uint8Array.from(n);else throw new Error(`${t} must be hex string or Uint8Array`);const r=o.length;if(typeof e=="number"&&r!==e)throw new Error(`${t} expected ${e} bytes, got ${r}`);return o}function Y(...t){const n=new Uint8Array(t.reduce((o,r)=>o+r.length,0));let e=0;return t.forEach(o=>{if(!qt(o))throw new Error("Uint8Array expected");n.set(o,e),e+=o.length}),n}function nn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}function rn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function on(t){let n;for(n=0;t>xe;t>>=_t,n+=1);return n}function sn(t,n){return t>>BigInt(n)&_t}const cn=(t,n,e)=>t|(e?_t:xe)<<BigInt(n),Mt=t=>(Je<<BigInt(t-1))-_t,$t=t=>new Uint8Array(t),ue=t=>Uint8Array.from(t);function Be(t,n,e){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let o=$t(t),r=$t(t),s=0;const c=()=>{o.fill(1),r.fill(0),s=0},i=(...f)=>e(r,o,...f),l=(f=$t())=>{r=i(ue([0]),f),o=i(),f.length!==0&&(r=i(ue([1]),f),o=i())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const m=[];for(;f<n;){o=i();const b=o.slice();m.push(b),f+=o.length}return Y(...m)};return(f,m)=>{c(),l(f);let b;for(;!(b=m(u()));)l();return c(),b}}const ln={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Ot(t,n,e={}){const o=(r,s,c)=>{const i=ln[s];if(typeof i!="function")throw new Error(`Invalid validator "${s}", expected function`);const l=t[r];if(!(c&&l===void 0)&&!i(l,t))throw new Error(`Invalid param ${String(r)}=${l} (${typeof l}), expected ${s}`)};for(const[r,s]of Object.entries(n))o(r,s,!1);for(const[r,s]of Object.entries(e))o(r,s,!0);return t}const un=Object.freeze(Object.defineProperty({__proto__:null,bitGet:sn,bitLen:on,bitMask:Mt,bitSet:cn,bytesToHex:rt,bytesToNumberBE:pt,bytesToNumberLE:Yt,concatBytes:Y,createHmacDrbg:Be,ensureBytes:G,equalBytes:nn,hexToBytes:Bt,hexToNumber:_,numberToBytesBE:mt,numberToBytesLE:Se,numberToHexUnpadded:$,numberToVarBytesBE:en,utf8ToBytes:rn,validateObject:Ot},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const V=BigInt(0),H=BigInt(1),dt=BigInt(2),fn=BigInt(3),Kt=BigInt(4),fe=BigInt(5),ae=BigInt(8);BigInt(9);BigInt(16);function k(t,n){const e=t%n;return e>=V?e:n+e}function an(t,n,e){if(e<=V||n<V)throw new Error("Expected power/modulo > 0");if(e===H)return V;let o=H;for(;n>V;)n&H&&(o=o*t%e),t=t*t%e,n>>=H;return o}function zt(t,n){if(t===V||n<=V)throw new Error(`invert: expected positive integers, got n=${t} mod=${n}`);let e=k(t,n),o=n,r=V,s=H;for(;e!==V;){const i=o/e,l=o%e,u=r-s*i;o=e,e=l,r=s,s=u}if(o!==H)throw new Error("invert: does not exist");return k(r,n)}function hn(t){const n=(t-H)/dt;let e,o,r;for(e=t-H,o=0;e%dt===V;e/=dt,o++);for(r=dt;r<t&&an(r,n,t)!==t-H;r++);if(o===1){const c=(t+H)/Kt;return function(l,u){const h=l.pow(u,c);if(!l.eql(l.sqr(h),u))throw new Error("Cannot find square root");return h}}const s=(e+H)/dt;return function(i,l){if(i.pow(l,n)===i.neg(i.ONE))throw new Error("Cannot find square root");let u=o,h=i.pow(i.mul(i.ONE,r),e),f=i.pow(l,s),m=i.pow(l,e);for(;!i.eql(m,i.ONE);){if(i.eql(m,i.ZERO))return i.ZERO;let b=1;for(let a=i.sqr(m);b<u&&!i.eql(a,i.ONE);b++)a=i.sqr(a);const g=i.pow(h,H<<BigInt(u-b-1));h=i.sqr(g),f=i.mul(f,g),m=i.mul(m,h),u=b}return f}}function dn(t){if(t%Kt===fn){const n=(t+H)/Kt;return function(o,r){const s=o.pow(r,n);if(!o.eql(o.sqr(s),r))throw new Error("Cannot find square root");return s}}if(t%ae===fe){const n=(t-fe)/ae;return function(o,r){const s=o.mul(r,dt),c=o.pow(s,n),i=o.mul(r,c),l=o.mul(o.mul(i,dt),c),u=o.mul(i,o.sub(l,o.ONE));if(!o.eql(o.sqr(u),r))throw new Error("Cannot find square root");return u}}return hn(t)}const gn=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function wn(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=gn.reduce((o,r)=>(o[r]="function",o),n);return Ot(t,e)}function yn(t,n,e){if(e<V)throw new Error("Expected power > 0");if(e===V)return t.ONE;if(e===H)return n;let o=t.ONE,r=n;for(;e>V;)e&H&&(o=t.mul(o,r)),r=t.sqr(r),e>>=H;return o}function pn(t,n){const e=new Array(n.length),o=n.reduce((s,c,i)=>t.is0(c)?s:(e[i]=s,t.mul(s,c)),t.ONE),r=t.inv(o);return n.reduceRight((s,c,i)=>t.is0(c)?s:(e[i]=t.mul(s,e[i]),t.mul(s,c)),r),e}function Gt(t,n){const e=n!==void 0?n:t.toString(2).length,o=Math.ceil(e/8);return{nBitLength:e,nByteLength:o}}function Ae(t,n,e=!1,o={}){if(t<=V)throw new Error(`Expected Fp ORDER > 0, got ${t}`);const{nBitLength:r,nByteLength:s}=Gt(t,n);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=dn(t),i=Object.freeze({ORDER:t,BITS:r,BYTES:s,MASK:Mt(r),ZERO:V,ONE:H,create:l=>k(l,t),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return V<=l&&l<t},is0:l=>l===V,isOdd:l=>(l&H)===H,neg:l=>k(-l,t),eql:(l,u)=>l===u,sqr:l=>k(l*l,t),add:(l,u)=>k(l+u,t),sub:(l,u)=>k(l-u,t),mul:(l,u)=>k(l*u,t),pow:(l,u)=>yn(i,l,u),div:(l,u)=>k(l*zt(u,t),t),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>zt(l,t),sqrt:o.sqrt||(l=>c(i,l)),invertBatch:l=>pn(i,l),cmov:(l,u,h)=>h?u:l,toBytes:l=>e?Se(l,s):mt(l,s),fromBytes:l=>{if(l.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${l.length}`);return e?Yt(l):pt(l)}});return Object.freeze(i)}function mn(t,n,e=!1){t=G("privateHash",t);const o=t.length,r=Gt(n).nByteLength+8;if(r<24||o<r||o>1024)throw new Error(`hashToPrivateScalar: expected ${r}-1024 bytes of input, got ${o}`);const s=e?Yt(t):pt(t);return k(s,n-H)+H}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const En=BigInt(0),Ft=BigInt(1);function bn(t,n){const e=(r,s)=>{const c=s.negate();return r?c:s},o=r=>{const s=Math.ceil(n/r)+1,c=2**(r-1);return{windows:s,windowSize:c}};return{constTimeNegate:e,unsafeLadder(r,s){let c=t.ZERO,i=r;for(;s>En;)s&Ft&&(c=c.add(i)),i=i.double(),s>>=Ft;return c},precomputeWindow(r,s){const{windows:c,windowSize:i}=o(s),l=[];let u=r,h=u;for(let f=0;f<c;f++){h=u,l.push(h);for(let m=1;m<i;m++)h=h.add(u),l.push(h);u=h.double()}return l},wNAF(r,s,c){const{windows:i,windowSize:l}=o(r);let u=t.ZERO,h=t.BASE;const f=BigInt(2**r-1),m=2**r,b=BigInt(r);for(let g=0;g<i;g++){const a=g*l;let w=Number(c&f);c>>=b,w>l&&(w-=m,c+=Ft);const y=a,v=a+Math.abs(w)-1,S=g%2!==0,P=w<0;w===0?h=h.add(e(S,s[y])):u=u.add(e(P,s[v]))}return{p:u,f:h}},wNAFCached(r,s,c,i){const l=r._WINDOW_SIZE||1;let u=s.get(r);return u||(u=this.precomputeWindow(r,l),l!==1&&s.set(r,i(u))),this.wNAF(l,u,c)}}}function Te(t){return wn(t.Fp),Ot(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Gt(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function vn(t){const n=Te(t);Ot(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:o,a:r}=n;if(e){if(!o.eql(r,o.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...n})}const{bytesToNumberBE:xn,hexToBytes:Sn}=un,gt={Err:class extends Error{constructor(n=""){super(n)}},_parseInt(t){const{Err:n}=gt;if(t.length<2||t[0]!==2)throw new n("Invalid signature integer tag");const e=t[1],o=t.subarray(2,e+2);if(!e||o.length!==e)throw new n("Invalid signature integer: wrong length");if(o[0]&128)throw new n("Invalid signature integer: negative");if(o[0]===0&&!(o[1]&128))throw new n("Invalid signature integer: unnecessary leading zero");return{d:xn(o),l:t.subarray(e+2)}},toSig(t){const{Err:n}=gt,e=typeof t=="string"?Sn(t):t;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let o=e.length;if(o<2||e[0]!=48)throw new n("Invalid signature tag");if(e[1]!==o-2)throw new n("Invalid signature: incorrect length");const{d:r,l:s}=gt._parseInt(e.subarray(2)),{d:c,l:i}=gt._parseInt(s);if(i.length)throw new n("Invalid signature: left bytes after parsing");return{r,s:c}},hexFromSig(t){const n=u=>Number.parseInt(u[0],16)&8?"00"+u:u,e=u=>{const h=u.toString(16);return h.length&1?`0${h}`:h},o=n(e(t.s)),r=n(e(t.r)),s=o.length/2,c=r.length/2,i=e(s),l=e(c);return`30${e(c+s+4)}02${l}${r}02${i}${o}`}},nt=BigInt(0),W=BigInt(1);BigInt(2);const he=BigInt(3);BigInt(4);function Bn(t){const n=vn(t),{Fp:e}=n,o=n.toBytes||((g,a,w)=>{const y=a.toAffine();return Y(Uint8Array.from([4]),e.toBytes(y.x),e.toBytes(y.y))}),r=n.fromBytes||(g=>{const a=g.subarray(1),w=e.fromBytes(a.subarray(0,e.BYTES)),y=e.fromBytes(a.subarray(e.BYTES,2*e.BYTES));return{x:w,y}});function s(g){const{a,b:w}=n,y=e.sqr(g),v=e.mul(y,g);return e.add(e.add(v,e.mul(g,a)),w)}if(!e.eql(e.sqr(n.Gy),s(n.Gx)))throw new Error("bad generator point: equation left != right");function c(g){return typeof g=="bigint"&&nt<g&&g<n.n}function i(g){if(!c(g))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function l(g){const{allowedPrivateKeyLengths:a,nByteLength:w,wrapPrivateKey:y,n:v}=n;if(a&&typeof g!="bigint"){if(g instanceof Uint8Array&&(g=rt(g)),typeof g!="string"||!a.includes(g.length))throw new Error("Invalid key");g=g.padStart(w*2,"0")}let S;try{S=typeof g=="bigint"?g:pt(G("private key",g,w))}catch{throw new Error(`private key must be ${w} bytes, hex or bigint, not ${typeof g}`)}return y&&(S=k(S,v)),i(S),S}const u=new Map;function h(g){if(!(g instanceof f))throw new Error("ProjectivePoint expected")}class f{constructor(a,w,y){if(this.px=a,this.py=w,this.pz=y,a==null||!e.isValid(a))throw new Error("x required");if(w==null||!e.isValid(w))throw new Error("y required");if(y==null||!e.isValid(y))throw new Error("z required")}static fromAffine(a){const{x:w,y}=a||{};if(!a||!e.isValid(w)||!e.isValid(y))throw new Error("invalid affine point");if(a instanceof f)throw new Error("projective point not allowed");const v=S=>e.eql(S,e.ZERO);return v(w)&&v(y)?f.ZERO:new f(w,y,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(a){const w=e.invertBatch(a.map(y=>y.pz));return a.map((y,v)=>y.toAffine(w[v])).map(f.fromAffine)}static fromHex(a){const w=f.fromAffine(r(G("pointHex",a)));return w.assertValidity(),w}static fromPrivateKey(a){return f.BASE.multiply(l(a))}_setWindowSize(a){this._WINDOW_SIZE=a,u.delete(this)}assertValidity(){if(this.is0()){if(n.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:a,y:w}=this.toAffine();if(!e.isValid(a)||!e.isValid(w))throw new Error("bad point: x or y not FE");const y=e.sqr(w),v=s(a);if(!e.eql(y,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:a}=this.toAffine();if(e.isOdd)return!e.isOdd(a);throw new Error("Field doesn't support isOdd")}equals(a){h(a);const{px:w,py:y,pz:v}=this,{px:S,py:P,pz:T}=a,E=e.eql(e.mul(w,T),e.mul(S,v)),x=e.eql(e.mul(y,T),e.mul(P,v));return E&&x}negate(){return new f(this.px,e.neg(this.py),this.pz)}double(){const{a,b:w}=n,y=e.mul(w,he),{px:v,py:S,pz:P}=this;let T=e.ZERO,E=e.ZERO,x=e.ZERO,A=e.mul(v,v),M=e.mul(S,S),C=e.mul(P,P),I=e.mul(v,S);return I=e.add(I,I),x=e.mul(v,P),x=e.add(x,x),T=e.mul(a,x),E=e.mul(y,C),E=e.add(T,E),T=e.sub(M,E),E=e.add(M,E),E=e.mul(T,E),T=e.mul(I,T),x=e.mul(y,x),C=e.mul(a,C),I=e.sub(A,C),I=e.mul(a,I),I=e.add(I,x),x=e.add(A,A),A=e.add(x,A),A=e.add(A,C),A=e.mul(A,I),E=e.add(E,A),C=e.mul(S,P),C=e.add(C,C),A=e.mul(C,I),T=e.sub(T,A),x=e.mul(C,M),x=e.add(x,x),x=e.add(x,x),new f(T,E,x)}add(a){h(a);const{px:w,py:y,pz:v}=this,{px:S,py:P,pz:T}=a;let E=e.ZERO,x=e.ZERO,A=e.ZERO;const M=n.a,C=e.mul(n.b,he);let I=e.mul(w,S),Z=e.mul(y,P),D=e.mul(v,T),ot=e.add(w,y),d=e.add(S,P);ot=e.mul(ot,d),d=e.add(I,Z),ot=e.sub(ot,d),d=e.add(w,v);let p=e.add(S,T);return d=e.mul(d,p),p=e.add(I,D),d=e.sub(d,p),p=e.add(y,v),E=e.add(P,T),p=e.mul(p,E),E=e.add(Z,D),p=e.sub(p,E),A=e.mul(M,d),E=e.mul(C,D),A=e.add(E,A),E=e.sub(Z,A),A=e.add(Z,A),x=e.mul(E,A),Z=e.add(I,I),Z=e.add(Z,I),D=e.mul(M,D),d=e.mul(C,d),Z=e.add(Z,D),D=e.sub(I,D),D=e.mul(M,D),d=e.add(d,D),I=e.mul(Z,d),x=e.add(x,I),I=e.mul(p,d),E=e.mul(ot,E),E=e.sub(E,I),I=e.mul(ot,Z),A=e.mul(p,A),A=e.add(A,I),new f(E,x,A)}subtract(a){return this.add(a.negate())}is0(){return this.equals(f.ZERO)}wNAF(a){return b.wNAFCached(this,u,a,w=>{const y=e.invertBatch(w.map(v=>v.pz));return w.map((v,S)=>v.toAffine(y[S])).map(f.fromAffine)})}multiplyUnsafe(a){const w=f.ZERO;if(a===nt)return w;if(i(a),a===W)return this;const{endo:y}=n;if(!y)return b.unsafeLadder(this,a);let{k1neg:v,k1:S,k2neg:P,k2:T}=y.splitScalar(a),E=w,x=w,A=this;for(;S>nt||T>nt;)S&W&&(E=E.add(A)),T&W&&(x=x.add(A)),A=A.double(),S>>=W,T>>=W;return v&&(E=E.negate()),P&&(x=x.negate()),x=new f(e.mul(x.px,y.beta),x.py,x.pz),E.add(x)}multiply(a){i(a);let w=a,y,v;const{endo:S}=n;if(S){const{k1neg:P,k1:T,k2neg:E,k2:x}=S.splitScalar(w);let{p:A,f:M}=this.wNAF(T),{p:C,f:I}=this.wNAF(x);A=b.constTimeNegate(P,A),C=b.constTimeNegate(E,C),C=new f(e.mul(C.px,S.beta),C.py,C.pz),y=A.add(C),v=M.add(I)}else{const{p:P,f:T}=this.wNAF(w);y=P,v=T}return f.normalizeZ([y,v])[0]}multiplyAndAddUnsafe(a,w,y){const v=f.BASE,S=(T,E)=>E===nt||E===W||!T.equals(v)?T.multiplyUnsafe(E):T.multiply(E),P=S(this,w).add(S(a,y));return P.is0()?void 0:P}toAffine(a){const{px:w,py:y,pz:v}=this,S=this.is0();a==null&&(a=S?e.ONE:e.inv(v));const P=e.mul(w,a),T=e.mul(y,a),E=e.mul(v,a);if(S)return{x:e.ZERO,y:e.ZERO};if(!e.eql(E,e.ONE))throw new Error("invZ was invalid");return{x:P,y:T}}isTorsionFree(){const{h:a,isTorsionFree:w}=n;if(a===W)return!0;if(w)return w(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:a,clearCofactor:w}=n;return a===W?this:w?w(f,this):this.multiplyUnsafe(n.h)}toRawBytes(a=!0){return this.assertValidity(),o(f,this,a)}toHex(a=!0){return rt(this.toRawBytes(a))}}f.BASE=new f(n.Gx,n.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);const m=n.nBitLength,b=bn(f,n.endo?Math.ceil(m/2):m);return{CURVE:n,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:c}}function An(t){const n=Te(t);return Ot(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function Tn(t){const n=An(t),{Fp:e,n:o}=n,r=e.BYTES+1,s=2*e.BYTES+1;function c(d){return nt<d&&d<e.ORDER}function i(d){return k(d,o)}function l(d){return zt(d,o)}const{ProjectivePoint:u,normPrivateKeyToScalar:h,weierstrassEquation:f,isWithinCurveOrder:m}=Bn({...n,toBytes(d,p,B){const U=p.toAffine(),O=e.toBytes(U.x),R=Y;return B?R(Uint8Array.from([p.hasEvenY()?2:3]),O):R(Uint8Array.from([4]),O,e.toBytes(U.y))},fromBytes(d){const p=d.length,B=d[0],U=d.subarray(1);if(p===r&&(B===2||B===3)){const O=pt(U);if(!c(O))throw new Error("Point is not on curve");const R=f(O);let K=e.sqrt(R);const z=(K&W)===W;return(B&1)===1!==z&&(K=e.neg(K)),{x:O,y:K}}else if(p===s&&B===4){const O=e.fromBytes(U.subarray(0,e.BYTES)),R=e.fromBytes(U.subarray(e.BYTES,2*e.BYTES));return{x:O,y:R}}else throw new Error(`Point of length ${p} was invalid. Expected ${r} compressed bytes or ${s} uncompressed bytes`)}}),b=d=>rt(mt(d,n.nByteLength));function g(d){const p=o>>W;return d>p}function a(d){return g(d)?i(-d):d}const w=(d,p,B)=>pt(d.slice(p,B));class y{constructor(p,B,U){this.r=p,this.s=B,this.recovery=U,this.assertValidity()}static fromCompact(p){const B=n.nByteLength;return p=G("compactSignature",p,B*2),new y(w(p,0,B),w(p,B,2*B))}static fromDER(p){const{r:B,s:U}=gt.toSig(G("DER",p));return new y(B,U)}assertValidity(){if(!m(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!m(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(p){return new y(this.r,this.s,p)}recoverPublicKey(p){const{r:B,s:U,recovery:O}=this,R=x(G("msgHash",p));if(O==null||![0,1,2,3].includes(O))throw new Error("recovery id invalid");const K=O===2||O===3?B+n.n:B;if(K>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const z=O&1?"03":"02",st=u.fromHex(z+b(K)),it=l(K),Et=i(-R*it),Pt=i(U*it),ct=u.BASE.multiplyAndAddUnsafe(st,Et,Pt);if(!ct)throw new Error("point at infinify");return ct.assertValidity(),ct}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Bt(this.toDERHex())}toDERHex(){return gt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Bt(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}const v={isValidPrivateKey(d){try{return h(d),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const d=n.randomBytes(e.BYTES+8),p=mn(d,o);return mt(p,n.nByteLength)},precompute(d=8,p=u.BASE){return p._setWindowSize(d),p.multiply(BigInt(3)),p}};function S(d,p=!0){return u.fromPrivateKey(d).toRawBytes(p)}function P(d){const p=d instanceof Uint8Array,B=typeof d=="string",U=(p||B)&&d.length;return p?U===r||U===s:B?U===2*r||U===2*s:d instanceof u}function T(d,p,B=!0){if(P(d))throw new Error("first arg must be private key");if(!P(p))throw new Error("second arg must be public key");return u.fromHex(p).multiply(h(d)).toRawBytes(B)}const E=n.bits2int||function(d){const p=pt(d),B=d.length*8-n.nBitLength;return B>0?p>>BigInt(B):p},x=n.bits2int_modN||function(d){return i(E(d))},A=Mt(n.nBitLength);function M(d){if(typeof d!="bigint")throw new Error("bigint expected");if(!(nt<=d&&d<A))throw new Error(`bigint expected < 2^${n.nBitLength}`);return mt(d,n.nByteLength)}function C(d,p,B=I){if(["recovered","canonical"].some(at=>at in B))throw new Error("sign() legacy options not supported");const{hash:U,randomBytes:O}=n;let{lowS:R,prehash:K,extraEntropy:z}=B;R==null&&(R=!0),d=G("msgHash",d),K&&(d=G("prehashed msgHash",U(d)));const st=x(d),it=h(p),Et=[M(it),M(st)];if(z!=null){const at=z===!0?O(e.BYTES):z;Et.push(G("extraEntropy",at,e.BYTES))}const Pt=Y(...Et),ct=st;function Vt(at){const bt=E(at);if(!m(bt))return;const oe=l(bt),vt=u.BASE.multiply(bt).toAffine(),X=i(vt.x);if(X===nt)return;const xt=i(oe*i(ct+X*it));if(xt===nt)return;let se=(vt.x===X?0:2)|Number(vt.y&W),ie=xt;return R&&g(xt)&&(ie=a(xt),se^=1),new y(X,ie,se)}return{seed:Pt,k2sig:Vt}}const I={lowS:n.lowS,prehash:!1},Z={lowS:n.lowS,prehash:!1};function D(d,p,B=I){const{seed:U,k2sig:O}=C(d,p,B),R=n;return Be(R.hash.outputLen,R.nByteLength,R.hmac)(U,O)}u.BASE._setWindowSize(8);function ot(d,p,B,U=Z){var vt;const O=d;if(p=G("msgHash",p),B=G("publicKey",B),"strict"in U)throw new Error("options.strict was renamed to lowS");const{lowS:R,prehash:K}=U;let z,st;try{if(typeof O=="string"||O instanceof Uint8Array)try{z=y.fromDER(O)}catch(X){if(!(X instanceof gt.Err))throw X;z=y.fromCompact(O)}else if(typeof O=="object"&&typeof O.r=="bigint"&&typeof O.s=="bigint"){const{r:X,s:xt}=O;z=new y(X,xt)}else throw new Error("PARSE");st=u.fromHex(B)}catch(X){if(X.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(R&&z.hasHighS())return!1;K&&(p=n.hash(p));const{r:it,s:Et}=z,Pt=x(p),ct=l(Et),Vt=i(Pt*ct),at=i(it*ct),bt=(vt=u.BASE.multiplyAndAddUnsafe(st,Vt,at))==null?void 0:vt.toAffine();return bt?i(bt.x)===it:!1}return{CURVE:n,getPublicKey:S,getSharedSecret:T,sign:D,verify:ot,ProjectivePoint:u,Signature:y,utils:v}}var Pn=Object.defineProperty,Pe=(t,n)=>{for(var e in n)Pn(t,e,{get:n[e],enumerable:!0})},Ie={};Pe(Ie,{EmptyArray:()=>ee,arrayToHex:()=>Rt,arrayToUtf8:()=>te,calculateSharedKey:()=>Jn,comparePublicKeyHex:()=>Qn,compressPublicKeyHex:()=>Gn,doDecrypt:()=>er,doEncrypt:()=>tr,doSignature:()=>nr,doVerifySignature:()=>rr,generateKeyPairHex:()=>Jt,getHash:()=>ne,getPoint:()=>Re,getPublicKeyFromPrivateKey:()=>qe,getZ:()=>Ht,hexToArray:()=>F,initRNGPool:()=>Wt,leftPad:()=>q,precomputePublicKey:()=>or,utf8ToHex:()=>Tt,verifyPublicKey:()=>Wn});var Lt=BigInt(0),It=BigInt(1),In=BigInt(2);BigInt(3);function On(t){let n=t.toString(16);if(n[0]!=="-")n.length%2===1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{n=n.substring(1);let e=n.length;e%2===1?e+=1:n.match(/^[0-7]/)||(e+=2);let o="";for(let c=0;c<e;c++)o+="f";n=((_(o)^t)+It).toString(16).replace(/^-/,"")}return n}var Oe=class{constructor(t=null,n="00",e="00",o=""){this.tlv=t,this.t=n,this.l=e,this.v=o}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let n=t.toString(16);return n.length%2===1&&(n="0"+n),t<128?n:(128+n.length/2).toString(16)+n}getValue(){return""}},de=class extends Oe{constructor(t){super(),this.t="02",t&&(this.v=On(t))}getValue(){return this.v}},Un=class extends Oe{constructor(n){super();L(this,"t","30");this.asn1Array=n}getValue(){return this.v=this.asn1Array.map(n=>n.getEncodedHex()).join(""),this.v}};function Ue(t,n){return+t[n+2]<8?1:+t.substring(n+2,n+4)&127+1}function ge(t,n){const e=Ue(t,n),o=t.substring(n+2,n+2+e*2);return o?+(+o[0]<8?_(o):_(o.substring(2))).toString():-1}function kt(t,n){const e=Ue(t,n);return n+(e+1)*2}function Cn(t,n){const e=new de(t),o=new de(n);return new Un([e,o]).getEncodedHex()}function Nn(t){const n=kt(t,0),e=kt(t,n),o=ge(t,n),r=t.substr(e,o*2),s=e+r.length,c=kt(t,s),i=ge(t,s),l=t.substring(c,c+i*2),u=_(r),h=_(l);return{r:u,s:h}}var Zt=16384,wt=new Uint8Array(0),St;async function Wt(){if("crypto"in globalThis){St=globalThis.crypto;return}if(!(wt.length>Zt/2))if("wx"in globalThis&&"getRandomValues"in globalThis.wx)wt=await new Promise(t=>{wx.getRandomValues({length:Zt,success(n){t(new Uint8Array(n.randomValues))}})});else try{globalThis.crypto?St=globalThis.crypto:St=(await Promise.resolve().then(()=>require("./__vite-browser-external-b3701507.js"))).webcrypto;const t=new Uint8Array(Zt);St.getRandomValues(t),wt=t}catch{throw new Error("no available csprng, abort.")}}Wt();function Ln(t){if(wt.length>t){const n=wt.slice(0,t);return wt=wt.slice(t),Wt(),n}else throw new Error("random number pool is not ready or insufficient, prevent getting too long random values or too often.")}function Hn(t=0){const n=new Uint8Array(t);return St?St.getRandomValues(n):Ln(t)}var Ce=t=>t instanceof Uint8Array,Dt=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),_n=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!_n)throw new Error("Non little-endian hardware is not supported");var qn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function At(t){if(!Ce(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=qn[t[e]];return n}function Rn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Qt(t){if(typeof t=="string"&&(t=Rn(t)),!Ce(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}var Ne=class{clone(){return this._cloneInto()}};function Vn(t){const n=o=>t().update(Qt(o)).digest(),e=t();return n.outputLen=e.outputLen,n.blockLen=e.blockLen,n.create=()=>t(),n}var $n=(t,n,e)=>t&n|t&e|n&e,we=(t,n,e)=>t^n^e,Fn=(t,n,e)=>t&n|~t&e;function kn(t,n,e,o){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,o);const r=BigInt(32),s=BigInt(4294967295),c=Number(e>>r&s),i=Number(e&s),l=o?4:0,u=o?0:4;t.setUint32(n+l,c,o),t.setUint32(n+u,i,o)}function Q(t,n){const e=n&31;return t<<e|t>>>32-e}function Zn(t){return t^Q(t,9)^Q(t,17)}function Dn(t){return t^Q(t,15)^Q(t,23)}var Kn=class extends Ne{constructor(n,e,o,r){super();L(this,"buffer");L(this,"view");L(this,"finished",!1);L(this,"length",0);L(this,"pos",0);L(this,"destroyed",!1);this.blockLen=n,this.outputLen=e,this.padOffset=o,this.isLE=r,this.buffer=new Uint8Array(n),this.view=Dt(this.buffer)}update(n){const{view:e,buffer:o,blockLen:r}=this;n=Qt(n);const s=n.length;for(let c=0;c<s;){const i=Math.min(r-this.pos,s-c);if(i===r){const l=Dt(n);for(;r<=s-c;c+=r)this.process(l,c);continue}o.set(n.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===r&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){this.finished=!0;const{buffer:e,view:o,blockLen:r,isLE:s}=this;let{pos:c}=this;e[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>r-c&&(this.process(o,0),c=0);for(let f=c;f<r;f++)e[f]=0;kn(o,r-8,BigInt(this.length*8),s),this.process(o,0);const i=Dt(n),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)i.setUint32(4*f,h[f],s)}digest(){const{buffer:n,outputLen:e}=this;this.digestInto(n);const o=n.slice(0,e);return this.destroy(),o}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:e,buffer:o,length:r,finished:s,destroyed:c,pos:i}=this;return n.length=r,n.pos=i,n.finished=s,n.destroyed=c,r%e&&n.buffer.set(o),n}},lt=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),J=new Uint32Array(68),ye=new Uint32Array(64),zn=2043430169,jn=2055708042,Yn=class extends Kn{constructor(){super(64,32,8,!1);L(this,"A",lt[0]|0);L(this,"B",lt[1]|0);L(this,"C",lt[2]|0);L(this,"D",lt[3]|0);L(this,"E",lt[4]|0);L(this,"F",lt[5]|0);L(this,"G",lt[6]|0);L(this,"H",lt[7]|0)}get(){const{A:n,B:e,C:o,D:r,E:s,F:c,G:i,H:l}=this;return[n,e,o,r,s,c,i,l]}set(n,e,o,r,s,c,i,l){this.A=n|0,this.B=e|0,this.C=o|0,this.D=r|0,this.E=s|0,this.F=c|0,this.G=i|0,this.H=l|0}process(n,e){for(let f=0;f<16;f++,e+=4)J[f]=n.getUint32(e,!1);for(let f=16;f<68;f++)J[f]=Dn(J[f-16]^J[f-9]^Q(J[f-3],15))^Q(J[f-13],7)^J[f-6];for(let f=0;f<64;f++)ye[f]=J[f]^J[f+4];let{A:o,B:r,C:s,D:c,E:i,F:l,G:u,H:h}=this;for(let f=0;f<64;f++){let m=f>=0&&f<=15,b=m?zn:jn,g=Q(Q(o,12)+i+Q(b,f),7),a=g^Q(o,12),w=(m?we(o,r,s):$n(o,r,s))+c+a+ye[f]|0,y=(m?we(i,l,u):Fn(i,l,u))+h+g+J[f]|0;c=s,s=Q(r,9),r=o,o=w,h=u,u=Q(l,19),l=i,i=Zn(y)}o=o^this.A|0,r=r^this.B|0,s=s^this.C|0,c=c^this.D|0,i=i^this.E|0,l=l^this.F|0,u=u^this.G|0,h=h^this.H|0,this.set(o,r,s,c,i,l,u,h)}roundClean(){J.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},et=Vn(()=>new Yn),Le=class extends Ne{constructor(n,e){super();L(this,"oHash");L(this,"iHash");L(this,"blockLen");L(this,"outputLen");L(this,"finished",!1);L(this,"destroyed",!1);const o=Qt(e);if(this.iHash=n.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,s=new Uint8Array(r);s.set(o.length>r?n.create().update(o).digest():o);for(let c=0;c<s.length;c++)s[c]^=54;this.iHash.update(s),this.oHash=n.create();for(let c=0;c<s.length;c++)s[c]^=106;this.oHash.update(s),s.fill(0)}update(n){return this.iHash.update(n),this}digestInto(n){this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:o,finished:r,destroyed:s,blockLen:c,outputLen:i}=this;return n=n,n.finished=r,n.destroyed=s,n.blockLen=c,n.outputLen=i,n.oHash=e._cloneInto(n.oHash),n.iHash=o._cloneInto(n.iHash),n}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Xt=(t,n,e)=>new Le(t,n).update(e).digest();Xt.create=(t,n)=>new Le(t,n);var Mn=Ae(BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991999")),N=Tn({a:BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991996"),b:BigInt("18505919022281880113072981827955639221458448578012075254857346196103069175443"),Fp:Mn,h:It,n:BigInt("115792089210356248756420345214020892766061623724957744567843809356293439045923"),Gx:BigInt("22963146547237050559479531362550074578802567295341616970375194840604139615431"),Gy:BigInt("85132369209828568825618990617112496413088388631904505083283536607588877201568"),hash:et,hmac:(t,...n)=>Xt(et,t,Y(...n)),randomBytes:Hn}),tt=Ae(BigInt(N.CURVE.n));function Jt(t){const n=t?mt(k(BigInt(t),It)+It,32):N.utils.randomPrivateKey(),e=N.getPublicKey(n,!1),o=q(rt(n),64),r=q(rt(e),64);return{privateKey:o,publicKey:r}}function Gn(t){if(t.length!==130)throw new Error("Invalid public key to compress");const n=(t.length-2)/2,e=t.substring(2,2+n),o=_(t.substring(n+2,n+n+2));let r="03";return k(o,In)===Lt&&(r="02"),r+e}function Tt(t){t=decodeURIComponent(encodeURIComponent(t));const n=t.length,e=new Uint32Array((n>>>2)+1);for(let r=0;r<n;r++)e[r>>>2]|=(t.charCodeAt(r)&255)<<24-r%4*8;const o=[];for(let r=0;r<n;r++){const s=e[r>>>2]>>>24-r%4*8&255;o.push((s>>>4).toString(16)),o.push((s&15).toString(16))}return o.join("")}function q(t,n){return t.length>=n?t:new Array(n-t.length+1).join("0")+t}function Rt(t){return t.map(n=>{const e=n.toString(16);return e.length===1?"0"+e:e}).join("")}function te(t){const n=[];for(let e=0,o=t.length;e<o;e++)t[e]>=240&&t[e]<=247?(n.push(String.fromCodePoint(((t[e]&7)<<18)+((t[e+1]&63)<<12)+((t[e+2]&63)<<6)+(t[e+3]&63))),e+=3):t[e]>=224&&t[e]<=239?(n.push(String.fromCodePoint(((t[e]&15)<<12)+((t[e+1]&63)<<6)+(t[e+2]&63))),e+=2):t[e]>=192&&t[e]<=223?(n.push(String.fromCodePoint(((t[e]&31)<<6)+(t[e+1]&63))),e++):n.push(String.fromCodePoint(t[e]));return n.join("")}function F(t){let n=t.length;n%2!==0&&(t=q(t,n+1)),n=t.length;const e=n/2,o=new Uint8Array(e);for(let r=0;r<e;r++)o[r]=parseInt(t.substring(r*2,r*2+2),16);return o}function Wn(t){const n=N.ProjectivePoint.fromHex(t);if(!n)return!1;try{return n.assertValidity(),!0}catch{return!1}}function Qn(t,n){const e=N.ProjectivePoint.fromHex(t);if(!e)return!1;const o=N.ProjectivePoint.fromHex(n);return o?e.equals(o):!1}var pe=_("80000000000000000000000000000000"),me=_("7fffffffffffffffffffffffffffffff");function Xn(t,n){let e=new Uint8Array(n),o=1,r=0,s=ee;const c=new Uint8Array(4),i=()=>{c[0]=o>>24&255,c[1]=o>>16&255,c[2]=o>>8&255,c[3]=o&255,s=et(Y(t,c)),o++,r=0};i();for(let l=0,u=e.length;l<u;l++)r===s.length&&i(),e[l]=s[r++]&255;return e}function Jn(t,n,e,o,r,s=!1,c="1234567812345678",i="1234567812345678"){const l=N.ProjectivePoint.fromHex(n.publicKey),u=N.ProjectivePoint.fromHex(o),h=N.ProjectivePoint.fromHex(e);let f=Ht(t.publicKey,c),m=Ht(e,i);s&&([f,m]=[m,f]);const b=_(n.privateKey),g=_(t.privateKey),a=l.x,w=pe+(a&me),y=tt.add(g,tt.mulN(w,b)),v=u.x,S=tt.add(pe,v&me),P=u.multiply(S).add(h).multiply(y),T=F(q($(P.x),64)),E=F(q($(P.y),64));return Xn(Y(T,E,f,m),r)}var He=0,ee=new Uint8Array;function tr(t,n,e=1){const o=typeof t=="string"?F(Tt(t)):Uint8Array.from(t),r=typeof n=="string"?N.ProjectivePoint.fromHex(n):n,s=Jt(),c=_(s.privateKey);let i=s.publicKey;i.length>128&&(i=i.substring(i.length-128));const l=r.multiply(c),u=F(q($(l.x),64)),h=F(q($(l.y),64)),f=At(et(Y(u,o,h)));_e(u,h,o);const m=At(o);return e===He?i+m+f:i+f+m}function _e(t,n,e){let o=1,r=0,s=ee;const c=new Uint8Array(4),i=()=>{c[0]=o>>24&255,c[1]=o>>16&255,c[2]=o>>8&255,c[3]=o&255,s=et(Y(t,n,c)),o++,r=0};i();for(let l=0,u=e.length;l<u;l++)r===s.length&&i(),e[l]^=s[r++]&255}function er(t,n,e=1,{output:o="string"}={}){const r=_(n);let s=t.substring(128,128+64),c=t.substring(128+64);e===He&&(s=t.substring(t.length-64),c=t.substring(128,t.length-64));const i=F(c),u=N.ProjectivePoint.fromHex("04"+t.substring(0,128)).multiply(r),h=F(q($(u.x),64)),f=F(q($(u.y),64));return _e(h,f,i),Rt(Array.from(et(Y(h,i,f))))===s.toLowerCase()?o==="array"?i:te(i):o==="array"?[]:""}function nr(t,n,e={}){let{pointPool:o,der:r,hash:s,publicKey:c,userId:i}=e,l=typeof t=="string"?Tt(t):Rt(Array.from(t));s&&(c=c||qe(n),l=ne(l,c,i));const u=_(n),h=_(l);let f=null,m=null,b=null;do{do{let g;o&&o.length?g=o.pop():g=Re(),f=g.k,m=tt.add(h,g.x1)}while(m===Lt||m+f===N.CURVE.n);b=tt.mul(tt.inv(tt.addN(u,It)),tt.subN(f,tt.mulN(m,u)))}while(b===Lt);return r?Cn(m,b):q($(m),64)+q($(b),64)}function rr(t,n,e,o={}){let r;const{hash:s,der:c,userId:i}=o,l=typeof e=="string"?e:e.toHex(!1);s?r=ne(typeof t=="string"?Tt(t):t,l,i):r=typeof t=="string"?Tt(t):Rt(Array.from(t));let u,h;if(c){const w=Nn(n);u=w.r,h=w.s}else u=_(n.substring(0,64)),h=_(n.substring(64));const f=typeof e=="string"?N.ProjectivePoint.fromHex(e):e,m=_(r),b=tt.add(u,h);if(b===Lt)return!1;const g=N.ProjectivePoint.BASE.multiply(h).add(f.multiply(b)),a=tt.add(m,g.x);return u===a}function Ht(t,n="1234567812345678"){n=Tt(n);const e=q($(N.CURVE.a),64),o=q($(N.CURVE.b),64),r=q($(N.ProjectivePoint.BASE.x),64),s=q($(N.ProjectivePoint.BASE.y),64);let c,i;if(t.length===128)c=t.substring(0,64),i=t.substring(64,128);else{const f=N.ProjectivePoint.fromHex(t);c=q($(f.x),64),i=q($(f.y),64)}const l=F(n+e+o+r+s+c+i),u=n.length*4;return et(Y(new Uint8Array([u>>8&255,u&255]),l))}function ne(t,n,e="1234567812345678"){const o=Ht(n,e);return At(et(Y(o,typeof t=="string"?F(t):t)))}function or(t,n){const e=N.ProjectivePoint.fromHex(t);return N.utils.precompute(n,e)}function qe(t){const n=N.getPublicKey(t,!1);return q(rt(n),64)}function Re(){const t=Jt(),n=N.ProjectivePoint.fromHex(t.publicKey),e=_(t.privateKey);return{...t,k:e,x1:n.x}}function Ve(t){const n=[];for(let e=0,o=t.length;e<o;e++){const r=t.codePointAt(e);if(r<=127)n.push(r);else if(r<=2047)n.push(192|r>>>6),n.push(128|r&63);else if(r<=55295||r>=57344&&r<=65535)n.push(224|r>>>12),n.push(128|r>>>6&63),n.push(128|r&63);else if(r>=65536&&r<=1114111)e++,n.push(240|r>>>18&28),n.push(128|r>>>12&63),n.push(128|r>>>6&63),n.push(128|r&63);else throw n.push(r),new Error("input is not supported")}return new Uint8Array(n)}function sr(t,n){if(t=typeof t=="string"?Ve(t):t,n){if((n.mode||"hmac")!=="hmac")throw new Error("invalid mode");let o=n.key;if(!o)throw new Error("invalid key");return o=typeof o=="string"?F(o):o,At(Xt(et,o,t))}return At(et(t))}var $e={};Pe($e,{decrypt:()=>fr,encrypt:()=>ur,sm4:()=>re});var ut=0,ir=32,ht=16,Ut=Uint8Array.from([214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]),Ct=new Uint32Array([462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257]);function ft(t){return(Ut[t>>>24&255]&255)<<24|(Ut[t>>>16&255]&255)<<16|(Ut[t>>>8&255]&255)<<8|Ut[t&255]&255}function cr(t,n,e){let o=0,r=0,s=0,c=0,i=0,l=0,u=0,h=0;i=t[0]&255,l=t[1]&255,u=t[2]&255,h=t[3]&255,o=i<<24|l<<16|u<<8|h,i=t[4]&255,l=t[5]&255,u=t[6]&255,h=t[7]&255,r=i<<24|l<<16|u<<8|h,i=t[8]&255,l=t[9]&255,u=t[10]&255,h=t[11]&255,s=i<<24|l<<16|u<<8|h,i=t[12]&255,l=t[13]&255,u=t[14]&255,h=t[15]&255,c=i<<24|l<<16|u<<8|h;for(let f=0;f<32;f+=4)i=r^s^c^e[f],i=ft(i),o^=i^(i<<2|i>>>30)^(i<<10|i>>>22)^(i<<18|i>>>14)^(i<<24|i>>>8),l=s^c^o^e[f+1],l=ft(l),r^=l^(l<<2|l>>>30)^(l<<10|l>>>22)^(l<<18|l>>>14)^(l<<24|l>>>8),u=c^o^r^e[f+2],u=ft(u),s^=u^(u<<2|u>>>30)^(u<<10|u>>>22)^(u<<18|u>>>14)^(u<<24|u>>>8),h=o^r^s^e[f+3],h=ft(h),c^=h^(h<<2|h>>>30)^(h<<10|h>>>22)^(h<<18|h>>>14)^(h<<24|h>>>8);n[0]=c>>>24&255,n[1]=c>>>16&255,n[2]=c>>>8&255,n[3]=c&255,n[4]=s>>>24&255,n[5]=s>>>16&255,n[6]=s>>>8&255,n[7]=s&255,n[8]=r>>>24&255,n[9]=r>>>16&255,n[10]=r>>>8&255,n[11]=r&255,n[12]=o>>>24&255,n[13]=o>>>16&255,n[14]=o>>>8&255,n[15]=o&255}function lr(t,n,e){let o=0,r=0,s=0,c=0,i=0;o=(t[0]&255)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255,r=(t[4]&255)<<24|(t[5]&255)<<16|(t[6]&255)<<8|t[7]&255,s=(t[8]&255)<<24|(t[9]&255)<<16|(t[10]&255)<<8|t[11]&255,c=(t[12]&255)<<24|(t[13]&255)<<16|(t[14]&255)<<8|t[15]&255,o^=2746333894,r^=1453994832,s^=1736282519,c^=2993693404;for(let l=0;l<32;l+=4)i=r^s^c^Ct[l+0],i=ft(i),o^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+0]=o,i=s^c^o^Ct[l+1],i=ft(i),r^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+1]=r,i=c^o^r^Ct[l+2],i=ft(i),s^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+2]=s,i=o^r^s^Ct[l+3],i=ft(i),c^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+3]=c;if(e===ut)for(let l=0;l<16;l++)[n[l],n[31-l]]=[n[31-l],n[l]]}var Nt=new Uint8Array(16);function re(t,n,e,o={}){let{padding:r="pkcs#7",mode:s,iv:c=new Uint8Array(16),output:i}=o;if(s==="cbc"&&(typeof c=="string"&&(c=F(c)),c.length!==128/8))throw new Error("iv is invalid");if(typeof n=="string"&&(n=F(n)),n.length!==128/8)throw new Error("key is invalid");if(typeof t=="string"?e!==ut?t=Ve(t):t=F(t):t=Uint8Array.from(t),(r==="pkcs#5"||r==="pkcs#7")&&e!==ut){const b=ht-t.length%ht,g=new Uint8Array(t.length+b);g.set(t,0);for(let a=0;a<b;a++)g[t.length+a]=b;t=g}const l=new Uint32Array(ir);lr(n,l,e);let u=new Uint8Array(t.length),h=c,f=t.length,m=0;for(;f>=ht;){const b=t.subarray(m,m+16);if(s==="cbc")for(let g=0;g<ht;g++)e!==ut&&(b[g]^=h[g]);cr(b,Nt,l);for(let g=0;g<ht;g++)s==="cbc"&&e===ut&&(Nt[g]^=h[g]),u[m+g]=Nt[g];s==="cbc"&&(e!==ut?h=Nt:h=b),f-=ht,m+=ht}if((r==="pkcs#5"||r==="pkcs#7")&&e===ut){const b=u.length,g=u[b-1];for(let a=1;a<=g;a++)if(u[b-a]!==g)throw new Error("padding is invalid");u=u.slice(0,b-g)}return i!=="array"?e!==ut?At(u):te(u):u}function ur(t,n,e={}){return re(t,n,1,e)}function fr(t,n,e={}){return re(t,n,0,e)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */exports.STATUS=jt;exports.sm2_exports=Ie;exports.sm32=sr;exports.sm4_exports=$e;exports.useFetch=Ee;exports.useFindLabelsFromPath=be;exports.useFindTextsFromPath=Ke;exports.useFormFail=Qe;exports.useFormFormat=Xe;exports.useHiddenForm=Ge;exports.usePage=Ze;exports.useProcessStatus=ve;exports.useProcessStatusSuccess=We;exports.useTextFromOptionsValue=De;
2
- //# sourceMappingURL=index-b8729555.js.map
1
+ "use strict";var Fe=Object.defineProperty;var ke=(t,n,e)=>n in t?Fe(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var L=(t,n,e)=>(ke(t,typeof n!="symbol"?n+"":n,e),e);const j=require("lodash-es"),ce=require("axios"),yt=require("vant"),jt={STATE_CODE_SUCCESS:"SUCCESS",STATE_CODE_FAIL:"FAIL",STATE_CODE_NOT_FOUND:"NOT_FOUND",STATE_CODE_INFO_NOT_COMPLETE:"INCOMPLETE",STATE_CODE_NOT_ALLOWED:"NOT_ALLOWED"};function Ee(t){return t||(t={}),t.loading=!0,{get(n,e){return new Promise((o,r)=>{ce.get(n,e).then(s=>{o(s)}).catch(s=>{r(s)}).finally(()=>{t.loading=!1})})},post(n,e,o){return new Promise((r,s)=>{ce.post(n,e,o).then(c=>{r(c)}).catch(c=>{s(c)}).finally(()=>{t.loading=!1})})}}}const Ze=async(t,n,e)=>{if(t.finishedText=t.finishedText||"加载完毕",t.loading=!0,!t.uri){console.error("URI is required in pagination");return}let o={};try{yt.showToast({type:"loading",message:"加载中...",forbidClick:!0,overlay:!0,duration:0}),o=await Ee().get(t.uri,{params:{...t.params||{},page:n||!t.page?1:t.page+1}})}catch{t.loading=!1,t.finished=!1,t.error=!0;return}finally{yt.closeToast(!0)}if(o.status!==jt.STATE_CODE_SUCCESS){t.loading=!1,t.error=!0,t.errorText=o.result;return}let r;e?r=e(o):r=o.result;let s=r.data;!n&&t.items&&(s=t.items.concat(s));const c=r.current_page||r.current||r.page||1,i=r.last_page||r.lastPage||r.pages||0,l=r.total_size||r.totalSize||r.total||0;t.loading=!1,t.error=!1,t.page=c,t.items=s,t.finished=i===0||i===c,t.empty=l===0};function De(t,n){if(!n)return"";const e=n.find(o=>o.value===t);return e?e.text:""}function be(t,n,e){e=e||{value:"value",label:"label",children:"children"};let o=[];return j.reduce(n,(r,s)=>{const c=j.find(r,{[e.value]:s});if(c)return o.push(c[e.label]),c[e.children]},t),o}function Ke(t,n,e){return e=e||{value:"value",label:"text",children:"children"},be(t,n,e)}const{STATE_CODE_FAIL:ze,STATE_CODE_INFO_NOT_COMPLETE:je,STATE_CODE_NOT_FOUND:Ye,STATE_CODE_NOT_ALLOWED:Me,STATE_CODE_SUCCESS:le}=jt;function Ge(t){const{url:n,data:e,csrfToken:o}=t;let{method:r}=t;r=r||"post";const s=document.createElement("form");if(s.action=n,s.method=r,s.target="_blank",s.style.display="none",Object.keys(e).forEach(c=>{const i=document.createElement("input");i.type="hidden",i.name=c,i.value=e[c],s.appendChild(i)}),!o){const c=document.createElement("input");c.type="hidden",c.name="_token",c.value=document.querySelector('meta[name="csrf-token"]').getAttribute("content"),s.appendChild(c)}return document.body.appendChild(s),s}function ve(t,n){const{status:e}=t,o=t.result,r={};r.default="请求失败, 请检查数据并重试",r[ze]="系统错误,请稍候再试",r[Ye]="请求的内容不存在",r[je]="信息不完整",r[Me]="没有权限";const s={[le]:"success"},c=n[e]||n[s[e]]||r[e]||r.def;j.isString(c)?e===le?yt.showSuccessToast(c):yt.showFailToast(o||c):j.isFunction(c)&&c()}function We(t,n){ve(t,{success:n})}function Qe(t){t&&t.errorFields?t.errorFields.forEach(n=>{yt.showFailToast(n.errors.join(" "))}):t&&t.response?yt.showFailToast("网络异常"):yt.showFailToast("请检查填写项")}function Xe(t,n){const e=j.cloneDeep(t);n=n||{};const o=r=>{for(let s in r){if(n.date&&j.isDate(r[s])){r[s]=Math.ceil(r[s].getTime()/1e3);continue}if(n.boolean&&j.isBoolean(r[s])){r[s]=r[s]?1:0;continue}if(n.attachment){const c=n.attachment;if(j.isObject(r[s])&&j.isString(c)&&!j.isUndefined(r[s][c])){r[s]=r[s][c];continue}else if(j.isObject(r[s])&&j.isFunction(c)){r[s]=c(r[s]);continue}}if(j.isArray(r[s]))for(let c in r[s])r[s][c]=o(r[s][c])}return r};return o(e)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xe=BigInt(0),_t=BigInt(1),Je=BigInt(2),qt=t=>t instanceof Uint8Array,tn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function rt(t){if(!qt(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=tn[t[e]];return n}function $(t){const n=t.toString(16);return n.length&1?`0${n}`:n}function _(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function Bt(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const n=t.length;if(n%2)throw new Error("padded hex string expected, got unpadded hex of length "+n);const e=new Uint8Array(n/2);for(let o=0;o<e.length;o++){const r=o*2,s=t.slice(r,r+2),c=Number.parseInt(s,16);if(Number.isNaN(c)||c<0)throw new Error("Invalid byte sequence");e[o]=c}return e}function pt(t){return _(rt(t))}function Yt(t){if(!qt(t))throw new Error("Uint8Array expected");return _(rt(Uint8Array.from(t).reverse()))}function mt(t,n){return Bt(t.toString(16).padStart(n*2,"0"))}function Se(t,n){return mt(t,n).reverse()}function en(t){return Bt($(t))}function G(t,n,e){let o;if(typeof n=="string")try{o=Bt(n)}catch(s){throw new Error(`${t} must be valid hex string, got "${n}". Cause: ${s}`)}else if(qt(n))o=Uint8Array.from(n);else throw new Error(`${t} must be hex string or Uint8Array`);const r=o.length;if(typeof e=="number"&&r!==e)throw new Error(`${t} expected ${e} bytes, got ${r}`);return o}function Y(...t){const n=new Uint8Array(t.reduce((o,r)=>o+r.length,0));let e=0;return t.forEach(o=>{if(!qt(o))throw new Error("Uint8Array expected");n.set(o,e),e+=o.length}),n}function nn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}function rn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function on(t){let n;for(n=0;t>xe;t>>=_t,n+=1);return n}function sn(t,n){return t>>BigInt(n)&_t}const cn=(t,n,e)=>t|(e?_t:xe)<<BigInt(n),Mt=t=>(Je<<BigInt(t-1))-_t,$t=t=>new Uint8Array(t),ue=t=>Uint8Array.from(t);function Be(t,n,e){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let o=$t(t),r=$t(t),s=0;const c=()=>{o.fill(1),r.fill(0),s=0},i=(...f)=>e(r,o,...f),l=(f=$t())=>{r=i(ue([0]),f),o=i(),f.length!==0&&(r=i(ue([1]),f),o=i())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const m=[];for(;f<n;){o=i();const b=o.slice();m.push(b),f+=o.length}return Y(...m)};return(f,m)=>{c(),l(f);let b;for(;!(b=m(u()));)l();return c(),b}}const ln={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Ot(t,n,e={}){const o=(r,s,c)=>{const i=ln[s];if(typeof i!="function")throw new Error(`Invalid validator "${s}", expected function`);const l=t[r];if(!(c&&l===void 0)&&!i(l,t))throw new Error(`Invalid param ${String(r)}=${l} (${typeof l}), expected ${s}`)};for(const[r,s]of Object.entries(n))o(r,s,!1);for(const[r,s]of Object.entries(e))o(r,s,!0);return t}const un=Object.freeze(Object.defineProperty({__proto__:null,bitGet:sn,bitLen:on,bitMask:Mt,bitSet:cn,bytesToHex:rt,bytesToNumberBE:pt,bytesToNumberLE:Yt,concatBytes:Y,createHmacDrbg:Be,ensureBytes:G,equalBytes:nn,hexToBytes:Bt,hexToNumber:_,numberToBytesBE:mt,numberToBytesLE:Se,numberToHexUnpadded:$,numberToVarBytesBE:en,utf8ToBytes:rn,validateObject:Ot},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const V=BigInt(0),H=BigInt(1),dt=BigInt(2),fn=BigInt(3),Kt=BigInt(4),fe=BigInt(5),ae=BigInt(8);BigInt(9);BigInt(16);function k(t,n){const e=t%n;return e>=V?e:n+e}function an(t,n,e){if(e<=V||n<V)throw new Error("Expected power/modulo > 0");if(e===H)return V;let o=H;for(;n>V;)n&H&&(o=o*t%e),t=t*t%e,n>>=H;return o}function zt(t,n){if(t===V||n<=V)throw new Error(`invert: expected positive integers, got n=${t} mod=${n}`);let e=k(t,n),o=n,r=V,s=H;for(;e!==V;){const i=o/e,l=o%e,u=r-s*i;o=e,e=l,r=s,s=u}if(o!==H)throw new Error("invert: does not exist");return k(r,n)}function hn(t){const n=(t-H)/dt;let e,o,r;for(e=t-H,o=0;e%dt===V;e/=dt,o++);for(r=dt;r<t&&an(r,n,t)!==t-H;r++);if(o===1){const c=(t+H)/Kt;return function(l,u){const h=l.pow(u,c);if(!l.eql(l.sqr(h),u))throw new Error("Cannot find square root");return h}}const s=(e+H)/dt;return function(i,l){if(i.pow(l,n)===i.neg(i.ONE))throw new Error("Cannot find square root");let u=o,h=i.pow(i.mul(i.ONE,r),e),f=i.pow(l,s),m=i.pow(l,e);for(;!i.eql(m,i.ONE);){if(i.eql(m,i.ZERO))return i.ZERO;let b=1;for(let a=i.sqr(m);b<u&&!i.eql(a,i.ONE);b++)a=i.sqr(a);const g=i.pow(h,H<<BigInt(u-b-1));h=i.sqr(g),f=i.mul(f,g),m=i.mul(m,h),u=b}return f}}function dn(t){if(t%Kt===fn){const n=(t+H)/Kt;return function(o,r){const s=o.pow(r,n);if(!o.eql(o.sqr(s),r))throw new Error("Cannot find square root");return s}}if(t%ae===fe){const n=(t-fe)/ae;return function(o,r){const s=o.mul(r,dt),c=o.pow(s,n),i=o.mul(r,c),l=o.mul(o.mul(i,dt),c),u=o.mul(i,o.sub(l,o.ONE));if(!o.eql(o.sqr(u),r))throw new Error("Cannot find square root");return u}}return hn(t)}const gn=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function wn(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=gn.reduce((o,r)=>(o[r]="function",o),n);return Ot(t,e)}function yn(t,n,e){if(e<V)throw new Error("Expected power > 0");if(e===V)return t.ONE;if(e===H)return n;let o=t.ONE,r=n;for(;e>V;)e&H&&(o=t.mul(o,r)),r=t.sqr(r),e>>=H;return o}function pn(t,n){const e=new Array(n.length),o=n.reduce((s,c,i)=>t.is0(c)?s:(e[i]=s,t.mul(s,c)),t.ONE),r=t.inv(o);return n.reduceRight((s,c,i)=>t.is0(c)?s:(e[i]=t.mul(s,e[i]),t.mul(s,c)),r),e}function Gt(t,n){const e=n!==void 0?n:t.toString(2).length,o=Math.ceil(e/8);return{nBitLength:e,nByteLength:o}}function Ae(t,n,e=!1,o={}){if(t<=V)throw new Error(`Expected Fp ORDER > 0, got ${t}`);const{nBitLength:r,nByteLength:s}=Gt(t,n);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=dn(t),i=Object.freeze({ORDER:t,BITS:r,BYTES:s,MASK:Mt(r),ZERO:V,ONE:H,create:l=>k(l,t),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return V<=l&&l<t},is0:l=>l===V,isOdd:l=>(l&H)===H,neg:l=>k(-l,t),eql:(l,u)=>l===u,sqr:l=>k(l*l,t),add:(l,u)=>k(l+u,t),sub:(l,u)=>k(l-u,t),mul:(l,u)=>k(l*u,t),pow:(l,u)=>yn(i,l,u),div:(l,u)=>k(l*zt(u,t),t),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>zt(l,t),sqrt:o.sqrt||(l=>c(i,l)),invertBatch:l=>pn(i,l),cmov:(l,u,h)=>h?u:l,toBytes:l=>e?Se(l,s):mt(l,s),fromBytes:l=>{if(l.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${l.length}`);return e?Yt(l):pt(l)}});return Object.freeze(i)}function mn(t,n,e=!1){t=G("privateHash",t);const o=t.length,r=Gt(n).nByteLength+8;if(r<24||o<r||o>1024)throw new Error(`hashToPrivateScalar: expected ${r}-1024 bytes of input, got ${o}`);const s=e?Yt(t):pt(t);return k(s,n-H)+H}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const En=BigInt(0),Ft=BigInt(1);function bn(t,n){const e=(r,s)=>{const c=s.negate();return r?c:s},o=r=>{const s=Math.ceil(n/r)+1,c=2**(r-1);return{windows:s,windowSize:c}};return{constTimeNegate:e,unsafeLadder(r,s){let c=t.ZERO,i=r;for(;s>En;)s&Ft&&(c=c.add(i)),i=i.double(),s>>=Ft;return c},precomputeWindow(r,s){const{windows:c,windowSize:i}=o(s),l=[];let u=r,h=u;for(let f=0;f<c;f++){h=u,l.push(h);for(let m=1;m<i;m++)h=h.add(u),l.push(h);u=h.double()}return l},wNAF(r,s,c){const{windows:i,windowSize:l}=o(r);let u=t.ZERO,h=t.BASE;const f=BigInt(2**r-1),m=2**r,b=BigInt(r);for(let g=0;g<i;g++){const a=g*l;let w=Number(c&f);c>>=b,w>l&&(w-=m,c+=Ft);const y=a,v=a+Math.abs(w)-1,S=g%2!==0,P=w<0;w===0?h=h.add(e(S,s[y])):u=u.add(e(P,s[v]))}return{p:u,f:h}},wNAFCached(r,s,c,i){const l=r._WINDOW_SIZE||1;let u=s.get(r);return u||(u=this.precomputeWindow(r,l),l!==1&&s.set(r,i(u))),this.wNAF(l,u,c)}}}function Te(t){return wn(t.Fp),Ot(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Gt(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function vn(t){const n=Te(t);Ot(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:o,a:r}=n;if(e){if(!o.eql(r,o.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...n})}const{bytesToNumberBE:xn,hexToBytes:Sn}=un,gt={Err:class extends Error{constructor(n=""){super(n)}},_parseInt(t){const{Err:n}=gt;if(t.length<2||t[0]!==2)throw new n("Invalid signature integer tag");const e=t[1],o=t.subarray(2,e+2);if(!e||o.length!==e)throw new n("Invalid signature integer: wrong length");if(o[0]&128)throw new n("Invalid signature integer: negative");if(o[0]===0&&!(o[1]&128))throw new n("Invalid signature integer: unnecessary leading zero");return{d:xn(o),l:t.subarray(e+2)}},toSig(t){const{Err:n}=gt,e=typeof t=="string"?Sn(t):t;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let o=e.length;if(o<2||e[0]!=48)throw new n("Invalid signature tag");if(e[1]!==o-2)throw new n("Invalid signature: incorrect length");const{d:r,l:s}=gt._parseInt(e.subarray(2)),{d:c,l:i}=gt._parseInt(s);if(i.length)throw new n("Invalid signature: left bytes after parsing");return{r,s:c}},hexFromSig(t){const n=u=>Number.parseInt(u[0],16)&8?"00"+u:u,e=u=>{const h=u.toString(16);return h.length&1?`0${h}`:h},o=n(e(t.s)),r=n(e(t.r)),s=o.length/2,c=r.length/2,i=e(s),l=e(c);return`30${e(c+s+4)}02${l}${r}02${i}${o}`}},nt=BigInt(0),W=BigInt(1);BigInt(2);const he=BigInt(3);BigInt(4);function Bn(t){const n=vn(t),{Fp:e}=n,o=n.toBytes||((g,a,w)=>{const y=a.toAffine();return Y(Uint8Array.from([4]),e.toBytes(y.x),e.toBytes(y.y))}),r=n.fromBytes||(g=>{const a=g.subarray(1),w=e.fromBytes(a.subarray(0,e.BYTES)),y=e.fromBytes(a.subarray(e.BYTES,2*e.BYTES));return{x:w,y}});function s(g){const{a,b:w}=n,y=e.sqr(g),v=e.mul(y,g);return e.add(e.add(v,e.mul(g,a)),w)}if(!e.eql(e.sqr(n.Gy),s(n.Gx)))throw new Error("bad generator point: equation left != right");function c(g){return typeof g=="bigint"&&nt<g&&g<n.n}function i(g){if(!c(g))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function l(g){const{allowedPrivateKeyLengths:a,nByteLength:w,wrapPrivateKey:y,n:v}=n;if(a&&typeof g!="bigint"){if(g instanceof Uint8Array&&(g=rt(g)),typeof g!="string"||!a.includes(g.length))throw new Error("Invalid key");g=g.padStart(w*2,"0")}let S;try{S=typeof g=="bigint"?g:pt(G("private key",g,w))}catch{throw new Error(`private key must be ${w} bytes, hex or bigint, not ${typeof g}`)}return y&&(S=k(S,v)),i(S),S}const u=new Map;function h(g){if(!(g instanceof f))throw new Error("ProjectivePoint expected")}class f{constructor(a,w,y){if(this.px=a,this.py=w,this.pz=y,a==null||!e.isValid(a))throw new Error("x required");if(w==null||!e.isValid(w))throw new Error("y required");if(y==null||!e.isValid(y))throw new Error("z required")}static fromAffine(a){const{x:w,y}=a||{};if(!a||!e.isValid(w)||!e.isValid(y))throw new Error("invalid affine point");if(a instanceof f)throw new Error("projective point not allowed");const v=S=>e.eql(S,e.ZERO);return v(w)&&v(y)?f.ZERO:new f(w,y,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(a){const w=e.invertBatch(a.map(y=>y.pz));return a.map((y,v)=>y.toAffine(w[v])).map(f.fromAffine)}static fromHex(a){const w=f.fromAffine(r(G("pointHex",a)));return w.assertValidity(),w}static fromPrivateKey(a){return f.BASE.multiply(l(a))}_setWindowSize(a){this._WINDOW_SIZE=a,u.delete(this)}assertValidity(){if(this.is0()){if(n.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:a,y:w}=this.toAffine();if(!e.isValid(a)||!e.isValid(w))throw new Error("bad point: x or y not FE");const y=e.sqr(w),v=s(a);if(!e.eql(y,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:a}=this.toAffine();if(e.isOdd)return!e.isOdd(a);throw new Error("Field doesn't support isOdd")}equals(a){h(a);const{px:w,py:y,pz:v}=this,{px:S,py:P,pz:T}=a,E=e.eql(e.mul(w,T),e.mul(S,v)),x=e.eql(e.mul(y,T),e.mul(P,v));return E&&x}negate(){return new f(this.px,e.neg(this.py),this.pz)}double(){const{a,b:w}=n,y=e.mul(w,he),{px:v,py:S,pz:P}=this;let T=e.ZERO,E=e.ZERO,x=e.ZERO,A=e.mul(v,v),M=e.mul(S,S),C=e.mul(P,P),I=e.mul(v,S);return I=e.add(I,I),x=e.mul(v,P),x=e.add(x,x),T=e.mul(a,x),E=e.mul(y,C),E=e.add(T,E),T=e.sub(M,E),E=e.add(M,E),E=e.mul(T,E),T=e.mul(I,T),x=e.mul(y,x),C=e.mul(a,C),I=e.sub(A,C),I=e.mul(a,I),I=e.add(I,x),x=e.add(A,A),A=e.add(x,A),A=e.add(A,C),A=e.mul(A,I),E=e.add(E,A),C=e.mul(S,P),C=e.add(C,C),A=e.mul(C,I),T=e.sub(T,A),x=e.mul(C,M),x=e.add(x,x),x=e.add(x,x),new f(T,E,x)}add(a){h(a);const{px:w,py:y,pz:v}=this,{px:S,py:P,pz:T}=a;let E=e.ZERO,x=e.ZERO,A=e.ZERO;const M=n.a,C=e.mul(n.b,he);let I=e.mul(w,S),Z=e.mul(y,P),D=e.mul(v,T),ot=e.add(w,y),d=e.add(S,P);ot=e.mul(ot,d),d=e.add(I,Z),ot=e.sub(ot,d),d=e.add(w,v);let p=e.add(S,T);return d=e.mul(d,p),p=e.add(I,D),d=e.sub(d,p),p=e.add(y,v),E=e.add(P,T),p=e.mul(p,E),E=e.add(Z,D),p=e.sub(p,E),A=e.mul(M,d),E=e.mul(C,D),A=e.add(E,A),E=e.sub(Z,A),A=e.add(Z,A),x=e.mul(E,A),Z=e.add(I,I),Z=e.add(Z,I),D=e.mul(M,D),d=e.mul(C,d),Z=e.add(Z,D),D=e.sub(I,D),D=e.mul(M,D),d=e.add(d,D),I=e.mul(Z,d),x=e.add(x,I),I=e.mul(p,d),E=e.mul(ot,E),E=e.sub(E,I),I=e.mul(ot,Z),A=e.mul(p,A),A=e.add(A,I),new f(E,x,A)}subtract(a){return this.add(a.negate())}is0(){return this.equals(f.ZERO)}wNAF(a){return b.wNAFCached(this,u,a,w=>{const y=e.invertBatch(w.map(v=>v.pz));return w.map((v,S)=>v.toAffine(y[S])).map(f.fromAffine)})}multiplyUnsafe(a){const w=f.ZERO;if(a===nt)return w;if(i(a),a===W)return this;const{endo:y}=n;if(!y)return b.unsafeLadder(this,a);let{k1neg:v,k1:S,k2neg:P,k2:T}=y.splitScalar(a),E=w,x=w,A=this;for(;S>nt||T>nt;)S&W&&(E=E.add(A)),T&W&&(x=x.add(A)),A=A.double(),S>>=W,T>>=W;return v&&(E=E.negate()),P&&(x=x.negate()),x=new f(e.mul(x.px,y.beta),x.py,x.pz),E.add(x)}multiply(a){i(a);let w=a,y,v;const{endo:S}=n;if(S){const{k1neg:P,k1:T,k2neg:E,k2:x}=S.splitScalar(w);let{p:A,f:M}=this.wNAF(T),{p:C,f:I}=this.wNAF(x);A=b.constTimeNegate(P,A),C=b.constTimeNegate(E,C),C=new f(e.mul(C.px,S.beta),C.py,C.pz),y=A.add(C),v=M.add(I)}else{const{p:P,f:T}=this.wNAF(w);y=P,v=T}return f.normalizeZ([y,v])[0]}multiplyAndAddUnsafe(a,w,y){const v=f.BASE,S=(T,E)=>E===nt||E===W||!T.equals(v)?T.multiplyUnsafe(E):T.multiply(E),P=S(this,w).add(S(a,y));return P.is0()?void 0:P}toAffine(a){const{px:w,py:y,pz:v}=this,S=this.is0();a==null&&(a=S?e.ONE:e.inv(v));const P=e.mul(w,a),T=e.mul(y,a),E=e.mul(v,a);if(S)return{x:e.ZERO,y:e.ZERO};if(!e.eql(E,e.ONE))throw new Error("invZ was invalid");return{x:P,y:T}}isTorsionFree(){const{h:a,isTorsionFree:w}=n;if(a===W)return!0;if(w)return w(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:a,clearCofactor:w}=n;return a===W?this:w?w(f,this):this.multiplyUnsafe(n.h)}toRawBytes(a=!0){return this.assertValidity(),o(f,this,a)}toHex(a=!0){return rt(this.toRawBytes(a))}}f.BASE=new f(n.Gx,n.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);const m=n.nBitLength,b=bn(f,n.endo?Math.ceil(m/2):m);return{CURVE:n,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:c}}function An(t){const n=Te(t);return Ot(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function Tn(t){const n=An(t),{Fp:e,n:o}=n,r=e.BYTES+1,s=2*e.BYTES+1;function c(d){return nt<d&&d<e.ORDER}function i(d){return k(d,o)}function l(d){return zt(d,o)}const{ProjectivePoint:u,normPrivateKeyToScalar:h,weierstrassEquation:f,isWithinCurveOrder:m}=Bn({...n,toBytes(d,p,B){const U=p.toAffine(),O=e.toBytes(U.x),R=Y;return B?R(Uint8Array.from([p.hasEvenY()?2:3]),O):R(Uint8Array.from([4]),O,e.toBytes(U.y))},fromBytes(d){const p=d.length,B=d[0],U=d.subarray(1);if(p===r&&(B===2||B===3)){const O=pt(U);if(!c(O))throw new Error("Point is not on curve");const R=f(O);let K=e.sqrt(R);const z=(K&W)===W;return(B&1)===1!==z&&(K=e.neg(K)),{x:O,y:K}}else if(p===s&&B===4){const O=e.fromBytes(U.subarray(0,e.BYTES)),R=e.fromBytes(U.subarray(e.BYTES,2*e.BYTES));return{x:O,y:R}}else throw new Error(`Point of length ${p} was invalid. Expected ${r} compressed bytes or ${s} uncompressed bytes`)}}),b=d=>rt(mt(d,n.nByteLength));function g(d){const p=o>>W;return d>p}function a(d){return g(d)?i(-d):d}const w=(d,p,B)=>pt(d.slice(p,B));class y{constructor(p,B,U){this.r=p,this.s=B,this.recovery=U,this.assertValidity()}static fromCompact(p){const B=n.nByteLength;return p=G("compactSignature",p,B*2),new y(w(p,0,B),w(p,B,2*B))}static fromDER(p){const{r:B,s:U}=gt.toSig(G("DER",p));return new y(B,U)}assertValidity(){if(!m(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!m(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(p){return new y(this.r,this.s,p)}recoverPublicKey(p){const{r:B,s:U,recovery:O}=this,R=x(G("msgHash",p));if(O==null||![0,1,2,3].includes(O))throw new Error("recovery id invalid");const K=O===2||O===3?B+n.n:B;if(K>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const z=O&1?"03":"02",st=u.fromHex(z+b(K)),it=l(K),Et=i(-R*it),Pt=i(U*it),ct=u.BASE.multiplyAndAddUnsafe(st,Et,Pt);if(!ct)throw new Error("point at infinify");return ct.assertValidity(),ct}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Bt(this.toDERHex())}toDERHex(){return gt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Bt(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}const v={isValidPrivateKey(d){try{return h(d),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const d=n.randomBytes(e.BYTES+8),p=mn(d,o);return mt(p,n.nByteLength)},precompute(d=8,p=u.BASE){return p._setWindowSize(d),p.multiply(BigInt(3)),p}};function S(d,p=!0){return u.fromPrivateKey(d).toRawBytes(p)}function P(d){const p=d instanceof Uint8Array,B=typeof d=="string",U=(p||B)&&d.length;return p?U===r||U===s:B?U===2*r||U===2*s:d instanceof u}function T(d,p,B=!0){if(P(d))throw new Error("first arg must be private key");if(!P(p))throw new Error("second arg must be public key");return u.fromHex(p).multiply(h(d)).toRawBytes(B)}const E=n.bits2int||function(d){const p=pt(d),B=d.length*8-n.nBitLength;return B>0?p>>BigInt(B):p},x=n.bits2int_modN||function(d){return i(E(d))},A=Mt(n.nBitLength);function M(d){if(typeof d!="bigint")throw new Error("bigint expected");if(!(nt<=d&&d<A))throw new Error(`bigint expected < 2^${n.nBitLength}`);return mt(d,n.nByteLength)}function C(d,p,B=I){if(["recovered","canonical"].some(at=>at in B))throw new Error("sign() legacy options not supported");const{hash:U,randomBytes:O}=n;let{lowS:R,prehash:K,extraEntropy:z}=B;R==null&&(R=!0),d=G("msgHash",d),K&&(d=G("prehashed msgHash",U(d)));const st=x(d),it=h(p),Et=[M(it),M(st)];if(z!=null){const at=z===!0?O(e.BYTES):z;Et.push(G("extraEntropy",at,e.BYTES))}const Pt=Y(...Et),ct=st;function Vt(at){const bt=E(at);if(!m(bt))return;const oe=l(bt),vt=u.BASE.multiply(bt).toAffine(),X=i(vt.x);if(X===nt)return;const xt=i(oe*i(ct+X*it));if(xt===nt)return;let se=(vt.x===X?0:2)|Number(vt.y&W),ie=xt;return R&&g(xt)&&(ie=a(xt),se^=1),new y(X,ie,se)}return{seed:Pt,k2sig:Vt}}const I={lowS:n.lowS,prehash:!1},Z={lowS:n.lowS,prehash:!1};function D(d,p,B=I){const{seed:U,k2sig:O}=C(d,p,B),R=n;return Be(R.hash.outputLen,R.nByteLength,R.hmac)(U,O)}u.BASE._setWindowSize(8);function ot(d,p,B,U=Z){var vt;const O=d;if(p=G("msgHash",p),B=G("publicKey",B),"strict"in U)throw new Error("options.strict was renamed to lowS");const{lowS:R,prehash:K}=U;let z,st;try{if(typeof O=="string"||O instanceof Uint8Array)try{z=y.fromDER(O)}catch(X){if(!(X instanceof gt.Err))throw X;z=y.fromCompact(O)}else if(typeof O=="object"&&typeof O.r=="bigint"&&typeof O.s=="bigint"){const{r:X,s:xt}=O;z=new y(X,xt)}else throw new Error("PARSE");st=u.fromHex(B)}catch(X){if(X.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(R&&z.hasHighS())return!1;K&&(p=n.hash(p));const{r:it,s:Et}=z,Pt=x(p),ct=l(Et),Vt=i(Pt*ct),at=i(it*ct),bt=(vt=u.BASE.multiplyAndAddUnsafe(st,Vt,at))==null?void 0:vt.toAffine();return bt?i(bt.x)===it:!1}return{CURVE:n,getPublicKey:S,getSharedSecret:T,sign:D,verify:ot,ProjectivePoint:u,Signature:y,utils:v}}var Pn=Object.defineProperty,Pe=(t,n)=>{for(var e in n)Pn(t,e,{get:n[e],enumerable:!0})},Ie={};Pe(Ie,{EmptyArray:()=>ee,arrayToHex:()=>Rt,arrayToUtf8:()=>te,calculateSharedKey:()=>Jn,comparePublicKeyHex:()=>Qn,compressPublicKeyHex:()=>Gn,doDecrypt:()=>er,doEncrypt:()=>tr,doSignature:()=>nr,doVerifySignature:()=>rr,generateKeyPairHex:()=>Jt,getHash:()=>ne,getPoint:()=>Re,getPublicKeyFromPrivateKey:()=>qe,getZ:()=>Ht,hexToArray:()=>F,initRNGPool:()=>Wt,leftPad:()=>q,precomputePublicKey:()=>or,utf8ToHex:()=>Tt,verifyPublicKey:()=>Wn});var Lt=BigInt(0),It=BigInt(1),In=BigInt(2);BigInt(3);function On(t){let n=t.toString(16);if(n[0]!=="-")n.length%2===1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{n=n.substring(1);let e=n.length;e%2===1?e+=1:n.match(/^[0-7]/)||(e+=2);let o="";for(let c=0;c<e;c++)o+="f";n=((_(o)^t)+It).toString(16).replace(/^-/,"")}return n}var Oe=class{constructor(t=null,n="00",e="00",o=""){this.tlv=t,this.t=n,this.l=e,this.v=o}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let n=t.toString(16);return n.length%2===1&&(n="0"+n),t<128?n:(128+n.length/2).toString(16)+n}getValue(){return""}},de=class extends Oe{constructor(t){super(),this.t="02",t&&(this.v=On(t))}getValue(){return this.v}},Un=class extends Oe{constructor(n){super();L(this,"t","30");this.asn1Array=n}getValue(){return this.v=this.asn1Array.map(n=>n.getEncodedHex()).join(""),this.v}};function Ue(t,n){return+t[n+2]<8?1:+t.substring(n+2,n+4)&127+1}function ge(t,n){const e=Ue(t,n),o=t.substring(n+2,n+2+e*2);return o?+(+o[0]<8?_(o):_(o.substring(2))).toString():-1}function kt(t,n){const e=Ue(t,n);return n+(e+1)*2}function Cn(t,n){const e=new de(t),o=new de(n);return new Un([e,o]).getEncodedHex()}function Nn(t){const n=kt(t,0),e=kt(t,n),o=ge(t,n),r=t.substr(e,o*2),s=e+r.length,c=kt(t,s),i=ge(t,s),l=t.substring(c,c+i*2),u=_(r),h=_(l);return{r:u,s:h}}var Zt=16384,wt=new Uint8Array(0),St;async function Wt(){if("crypto"in globalThis){St=globalThis.crypto;return}if(!(wt.length>Zt/2))if("wx"in globalThis&&"getRandomValues"in globalThis.wx)wt=await new Promise(t=>{wx.getRandomValues({length:Zt,success(n){t(new Uint8Array(n.randomValues))}})});else try{globalThis.crypto?St=globalThis.crypto:St=(await Promise.resolve().then(()=>require("./__vite-browser-external-b3701507.cjs"))).webcrypto;const t=new Uint8Array(Zt);St.getRandomValues(t),wt=t}catch{throw new Error("no available csprng, abort.")}}Wt();function Ln(t){if(wt.length>t){const n=wt.slice(0,t);return wt=wt.slice(t),Wt(),n}else throw new Error("random number pool is not ready or insufficient, prevent getting too long random values or too often.")}function Hn(t=0){const n=new Uint8Array(t);return St?St.getRandomValues(n):Ln(t)}var Ce=t=>t instanceof Uint8Array,Dt=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),_n=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!_n)throw new Error("Non little-endian hardware is not supported");var qn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function At(t){if(!Ce(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=qn[t[e]];return n}function Rn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Qt(t){if(typeof t=="string"&&(t=Rn(t)),!Ce(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}var Ne=class{clone(){return this._cloneInto()}};function Vn(t){const n=o=>t().update(Qt(o)).digest(),e=t();return n.outputLen=e.outputLen,n.blockLen=e.blockLen,n.create=()=>t(),n}var $n=(t,n,e)=>t&n|t&e|n&e,we=(t,n,e)=>t^n^e,Fn=(t,n,e)=>t&n|~t&e;function kn(t,n,e,o){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,o);const r=BigInt(32),s=BigInt(4294967295),c=Number(e>>r&s),i=Number(e&s),l=o?4:0,u=o?0:4;t.setUint32(n+l,c,o),t.setUint32(n+u,i,o)}function Q(t,n){const e=n&31;return t<<e|t>>>32-e}function Zn(t){return t^Q(t,9)^Q(t,17)}function Dn(t){return t^Q(t,15)^Q(t,23)}var Kn=class extends Ne{constructor(n,e,o,r){super();L(this,"buffer");L(this,"view");L(this,"finished",!1);L(this,"length",0);L(this,"pos",0);L(this,"destroyed",!1);this.blockLen=n,this.outputLen=e,this.padOffset=o,this.isLE=r,this.buffer=new Uint8Array(n),this.view=Dt(this.buffer)}update(n){const{view:e,buffer:o,blockLen:r}=this;n=Qt(n);const s=n.length;for(let c=0;c<s;){const i=Math.min(r-this.pos,s-c);if(i===r){const l=Dt(n);for(;r<=s-c;c+=r)this.process(l,c);continue}o.set(n.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===r&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){this.finished=!0;const{buffer:e,view:o,blockLen:r,isLE:s}=this;let{pos:c}=this;e[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>r-c&&(this.process(o,0),c=0);for(let f=c;f<r;f++)e[f]=0;kn(o,r-8,BigInt(this.length*8),s),this.process(o,0);const i=Dt(n),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)i.setUint32(4*f,h[f],s)}digest(){const{buffer:n,outputLen:e}=this;this.digestInto(n);const o=n.slice(0,e);return this.destroy(),o}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:e,buffer:o,length:r,finished:s,destroyed:c,pos:i}=this;return n.length=r,n.pos=i,n.finished=s,n.destroyed=c,r%e&&n.buffer.set(o),n}},lt=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),J=new Uint32Array(68),ye=new Uint32Array(64),zn=2043430169,jn=2055708042,Yn=class extends Kn{constructor(){super(64,32,8,!1);L(this,"A",lt[0]|0);L(this,"B",lt[1]|0);L(this,"C",lt[2]|0);L(this,"D",lt[3]|0);L(this,"E",lt[4]|0);L(this,"F",lt[5]|0);L(this,"G",lt[6]|0);L(this,"H",lt[7]|0)}get(){const{A:n,B:e,C:o,D:r,E:s,F:c,G:i,H:l}=this;return[n,e,o,r,s,c,i,l]}set(n,e,o,r,s,c,i,l){this.A=n|0,this.B=e|0,this.C=o|0,this.D=r|0,this.E=s|0,this.F=c|0,this.G=i|0,this.H=l|0}process(n,e){for(let f=0;f<16;f++,e+=4)J[f]=n.getUint32(e,!1);for(let f=16;f<68;f++)J[f]=Dn(J[f-16]^J[f-9]^Q(J[f-3],15))^Q(J[f-13],7)^J[f-6];for(let f=0;f<64;f++)ye[f]=J[f]^J[f+4];let{A:o,B:r,C:s,D:c,E:i,F:l,G:u,H:h}=this;for(let f=0;f<64;f++){let m=f>=0&&f<=15,b=m?zn:jn,g=Q(Q(o,12)+i+Q(b,f),7),a=g^Q(o,12),w=(m?we(o,r,s):$n(o,r,s))+c+a+ye[f]|0,y=(m?we(i,l,u):Fn(i,l,u))+h+g+J[f]|0;c=s,s=Q(r,9),r=o,o=w,h=u,u=Q(l,19),l=i,i=Zn(y)}o=o^this.A|0,r=r^this.B|0,s=s^this.C|0,c=c^this.D|0,i=i^this.E|0,l=l^this.F|0,u=u^this.G|0,h=h^this.H|0,this.set(o,r,s,c,i,l,u,h)}roundClean(){J.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},et=Vn(()=>new Yn),Le=class extends Ne{constructor(n,e){super();L(this,"oHash");L(this,"iHash");L(this,"blockLen");L(this,"outputLen");L(this,"finished",!1);L(this,"destroyed",!1);const o=Qt(e);if(this.iHash=n.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,s=new Uint8Array(r);s.set(o.length>r?n.create().update(o).digest():o);for(let c=0;c<s.length;c++)s[c]^=54;this.iHash.update(s),this.oHash=n.create();for(let c=0;c<s.length;c++)s[c]^=106;this.oHash.update(s),s.fill(0)}update(n){return this.iHash.update(n),this}digestInto(n){this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:o,finished:r,destroyed:s,blockLen:c,outputLen:i}=this;return n=n,n.finished=r,n.destroyed=s,n.blockLen=c,n.outputLen=i,n.oHash=e._cloneInto(n.oHash),n.iHash=o._cloneInto(n.iHash),n}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Xt=(t,n,e)=>new Le(t,n).update(e).digest();Xt.create=(t,n)=>new Le(t,n);var Mn=Ae(BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991999")),N=Tn({a:BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991996"),b:BigInt("18505919022281880113072981827955639221458448578012075254857346196103069175443"),Fp:Mn,h:It,n:BigInt("115792089210356248756420345214020892766061623724957744567843809356293439045923"),Gx:BigInt("22963146547237050559479531362550074578802567295341616970375194840604139615431"),Gy:BigInt("85132369209828568825618990617112496413088388631904505083283536607588877201568"),hash:et,hmac:(t,...n)=>Xt(et,t,Y(...n)),randomBytes:Hn}),tt=Ae(BigInt(N.CURVE.n));function Jt(t){const n=t?mt(k(BigInt(t),It)+It,32):N.utils.randomPrivateKey(),e=N.getPublicKey(n,!1),o=q(rt(n),64),r=q(rt(e),64);return{privateKey:o,publicKey:r}}function Gn(t){if(t.length!==130)throw new Error("Invalid public key to compress");const n=(t.length-2)/2,e=t.substring(2,2+n),o=_(t.substring(n+2,n+n+2));let r="03";return k(o,In)===Lt&&(r="02"),r+e}function Tt(t){t=decodeURIComponent(encodeURIComponent(t));const n=t.length,e=new Uint32Array((n>>>2)+1);for(let r=0;r<n;r++)e[r>>>2]|=(t.charCodeAt(r)&255)<<24-r%4*8;const o=[];for(let r=0;r<n;r++){const s=e[r>>>2]>>>24-r%4*8&255;o.push((s>>>4).toString(16)),o.push((s&15).toString(16))}return o.join("")}function q(t,n){return t.length>=n?t:new Array(n-t.length+1).join("0")+t}function Rt(t){return t.map(n=>{const e=n.toString(16);return e.length===1?"0"+e:e}).join("")}function te(t){const n=[];for(let e=0,o=t.length;e<o;e++)t[e]>=240&&t[e]<=247?(n.push(String.fromCodePoint(((t[e]&7)<<18)+((t[e+1]&63)<<12)+((t[e+2]&63)<<6)+(t[e+3]&63))),e+=3):t[e]>=224&&t[e]<=239?(n.push(String.fromCodePoint(((t[e]&15)<<12)+((t[e+1]&63)<<6)+(t[e+2]&63))),e+=2):t[e]>=192&&t[e]<=223?(n.push(String.fromCodePoint(((t[e]&31)<<6)+(t[e+1]&63))),e++):n.push(String.fromCodePoint(t[e]));return n.join("")}function F(t){let n=t.length;n%2!==0&&(t=q(t,n+1)),n=t.length;const e=n/2,o=new Uint8Array(e);for(let r=0;r<e;r++)o[r]=parseInt(t.substring(r*2,r*2+2),16);return o}function Wn(t){const n=N.ProjectivePoint.fromHex(t);if(!n)return!1;try{return n.assertValidity(),!0}catch{return!1}}function Qn(t,n){const e=N.ProjectivePoint.fromHex(t);if(!e)return!1;const o=N.ProjectivePoint.fromHex(n);return o?e.equals(o):!1}var pe=_("80000000000000000000000000000000"),me=_("7fffffffffffffffffffffffffffffff");function Xn(t,n){let e=new Uint8Array(n),o=1,r=0,s=ee;const c=new Uint8Array(4),i=()=>{c[0]=o>>24&255,c[1]=o>>16&255,c[2]=o>>8&255,c[3]=o&255,s=et(Y(t,c)),o++,r=0};i();for(let l=0,u=e.length;l<u;l++)r===s.length&&i(),e[l]=s[r++]&255;return e}function Jn(t,n,e,o,r,s=!1,c="1234567812345678",i="1234567812345678"){const l=N.ProjectivePoint.fromHex(n.publicKey),u=N.ProjectivePoint.fromHex(o),h=N.ProjectivePoint.fromHex(e);let f=Ht(t.publicKey,c),m=Ht(e,i);s&&([f,m]=[m,f]);const b=_(n.privateKey),g=_(t.privateKey),a=l.x,w=pe+(a&me),y=tt.add(g,tt.mulN(w,b)),v=u.x,S=tt.add(pe,v&me),P=u.multiply(S).add(h).multiply(y),T=F(q($(P.x),64)),E=F(q($(P.y),64));return Xn(Y(T,E,f,m),r)}var He=0,ee=new Uint8Array;function tr(t,n,e=1){const o=typeof t=="string"?F(Tt(t)):Uint8Array.from(t),r=typeof n=="string"?N.ProjectivePoint.fromHex(n):n,s=Jt(),c=_(s.privateKey);let i=s.publicKey;i.length>128&&(i=i.substring(i.length-128));const l=r.multiply(c),u=F(q($(l.x),64)),h=F(q($(l.y),64)),f=At(et(Y(u,o,h)));_e(u,h,o);const m=At(o);return e===He?i+m+f:i+f+m}function _e(t,n,e){let o=1,r=0,s=ee;const c=new Uint8Array(4),i=()=>{c[0]=o>>24&255,c[1]=o>>16&255,c[2]=o>>8&255,c[3]=o&255,s=et(Y(t,n,c)),o++,r=0};i();for(let l=0,u=e.length;l<u;l++)r===s.length&&i(),e[l]^=s[r++]&255}function er(t,n,e=1,{output:o="string"}={}){const r=_(n);let s=t.substring(128,128+64),c=t.substring(128+64);e===He&&(s=t.substring(t.length-64),c=t.substring(128,t.length-64));const i=F(c),u=N.ProjectivePoint.fromHex("04"+t.substring(0,128)).multiply(r),h=F(q($(u.x),64)),f=F(q($(u.y),64));return _e(h,f,i),Rt(Array.from(et(Y(h,i,f))))===s.toLowerCase()?o==="array"?i:te(i):o==="array"?[]:""}function nr(t,n,e={}){let{pointPool:o,der:r,hash:s,publicKey:c,userId:i}=e,l=typeof t=="string"?Tt(t):Rt(Array.from(t));s&&(c=c||qe(n),l=ne(l,c,i));const u=_(n),h=_(l);let f=null,m=null,b=null;do{do{let g;o&&o.length?g=o.pop():g=Re(),f=g.k,m=tt.add(h,g.x1)}while(m===Lt||m+f===N.CURVE.n);b=tt.mul(tt.inv(tt.addN(u,It)),tt.subN(f,tt.mulN(m,u)))}while(b===Lt);return r?Cn(m,b):q($(m),64)+q($(b),64)}function rr(t,n,e,o={}){let r;const{hash:s,der:c,userId:i}=o,l=typeof e=="string"?e:e.toHex(!1);s?r=ne(typeof t=="string"?Tt(t):t,l,i):r=typeof t=="string"?Tt(t):Rt(Array.from(t));let u,h;if(c){const w=Nn(n);u=w.r,h=w.s}else u=_(n.substring(0,64)),h=_(n.substring(64));const f=typeof e=="string"?N.ProjectivePoint.fromHex(e):e,m=_(r),b=tt.add(u,h);if(b===Lt)return!1;const g=N.ProjectivePoint.BASE.multiply(h).add(f.multiply(b)),a=tt.add(m,g.x);return u===a}function Ht(t,n="1234567812345678"){n=Tt(n);const e=q($(N.CURVE.a),64),o=q($(N.CURVE.b),64),r=q($(N.ProjectivePoint.BASE.x),64),s=q($(N.ProjectivePoint.BASE.y),64);let c,i;if(t.length===128)c=t.substring(0,64),i=t.substring(64,128);else{const f=N.ProjectivePoint.fromHex(t);c=q($(f.x),64),i=q($(f.y),64)}const l=F(n+e+o+r+s+c+i),u=n.length*4;return et(Y(new Uint8Array([u>>8&255,u&255]),l))}function ne(t,n,e="1234567812345678"){const o=Ht(n,e);return At(et(Y(o,typeof t=="string"?F(t):t)))}function or(t,n){const e=N.ProjectivePoint.fromHex(t);return N.utils.precompute(n,e)}function qe(t){const n=N.getPublicKey(t,!1);return q(rt(n),64)}function Re(){const t=Jt(),n=N.ProjectivePoint.fromHex(t.publicKey),e=_(t.privateKey);return{...t,k:e,x1:n.x}}function Ve(t){const n=[];for(let e=0,o=t.length;e<o;e++){const r=t.codePointAt(e);if(r<=127)n.push(r);else if(r<=2047)n.push(192|r>>>6),n.push(128|r&63);else if(r<=55295||r>=57344&&r<=65535)n.push(224|r>>>12),n.push(128|r>>>6&63),n.push(128|r&63);else if(r>=65536&&r<=1114111)e++,n.push(240|r>>>18&28),n.push(128|r>>>12&63),n.push(128|r>>>6&63),n.push(128|r&63);else throw n.push(r),new Error("input is not supported")}return new Uint8Array(n)}function sr(t,n){if(t=typeof t=="string"?Ve(t):t,n){if((n.mode||"hmac")!=="hmac")throw new Error("invalid mode");let o=n.key;if(!o)throw new Error("invalid key");return o=typeof o=="string"?F(o):o,At(Xt(et,o,t))}return At(et(t))}var $e={};Pe($e,{decrypt:()=>fr,encrypt:()=>ur,sm4:()=>re});var ut=0,ir=32,ht=16,Ut=Uint8Array.from([214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]),Ct=new Uint32Array([462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257]);function ft(t){return(Ut[t>>>24&255]&255)<<24|(Ut[t>>>16&255]&255)<<16|(Ut[t>>>8&255]&255)<<8|Ut[t&255]&255}function cr(t,n,e){let o=0,r=0,s=0,c=0,i=0,l=0,u=0,h=0;i=t[0]&255,l=t[1]&255,u=t[2]&255,h=t[3]&255,o=i<<24|l<<16|u<<8|h,i=t[4]&255,l=t[5]&255,u=t[6]&255,h=t[7]&255,r=i<<24|l<<16|u<<8|h,i=t[8]&255,l=t[9]&255,u=t[10]&255,h=t[11]&255,s=i<<24|l<<16|u<<8|h,i=t[12]&255,l=t[13]&255,u=t[14]&255,h=t[15]&255,c=i<<24|l<<16|u<<8|h;for(let f=0;f<32;f+=4)i=r^s^c^e[f],i=ft(i),o^=i^(i<<2|i>>>30)^(i<<10|i>>>22)^(i<<18|i>>>14)^(i<<24|i>>>8),l=s^c^o^e[f+1],l=ft(l),r^=l^(l<<2|l>>>30)^(l<<10|l>>>22)^(l<<18|l>>>14)^(l<<24|l>>>8),u=c^o^r^e[f+2],u=ft(u),s^=u^(u<<2|u>>>30)^(u<<10|u>>>22)^(u<<18|u>>>14)^(u<<24|u>>>8),h=o^r^s^e[f+3],h=ft(h),c^=h^(h<<2|h>>>30)^(h<<10|h>>>22)^(h<<18|h>>>14)^(h<<24|h>>>8);n[0]=c>>>24&255,n[1]=c>>>16&255,n[2]=c>>>8&255,n[3]=c&255,n[4]=s>>>24&255,n[5]=s>>>16&255,n[6]=s>>>8&255,n[7]=s&255,n[8]=r>>>24&255,n[9]=r>>>16&255,n[10]=r>>>8&255,n[11]=r&255,n[12]=o>>>24&255,n[13]=o>>>16&255,n[14]=o>>>8&255,n[15]=o&255}function lr(t,n,e){let o=0,r=0,s=0,c=0,i=0;o=(t[0]&255)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255,r=(t[4]&255)<<24|(t[5]&255)<<16|(t[6]&255)<<8|t[7]&255,s=(t[8]&255)<<24|(t[9]&255)<<16|(t[10]&255)<<8|t[11]&255,c=(t[12]&255)<<24|(t[13]&255)<<16|(t[14]&255)<<8|t[15]&255,o^=2746333894,r^=1453994832,s^=1736282519,c^=2993693404;for(let l=0;l<32;l+=4)i=r^s^c^Ct[l+0],i=ft(i),o^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+0]=o,i=s^c^o^Ct[l+1],i=ft(i),r^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+1]=r,i=c^o^r^Ct[l+2],i=ft(i),s^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+2]=s,i=o^r^s^Ct[l+3],i=ft(i),c^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[l+3]=c;if(e===ut)for(let l=0;l<16;l++)[n[l],n[31-l]]=[n[31-l],n[l]]}var Nt=new Uint8Array(16);function re(t,n,e,o={}){let{padding:r="pkcs#7",mode:s,iv:c=new Uint8Array(16),output:i}=o;if(s==="cbc"&&(typeof c=="string"&&(c=F(c)),c.length!==128/8))throw new Error("iv is invalid");if(typeof n=="string"&&(n=F(n)),n.length!==128/8)throw new Error("key is invalid");if(typeof t=="string"?e!==ut?t=Ve(t):t=F(t):t=Uint8Array.from(t),(r==="pkcs#5"||r==="pkcs#7")&&e!==ut){const b=ht-t.length%ht,g=new Uint8Array(t.length+b);g.set(t,0);for(let a=0;a<b;a++)g[t.length+a]=b;t=g}const l=new Uint32Array(ir);lr(n,l,e);let u=new Uint8Array(t.length),h=c,f=t.length,m=0;for(;f>=ht;){const b=t.subarray(m,m+16);if(s==="cbc")for(let g=0;g<ht;g++)e!==ut&&(b[g]^=h[g]);cr(b,Nt,l);for(let g=0;g<ht;g++)s==="cbc"&&e===ut&&(Nt[g]^=h[g]),u[m+g]=Nt[g];s==="cbc"&&(e!==ut?h=Nt:h=b),f-=ht,m+=ht}if((r==="pkcs#5"||r==="pkcs#7")&&e===ut){const b=u.length,g=u[b-1];for(let a=1;a<=g;a++)if(u[b-a]!==g)throw new Error("padding is invalid");u=u.slice(0,b-g)}return i!=="array"?e!==ut?At(u):te(u):u}function ur(t,n,e={}){return re(t,n,1,e)}function fr(t,n,e={}){return re(t,n,0,e)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */exports.STATUS=jt;exports.sm2_exports=Ie;exports.sm32=sr;exports.sm4_exports=$e;exports.useFetch=Ee;exports.useFindLabelsFromPath=be;exports.useFindTextsFromPath=Ke;exports.useFormFail=Qe;exports.useFormFormat=Xe;exports.useHiddenForm=Ge;exports.usePage=Ze;exports.useProcessStatus=ve;exports.useProcessStatusSuccess=We;exports.useTextFromOptionsValue=De;
2
+ //# sourceMappingURL=index-88ed539a.cjs.map