@learncard/react 2.12.2 → 2.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{BoostGenericCard-06bedec7.js → BoostGenericCard-72cab860.js} +2 -2
- package/dist/cjs/{BoostGenericCard-06bedec7.js.map → BoostGenericCard-72cab860.js.map} +1 -1
- package/dist/cjs/{CertificateDisplayCard-9c1d58da.js → CertificateDisplayCard-a036cdc5.js} +4 -4
- package/dist/cjs/{CertificateDisplayCard-9c1d58da.js.map → CertificateDisplayCard-a036cdc5.js.map} +1 -1
- package/dist/cjs/{MeritBadgeDisplayCard-201bf5ad.js → MeritBadgeDisplayCard-2e4edd20.js} +4 -4
- package/dist/cjs/MeritBadgeDisplayCard-2e4edd20.js.map +1 -0
- package/dist/cjs/{MeritBadgeSkillsCount-ef283e0d.js → MeritBadgeSkillsCount-472542c1.js} +2 -2
- package/dist/cjs/{MeritBadgeSkillsCount-ef283e0d.js.map → MeritBadgeSkillsCount-472542c1.js.map} +1 -1
- package/dist/cjs/{VCCard-d72176f3.js → VCCard-ebbbda88.js} +3 -3
- package/dist/cjs/{VCCard-d72176f3.js.map → VCCard-ebbbda88.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-27460538.js → VCDisplayBackFace-13c73f23.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-27460538.js.map → VCDisplayBackFace-13c73f23.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-b05125ab.js → VCDisplayCard-3720145a.js} +3 -3
- package/dist/cjs/{VCDisplayCard-b05125ab.js.map → VCDisplayCard-3720145a.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-78d4cc3f.js → VCDisplayCard2-ae93ccd2.js} +19 -19
- package/dist/cjs/VCDisplayCard2-ae93ccd2.js.map +1 -0
- package/dist/cjs/{VCVerificationPill-3c130965.js → VCVerificationPill-a1607dff.js} +2 -2
- package/dist/cjs/{VCVerificationPill-3c130965.js.map → VCVerificationPill-a1607dff.js.map} +1 -1
- package/dist/cjs/{VerifierStateBadgeAndText-57a7b85f.js → VerifierStateBadgeAndText-5f10743e.js} +127 -105
- package/dist/cjs/VerifierStateBadgeAndText-5f10743e.js.map +1 -0
- package/dist/cjs/{credential.helpers-3d0256cf.js → credential.helpers-65ea507a.js} +2 -2
- package/dist/cjs/{credential.helpers-3d0256cf.js.map → credential.helpers-65ea507a.js.map} +1 -1
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/index14.js +12 -12
- package/dist/cjs/index22.js +5 -5
- package/dist/cjs/index39.js +10 -10
- package/dist/cjs/index4.js +3 -3
- package/dist/cjs/index40.js +4 -4
- package/dist/cjs/index41.js +5 -5
- package/dist/cjs/index42.js +6 -6
- package/dist/cjs/index43.js +1 -1
- package/dist/cjs/index46.js +2 -2
- package/dist/cjs/index7.js +4 -4
- package/dist/cjs/{types.esm-228757cd.js → types.esm-50b3eecd.js} +17 -2
- package/dist/cjs/types.esm-50b3eecd.js.map +1 -0
- package/dist/esm/{BoostGenericCard-d4ea46de.js → BoostGenericCard-2f586072.js} +2 -2
- package/dist/esm/{BoostGenericCard-d4ea46de.js.map → BoostGenericCard-2f586072.js.map} +1 -1
- package/dist/esm/{CertificateDisplayCard-487a3b4e.js → CertificateDisplayCard-ff1ae869.js} +4 -4
- package/dist/esm/{CertificateDisplayCard-487a3b4e.js.map → CertificateDisplayCard-ff1ae869.js.map} +1 -1
- package/dist/esm/{MeritBadgeDisplayCard-13622cd4.js → MeritBadgeDisplayCard-b8b904d2.js} +4 -4
- package/dist/esm/MeritBadgeDisplayCard-b8b904d2.js.map +1 -0
- package/dist/esm/{MeritBadgeSkillsCount-11bd0ae3.js → MeritBadgeSkillsCount-46d9c24b.js} +2 -2
- package/dist/esm/{MeritBadgeSkillsCount-11bd0ae3.js.map → MeritBadgeSkillsCount-46d9c24b.js.map} +1 -1
- package/dist/esm/{VCCard-7fa8f15b.js → VCCard-e2ebb922.js} +3 -3
- package/dist/esm/{VCCard-7fa8f15b.js.map → VCCard-e2ebb922.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-314c1107.js → VCDisplayBackFace-4f2d700d.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-314c1107.js.map → VCDisplayBackFace-4f2d700d.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-652910f5.js → VCDisplayCard-32e126f8.js} +3 -3
- package/dist/esm/{VCDisplayCard-652910f5.js.map → VCDisplayCard-32e126f8.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-a8b9a519.js → VCDisplayCard2-ec2177de.js} +19 -19
- package/dist/esm/VCDisplayCard2-ec2177de.js.map +1 -0
- package/dist/esm/{VCVerificationPill-be1140c5.js → VCVerificationPill-0c336075.js} +2 -2
- package/dist/esm/{VCVerificationPill-be1140c5.js.map → VCVerificationPill-0c336075.js.map} +1 -1
- package/dist/esm/{VerifierStateBadgeAndText-97117c5d.js → VerifierStateBadgeAndText-0a4e0c63.js} +128 -106
- package/dist/esm/VerifierStateBadgeAndText-0a4e0c63.js.map +1 -0
- package/dist/esm/{credential.helpers-3dfe6b60.js → credential.helpers-61005784.js} +2 -2
- package/dist/esm/{credential.helpers-3dfe6b60.js.map → credential.helpers-61005784.js.map} +1 -1
- package/dist/esm/index.js +12 -12
- package/dist/esm/index14.js +12 -12
- package/dist/esm/index22.js +5 -5
- package/dist/esm/index39.js +10 -10
- package/dist/esm/index4.js +3 -3
- package/dist/esm/index40.js +4 -4
- package/dist/esm/index41.js +5 -5
- package/dist/esm/index42.js +6 -6
- package/dist/esm/index43.js +1 -1
- package/dist/esm/index46.js +2 -2
- package/dist/esm/index7.js +4 -4
- package/dist/esm/{types.esm-a67e86b1.js → types.esm-2762569e.js} +13 -3
- package/dist/esm/types.esm-2762569e.js.map +1 -0
- package/dist/index.d.ts +20 -2
- package/package.json +3 -3
- package/src/assets/styles/main.css +24 -18
- package/src/components/MeritBadgeDisplayCard/MediaAttachmentsBox.tsx +3 -2
- package/src/components/VCDisplayCard2/VC2FrontFaceInfo.tsx +19 -21
- package/dist/cjs/MeritBadgeDisplayCard-201bf5ad.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-78d4cc3f.js.map +0 -1
- package/dist/cjs/VerifierStateBadgeAndText-57a7b85f.js.map +0 -1
- package/dist/cjs/types.esm-228757cd.js.map +0 -1
- package/dist/esm/MeritBadgeDisplayCard-13622cd4.js.map +0 -1
- package/dist/esm/VCDisplayCard2-a8b9a519.js.map +0 -1
- package/dist/esm/VerifierStateBadgeAndText-97117c5d.js.map +0 -1
- package/dist/esm/types.esm-a67e86b1.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCVerificationPill-
|
|
1
|
+
{"version":3,"file":"VCVerificationPill-a1607dff.js","sources":["../../src/components/VCVerificationPill/VCVerificationPill.tsx"],"sourcesContent":["import React from 'react';\nimport { VerificationStatus, VerificationStatusEnum } from '@learncard/types';\n\nimport VerificationFailedIcon from '../../assets/images/RedXCircle.svg';\nimport VerificationPassedIcon from '../../assets/images/GreenCheckCircle.svg';\nimport VerificationWarningIcon from '../../assets/images/YellowWarningCircle.svg';\n\ntype VerificationDisplayItemProps = {\n status?: VerificationStatus;\n message?: string;\n details?: string;\n};\n\ntype VerifiableStateIndicatorProps = {\n status: VerificationStatus;\n};\n\nconst StatusToBgColor = {\n [VerificationStatusEnum.Success]: 'bg-emerald-500',\n [VerificationStatusEnum.Failed]: 'bg-yellow-400',\n [VerificationStatusEnum.Error]: 'bg-rose-600',\n};\n\nconst StatusToTextColor = {\n [VerificationStatusEnum.Success]: 'text-emerald-700',\n [VerificationStatusEnum.Failed]: 'text-yellow-400',\n [VerificationStatusEnum.Error]: 'text-rose-600',\n};\n\nconst StatusToIcon = {\n [VerificationStatusEnum.Success]: VerificationPassedIcon,\n [VerificationStatusEnum.Failed]: VerificationWarningIcon,\n [VerificationStatusEnum.Error]: VerificationFailedIcon,\n};\n\nconst StatusToText = {\n [VerificationStatusEnum.Success]: 'Verification Success',\n [VerificationStatusEnum.Error]: 'Verification Error ',\n [VerificationStatusEnum.Failed]: 'Verification Failed',\n};\n\nexport const ValidationStateIndicator: React.FC<VerifiableStateIndicatorProps> = ({ status }) => {\n const bgColor = StatusToBgColor[status];\n const source = StatusToIcon[status];\n\n return (\n <div className={`relative rounded-full w-[30px] h-[30px] ${bgColor}`}>\n <div className=\"relative w-[100%] h-[100%] flex items-center justify-center rounded-[50%] bg-white rounded-full overflow-hidden\">\n <img\n className=\"h-full w-full object-contain p-1\"\n src={source ?? ''}\n alt=\"Verification Status Icon\"\n />\n </div>\n </div>\n );\n};\n\nconst VCVerificationPill: React.FC<VerificationDisplayItemProps> = ({\n message = '',\n details,\n status = VerificationStatusEnum.Success,\n}) => {\n const statusColor = StatusToTextColor[status];\n const statusInfoText = StatusToText[status];\n\n return (\n <section className=\"flex width-full bg-white p-2 px-5 my-3.5 justify-between items-center relative vc-verification-checklist-pill rounded-[22px]\">\n <div className=\"vc-pill-left\">\n <p className={`text-[10px] font-bold status-text uppercase ${statusColor}`}>\n {statusInfoText}\n </p>\n\n <p className=\"text-[12px] text-grayscale-900 vc-pill-text\">{message}</p>\n\n {details && <p className=\"text-[12px] text-gray-600\"> {details}</p>}\n </div>\n <div className=\"vc-pill-right\">\n <ValidationStateIndicator status={status} />\n </div>\n </section>\n );\n};\n\nexport default VCVerificationPill;\n"],"names":["VerificationStatusEnum","VerificationPassedIcon","VerificationWarningIcon","VerificationFailedIcon","React"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,eAAkB,GAAA;AAAA,EACpB,CAACA,gCAAuB,CAAA,OAAO,GAAG,gBAAA;AAAA,EAClC,CAACA,gCAAuB,CAAA,MAAM,GAAG,eAAA;AAAA,EACjC,CAACA,gCAAuB,CAAA,KAAK,GAAG,aAAA;AACpC,CAAA,CAAA;AAEA,MAAM,iBAAoB,GAAA;AAAA,EACtB,CAACA,gCAAuB,CAAA,OAAO,GAAG,kBAAA;AAAA,EAClC,CAACA,gCAAuB,CAAA,MAAM,GAAG,iBAAA;AAAA,EACjC,CAACA,gCAAuB,CAAA,KAAK,GAAG,eAAA;AACpC,CAAA,CAAA;AAEA,MAAM,YAAe,GAAA;AAAA,EACjB,CAACA,gCAAuB,CAAA,OAAO,GAAGC,0CAAA;AAAA,EAClC,CAACD,gCAAuB,CAAA,MAAM,GAAGE,2CAAA;AAAA,EACjC,CAACF,gCAAuB,CAAA,KAAK,GAAGG,0CAAA;AACpC,CAAA,CAAA;AAEA,MAAM,YAAe,GAAA;AAAA,EACjB,CAACH,gCAAuB,CAAA,OAAO,GAAG,sBAAA;AAAA,EAClC,CAACA,gCAAuB,CAAA,KAAK,GAAG,qBAAA;AAAA,EAChC,CAACA,gCAAuB,CAAA,MAAM,GAAG,qBAAA;AACrC,CAAA,CAAA;AAEO,MAAM,wBAAoE,GAAA,CAAC,EAAE,MAAA,EAAa,KAAA;AAC7F,EAAM,MAAA,OAAA,GAAU,gBAAgB,MAAM,CAAA,CAAA;AACtC,EAAM,MAAA,MAAA,GAAS,aAAa,MAAM,CAAA,CAAA;AAElC,EACI,uBAAAI,yBAAA,CAAA,aAAA,CAAC,SAAI,SAAW,EAAA,CAAA,wCAAA,EAA2C,OAAO,CAC9D,CAAA,EAAA,kBAAAA,yBAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAU,iHACX,EAAA,kBAAAA,yBAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACG,SAAU,EAAA,kCAAA;AAAA,MACV,KAAK,MAAU,IAAA,IAAA,GAAA,MAAA,GAAA,EAAA;AAAA,MACf,GAAI,EAAA,0BAAA;AAAA,KAAA;AAAA,GAEZ,CACJ,CAAA,CAAA;AAER,EAAA;AAEA,MAAM,qBAA6D,CAAC;AAAA,EAChE,OAAU,GAAA,EAAA;AAAA,EACV,OAAA;AAAA,EACA,SAASJ,gCAAuB,CAAA,OAAA;AACpC,CAAM,KAAA;AACF,EAAM,MAAA,WAAA,GAAc,kBAAkB,MAAM,CAAA,CAAA;AAC5C,EAAM,MAAA,cAAA,GAAiB,aAAa,MAAM,CAAA,CAAA;AAE1C,EAAA,+DACK,SAAQ,EAAA,EAAA,SAAA,EAAU,8HACf,EAAA,kBAAAI,yBAAA,CAAA,aAAA,CAAC,SAAI,SAAU,EAAA,cAAA,EAAA,kBACVA,yBAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAE,WAAW,CAA+C,4CAAA,EAAA,WAAW,MACnE,cACL,CAAA,0DAEC,GAAE,EAAA,EAAA,SAAA,EAAU,6CAA+C,EAAA,EAAA,OAAQ,GAEnE,OAAW,oBAAAA,yBAAA,CAAA,aAAA,CAAC,OAAE,SAAU,EAAA,2BAAA,EAAA,EAA4B,KAAE,OAAQ,CACnE,CACA,kBAAAA,yBAAA,CAAA,aAAA,CAAC,SAAI,SAAU,EAAA,eAAA,EAAA,0DACV,wBAAyB,EAAA,EAAA,MAAA,EAAgB,CAC9C,CACJ,CAAA,CAAA;AAER;;;;;"}
|
package/dist/cjs/{VerifierStateBadgeAndText-57a7b85f.js → VerifierStateBadgeAndText-5f10743e.js}
RENAMED
|
@@ -11,7 +11,7 @@ var Social = require('./social.png');
|
|
|
11
11
|
var Stem = require('./stem.png');
|
|
12
12
|
var Trade = require('./trade.png');
|
|
13
13
|
var PuzzlePiece = require('./PuzzlePiece-e64f4596.js');
|
|
14
|
-
var types_esm = require('./types.esm-
|
|
14
|
+
var types_esm = require('./types.esm-50b3eecd.js');
|
|
15
15
|
var i18n = require('./i18n-ddbb18e7.js');
|
|
16
16
|
|
|
17
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -435,6 +435,10 @@ const VideoIcon = ({ className = "", size = "25" }) => {
|
|
|
435
435
|
);
|
|
436
436
|
};
|
|
437
437
|
|
|
438
|
+
function number(params) {
|
|
439
|
+
return types_esm._coercedNumber(types_esm.ZodNumber, params);
|
|
440
|
+
}
|
|
441
|
+
|
|
438
442
|
const capitalize = (string) => {
|
|
439
443
|
return string ? string[0].toUpperCase() + string.slice(1) : "";
|
|
440
444
|
};
|
|
@@ -3162,12 +3166,11 @@ var produce = immer.produce;
|
|
|
3162
3166
|
*
|
|
3163
3167
|
* @author Dan Kogai (https://github.com/dankogai)
|
|
3164
3168
|
*/
|
|
3165
|
-
const version = '3.
|
|
3169
|
+
const version = '3.9.3';
|
|
3166
3170
|
/**
|
|
3167
3171
|
* @deprecated use lowercase `version`.
|
|
3168
3172
|
*/
|
|
3169
3173
|
const VERSION = version;
|
|
3170
|
-
const _hasBuffer = typeof Buffer === 'function';
|
|
3171
3174
|
const _TD = typeof TextDecoder === 'function' ? new TextDecoder('utf-8', { ignoreBOM: true }) : undefined;
|
|
3172
3175
|
const _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
|
|
3173
3176
|
const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -3211,10 +3214,8 @@ const btoaPolyfill = (bin) => {
|
|
|
3211
3214
|
* @returns {string} Base64-encoded string
|
|
3212
3215
|
*/
|
|
3213
3216
|
const _btoa = typeof btoa === 'function' ? (bin) => btoa(bin)
|
|
3214
|
-
:
|
|
3215
|
-
|
|
3216
|
-
const _fromUint8Array = _hasBuffer
|
|
3217
|
-
? (u8a) => Buffer.from(u8a).toString('base64')
|
|
3217
|
+
: btoaPolyfill;
|
|
3218
|
+
const _fromUint8Array = typeof Uint8Array.prototype.toBase64 === 'function' ? (u8a) => u8a.toBase64()
|
|
3218
3219
|
: (u8a) => {
|
|
3219
3220
|
// cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326
|
|
3220
3221
|
const maxargs = 0x1000;
|
|
@@ -3253,7 +3254,7 @@ const cb_utob = (c) => {
|
|
|
3253
3254
|
+ _fromCC(0x80 | (cc & 0x3f)));
|
|
3254
3255
|
}
|
|
3255
3256
|
};
|
|
3256
|
-
const re_utob = /[\uD800-\uDBFF][\uDC00-\
|
|
3257
|
+
const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
|
|
3257
3258
|
/**
|
|
3258
3259
|
* @deprecated should have been internal use only.
|
|
3259
3260
|
* @param {string} src UTF-8 string
|
|
@@ -3261,11 +3262,9 @@ const re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
3261
3262
|
*/
|
|
3262
3263
|
const utob = (u) => u.replace(re_utob, cb_utob);
|
|
3263
3264
|
//
|
|
3264
|
-
const _encode =
|
|
3265
|
-
? (s) =>
|
|
3266
|
-
:
|
|
3267
|
-
? (s) => _fromUint8Array(_TE.encode(s))
|
|
3268
|
-
: (s) => _btoa(utob(s));
|
|
3265
|
+
const _encode = _TE
|
|
3266
|
+
? (s) => _fromUint8Array(_TE.encode(s))
|
|
3267
|
+
: (s) => _btoa(utob(s));
|
|
3269
3268
|
/**
|
|
3270
3269
|
* converts a UTF-8-encoded string to a Base64 string.
|
|
3271
3270
|
* @param {boolean} [urlsafe] if `true` make the result URL-safe
|
|
@@ -3341,22 +3340,18 @@ const atobPolyfill = (asc) => {
|
|
|
3341
3340
|
* @returns {string} binary string
|
|
3342
3341
|
*/
|
|
3343
3342
|
const _atob = typeof atob === 'function' ? (asc) => atob(_tidyB64(asc))
|
|
3344
|
-
:
|
|
3345
|
-
: atobPolyfill;
|
|
3343
|
+
: atobPolyfill;
|
|
3346
3344
|
//
|
|
3347
|
-
const _toUint8Array =
|
|
3348
|
-
? (a) => _U8Afrom(
|
|
3349
|
-
: (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
3345
|
+
const _toUint8Array = typeof Uint8Array.fromBase64 === 'function'
|
|
3346
|
+
? (a) => Uint8Array.fromBase64(a) : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));
|
|
3350
3347
|
/**
|
|
3351
3348
|
* converts a Base64 string to a Uint8Array.
|
|
3352
3349
|
*/
|
|
3353
3350
|
const toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
3354
3351
|
//
|
|
3355
|
-
const _decode =
|
|
3356
|
-
? (a) =>
|
|
3357
|
-
:
|
|
3358
|
-
? (a) => _TD.decode(_toUint8Array(a))
|
|
3359
|
-
: (a) => btou(_atob(a));
|
|
3352
|
+
const _decode = _TD
|
|
3353
|
+
? (a) => _TD.decode(_toUint8Array(a))
|
|
3354
|
+
: (a) => btou(_atob(a));
|
|
3360
3355
|
const _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));
|
|
3361
3356
|
/**
|
|
3362
3357
|
* converts a Base64 string to a UTF-8 string.
|
|
@@ -3484,6 +3479,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3484
3479
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
3485
3480
|
});
|
|
3486
3481
|
};
|
|
3482
|
+
var _a;
|
|
3487
3483
|
var __create = Object.create;
|
|
3488
3484
|
var __defProp2 = Object.defineProperty;
|
|
3489
3485
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -4345,7 +4341,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
4345
4341
|
util: /* @__PURE__ */ __name(() => util_exports, "util"),
|
|
4346
4342
|
version: /* @__PURE__ */ __name(() => version, "version")
|
|
4347
4343
|
});
|
|
4348
|
-
var
|
|
4344
|
+
var _a2;
|
|
4349
4345
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
4350
4346
|
status: "aborted"
|
|
4351
4347
|
});
|
|
@@ -4425,7 +4421,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
4425
4421
|
this.name = "ZodEncodeError";
|
|
4426
4422
|
}
|
|
4427
4423
|
}, __name(_b, "$ZodEncodeError"), __name2(_b, "$ZodEncodeError"), _b);
|
|
4428
|
-
(_c = (
|
|
4424
|
+
(_c = (_a2 = globalThis).__zod_globalConfig) != null ? _c : _a2.__zod_globalConfig = {};
|
|
4429
4425
|
var globalConfig = globalThis.__zod_globalConfig;
|
|
4430
4426
|
function config(newConfig) {
|
|
4431
4427
|
if (newConfig)
|
|
@@ -14617,7 +14613,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
14617
14613
|
}
|
|
14618
14614
|
__name(yo_default, "yo_default");
|
|
14619
14615
|
__name2(yo_default, "default");
|
|
14620
|
-
var
|
|
14616
|
+
var _a22;
|
|
14621
14617
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
14622
14618
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
14623
14619
|
var $ZodRegistry = (_f = class {
|
|
@@ -14666,7 +14662,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
14666
14662
|
}
|
|
14667
14663
|
__name(registry, "registry");
|
|
14668
14664
|
__name2(registry, "registry");
|
|
14669
|
-
(_g = (
|
|
14665
|
+
(_g = (_a22 = globalThis).__zod_globalRegistry) != null ? _g : _a22.__zod_globalRegistry = registry();
|
|
14670
14666
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
14671
14667
|
// @__NO_SIDE_EFFECTS__
|
|
14672
14668
|
function _string(Class2, params) {
|
|
@@ -18631,7 +18627,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18631
18627
|
var ZodFirstPartyTypeKind;
|
|
18632
18628
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
18633
18629
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
18634
|
-
var
|
|
18630
|
+
var z3 = __spreadProps(__spreadValues(__spreadValues({}, schemas_exports2), checks_exports2), {
|
|
18635
18631
|
iso: iso_exports
|
|
18636
18632
|
});
|
|
18637
18633
|
var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -18743,7 +18739,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18743
18739
|
function convertBaseSchema(schema, ctx) {
|
|
18744
18740
|
if (schema.not !== void 0) {
|
|
18745
18741
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
18746
|
-
return
|
|
18742
|
+
return z3.never();
|
|
18747
18743
|
}
|
|
18748
18744
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
18749
18745
|
}
|
|
@@ -18765,7 +18761,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18765
18761
|
return ctx.refs.get(refPath);
|
|
18766
18762
|
}
|
|
18767
18763
|
if (ctx.processing.has(refPath)) {
|
|
18768
|
-
return
|
|
18764
|
+
return z3.lazy(() => {
|
|
18769
18765
|
if (!ctx.refs.has(refPath)) {
|
|
18770
18766
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
18771
18767
|
}
|
|
@@ -18782,25 +18778,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18782
18778
|
if (schema.enum !== void 0) {
|
|
18783
18779
|
const enumValues = schema.enum;
|
|
18784
18780
|
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
18785
|
-
return
|
|
18781
|
+
return z3.null();
|
|
18786
18782
|
}
|
|
18787
18783
|
if (enumValues.length === 0) {
|
|
18788
|
-
return
|
|
18784
|
+
return z3.never();
|
|
18789
18785
|
}
|
|
18790
18786
|
if (enumValues.length === 1) {
|
|
18791
|
-
return
|
|
18787
|
+
return z3.literal(enumValues[0]);
|
|
18792
18788
|
}
|
|
18793
18789
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
18794
|
-
return
|
|
18790
|
+
return z3.enum(enumValues);
|
|
18795
18791
|
}
|
|
18796
|
-
const literalSchemas = enumValues.map((v) =>
|
|
18792
|
+
const literalSchemas = enumValues.map((v) => z3.literal(v));
|
|
18797
18793
|
if (literalSchemas.length < 2) {
|
|
18798
18794
|
return literalSchemas[0];
|
|
18799
18795
|
}
|
|
18800
|
-
return
|
|
18796
|
+
return z3.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
18801
18797
|
}
|
|
18802
18798
|
if (schema.const !== void 0) {
|
|
18803
|
-
return
|
|
18799
|
+
return z3.literal(schema.const);
|
|
18804
18800
|
}
|
|
18805
18801
|
const type = schema.type;
|
|
18806
18802
|
if (Array.isArray(type)) {
|
|
@@ -18809,68 +18805,68 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18809
18805
|
return convertBaseSchema(typeSchema, ctx);
|
|
18810
18806
|
});
|
|
18811
18807
|
if (typeSchemas.length === 0) {
|
|
18812
|
-
return
|
|
18808
|
+
return z3.never();
|
|
18813
18809
|
}
|
|
18814
18810
|
if (typeSchemas.length === 1) {
|
|
18815
18811
|
return typeSchemas[0];
|
|
18816
18812
|
}
|
|
18817
|
-
return
|
|
18813
|
+
return z3.union(typeSchemas);
|
|
18818
18814
|
}
|
|
18819
18815
|
if (!type) {
|
|
18820
|
-
return
|
|
18816
|
+
return z3.any();
|
|
18821
18817
|
}
|
|
18822
18818
|
let zodSchema;
|
|
18823
18819
|
switch (type) {
|
|
18824
18820
|
case "string": {
|
|
18825
|
-
let stringSchema =
|
|
18821
|
+
let stringSchema = z3.string();
|
|
18826
18822
|
if (schema.format) {
|
|
18827
18823
|
const format = schema.format;
|
|
18828
18824
|
if (format === "email") {
|
|
18829
|
-
stringSchema = stringSchema.check(
|
|
18825
|
+
stringSchema = stringSchema.check(z3.email());
|
|
18830
18826
|
} else if (format === "uri" || format === "uri-reference") {
|
|
18831
|
-
stringSchema = stringSchema.check(
|
|
18827
|
+
stringSchema = stringSchema.check(z3.url());
|
|
18832
18828
|
} else if (format === "uuid" || format === "guid") {
|
|
18833
|
-
stringSchema = stringSchema.check(
|
|
18829
|
+
stringSchema = stringSchema.check(z3.uuid());
|
|
18834
18830
|
} else if (format === "date-time") {
|
|
18835
|
-
stringSchema = stringSchema.check(
|
|
18831
|
+
stringSchema = stringSchema.check(z3.iso.datetime());
|
|
18836
18832
|
} else if (format === "date") {
|
|
18837
|
-
stringSchema = stringSchema.check(
|
|
18833
|
+
stringSchema = stringSchema.check(z3.iso.date());
|
|
18838
18834
|
} else if (format === "time") {
|
|
18839
|
-
stringSchema = stringSchema.check(
|
|
18835
|
+
stringSchema = stringSchema.check(z3.iso.time());
|
|
18840
18836
|
} else if (format === "duration") {
|
|
18841
|
-
stringSchema = stringSchema.check(
|
|
18837
|
+
stringSchema = stringSchema.check(z3.iso.duration());
|
|
18842
18838
|
} else if (format === "ipv4") {
|
|
18843
|
-
stringSchema = stringSchema.check(
|
|
18839
|
+
stringSchema = stringSchema.check(z3.ipv4());
|
|
18844
18840
|
} else if (format === "ipv6") {
|
|
18845
|
-
stringSchema = stringSchema.check(
|
|
18841
|
+
stringSchema = stringSchema.check(z3.ipv6());
|
|
18846
18842
|
} else if (format === "mac") {
|
|
18847
|
-
stringSchema = stringSchema.check(
|
|
18843
|
+
stringSchema = stringSchema.check(z3.mac());
|
|
18848
18844
|
} else if (format === "cidr") {
|
|
18849
|
-
stringSchema = stringSchema.check(
|
|
18845
|
+
stringSchema = stringSchema.check(z3.cidrv4());
|
|
18850
18846
|
} else if (format === "cidr-v6") {
|
|
18851
|
-
stringSchema = stringSchema.check(
|
|
18847
|
+
stringSchema = stringSchema.check(z3.cidrv6());
|
|
18852
18848
|
} else if (format === "base64") {
|
|
18853
|
-
stringSchema = stringSchema.check(
|
|
18849
|
+
stringSchema = stringSchema.check(z3.base64());
|
|
18854
18850
|
} else if (format === "base64url") {
|
|
18855
|
-
stringSchema = stringSchema.check(
|
|
18851
|
+
stringSchema = stringSchema.check(z3.base64url());
|
|
18856
18852
|
} else if (format === "e164") {
|
|
18857
|
-
stringSchema = stringSchema.check(
|
|
18853
|
+
stringSchema = stringSchema.check(z3.e164());
|
|
18858
18854
|
} else if (format === "jwt") {
|
|
18859
|
-
stringSchema = stringSchema.check(
|
|
18855
|
+
stringSchema = stringSchema.check(z3.jwt());
|
|
18860
18856
|
} else if (format === "emoji") {
|
|
18861
|
-
stringSchema = stringSchema.check(
|
|
18857
|
+
stringSchema = stringSchema.check(z3.emoji());
|
|
18862
18858
|
} else if (format === "nanoid") {
|
|
18863
|
-
stringSchema = stringSchema.check(
|
|
18859
|
+
stringSchema = stringSchema.check(z3.nanoid());
|
|
18864
18860
|
} else if (format === "cuid") {
|
|
18865
|
-
stringSchema = stringSchema.check(
|
|
18861
|
+
stringSchema = stringSchema.check(z3.cuid());
|
|
18866
18862
|
} else if (format === "cuid2") {
|
|
18867
|
-
stringSchema = stringSchema.check(
|
|
18863
|
+
stringSchema = stringSchema.check(z3.cuid2());
|
|
18868
18864
|
} else if (format === "ulid") {
|
|
18869
|
-
stringSchema = stringSchema.check(
|
|
18865
|
+
stringSchema = stringSchema.check(z3.ulid());
|
|
18870
18866
|
} else if (format === "xid") {
|
|
18871
|
-
stringSchema = stringSchema.check(
|
|
18867
|
+
stringSchema = stringSchema.check(z3.xid());
|
|
18872
18868
|
} else if (format === "ksuid") {
|
|
18873
|
-
stringSchema = stringSchema.check(
|
|
18869
|
+
stringSchema = stringSchema.check(z3.ksuid());
|
|
18874
18870
|
}
|
|
18875
18871
|
}
|
|
18876
18872
|
if (typeof schema.minLength === "number") {
|
|
@@ -18887,7 +18883,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18887
18883
|
}
|
|
18888
18884
|
case "number":
|
|
18889
18885
|
case "integer": {
|
|
18890
|
-
let numberSchema = type === "integer" ?
|
|
18886
|
+
let numberSchema = type === "integer" ? z3.number().int() : z3.number();
|
|
18891
18887
|
if (typeof schema.minimum === "number") {
|
|
18892
18888
|
numberSchema = numberSchema.min(schema.minimum);
|
|
18893
18889
|
}
|
|
@@ -18911,11 +18907,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18911
18907
|
break;
|
|
18912
18908
|
}
|
|
18913
18909
|
case "boolean": {
|
|
18914
|
-
zodSchema =
|
|
18910
|
+
zodSchema = z3.boolean();
|
|
18915
18911
|
break;
|
|
18916
18912
|
}
|
|
18917
18913
|
case "null": {
|
|
18918
|
-
zodSchema =
|
|
18914
|
+
zodSchema = z3.null();
|
|
18919
18915
|
break;
|
|
18920
18916
|
}
|
|
18921
18917
|
case "object": {
|
|
@@ -18928,14 +18924,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18928
18924
|
}
|
|
18929
18925
|
if (schema.propertyNames) {
|
|
18930
18926
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
18931
|
-
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) :
|
|
18927
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z3.any();
|
|
18932
18928
|
if (Object.keys(shape).length === 0) {
|
|
18933
|
-
zodSchema =
|
|
18929
|
+
zodSchema = z3.record(keySchema, valueSchema);
|
|
18934
18930
|
break;
|
|
18935
18931
|
}
|
|
18936
|
-
const objectSchema2 =
|
|
18937
|
-
const recordSchema =
|
|
18938
|
-
zodSchema =
|
|
18932
|
+
const objectSchema2 = z3.object(shape).passthrough();
|
|
18933
|
+
const recordSchema = z3.looseRecord(keySchema, valueSchema);
|
|
18934
|
+
zodSchema = z3.intersection(objectSchema2, recordSchema);
|
|
18939
18935
|
break;
|
|
18940
18936
|
}
|
|
18941
18937
|
if (schema.patternProperties) {
|
|
@@ -18944,28 +18940,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18944
18940
|
const looseRecords = [];
|
|
18945
18941
|
for (const pattern of patternKeys) {
|
|
18946
18942
|
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
18947
|
-
const keySchema =
|
|
18948
|
-
looseRecords.push(
|
|
18943
|
+
const keySchema = z3.string().regex(new RegExp(pattern));
|
|
18944
|
+
looseRecords.push(z3.looseRecord(keySchema, patternValue));
|
|
18949
18945
|
}
|
|
18950
18946
|
const schemasToIntersect = [];
|
|
18951
18947
|
if (Object.keys(shape).length > 0) {
|
|
18952
|
-
schemasToIntersect.push(
|
|
18948
|
+
schemasToIntersect.push(z3.object(shape).passthrough());
|
|
18953
18949
|
}
|
|
18954
18950
|
schemasToIntersect.push(...looseRecords);
|
|
18955
18951
|
if (schemasToIntersect.length === 0) {
|
|
18956
|
-
zodSchema =
|
|
18952
|
+
zodSchema = z3.object({}).passthrough();
|
|
18957
18953
|
} else if (schemasToIntersect.length === 1) {
|
|
18958
18954
|
zodSchema = schemasToIntersect[0];
|
|
18959
18955
|
} else {
|
|
18960
|
-
let result =
|
|
18956
|
+
let result = z3.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
18961
18957
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
18962
|
-
result =
|
|
18958
|
+
result = z3.intersection(result, schemasToIntersect[i]);
|
|
18963
18959
|
}
|
|
18964
18960
|
zodSchema = result;
|
|
18965
18961
|
}
|
|
18966
18962
|
break;
|
|
18967
18963
|
}
|
|
18968
|
-
const objectSchema =
|
|
18964
|
+
const objectSchema = z3.object(shape);
|
|
18969
18965
|
if (schema.additionalProperties === false) {
|
|
18970
18966
|
zodSchema = objectSchema.strict();
|
|
18971
18967
|
} else if (typeof schema.additionalProperties === "object") {
|
|
@@ -18982,33 +18978,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18982
18978
|
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
18983
18979
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
|
|
18984
18980
|
if (rest) {
|
|
18985
|
-
zodSchema =
|
|
18981
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
18986
18982
|
} else {
|
|
18987
|
-
zodSchema =
|
|
18983
|
+
zodSchema = z3.tuple(tupleItems);
|
|
18988
18984
|
}
|
|
18989
18985
|
if (typeof schema.minItems === "number") {
|
|
18990
|
-
zodSchema = zodSchema.check(
|
|
18986
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
18991
18987
|
}
|
|
18992
18988
|
if (typeof schema.maxItems === "number") {
|
|
18993
|
-
zodSchema = zodSchema.check(
|
|
18989
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
18994
18990
|
}
|
|
18995
18991
|
} else if (Array.isArray(items)) {
|
|
18996
18992
|
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
18997
18993
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
|
|
18998
18994
|
if (rest) {
|
|
18999
|
-
zodSchema =
|
|
18995
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
19000
18996
|
} else {
|
|
19001
|
-
zodSchema =
|
|
18997
|
+
zodSchema = z3.tuple(tupleItems);
|
|
19002
18998
|
}
|
|
19003
18999
|
if (typeof schema.minItems === "number") {
|
|
19004
|
-
zodSchema = zodSchema.check(
|
|
19000
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
19005
19001
|
}
|
|
19006
19002
|
if (typeof schema.maxItems === "number") {
|
|
19007
|
-
zodSchema = zodSchema.check(
|
|
19003
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
19008
19004
|
}
|
|
19009
19005
|
} else if (items !== void 0) {
|
|
19010
19006
|
const element = convertSchema(items, ctx);
|
|
19011
|
-
let arraySchema =
|
|
19007
|
+
let arraySchema = z3.array(element);
|
|
19012
19008
|
if (typeof schema.minItems === "number") {
|
|
19013
19009
|
arraySchema = arraySchema.min(schema.minItems);
|
|
19014
19010
|
}
|
|
@@ -19017,7 +19013,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19017
19013
|
}
|
|
19018
19014
|
zodSchema = arraySchema;
|
|
19019
19015
|
} else {
|
|
19020
|
-
zodSchema =
|
|
19016
|
+
zodSchema = z3.array(z3.any());
|
|
19021
19017
|
}
|
|
19022
19018
|
break;
|
|
19023
19019
|
}
|
|
@@ -19030,37 +19026,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19030
19026
|
__name2(convertBaseSchema, "convertBaseSchema");
|
|
19031
19027
|
function convertSchema(schema, ctx) {
|
|
19032
19028
|
if (typeof schema === "boolean") {
|
|
19033
|
-
return schema ?
|
|
19029
|
+
return schema ? z3.any() : z3.never();
|
|
19034
19030
|
}
|
|
19035
19031
|
let baseSchema = convertBaseSchema(schema, ctx);
|
|
19036
19032
|
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
19037
19033
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
19038
19034
|
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
19039
|
-
const anyOfUnion =
|
|
19040
|
-
baseSchema = hasExplicitType ?
|
|
19035
|
+
const anyOfUnion = z3.union(options);
|
|
19036
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
19041
19037
|
}
|
|
19042
19038
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
19043
19039
|
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
19044
|
-
const oneOfUnion =
|
|
19045
|
-
baseSchema = hasExplicitType ?
|
|
19040
|
+
const oneOfUnion = z3.xor(options);
|
|
19041
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
19046
19042
|
}
|
|
19047
19043
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
19048
19044
|
if (schema.allOf.length === 0) {
|
|
19049
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
19045
|
+
baseSchema = hasExplicitType ? baseSchema : z3.any();
|
|
19050
19046
|
} else {
|
|
19051
19047
|
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
19052
19048
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
19053
19049
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
19054
|
-
result =
|
|
19050
|
+
result = z3.intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
19055
19051
|
}
|
|
19056
19052
|
baseSchema = result;
|
|
19057
19053
|
}
|
|
19058
19054
|
}
|
|
19059
19055
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
19060
|
-
baseSchema =
|
|
19056
|
+
baseSchema = z3.nullable(baseSchema);
|
|
19061
19057
|
}
|
|
19062
19058
|
if (schema.readOnly === true) {
|
|
19063
|
-
baseSchema =
|
|
19059
|
+
baseSchema = z3.readonly(baseSchema);
|
|
19064
19060
|
}
|
|
19065
19061
|
if (schema.default !== void 0) {
|
|
19066
19062
|
baseSchema = baseSchema.default(schema.default);
|
|
@@ -19096,7 +19092,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19096
19092
|
function fromJSONSchema(schema, params) {
|
|
19097
19093
|
var _a4;
|
|
19098
19094
|
if (typeof schema === "boolean") {
|
|
19099
|
-
return schema ?
|
|
19095
|
+
return schema ? z3.any() : z3.never();
|
|
19100
19096
|
}
|
|
19101
19097
|
let normalized;
|
|
19102
19098
|
try {
|
|
@@ -19821,7 +19817,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19821
19817
|
did: LCNProfileValidator.shape.did
|
|
19822
19818
|
});
|
|
19823
19819
|
var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
|
|
19824
|
-
email: LCNProfileValidator.shape.email
|
|
19820
|
+
email: LCNProfileValidator.shape.email,
|
|
19821
|
+
connectedAt: external_exports.iso.datetime().optional().describe("When the viewer and this profile became connected.")
|
|
19825
19822
|
});
|
|
19826
19823
|
var LCNVisibleProfileValidator = external_exports.union([
|
|
19827
19824
|
LCNConnectionProfileValidator.strict(),
|
|
@@ -21266,11 +21263,11 @@ var getFilestackHandle = /* @__PURE__ */ __name((url) => {
|
|
|
21266
21263
|
return urlParams[urlParams.length - 1];
|
|
21267
21264
|
}, "getFilestackHandle");
|
|
21268
21265
|
var getFileType = /* @__PURE__ */ __name((url) => __async(null, null, function* () {
|
|
21269
|
-
var
|
|
21266
|
+
var _a2;
|
|
21270
21267
|
const handle = getFilestackHandle(url);
|
|
21271
21268
|
try {
|
|
21272
21269
|
const data = yield (yield fetch(`https://www.filestackapi.com/api/file/${handle}/metadata`)).json();
|
|
21273
|
-
return (
|
|
21270
|
+
return (_a2 = data.mimetype) != null ? _a2 : "";
|
|
21274
21271
|
} catch (error) {
|
|
21275
21272
|
console.error(error);
|
|
21276
21273
|
return "";
|
|
@@ -21503,8 +21500,8 @@ function innerReactOuterReact(setState, field, value) {
|
|
|
21503
21500
|
__name(innerReactOuterReact, "innerReactOuterReact");
|
|
21504
21501
|
var curriedInnerReactOuterReact = /* @__PURE__ */ __name((setState) => (field, value) => innerReactOuterReact(setState, field, value), "curriedInnerReactOuterReact");
|
|
21505
21502
|
function curriedStateSlice(setState, options) {
|
|
21506
|
-
var
|
|
21507
|
-
if (((
|
|
21503
|
+
var _a2, _b, _c;
|
|
21504
|
+
if (((_a2 = options == null ? void 0 : options.outer) != null ? _a2 : "immer") === "immer") {
|
|
21508
21505
|
return ((_b = options == null ? void 0 : options.inner) != null ? _b : "immer") === "immer" ? curriedInnerImmerOuterImmer(setState) : curriedInnerReactOuterImmer(setState);
|
|
21509
21506
|
}
|
|
21510
21507
|
return ((_c = options == null ? void 0 : options.inner) != null ? _c : "immer") === "immer" ? curriedInnerImmerOuterReact(setState) : curriedInnerReactOuterReact(setState);
|
|
@@ -21520,6 +21517,31 @@ types_esm.object({
|
|
|
21520
21517
|
loading: types_esm.union([ImageResizingValidator, ImageUploadingValidator]).optional()
|
|
21521
21518
|
});
|
|
21522
21519
|
__toESM(require_dist());
|
|
21520
|
+
(_a = class extends Error {
|
|
21521
|
+
constructor(message) {
|
|
21522
|
+
super(message);
|
|
21523
|
+
this.name = "EnvironmentConfigurationError";
|
|
21524
|
+
}
|
|
21525
|
+
}, __name(_a, "EnvironmentConfigurationError"), _a);
|
|
21526
|
+
var requiredEnvironmentString = types_esm.string().trim().min(1, "Required but missing");
|
|
21527
|
+
types_esm.preprocess(
|
|
21528
|
+
(value) => value === "" ? void 0 : value,
|
|
21529
|
+
requiredEnvironmentString.optional()
|
|
21530
|
+
);
|
|
21531
|
+
types_esm.preprocess(
|
|
21532
|
+
(value) => value === "" ? void 0 : value,
|
|
21533
|
+
types_esm.url("Expected a valid URL").optional()
|
|
21534
|
+
);
|
|
21535
|
+
var environmentBoolean = types_esm._enum(["true", "false", "1", "0"]).transform((value) => value === "true" || value === "1");
|
|
21536
|
+
types_esm.preprocess(
|
|
21537
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
21538
|
+
environmentBoolean.optional()
|
|
21539
|
+
);
|
|
21540
|
+
var environmentPort = number().int().min(1).max(65535);
|
|
21541
|
+
types_esm.preprocess(
|
|
21542
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
21543
|
+
environmentPort.optional()
|
|
21544
|
+
);
|
|
21523
21545
|
var isAppDidWeb = /* @__PURE__ */ __name((did) => {
|
|
21524
21546
|
if (!did) return false;
|
|
21525
21547
|
const LCN_APP_DID_WEB_REGEX = /^did:web:.*:app:([^:]+)$/;
|
|
@@ -21710,4 +21732,4 @@ exports.isDid = isDid;
|
|
|
21710
21732
|
exports.isLearnCardNetworkDid = isLearnCardNetworkDid;
|
|
21711
21733
|
exports.prettyBytes = prettyBytes;
|
|
21712
21734
|
exports.resolveProfileDisplay = resolveProfileDisplay;
|
|
21713
|
-
//# sourceMappingURL=VerifierStateBadgeAndText-
|
|
21735
|
+
//# sourceMappingURL=VerifierStateBadgeAndText-5f10743e.js.map
|