PageSourceSearch

https://openart.ai/suite/_next/static/chunks/0266eb1bc4afa094.js

js openart.ai collected 2026-09-24 08:30:03 UTC 721,062 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,779640,595415,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(625468);let n=t.z.object({prompt:t.z.string().trim().min(1),resolution:t.z.enum(["2K","4K"]).default("2K"),aspectRatio:t.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),references:t.z.array(i.referenceSchema).min(1).max(14),imageCount:t.z.number().int().min(1).max(8).default(1)}),r=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string()}),o=(0,a.defineCapability)({id:"byte-plus-seedream-4-5:image2image",name:"Byte Plus Seedream 4.5",inputSchema:n,outputSchema:r,getBusinessDetails:e=>{let t=15;return{unitCredits:15,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream45Image2Image",0,o],779640);var s=t,u=a;let d=s.z.object({prompt:s.z.string().trim().min(1),resolution:s.z.enum(["2K","4K"]).default("2K"),aspectRatio:s.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),imageCount:s.z.number().int().min(1).max(8).default(1),autoEnhancePrompt:s.z.boolean().optional()}),l=s.z.object({url:s.z.string(),thumbnailUrl:s.z.string()}),c=(0,u.defineCapability)({id:"byte-plus-seedream-4-5:text2image",name:"Byte Plus Seedream 4.5",inputSchema:d,outputSchema:l,getBusinessDetails:e=>{let t=15;return{unitCredits:15,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream45Text2Image",0,c],595415)},983467,e=>{"use strict";var t=e.i(402390);let i=t.default.enum(["21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16"]),a=t.default.enum(["1K","2K","4K"]);e.s(["aspectRatioSchema",0,i,"resolutionSchema",0,a])},665230,13671,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(625468),n=e.i(983467);let r=t.z.object({prompt:t.z.string().min(1),references:t.z.array(i.referenceSchema).min(1).max(14),imageCount:t.z.number().int().min(1).max(8).default(1),aspectRatio:n.aspectRatioSchema.optional(),resolution:n.resolutionSchema.optional()}),o=t.z.object({images:t.z.array(t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional()})),seed:t.z.number().optional()}),s=(0,a.defineCapability)({id:"nano-banana-pro:image2image",name:"Nano Banana Pro Image to Image",inputSchema:r,outputSchema:o,getBusinessDetails:e=>{let t="4K"===e.resolution?80:40,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["nanoBananaProImage2Image",0,s],665230);var u=t,d=a,l=n;let c=u.z.object({prompt:u.z.string().min(1),imageCount:u.z.number().int().min(1).max(8).default(1),aspectRatio:l.aspectRatioSchema,resolution:l.resolutionSchema,autoEnhancePrompt:u.z.boolean().optional()}),f=u.z.object({images:u.z.array(u.z.object({url:u.z.string(),thumbnailUrl:u.z.string().optional()})),seed:u.z.number().optional()}),m=(0,d.defineCapability)({id:"nano-banana-pro:text2image",name:"Nano Banana Pro Text to Image",inputSchema:c,outputSchema:f,getBusinessDetails:e=>{let t="4K"===e.resolution?80:40,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["nanoBananaProText2Image",0,m],13671)},708783,e=>{"use strict";var t=e.i(207653),i=e.i(625468);let a=t.z.object({type:t.z.literal("image"),id:t.z.string(),url:t.z.string(),label:t.z.string(),metadata:t.z.custom().optional()}),n=t.z.object({prompt:t.z.string().optional(),videoCount:t.z.number().int().min(1).max(8).default(1),startFrame:a,endFrame:a.nullable().optional(),resolution:t.z.enum(["720p","1080p","4k"]).default("720p").catch("720p"),duration:t.z.union([t.z.literal(4),t.z.literal(6),t.z.literal(8)]).default(8).catch(8),aspectRatio:t.z.enum(["16:9","9:16"]).default("16:9").catch("16:9"),generateAudio:t.z.boolean().default(!0).catch(!0),mode:t.z.enum(["lite","fast","normal"]).default("lite").catch("lite")}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{"lite"===e.mode&&"4k"===e.resolution&&t.addIssue({code:"custom",path:["resolution"],message:"Lite mode does not support 4k resolution"})}),r=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),duration:t.z.number()}),o={"720p":{lite:{audio:20,noAudio:20},fast:{audio:35,noAudio:35},normal:{audio:135,noAudio:70}},"1080p":{lite:{audio:30,noAudio:30},fast:{audio:40,noAudio:35},normal:{audio:135,noAudio:70}},"4k":{fast:{audio:100,noAudio:100},normal:{audio:200,noAudio:135}}},s=(e,t,i,a)=>{let n=o[a]?.[i];return(n?t?n.audio:n.noAudio:70)*e},u=(0,i.defineCapability)({id:"veo3-1:image2video",name:"Veo 3.1 Image to Video",inputSchema:n,outputSc
1hema:r,getBusinessDetails:e=>{let t=s(e.duration,e.generateAudio,e.mode,e.resolution);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["veo31Image2Video",0,u])},267646,e=>{"use strict";var t=e.i(207653),i=e.i(625468);let a=t.z.object({prompt:t.z.string().min(1),videoCount:t.z.number().int().min(1).max(8).default(1),resolution:t.z.enum(["720p","1080p","4k"]).default("720p").catch("720p"),duration:t.z.union([t.z.literal(4),t.z.literal(6),t.z.literal(8)]).default(8).catch(8),aspectRatio:t.z.enum(["16:9","9:16","auto"]).default("16:9").catch("16:9"),generateAudio:t.z.boolean().default(!0).catch(!0),mode:t.z.enum(["lite","fast","normal"]).default("lite").catch("lite"),autoEnhancePrompt:t.z.boolean().optional()}).superRefine((e,t)=>{"lite"===e.mode&&"4k"===e.resolution&&t.addIssue({code:"custom",path:["resolution"],message:"Lite mode does not support 4k resolution"})}),n=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),duration:t.z.number()}),r={"720p":{lite:{audio:20,noAudio:20},fast:{audio:35,noAudio:35},normal:{audio:135,noAudio:70}},"1080p":{lite:{audio:30,noAudio:30},fast:{audio:40,noAudio:35},normal:{audio:135,noAudio:70}},"4k":{fast:{audio:100,noAudio:100},normal:{audio:200,noAudio:135}}},o=(e,t,i,a)=>{let n=r[a]?.[i];return(n?t?n.audio:n.noAudio:70)*e},s=(0,i.defineCapability)({id:"veo3-1:text2video",name:"Veo 3.1 Text to Video",inputSchema:a,outputSchema:n,getBusinessDetails:e=>{let t=o(e.duration,e.generateAudio,e.mode,e.resolution);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["veo31",0,s])},981499,714175,e=>{"use strict";var t=e.i(207653),i=e.i(200744);let a=300,n=0xa00000,r=.4,o=2.5,s={maxFileSizeBytes:0xa00000,minDimensionPx:300,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp"]},u={...s,maxReferenceImages:7},d={...s,maxReferenceImages:4},l={...s,maxReferenceImages:3},c={...s,maxReferenceImages:10};function f(e,i){if(!e)return;let{width:s,height:u,file_size_bytes:d}=e;if("number"==typeof s&&s<a&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Image width must be at least ${a}px`,path:["metadata","width"]}),"number"==typeof u&&u<a&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Image height must be at least ${a}px`,path:["metadata","height"]}),"number"==typeof d&&d>n&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Image file size must not exceed ${Math.round(n/1048576)}MB`,path:["metadata","file_size_bytes"]}),"number"==typeof s&&"number"==typeof u&&u>0){let e=s/u;(e<r||e>o)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Image aspect ratio must be between 1:2.5 and 2.5:1",path:["metadata"]})}}e.s(["KLING_IMAGE2IMAGE_CONSTRAINTS",0,c,"KLING_IMAGE2VIDEO_IMAGE_CONSTRAINTS",0,l,"KLING_IMAGE_ASPECT_RATIO_MAX",0,o,"KLING_IMAGE_ASPECT_RATIO_MIN",0,r,"KLING_IMAGE_MAX_FILE_SIZE_BYTES",0,n,"KLING_IMAGE_MIN_DIMENSION_PX",0,a,"KLING_TEXT2VIDEO_IMAGE_CONSTRAINTS",0,u,"KLING_VIDEO_EDIT_IMAGE_CONSTRAINTS",0,d],714175);let m=i.imageReferenceSchema.superRefine((e,t)=>f(e.metadata,t)),h=i.characterReferenceSchema.superRefine((e,t)=>f(e.metadata,t));e.s(["klingCharacterReferenceSchema",0,h,"klingImageReferenceSchema",0,m],981499)},22668,e=>{"use strict";var t=e.i(207653),i=e.i(625468),a=e.i(981499);let n=t.z.object({type:t.z.literal("voice"),id:t.z.string(),url:t.z.string(),label:t.z.string(),voiceId:t.z.string()}),r=t.z.object({prompt:t.z.string().max(2500).optional(),videoCount:t.z.number().int().min(1).max(8).default(1),startFrame:a.klingImageReferenceSchema,endFrame:a.klingImageReferenceSchema.nullable().optional(),voiceReference:n.optional(),duration:t.z.union([t.z.literal(5),t.z.literal(10)]).default(5),sound:t.z.boolean(),resolution:t.z.enum(["std","pro"]).default("pro")}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).refine(e=>"std"!==e.resolution||(e.endFrame?.url?.trim()??"")==="",{message:"End frame image is not supported for 720p",path:["endFrame"]}),o=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),coverUrl:t.z.string().optional(),duration:t.z.number()}),s=(0,i.defineCapability)({id:"kling2-6:image2video",name:"Kling 2.6 Image to Video",inputSchema:r,outputSc
1hema:o,getBusinessDetails:e=>{let t,i=(t="std"===e.resolution?12:e.sound?40:void 0!==e.voiceReference?45:20)*e.duration;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["kling26Image2Video",0,s])},976385,e=>{"use strict";var t=e.i(207653),i=e.i(625468);let a=t.z.object({prompt:t.z.string().min(1).max(2500),videoCount:t.z.number().int().min(1).max(8).default(1),sound:t.z.boolean(),duration:t.z.union([t.z.literal(5),t.z.literal(10)]).default(5).catch(5),aspectRatio:t.z.enum(["16:9","9:16","1:1","auto"]).default("16:9").catch("16:9"),autoEnhancePrompt:t.z.boolean().optional(),resolution:t.z.enum(["std","pro"]).default("pro")}),n=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),coverUrl:t.z.string().optional(),duration:t.z.number()}),r=(0,i.defineCapability)({id:"kling2-6:text2video",name:"Kling 2.6 Text to Video",inputSchema:a,outputSchema:n,getBusinessDetails:e=>{let t,i=(t="std"===e.resolution?12:e.sound?40:20)*e.duration;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["kling26Text2Video",0,r])},176590,795106,e=>{"use strict";var t=e.i(207653),i=e.i(625468);let a=t.z.object({type:t.z.literal("image"),id:t.z.string(),url:t.z.string(),label:t.z.string(),metadata:t.z.custom().optional()}),n=t.z.object({prompt:t.z.string().min(1),videoCount:t.z.number().int().min(1).max(8).default(1),startFrame:a,duration:t.z.union([t.z.literal(6),t.z.literal(10)]).default(6).catch(6),resolution:t.z.enum(["768p","1080p"]).default("768p").catch("768p"),mode:t.z.enum(["normal","fast"]).default("normal").catch("normal")}).refine(e=>10!==e.duration||"1080p"!==e.resolution,{message:"10s duration only supports 768p resolution",path:["resolution"]}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),r=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),duration:t.z.number()}),o={fast:{6:{"768p":100,"1080p":200},10:{"768p":200,"1080p":0}},normal:{6:{"768p":150,"1080p":300},10:{"768p":300,"1080p":0}}},s=(0,i.defineCapability)({id:"hailuo-2-3:image2video",name:"Hailuo 2.3 Image to Video",inputSchema:n,outputSchema:r,getBusinessDetails:e=>{let t="fast"===e.mode?"fast":"normal",i=6===e.duration?"6":"10",a=o[t][i][e.resolution];return{unitCredits:a,quantity:e.videoCount??1,totalCredits:a*(e.videoCount??1)}}});e.s(["hailuo23Image2Video",0,s],176590);var u=t,d=i;let l=u.z.object({prompt:u.z.string().min(1),videoCount:u.z.number().int().min(1).max(8).default(1),duration:u.z.union([u.z.literal(6),u.z.literal(10)]).default(6).catch(6),resolution:u.z.enum(["768p","1080p"]).default("768p").catch("768p"),autoEnhancePrompt:u.z.boolean().optional()}).refine(e=>10!==e.duration||"1080p"!==e.resolution,{message:"10s duration only supports 768p resolution",path:["resolution"]}),c=u.z.object({url:u.z.string(),thumbnailUrl:u.z.string().optional(),duration:u.z.number()}),f={6:{"768p":150,"1080p":300},10:{"768p":300,"1080p":0}},m=(0,d.defineCapability)({id:"hailuo-2-3:text2video",name:"Hailuo 2.3 Text to Video",inputSchema:l,outputSchema:c,getBusinessDetails:e=>{let t=f[6===e.duration?"6":"10"][e.resolution];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["hailuo23Text2Video",0,m],795106)},34279,407718,820458,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=t;let n=i.z.object({prompt:i.z.string(),delayMs:i.z.number().optional().default(1e3),shouldFail:i.z.boolean().optional().default(!1),failureRate:i.z.number().min(0).max(1).optional().default(0),autoEnhancePrompt:i.z.boolean().optional()}),r=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional(),executedAt:i.z.string(),delayMs:i.z.number()}),o=(0,a.defineCapability)({id:"stress-test:text2image",name:"Stress Test",inputSchema:n,outputSchema:r,getBusinessDetails:()=>({unitCredits:1,quantity:1,totalCredits:1})});e.s(["falStressTest",0,o],407718);let s=(0,t.defineModel)({id:"stress-test",name:"Stress Test",capabilities:{text2image:o}});e.s(["falStressTestModel",0,s],820458),e.s([],34279)},201719,271036,e=>{"use strict";var t=e.i(207653),i=e.i(625468);let a=t.z.object({images:t.z.array(t.z.string()).optional().default([]),user_prompt:t.z.string(),system_prompt:t.z.string().optional()}),n=t.z.object({text:t.z.string()}),r=(0,i.defineCapability)({id:"gemini-3.1-pro-preview:imageortxt2txt",name:"Gemini 3.1 Pro",inputSchema:a,outputSc
1hema:n,getBusinessDetails:()=>({unitCredits:0,quantity:1,totalCredits:0})}),o=(0,i.defineModel)({id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro",capabilities:{imageortxt2txt:r}});e.s(["googleGemini31ProPreviewModel",0,o],271036),e.s([],201719)},143417,311112,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(625468),n=e.i(981499),r=t;let o=r.z.object({index:r.z.number().int(),prompt:r.z.string().default(""),duration:r.z.number().int().min(1)});function s(e){let t=!0===e.generateSound||"on"===e.generateSound;if("std"===e.resolution)return t?35:25;if("pro"===e.resolution)return t?40:35;if("4k"===e.resolution)return 120;throw Error(`Invalid resolution: ${e.resolution}`)}e.s(["getKlingV3VideoCreditsPerSecond",()=>s,"multiPromptSchema",0,o],311112);let u={generateSound:t.z.boolean().default(!0),resolution:t.z.enum(["std","pro","4k"]).default("std"),duration:t.z.number().int().min(3).max(15).default(5),startFrame:t.z.union([n.klingImageReferenceSchema,n.klingCharacterReferenceSchema]),endFrame:t.z.union([n.klingImageReferenceSchema,n.klingCharacterReferenceSchema]).nullable().optional(),visualReferences:t.z.array(i.characterReferenceSchema).max(3).optional()},d=t.z.object({...u,multiShot:t.z.literal(!1).default(!1),videoCount:t.z.number().int().min(1).max(8).default(1),prompt:t.z.string().max(2500).refine(e=>e.trim().length>0),shotType:t.z.enum(["customize","intelligence"]).optional(),multiPrompt:t.z.array(t.z.unknown()).optional()}),l=t.z.object({...u,multiShot:t.z.literal(!0),videoCount:t.z.number().int().min(1).max(8).default(1),prompt:t.z.string().max(2500).default(""),shotType:t.z.enum(["customize","intelligence"]).default("intelligence"),multiPrompt:o.array().max(6).optional()}).superRefine((e,i)=>{if("customize"===e.shotType){if(!e.multiPrompt||0===e.multiPrompt.length)return void i.addIssue({code:t.z.ZodIssueCode.custom,message:"At least one shot is required in customize mode",path:["multiPrompt"]});for(let a=0;a<e.multiPrompt.length;a++){let n=e.multiPrompt[a].prompt;0===n.trim().length?i.addIssue({code:t.z.ZodIssueCode.custom,message:"Shot prompt is required",path:["multiPrompt",a,"prompt"]}):n.length>512&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Shot prompt must be at most 512 characters",path:["multiPrompt",a,"prompt"]})}e.multiPrompt.reduce((e,t)=>e+t.duration,0)!==e.duration&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Total duration of all shots must be equal to the overall duration",path:["multiPrompt"]})}else"intelligence"!==e.shotType||e.prompt&&0!==e.prompt.trim().length||i.addIssue({code:t.z.ZodIssueCode.custom,message:"Prompt is required in auto mode",path:["prompt"]})}),c=t.z.discriminatedUnion("multiShot",[d,l]),f=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional()}),m=(0,a.defineCapability)({id:"kling-v3:image2video",name:"Kling 3.0 Image to Video",inputSchema:c,outputSchema:f,getBusinessDetails:e=>{let t=s(e),i=e.duration*t;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["klingV3Image2Video",0,m],143417)},944029,e=>{"use strict";var t=e.i(207653),i=e.i(200744);let a=e=>Number.isInteger(e)?String(e):e.toFixed(3);function n({minDuration:e,maxDuration:n}){return i.videoReferenceSchema.extend({metadata:t.z.custom(e=>"object"==typeof e&&null!==e).superRefine((t,i)=>{if(!t)return void i.addIssue({code:"custom",message:"Video metadata is required. Please re-upload the video."});let r=t.duration;null==r?i.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video.",path:["duration"]}):r<e?i.addIssue({code:"custom",message:`Video too short. Minimum: ${e}s, your video: ${a(r)}s.`,path:["duration"]}):r>n&&i.addIssue({code:"custom",message:`Video too long. Maximum: ${n}s, your video: ${a(r)}s.`,path:["duration"]})})})}e.s(["createVideoReferenceWithDurationSchema",()=>n,"formatDuration",0,a])},134288,258065,872469,544471,138084,561456,129022,817638,51297,859355,784010,748034,491938,706375,30477,940495,846941,408566,495687,621523,90643,973288,390423,303467,e=>{"use strict";
1var t=e.i(143417),i=e.i(625468),a=t,n=e.i(207653),r=e.i(200744),o=i,s=e.i(944029),u=e.i(981499);let d=340,l=3850,c=n.z.object({prompt:n.z.string().max(2500).optional(),character:u.klingImageReferenceSchema,keepOriginalSound:n.z.enum(["yes","no"]).default("yes"),videoMode:n.z.enum(["std","pro"]).default("std")}),f=c.extend({characterOrientation:n.z.literal("image"),reference:r.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata?.duration;if(null==i)return void t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["metadata","duration"]});if(i<3)return void t.addIssue({code:"custom",message:`Video too short. Minimum: 3s, your video: ${(0,s.formatDuration)(i)}s.`,path:["metadata","duration"]});Math.round(i)>10&&t.addIssue({code:"custom",message:`Video too long. Maximum: 10s, your video: ${(0,s.formatDuration)(i)}s.`,path:["metadata","duration"]});let a=e.metadata?.width,n=e.metadata?.height;null!=a&&null!=n&&(a<d||a>l||n<d||n>l)&&t.addIssue({code:"custom",message:`Video resolution out of range. Each side must be ${d}–${l}px. Your video: ${a}\xd7${n}.`,path:["metadata","width"]})})}),m=c.extend({characterOrientation:n.z.literal("video"),reference:r.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata?.duration;if(null==i)return void t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["metadata","duration"]});if(i<3)return void t.addIssue({code:"custom",message:`Video too short. Minimum: 3s, your video: ${(0,s.formatDuration)(i)}s.`,path:["metadata","duration"]});Math.round(i)>30&&t.addIssue({code:"custom",message:`Video too long. Maximum: 30s, your video: ${(0,s.formatDuration)(i)}s.`,path:["metadata","duration"]});let a=e.metadata?.width,n=e.metadata?.height;null!=a&&null!=n&&(a<d||a>l||n<d||n>l)&&t.addIssue({code:"custom",message:`Video resolution out of range. Each side must be ${d}–${l}px. Your video: ${a}\xd7${n}.`,path:["metadata","width"]})})}),h=n.z.discriminatedUnion("characterOrientation",[f,m]),p=n.z.object({url:n.z.string(),thumbnailUrl:n.z.string().optional()}),b=(0,o.defineCapability)({id:"kling-v3:motion-sync",name:"Kling 3.0 Motion Sync",inputSchema:h,outputSc
1hema:p,getBusinessDetails:e=>{let t=e.reference.metadata?.duration;if(null==t)throw Error("Video metadata with duration is required");let i=Math.ceil(t),a=("pro"===e.videoMode?50:35)*i;return{unitCredits:a,quantity:1,totalCredits:a}}});e.s(["klingV3MotionSync",0,b],258065);var g=n,v=i,y=e.i(311112);let x={generateSound:g.z.boolean().default(!0),resolution:g.z.enum(["std","pro","4k"]).default("std"),aspectRatio:g.z.enum(["16:9","9:16","1:1"]).default("16:9"),duration:g.z.number().int().min(3).max(15).default(5)},z=g.z.object({...x,multiShot:g.z.literal(!1).default(!1),prompt:g.z.string().trim().min(1).max(2500),videoCount:g.z.number().int().min(1).max(8).default(1),shotType:g.z.enum(["customize","intelligence"]).optional(),multiPrompt:g.z.array(g.z.unknown()).optional(),autoEnhancePrompt:g.z.boolean().optional()}),_=g.z.object({...x,multiShot:g.z.literal(!0),videoCount:g.z.number().int().min(1).max(8).default(1),prompt:g.z.string().max(2500).default(""),shotType:g.z.enum(["customize","intelligence"]).default("intelligence"),multiPrompt:y.multiPromptSchema.array().max(6).optional(),autoEnhancePrompt:g.z.boolean().optional()}).superRefine((e,t)=>{if("customize"===e.shotType){if(!e.multiPrompt||0===e.multiPrompt.length)return void t.addIssue({code:g.z.ZodIssueCode.custom,message:"At least one shot is required in customize mode",path:["multiPrompt"]});for(let i=0;i<e.multiPrompt.length;i++){let a=e.multiPrompt[i].prompt;0===a.trim().length?t.addIssue({code:g.z.ZodIssueCode.custom,message:"Shot prompt is required",path:["multiPrompt",i,"prompt"]}):a.length>512&&t.addIssue({code:g.z.ZodIssueCode.custom,message:"Shot prompt must be at most 512 characters",path:["multiPrompt",i,"prompt"]})}e.multiPrompt.reduce((e,t)=>e+t.duration,0)!==e.duration&&t.addIssue({code:g.z.ZodIssueCode.custom,message:"Total duration of all shots must be equal to the overall duration",path:["multiPrompt"]})}else"intelligence"!==e.shotType||e.prompt&&0!==e.prompt.trim().length||t.addIssue({code:g.z.ZodIssueCode.custom,message:"Prompt is required in auto mode",path:["prompt"]})}),S=g.z.discriminatedUnion("multiShot",[z,_]),M=g.z.object({url:g.z.string(),thumbnailUrl:g.z.string().optional()}),I=(0,v.defineCapability)({id:"kling-v3:text2video",name:"Kling 3.0 Text to Video",inputSchema:S,outputSchema:M,getBusinessDetails:e=>{let t=(0,y.getKlingV3VideoCreditsPerSecond)(e),i=e.duration*t;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["klingV3Text2Video",0,I],872469);let w=(0,i.defineModel)({id:"kling-v3",name:"Kling 3.0",description:"Kling 3.0 video generation model by Kuaishou",metadata:{creator:"Kling",aliases:["Kuaishou","快手","可灵"]},capabilities:{text2video:I,image2video:a.klingV3Image2Video,motionSync:b}});e.s(["klingV3Model",0,w],544471),e.s([],134288);var C=i,R=n,E=i;let A=R.z.object({prompt:R.z.string().max(200).default("loadtest"),imageCount:R.z.number().int().min(1).max(8).default(1),sleepMinSeconds:R.z.number().int().min(0).max(1800).default(30),sleepMaxSeconds:R.z.number().int().min(0).max(1800).default(60)}),P=R.z.object({url:R.z.string(),thumbnailUrl:R.z.string(),sleptMs:R.z.number()});function T(e,t){return(0,E.defineCapability)({id:e,name:`Load Test Sleep — ${t} (internal)`,internal:!0,inputSchema:A,outputSchema:P,getBusinessDetails:e=>({unitCredits:0,quantity:e.imageCount,totalCredits:0})})}let k=T("loadtest-sleep:sleep2image-nb2-i2i","nano-banana-2:image2image"),D=T("loadtest-sleep:sleep2image-nbpro-i2i","nano-banana-pro:image2image"),B=T("loadtest-sleep:sleep2image-sd45-i2i","byte-plus-seedream-4-5:image2image"),j=T("loadtest-sleep:sleep2image-sdc2-e2v","byte-plus-seedance-2:element2video"),O=T("loadtest-sleep:sleep2image-gpt2-i2i","gpt-image-2:image2image"),V=(0,C.defineModel)({id:"loadtest-sleep",name:"Load Test Sleep (internal)",description:"Internal load-testing model. Runs the full generation orchestration but sleeps instead of calling a vendor. Not user-facing.",metadata:{creator:"OpenArt"},capabilities:{"sleep2image-nb2-i2i":k,"sleep2image-nbpro-i2i":D,"sleep2image-sd45-i2i":B,"sleep2image-sdc2-e2v":j,"sleep2image-gpt2-i2i":O}});e.s(["openartLoadtestSleepModel",0,V],138084);var N=i,F=n,U=r,q=i,L=s;let $=F.z.object({type:F.z.literal("image"),id:F.z.string(),url:F.z.string(),label:F.z.string()}),H=F.z.object({character:$,reference:U.videoReferenceSchema.superRefine((e,t)=>
1{let i=e.metadata?.duration;null==i?t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["metadata","duration"]}):i<1?t.addIssue({code:"custom",message:`Video too short. Minimum: 1s, your video: ${(0,L.formatDuration)(i)}s.`,path:["metadata","duration"]}):i>30&&t.addIssue({code:"custom",message:`Video too long. Maximum: 30s, your video: ${(0,L.formatDuration)(i)}s.`,path:["metadata","duration"]})}),resolution:F.z.enum(["SD","HD"]).default("SD"),backgroundMode:F.z.enum(["inpainted","original","solid","transparent"]).default("inpainted"),fast:F.z.boolean().default(!1)}),K=F.z.object({url:F.z.string(),thumbnailUrl:F.z.string().optional()}),G=(0,q.defineCapability)({id:"viggle-v4:motion-sync",name:"Viggle V4 Motion Sync",inputSchema:H,outputSchema:K,getBusinessDetails:e=>{let t=e.reference.metadata?.duration;if(null==t)throw Error("Video metadata with duration is required");let i=10*Math.ceil(t);return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["viggleViggleV4MotionSync",0,G],561456);let X=(0,N.defineModel)({id:"viggle-v4",name:"Viggle V4",description:"Viggle V4 animates a character image using motion from a driving video, reproducing body movements and expressions.",metadata:{creator:"Viggle"},capabilities:{motionSync:G}});e.s(["viggleViggleV4Model",0,X],129022),e.s([],817638);var Z=i,W=n,Y=i;let J=W.z.object({prompt:W.z.string().min(1),imageCount:W.z.number().int().min(1).max(8).default(1)}),Q=W.z.object({url:W.z.string(),thumbnailUrl:W.z.string()}),ee=(0,Y.defineCapability)({id:"mock:text2image",name:"Mock Text to Image",inputSchema:J,outputSchema:Q,getBusinessDetails:e=>{let t=60,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}}),et=(0,Z.defineModel)({id:"mock",name:"Mock Model",description:"A mock model for unit and integration testing.",capabilities:{text2image:ee}});e.s(["mockModel",0,et],51297);var ei=i,ea=n,en=r,er=i;let eo=2500,es={"720P":50,"1080P":80};e.s(["HAPPYHORSE_CREDITS_PER_SECOND",0,es,"HAPPYHORSE_PROMPT_MAX_CHARACTERS",0,eo],859355);let eu=ea.z.union([en.imageReferenceSchema,en.characterReferenceSchema,en.elementReferenceSchema]),ed=ea.z.object({prompt:ea.z.string().trim().min(1).max(eo,`Prompt must be ${eo} characters or less`),visualReferences:ea.z.array(eu).min(1).max(9),resolution:ea.z.enum(["720P","1080P"]).default("720P").catch("720P"),aspectRatio:ea.z.enum(["16:9","9:16","1:1","4:3","3:4"]).default("16:9").catch("16:9"),duration:ea.z.number().int().min(3).max(15).default(5).catch(5),videoCount:ea.z.number().int().min(1).max(8).default(1),seed:ea.z.number().int().min(0).max(0x7fffffff).optional()}),el=ea.z.object({url:ea.z.string(),thumbnailUrl:ea.z.string().optional(),duration:ea.z.number()}),ec=(0,er.defineCapability)({id:"happyhorse:element2video",name:"HappyHorse Element to Video",inputSchema:ed,outputSchema:el,getBusinessDetails:e=>{let t=es[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorseElement2Video",0,ec],784010);var ef=n,em=i,eh=e.i(332097);let ep={maxFileSizeBytes:0x1400000,minDimensionPx:300,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp"],maxReferenceImages:1},eb={maxFileSizeBytes:0xa00000,minDimensionPx:300,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp"],maxReferenceImages:5},eg={minDuration:3,maxDuration:15,minSide:320,maxSide:2160,maxFileSizeBytes:0x6400000},ev={maxFileSizeBytes:0xa00000,minDimensionPx:400,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp"],maxReferenceImages:9};e.s(["HAPPYHORSE_I2V_IMAGE_CONSTRAINTS",0,ep,"HAPPYHORSE_MODIFY_VIDEO_IMAGE_CONSTRAINTS",0,eb,"HAPPYHORSE_MODIFY_VIDEO_VIDEO_CONSTRAINTS",0,eg,"HAPPYHORSE_R2V_IMAGE_CONSTRAINTS",0,ev],748034);let ey=ef.z.object({type:ef.z.literal("image"),id:ef.z.string(),url:ef.z.string(),label:ef.z.string(),metadata:ef.z.custom().optional()}),ex=ef.z.object({prompt:ef.z.string().min(1).max(eo,`Prompt must be ${eo} characters or less`),videoCount:ef.z.number().int().min(1).max(8).default(1),startFrame:ey,duration:ef.z.number().int().min(3).max(15).default(5).catch(5),resolution:ef.z.enum(["1080P","720P"]).default("720P").catch("720P"),seed:ef.z.number().int().min(0).max(0x7fffffff).optional()}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>
1{let i=e.startFrame?.metadata;if(!i)return;let a=(0,eh.validateReferenceImageMetadata)(i,ep);a&&t.addIssue({code:ef.z.ZodIssueCode.custom,message:a.message,path:["startFrame"]})}),ez=ef.z.object({url:ef.z.string(),thumbnailUrl:ef.z.string().optional(),duration:ef.z.number()}),e_=(0,em.defineCapability)({id:"happyhorse:image2video",name:"HappyHorse Image to Video",inputSchema:ex,outputSchema:ez,getBusinessDetails:e=>{let t=es[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorseImage2Video",0,e_],491938);var eS=n,eM=r,eI=i;let ew=(0,s.createVideoReferenceWithDurationSchema)({minDuration:3,maxDuration:15}),eC=eS.z.object({prompt:eS.z.string().trim().min(1).max(eo,`Prompt must be ${eo} characters or less`),videoReference:ew,visualReferences:eS.z.array(eS.z.union([eM.imageReferenceSchema,eM.characterReferenceSchema,eM.elementReferenceSchema])).max(5).default([]),resolution:eS.z.enum(["720P","1080P"]).default("720P").catch("720P"),audioSetting:eS.z.enum(["auto","origin"]).default("auto").catch("auto"),seed:eS.z.number().int().min(0).max(0x7fffffff).optional()}),eR=eS.z.object({url:eS.z.string(),thumbnailUrl:eS.z.string().optional(),duration:eS.z.number()}),eE=15,eA=(0,eI.defineCapability)({id:"happyhorse:modify-video",name:"HappyHorse Modify Video",inputSchema:eC,outputSchema:eR,getBusinessDetails:e=>{let t=2*Math.min(eE,Math.floor(e.videoReference?.metadata?.duration??5)),i=es[e.resolution]*t;return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["happyhorseModifyVideo",0,eA],706375);var eP=n,eT=r,ek=i;let eD=eP.z.union([eT.imageReferenceSchema,eT.characterReferenceSchema,eT.elementReferenceSchema]),eB=eP.z.object({prompt:eP.z.string().trim().min(1).max(eo,`Prompt must be ${eo} characters or less`),visualReferences:eP.z.array(eD).min(1).max(9),resolution:eP.z.enum(["720P","1080P"]).default("720P").catch("720P"),aspectRatio:eP.z.enum(["16:9","9:16","1:1","4:3","3:4"]).default("16:9").catch("16:9"),duration:eP.z.number().int().min(3).max(15).default(5).catch(5),videoCount:eP.z.number().int().min(1).max(8).default(1),seed:eP.z.number().int().min(0).max(0x7fffffff).optional()}),ej=eP.z.object({url:eP.z.string(),thumbnailUrl:eP.z.string().optional(),duration:eP.z.number()}),eO=(0,ek.defineCapability)({id:"happyhorse:reference-video",name:"HappyHorse Reference Video",inputSchema:eB,outputSchema:ej,getBusinessDetails:e=>{let t=es[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorseReferenceVideo",0,eO],30477);var eV=n,eN=i;let eF=eV.z.object({prompt:eV.z.string().min(1).max(eo,`Prompt must be ${eo} characters or less`),videoCount:eV.z.number().int().min(1).max(8).default(1),duration:eV.z.number().int().min(3).max(15).default(5).catch(5),resolution:eV.z.enum(["1080P","720P"]).default("720P").catch("720P"),aspectRatio:eV.z.enum(["16:9","9:16","1:1","4:3","3:4"]).default("16:9").catch("16:9"),seed:eV.z.number().int().min(0).max(0x7fffffff).optional()}),eU=eV.z.object({url:eV.z.string(),thumbnailUrl:eV.z.string().optional(),duration:eV.z.number()}),eq=(0,eN.defineCapability)({id:"happyhorse:text2video",name:"HappyHorse Text to Video",inputSchema:eF,outputSchema:eU,getBusinessDetails:e=>{let t=es[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorseText2Video",0,eq],940495);let eL=(0,ei.defineModel)({id:"happyhorse",name:"HappyHorse",description:"HappyHorse video generation model (text-to-video, image-to-video, video edit & reference-to-video)",metadata:{creator:"HappyHorse"},capabilities:{text2video:eq,image2video:e_,"modify-video":eA,"reference-video":eO,element2video:ec}});e.s(["happyhorseModel",0,eL],846941);var e$=i,eH=n,eK=r,eG=i;let eX={"720P":35,"1080P":45};e.s(["HAPPYHORSE_1_1_CREDITS_PER_SECOND",0,eX],408566);let eZ=eH.z.union([eK.imageReferenceSchema,eK.characterReferenceSchema,eK.elementReferenceSchema]),eW=eH.z.object({prompt:eH.z.string().trim().min(1).max(eo,`Prompt must be ${eo} characters or less`),visualReferences:eH.z.array(eZ).min(1).max(9),resolution:eH.z.enum(["720P","1080P"]).default("720P").catch("720P"),aspectRatio:eH.z.enum(["16:9","9:16","1:1","4:3","3:4","4:5","5:4","9:21","21:9"]).default("16:9").catch("16:9"),duration:eH.z.number().int().min(3).max(15).default(5).catch(5),videoCount:eH.z.number().int().min(1).max(8).default(1),seed:eH.z.number().int().min(0).max(0x7fffffff).optional()}),eY=eH.z.object({url:eH.z.string(),thumbnailUrl:eH.z.string().optional()}),eJ=(0,eG.defineCapability)({id:"happyhorse-1-1:element2video",name:"HappyHorse 1.1 Element to Video",inputSchema:eW,outputSc
1hema:eY,getBusinessDetails:e=>{let t=eX[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorse11Element2Video",0,eJ],495687);var eQ=n,e0=i,e1=eh;let e2={maxFileSizeBytes:0x1400000,minDimensionPx:300,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp"],maxReferenceImages:1},e3={maxFileSizeBytes:0x1400000,minDimensionPx:400,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp"],maxReferenceImages:9};e.s(["HAPPYHORSE_1_1_I2V_IMAGE_CONSTRAINTS",0,e2,"HAPPYHORSE_1_1_R2V_IMAGE_CONSTRAINTS",0,e3],621523);let e4=eQ.z.object({type:eQ.z.literal("image"),id:eQ.z.string(),url:eQ.z.string(),label:eQ.z.string(),metadata:eQ.z.custom().optional()}),e6=eQ.z.object({prompt:eQ.z.string().min(1).max(eo,`Prompt must be ${eo} characters or less`),videoCount:eQ.z.number().int().min(1).max(8).default(1),startFrame:e4,duration:eQ.z.number().int().min(3).max(15).default(5).catch(5),resolution:eQ.z.enum(["1080P","720P"]).default("720P").catch("720P"),seed:eQ.z.number().int().min(0).max(0x7fffffff).optional()}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{let i=e.startFrame?.metadata;if(!i)return;let a=(0,e1.validateReferenceImageMetadata)(i,e2);a&&t.addIssue({code:eQ.z.ZodIssueCode.custom,message:a.message,path:["startFrame"]})}),e5=eQ.z.object({url:eQ.z.string(),thumbnailUrl:eQ.z.string().optional()}),e8=(0,e0.defineCapability)({id:"happyhorse-1-1:image2video",name:"HappyHorse 1.1 Image to Video",inputSchema:e6,outputSchema:e5,getBusinessDetails:e=>{let t=eX[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorse11Image2Video",0,e8],90643);var e9=n,e7=r,te=i;let tt=e9.z.union([e7.imageReferenceSchema,e7.characterReferenceSchema,e7.elementReferenceSchema]),ti=e9.z.object({prompt:e9.z.string().trim().min(1).max(eo,`Prompt must be ${eo} characters or less`),visualReferences:e9.z.array(tt).min(1).max(9),resolution:e9.z.enum(["720P","1080P"]).default("720P").catch("720P"),aspectRatio:e9.z.enum(["16:9","9:16","1:1","4:3","3:4","4:5","5:4","9:21","21:9"]).default("16:9").catch("16:9"),duration:e9.z.number().int().min(3).max(15).default(5).catch(5),videoCount:e9.z.number().int().min(1).max(8).default(1),seed:e9.z.number().int().min(0).max(0x7fffffff).optional()}),ta=e9.z.object({url:e9.z.string(),thumbnailUrl:e9.z.string().optional()}),tn=(0,te.defineCapability)({id:"happyhorse-1-1:reference-video",name:"HappyHorse 1.1 Reference Video",inputSchema:ti,outputSchema:ta,getBusinessDetails:e=>{let t=eX[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorse11ReferenceVideo",0,tn],973288);var tr=n,to=i;let ts=tr.z.object({prompt:tr.z.string().min(1).max(eo,`Prompt must be ${eo} characters or less`),videoCount:tr.z.number().int().min(1).max(8).default(1),duration:tr.z.number().int().min(3).max(15).default(5).catch(5),resolution:tr.z.enum(["1080P","720P"]).default("720P").catch("720P"),aspectRatio:tr.z.enum(["16:9","9:16","1:1","4:3","3:4","4:5","5:4","9:21","21:9"]).default("16:9").catch("16:9"),seed:tr.z.number().int().min(0).max(0x7fffffff).optional()}),tu=tr.z.object({url:tr.z.string(),thumbnailUrl:tr.z.string().optional()}),td=(0,to.defineCapability)({id:"happyhorse-1-1:text2video",name:"HappyHorse 1.1 Text to Video",inputSchema:ts,outputSchema:tu,getBusinessDetails:e=>{let t=eX[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["happyhorse11Text2Video",0,td],390423);let tl=(0,e$.defineModel)({id:"happyhorse-1-1",name:"HappyHorse 1.1",description:"HappyHorse 1.1 video generation model (text-to-video, image-to-video & reference-to-video)",metadata:{creator:"HappyHorse"},capabilities:{text2video:td,image2video:e8,"reference-video":tn,element2video:eJ}});e.s(["happyhorse11Model",0,tl],303467)},402587,e=>{"use strict";let t=3e3,i=3e4,a=500;e.s(["DEFAULT_PROMPT_MAX_CHARACTERS",0,t,"NEGATIVE_PROMPT_MAX_CHARACTERS",0,a,"SEEDANCE_2_PROMPT_MAX_CHARACTERS",0,i])},132200,505807,847999,609092,892411,331375,997945,155640,455437,931734,446986,683968,44494,707139,43308,406465,352818,687604,274592,341195,122680,728679,483167,190706,162094,110407,637611,636008,361299,798283,261907,488263,758461,775854,51032,986754,628329,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(200744),n=e.i(402587),r=t,o=e.i(332097);
1let s={maxFileSizeBytes:0x1400000,allowedFormats:["jpeg","jpg","png","webp"],minDimensionPx:240,maxDimensionPx:8e3,minAspectRatio:1/8,maxAspectRatio:8},u={...s},d={...s,maxReferenceImages:3},l={...s,maxReferenceImages:5},c={minDuration:1,maxDuration:30,maxFileSizeBytes:0x6400000},f={...s,maxReferenceImages:5},m={...s,allowedFormats:["jpeg","jpg","png","webp"],maxReferenceImages:10},h={...s,allowedFormats:["jpeg","jpg","png","webp"],maxReferenceImages:1},p={minDuration:1,maxDuration:15,totalMaxDuration:15,minSide:240,maxSide:4096,minAspectRatio:1/8,maxAspectRatio:8,maxFileSizeBytes:0x6400000},b={minDuration:1,maxDuration:15,allowedFormats:["wav","mp3"],totalMaxDuration:15,maxFileSizeBytes:0xf00000},g={...s,maxReferenceImages:9},v={maxFileSizeBytes:0xa00000,maxReferenceImages:3,allowedFormats:["jpeg","jpg","png","webp"],minAspectRatio:.1,maxAspectRatio:10},y={maxFileSizeBytes:0xa00000,maxReferenceImages:3,allowedFormats:["jpeg","jpg","png","webp"],minDimensionPx:384,maxDimensionPx:8e3,minAspectRatio:.1,maxAspectRatio:10};e.s(["QWEN_IMAGE_2_IMAGE_CONSTRAINTS",0,v,"QWEN_IMAGE_3_IMAGE_CONSTRAINTS",0,y,"WAN27_IMAGE_CONSTRAINTS",0,g,"WAN3_FRAME_IMAGE_CONSTRAINTS",0,h,"WAN3_REFERENCE_AUDIO_CONSTRAINTS",0,b,"WAN3_REFERENCE_IMAGE_CONSTRAINTS",0,m,"WAN3_REFERENCE_VIDEO_CONSTRAINTS",0,p,"WAN_IMAGE2VIDEO_IMAGE_CONSTRAINTS",0,u,"WAN_MODIFY_VIDEO_IMAGE_CONSTRAINTS",0,d,"WAN_REFERENCE_VIDEO_IMAGE_CONSTRAINTS",0,l,"WAN_REFERENCE_VIDEO_VIDEO_CONSTRAINTS",0,c,"WAN_TEXT2VIDEO_IMAGE_CONSTRAINTS",0,f],505807);let x=i.z.object({prompt:i.z.string().min(1).max(n.DEFAULT_PROMPT_MAX_CHARACTERS,`Prompt must be ${n.DEFAULT_PROMPT_MAX_CHARACTERS} characters or less`),references:i.z.array(i.z.union([a.imageReferenceSchema,a.characterReferenceSchema])).min(1).max(3),imageCount:i.z.number().int().min(1).max(8).default(1),negativePrompt:i.z.string().max(500,"Negative prompt must be 500 characters or less").optional(),size:i.z.string().regex(/^\d+\*\d+$/,"Size must be in format width*height (e.g., 1024*1024)").refine(e=>{let[t,i]=e.split("*").map(Number),a=t*i;return a>=262144&&a<=4194304},"Image area (width × height) must be between 512×512 and 2048×2048").optional(),promptExtend:i.z.boolean().default(!0),watermark:i.z.boolean().optional(),seed:i.z.number().int().min(0).max(0x7fffffff).optional()}).superRefine((e,t)=>{e.references.forEach((e,a)=>{if("image"!==e.type||!e.metadata)return;let n=(0,o.validateReferenceImageMetadata)(e.metadata,v);n&&t.addIssue({code:i.z.ZodIssueCode.custom,message:n.message,path:["references",a]})})}),z=i.z.object({images:i.z.array(i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional(),width:i.z.number(),height:i.z.number()})),seed:i.z.number().optional()}),_=(0,r.defineCapability)({id:"qwen-image-2:image2image",name:"Qwen Image 2 Image to Image",inputSchema:x,outputSchema:z,getBusinessDetails:e=>{let t=10,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["qwenImage2Image2Image",0,_],847999);var S=i,M=n,I=t;let w=S.z.object({prompt:S.z.string().min(1).max(M.DEFAULT_PROMPT_MAX_CHARACTERS,`Prompt must be ${M.DEFAULT_PROMPT_MAX_CHARACTERS} characters or less`),imageCount:S.z.number().int().min(1).max(8).default(2),negativePrompt:S.z.string().max(500,"Negative prompt must be 500 characters or less").optional(),size:S.z.string().regex(/^\d+\*\d+$/,"Size must be in format width*height (e.g., 1024*1024)").refine(e=>{let[t,i]=e.split("*").map(Number),a=t*i;return a>=262144&&a<=4194304},"Image area (width × height) must be between 512×512 and 2048×2048").optional(),promptExtend:S.z.boolean().default(!0),watermark:S.z.boolean().optional(),seed:S.z.number().int().min(0).max(0x7fffffff).optional()}),C=S.z.object({images:S.z.array(S.z.object({url:S.z.string(),thumbnailUrl:S.z.string().optional(),width:S.z.number(),height:S.z.number()})),seed:S.z.number().optional()}),R=(0,I.defineCapability)({id:"qwen-image-2:text2image",name:"Qwen Image 2 Text to Image",inputSchema:w,outputSchema:C,getBusinessDetails:e=>{let t=10,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["qwenImage2Text2Image",0,R],609092);let E=(0,t.defineModel)({id:"qwen-image-2",name:"Qwen Image 2",description:"Enhanced text rendering, semantic alignment, and image editing with reference images",metadata:{creator:"Alibaba Cloud"},capabilities:{text2image:R,image2image:_}});e.s(["qwenImage2Model",0,E],132200);var A=t,P=i,T=a,k=n,D=t,B=o;let j=P.z.object({prompt:P.z.string().min(1).max(k.DEFAULT_PROMPT_MAX_CHARACTERS,`Prompt must be ${k.DEFAULT_PROMPT_MAX_CHARACTERS} characters or less`),references:P.z.array(P.z.union([T.imageReferenceSchema,T.characterReferenceSchema])).min(1).max(3),imageCount:P.z.number().int().min(1).max(8).default(1),negativePrompt:P.z.string().max(500,"
1Negative prompt must be 500 characters or less").optional(),size:P.z.string().regex(/^\d+\*\d+$/,"Size must be in format width*height (e.g., 1024*1024)").refine(e=>{let[t,i]=e.split("*").map(Number),a=t*i;return a>=262144&&a<=4194304},"Image area (width × height) must be between 512×512 and 2048×2048").optional(),promptExtend:P.z.boolean().default(!0),watermark:P.z.boolean().optional(),seed:P.z.number().int().min(0).max(0x7fffffff).optional()}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type||!e.metadata)return;let a=(0,B.validateReferenceImageMetadata)(e.metadata,v);a&&t.addIssue({code:P.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),O=P.z.object({images:P.z.array(P.z.object({url:P.z.string(),thumbnailUrl:P.z.string().optional(),width:P.z.number(),height:P.z.number()})),seed:P.z.number().optional()}),V=(0,D.defineCapability)({id:"qwen-image-2-pro:image2image",name:"Qwen Image 2 Pro Image to Image",inputSchema:j,outputSchema:O,getBusinessDetails:e=>{let t=20,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["qwenImage2ProImage2Image",0,V],892411);var N=i,F=n,U=t;let q=N.z.object({prompt:N.z.string().min(1).max(F.DEFAULT_PROMPT_MAX_CHARACTERS,`Prompt must be ${F.DEFAULT_PROMPT_MAX_CHARACTERS} characters or less`),imageCount:N.z.number().int().min(1).max(8).default(2),negativePrompt:N.z.string().max(500,"Negative prompt must be 500 characters or less").optional(),size:N.z.string().regex(/^\d+\*\d+$/,"Size must be in format width*height (e.g., 1024*1024)").refine(e=>{let[t,i]=e.split("*").map(Number),a=t*i;return a>=262144&&a<=4194304},"Image area (width × height) must be between 512×512 and 2048×2048").optional(),promptExtend:N.z.boolean().default(!0),watermark:N.z.boolean().optional(),seed:N.z.number().int().min(0).max(0x7fffffff).optional()}),L=N.z.object({images:N.z.array(N.z.object({url:N.z.string(),thumbnailUrl:N.z.string().optional(),width:N.z.number(),height:N.z.number()})),seed:N.z.number().optional()}),$=(0,U.defineCapability)({id:"qwen-image-2-pro:text2image",name:"Qwen Image 2 Pro Text to Image",inputSchema:q,outputSchema:L,getBusinessDetails:e=>{let t=20,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["qwenImage2ProText2Image",0,$],331375);let H=(0,A.defineModel)({id:"qwen-image-2-pro",name:"Qwen Image 2 Pro",description:"Flagship model with superior text rendering, realism, and semantic alignment",metadata:{creator:"Alibaba Cloud"},capabilities:{text2image:$,image2image:V}});e.s(["qwenImage2ProModel",0,H],997945);var K=t,G=i,X=a,Z=n,W=t,Y=o,J=i;let Q=["1K","2K"],ee=["1:1","16:9","9:16","4:3","3:4"],et={"1K":{"1:1":"1024*1024","16:9":"1344*768","9:16":"768*1344","4:3":"1184*864","3:4":"864*1184"},"2K":{"1:1":"2048*2048","16:9":"2688*1536","9:16":"1536*2688","4:3":"2368*1728","3:4":"1728*2368"}},ei=[...Object.values(et["1K"]),...Object.values(et["2K"])],ea=J.z.enum(ei),en=J.z.enum(Q),er=J.z.enum(ee),eo=new Set(Object.values(et["1K"]));function es(e,t){return et[e][t]}function eu(e){for(let t of Q)for(let i of ee)if(es(t,i)===e)return{resolution:t,aspectRatio:i};return{resolution:"2K",aspectRatio:"1:1"}}function ed(e){return void 0!==e&&eo.has(e)}e.s(["getQwenImage3FormSize",()=>eu,"getQwenImage3Size",()=>es,"isQwenImage3OneKSize",()=>ed,"qwenImage3AspectRatioSchema",0,er,"qwenImage3ResolutionSchema",0,en,"qwenImage3SizeSchema",0,ea],155640);let el=G.z.object({prompt:G.z.string().min(1).max(Z.DEFAULT_PROMPT_MAX_CHARACTERS),references:G.z.array(G.z.union([X.imageReferenceSchema,X.characterReferenceSchema])).min(1).max(3),imageCount:G.z.number().int().min(1).max(8).default(1),negativePrompt:G.z.string().max(Z.NEGATIVE_PROMPT_MAX_CHARACTERS,`Negative prompt must be ${Z.NEGATIVE_PROMPT_MAX_CHARACTERS} characters or less`).optional(),size:ea.optional(),promptExtend:G.z.boolean().default(!0),watermark:G.z.boolean().default(!1),seed:G.z.number().int().min(0).max(0x7fffffff).optional()}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type||!e.metadata)return;let a=(0,Y.validateReferenceImageMetadata)(e.metadata,y);a&&t.addIssue({code:G.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),ec=G.z.object({images:G.z.array(G.z.object({url:G.z.string(),thumbnailUrl:G.z.string().optional(),width:G.z.number(),height:G.z.number()})),seed:G.z.number().optional()}),ef=(0,W.defineCapability)({id:"qwen-image-3:image2image",name:"Qwen Image 3.0 Image to Image",inputSchema:el,outputSc
1hema:ec,getBusinessDetails:e=>{let t=16+2*e.references.length;return{unitCredits:t,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["qwenImage3Image2Image",0,ef],455437);var em=i,eh=n,ep=t;let eb=em.z.object({prompt:em.z.string().min(1).max(eh.DEFAULT_PROMPT_MAX_CHARACTERS),imageCount:em.z.number().int().min(1).max(8).default(1),negativePrompt:em.z.string().max(eh.NEGATIVE_PROMPT_MAX_CHARACTERS,`Negative prompt must be ${eh.NEGATIVE_PROMPT_MAX_CHARACTERS} characters or less`).optional(),size:ea.optional(),promptExtend:em.z.boolean().default(!0),watermark:em.z.boolean().default(!1),seed:em.z.number().int().min(0).max(0x7fffffff).optional()}),eg=em.z.object({images:em.z.array(em.z.object({url:em.z.string(),thumbnailUrl:em.z.string().optional(),width:em.z.number(),height:em.z.number()})),seed:em.z.number().optional()}),ev=(0,ep.defineCapability)({id:"qwen-image-3:text2image",name:"Qwen Image 3.0 Text to Image",inputSchema:eb,outputSchema:eg,getBusinessDetails:e=>({unitCredits:16,quantity:e.imageCount,totalCredits:16*e.imageCount})});e.s(["qwenImage3Text2Image",0,ev],931734);let ey=(0,K.defineModel)({id:"qwen-image-3",name:"Qwen Image 3.0",description:"Alibaba Cloud's balanced Qwen image model for text generation and precise multi-reference editing",metadata:{creator:"Alibaba Cloud",aliases:["Qwen Image 3","qwen-image-3.0"]},capabilities:{text2image:ev,image2image:ef}});e.s(["qwenImage3Model",0,ey],446986);var ex=t,ez=i,e_=a,eS=n,eM=t,eI=o;e.s([],683968);let ew=ez.z.object({prompt:ez.z.string().min(1).max(eS.DEFAULT_PROMPT_MAX_CHARACTERS),references:ez.z.array(ez.z.union([e_.imageReferenceSchema,e_.characterReferenceSchema])).min(1).max(3),imageCount:ez.z.number().int().min(1).max(8).default(1),negativePrompt:ez.z.string().max(eS.NEGATIVE_PROMPT_MAX_CHARACTERS,`Negative prompt must be ${eS.NEGATIVE_PROMPT_MAX_CHARACTERS} characters or less`).optional(),size:ea.default("2048*2048"),promptExtend:ez.z.boolean().default(!0),watermark:ez.z.boolean().default(!1),seed:ez.z.number().int().min(0).max(0x7fffffff).optional()}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type||!e.metadata)return;let a=(0,eI.validateReferenceImageMetadata)(e.metadata,y);a&&t.addIssue({code:ez.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),eC=ez.z.object({images:ez.z.array(ez.z.object({url:ez.z.string(),thumbnailUrl:ez.z.string().optional(),width:ez.z.number(),height:ez.z.number()})),seed:ez.z.number().optional()}),eR=(0,eM.defineCapability)({id:"qwen-image-3-pro:image2image",name:"Qwen Image 3.0 Pro Image to Image",inputSchema:ew,outputSc
1hema:eC,getBusinessDetails:e=>{let t=(ed(e.size)?22:40)+2*e.references.length;return{unitCredits:t,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["qwenImage3ProImage2Image",0,eR],44494);var eE=i,eA=n,eP=t;let eT=eE.z.object({prompt:eE.z.string().min(1).max(eA.DEFAULT_PROMPT_MAX_CHARACTERS),imageCount:eE.z.number().int().min(1).max(8).default(1),negativePrompt:eE.z.string().max(eA.NEGATIVE_PROMPT_MAX_CHARACTERS,`Negative prompt must be ${eA.NEGATIVE_PROMPT_MAX_CHARACTERS} characters or less`).optional(),size:ea.default("2048*2048"),promptExtend:eE.z.boolean().default(!0),watermark:eE.z.boolean().default(!1),seed:eE.z.number().int().min(0).max(0x7fffffff).optional()}),ek=eE.z.object({images:eE.z.array(eE.z.object({url:eE.z.string(),thumbnailUrl:eE.z.string().optional(),width:eE.z.number(),height:eE.z.number()})),seed:eE.z.number().optional()}),eD=(0,eP.defineCapability)({id:"qwen-image-3-pro:text2image",name:"Qwen Image 3.0 Pro Text to Image",inputSchema:eT,outputSchema:ek,getBusinessDetails:e=>{let t=ed(e.size)?22:40;return{unitCredits:t,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["qwenImage3ProText2Image",0,eD],707139);let eB=(0,ex.defineModel)({id:"qwen-image-3-pro",name:"Qwen Image 3.0 Pro",description:"Alibaba Cloud's latest Qwen image model for text generation and precise multi-reference editing",metadata:{creator:"Alibaba Cloud",aliases:["qwen-image-3.0-pro"]},capabilities:{text2image:eD,image2image:eR}});e.s(["qwenImage3ProModel",0,eB],43308);var ej=t,eO=i,eV=a,eN=n,eF=t;let eU=eO.z.object({prompt:eO.z.string().min(1).max(eN.DEFAULT_PROMPT_MAX_CHARACTERS,`Prompt must be ${eN.DEFAULT_PROMPT_MAX_CHARACTERS} characters or less`),referenceImages:eO.z.array(eV.imageReferenceSchema).min(1).max(3),negativePrompt:eO.z.string().max(500,"Negative prompt must be 500 characters or less").optional(),size:eO.z.string().regex(/^\d+\*\d+$/,"Size must be in format width*height (e.g., 1024*1024)").optional(),imageCount:eO.z.number().int().min(1).max(6).default(1),promptExtend:eO.z.boolean().default(!0),watermark:eO.z.boolean().default(!1),seed:eO.z.number().int().min(0).max(0x7fffffff).optional()}),eq=eO.z.object({images:eO.z.array(eO.z.object({url:eO.z.string(),thumbnailUrl:eO.z.string().optional(),width:eO.z.number(),height:eO.z.number()})),seed:eO.z.number().optional()}),eL=(0,eF.defineCapability)({id:"qwen-image-edit:image2image",name:"Qwen Image Edit Image to Image",inputSchema:eU,outputSchema:eq,getBusinessDetails:e=>{let t=35,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["qwenImageEditImage2Image",0,eL],406465);let e$=(0,ej.defineModel)({id:"qwen-image-edit",name:"Qwen Image Edit",description:"High-quality image editing with multi-image support",metadata:{creator:"Alibaba Cloud"},capabilities:{image2image:eL}});e.s(["qwenImageEditModel",0,e$],352818);var eH=t,eK=i,eG=n,eX=t;let eZ=eK.z.object({prompt:eK.z.string().min(1).max(eG.DEFAULT_PROMPT_MAX_CHARACTERS,`Prompt must be ${eG.DEFAULT_PROMPT_MAX_CHARACTERS} characters or less`),imageCount:eK.z.number().int().min(1).max(8).default(2),negativePrompt:eK.z.string().max(500,"Negative prompt must be 500 characters or less").optional(),size:eK.z.enum(["1664*928","1472*1104","1328*1328","1104*1472","928*1664"]).default("1664*928"),promptExtend:eK.z.boolean().default(!0),watermark:eK.z.boolean().default(!1),seed:eK.z.number().int().min(0).max(0x7fffffff).optional(),autoEnhancePrompt:eK.z.boolean().optional()}),eW=eK.z.object({images:eK.z.array(eK.z.object({url:eK.z.string(),thumbnailUrl:eK.z.string().optional(),width:eK.z.number(),height:eK.z.number()})),seed:eK.z.number().optional()}),eY=(0,eX.defineCapability)({id:"qwen-image-max:text2image",name:"Qwen Image Max Text to Image",inputSchema:eZ,outputSchema:eW,getBusinessDetails:e=>{let t=35,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["qwenImageMaxText2Image",0,eY],687604);let eJ=(0,eH.defineModel)({id:"qwen-image-max",name:"Qwen Image Max",description:"High-quality text-to-image generation with enhanced realism",metadata:{creator:"Alibaba Cloud"},capabilities:{text2image:eY}});e.s(["qwenImageMaxModel",0,eJ],274592);var eQ=t,e0=i,e1=n,e2=t;let e3=e0.z.object({prompt:e0.z.string().min(1).max(e1.DEFAULT_PROMPT_MAX_CHARACTERS,`Prompt must be ${e1.DEFAULT_PROMPT_MAX_CHARACTERS} characters or less`),imageCount:e0.z.number().int().min(1).max(8).default(2),negativePrompt:e0.z.string().max(500,"
1Negative prompt must be 500 characters or less").optional(),size:e0.z.enum(["1664*928","1472*1104","1328*1328","1104*1472","928*1664"]).default("1664*928"),promptExtend:e0.z.boolean().default(!0),watermark:e0.z.boolean().default(!1),seed:e0.z.number().int().min(0).max(0x7fffffff).optional(),autoEnhancePrompt:e0.z.boolean().optional()}),e4=e0.z.object({images:e0.z.array(e0.z.object({url:e0.z.string(),thumbnailUrl:e0.z.string().optional(),width:e0.z.number(),height:e0.z.number()})),seed:e0.z.number().optional(),actual_prompt:e0.z.string().optional()}),e6=(0,e2.defineCapability)({id:"qwen-image-plus:text2image",name:"Qwen Image Plus Text to Image",inputSchema:e3,outputSchema:e4,getBusinessDetails:e=>{let t=20,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["qwenImagePlusText2Image",0,e6],341195);let e5=(0,eQ.defineModel)({id:"qwen-image-plus",name:"Qwen Image Plus",description:"Cost-effective text-to-image generation model",metadata:{creator:"Alibaba Cloud"},capabilities:{text2image:e6}});e.s(["qwenImagePlusModel",0,e5],122680);var e8=t,e9=i,e7=t;let te=e9.z.object({type:e9.z.literal("image"),id:e9.z.string(),url:e9.z.string(),label:e9.z.string(),metadata:e9.z.custom().optional()}),tt=e9.z.object({prompt:e9.z.string().optional(),videoCount:e9.z.number().int().min(1).max(8).default(1),startFrame:te,resolution:e9.z.enum(["480p","1080p"]).default("1080p").catch("1080p"),duration:e9.z.literal(5).default(5).catch(5),negativePrompt:e9.z.string().default("").catch("")}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),ti=e9.z.object({url:e9.z.string(),thumbnailUrl:e9.z.string().optional(),coverUrl:e9.z.string().optional(),duration:e9.z.number()}),ta={"480p":60,"1080p":200},tn=(0,e7.defineCapability)({id:"wan2-2:image2video",name:"Wan 2.2 Image to Video",inputSchema:tt,outputSchema:ti,getBusinessDetails:e=>{let t=ta[e.resolution]??200;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan22Image2Video",0,tn],728679);var tr=i,to=t,ts=e.i(944029);let tu=tr.z.object({type:tr.z.enum(["image","video"]).default("image"),id:tr.z.string(),url:tr.z.string(),label:tr.z.string()}),td=tr.z.object({type:tr.z.literal("video").default("video").catch("video"),id:tr.z.string(),url:tr.z.string(),label:tr.z.string(),metadata:tr.z.object({duration:tr.z.number().default(3).superRefine((e,t)=>{e<3?t.addIssue({code:"custom",message:`Video too short. Minimum: 3s, your video: ${(0,ts.formatDuration)(e)}s.`}):Math.round(e)>30&&t.addIssue({code:"custom",message:`Video too long. Maximum: 30s, your video: ${(0,ts.formatDuration)(e)}s.`})}),width:tr.z.number(),height:tr.z.number(),fps:tr.z.number(),frames:tr.z.number(),size:tr.z.number()})}),tl=tr.z.object({prompt:tr.z.string().optional(),modelType:tr.z.enum(["full_scene","motion_sync"]).default("motion_sync"),characterType:tr.z.enum(["image","video"]).default("image"),character:tu,reference:td,segmentTarget:tr.z.string().default("object"),resolution:tr.z.union([tr.z.literal(720),tr.z.literal(1080)]).default(720)}),tc=tr.z.object({url:tr.z.string(),thumbnailUrl:tr.z.string().optional()}),tf=(0,to.defineCapability)({id:"wan2-2:motion-sync",name:"Wan 2.2 Motion Sync",inputSchema:tl,outputSchema:tc,getBusinessDetails:e=>{let t=("full_scene"===e.modelType?1080===e.resolution?30:25:1080===e.resolution?40:30)*Math.ceil(e.reference.metadata.duration);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["wan22MotionSync",0,tf],483167);var tm=i,th=t;let tp=tm.z.object({prompt:tm.z.string().min(1),videoCount:tm.z.number().int().min(1).max(8).default(1),resolution:tm.z.enum(["480p","1080p"]).default("1080p").catch("1080p"),duration:tm.z.literal(5).default(5).catch(5),negativePrompt:tm.z.string().default("").catch(""),aspectRatio:tm.z.enum(["16:9","9:16","1:1"]).default("16:9").catch("16:9"),autoEnhancePrompt:tm.z.boolean().optional()}),tb=tm.z.object({url:tm.z.string(),thumbnailUrl:tm.z.string().optional(),coverUrl:tm.z.string().optional(),duration:tm.z.number()}),tg={"480p":60,"1080p":200},tv=(0,th.defineCapability)({id:"wan2-2:text2video",name:"Wan 2.2 Text to Video",inputSchema:tp,outputSc
1hema:tb,getBusinessDetails:e=>{let t=tg[e.resolution]??200;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan22Text2Video",0,tv],190706);let ty=(0,e8.defineModel)({id:"wan2-2",name:"Wan 2.2",description:"High quality video generation model by Alibaba",metadata:{creator:"Alibaba"},capabilities:{motionSync:tf,image2video:tn,text2video:tv}});e.s(["wan22Model",0,ty],162094);var tx=t,tz=i,t_=t;let tS=tz.z.object({type:tz.z.literal("image"),id:tz.z.string(),url:tz.z.string(),label:tz.z.string(),metadata:tz.z.custom().optional()}),tM=tz.z.object({prompt:tz.z.string().optional(),videoCount:tz.z.number().int().min(1).max(8).default(1),startFrame:tS,resolution:tz.z.enum(["480p","720p","1080p"]).default("1080p").catch("1080p"),duration:tz.z.union([tz.z.literal(5),tz.z.literal(10)]).default(5).catch(5),negativePrompt:tz.z.string().default("").catch(""),enablePromptExpansion:tz.z.boolean().default(!0).catch(!0)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),tI=tz.z.object({url:tz.z.string(),thumbnailUrl:tz.z.string().optional(),coverUrl:tz.z.string().optional(),duration:tz.z.number()}),tw={"480p":{5:100,10:200},"720p":{5:150,10:300},"1080p":{5:300,10:600}},tC=(0,t_.defineCapability)({id:"wan2-5:image2video",name:"Wan 2.5 Image to Video",inputSchema:tM,outputSchema:tI,getBusinessDetails:e=>{let t=tw[e.resolution]?.[e.duration]??300;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan25Image2Video",0,tC],110407);var tR=i,tE=t;let tA=tR.z.object({prompt:tR.z.string().min(1),videoCount:tR.z.number().int().min(1).max(8).default(1),resolution:tR.z.enum(["480p","720p","1080p"]).default("1080p").catch("1080p"),duration:tR.z.union([tR.z.literal(5),tR.z.literal(10)]).default(5).catch(5),negativePrompt:tR.z.string().default("").catch(""),aspectRatio:tR.z.enum(["16:9","9:16","1:1"]).default("16:9").catch("16:9"),enablePromptExpansion:tR.z.boolean().default(!0).catch(!0),autoEnhancePrompt:tR.z.boolean().optional()}),tP=tR.z.object({url:tR.z.string(),thumbnailUrl:tR.z.string().optional(),coverUrl:tR.z.string().optional(),duration:tR.z.number()}),tT={"480p":{5:100,10:200},"720p":{5:150,10:300},"1080p":{5:300,10:600}},tk=(0,tE.defineCapability)({id:"wan2-5:text2video",name:"Wan 2.5 Text to Video",inputSchema:tA,outputSchema:tP,getBusinessDetails:e=>{let t=tT[e.resolution]?.[e.duration]??300;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan25Text2Video",0,tk],637611);let tD=(0,tx.defineModel)({id:"wan2-5",name:"Wan 2.5",description:"High quality video generation model by Alibaba",metadata:{creator:"Alibaba"},capabilities:{image2video:tC,text2video:tk}});e.s(["wan25Model",0,tD],636008);var tB=t,tj=i,tO=t;let tV=tj.z.object({type:tj.z.literal("image"),id:tj.z.string(),url:tj.z.string(),label:tj.z.string(),metadata:tj.z.custom().optional()}),tN=tj.z.object({prompt:tj.z.string().optional(),videoCount:tj.z.number().int().min(1).max(8).default(1),startFrame:tV,resolution:tj.z.enum(["720p","1080p"]).default("1080p").catch("1080p"),duration:tj.z.union([tj.z.literal(5),tj.z.literal(10),tj.z.literal(15)]).default(5).catch(5),sound:tj.z.boolean(),multiShot:tj.z.boolean().default(!1).catch(!1),negativePrompt:tj.z.string().default("").catch(""),enablePromptExpansion:tj.z.boolean().default(!0).catch(!0)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),tF=tj.z.object({url:tj.z.string(),thumbnailUrl:tj.z.string().optional(),coverUrl:tj.z.string().optional(),duration:tj.z.number()}),tU=(0,tO.defineCapability)({id:"wan2-6:image2video",name:"Wan 2.6 Image to Video",inputSchema:tN,outputSchema:tF,getBusinessDetails:e=>{let t=("1080p"===e.resolution?35:25)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan26Image2Video",0,tU],361299);var tq=i,tL=t;let t$=tq.z.object({prompt:tq.z.string().min(1),videoCount:tq.z.number().int().min(1).max(8).default(1),resolution:tq.z.enum(["720p","1080p"]).default("1080p").catch("1080p"),duration:tq.z.union([tq.z.literal(5),tq.z.literal(10),tq.z.literal(15)]).default(5).catch(5),sound:tq.z.boolean(),multiShot:tq.z.boolean().default(!1).catch(!1),negativePrompt:tq.z.string().default("").catch(""),aspectRatio:tq.z.enum(["16:9","9:16","1:1"]).default("16:9").catch("16:9"),enablePromptExpansion:tq.z.boolean().default(!0).catch(!0),autoEnhancePrompt:tq.z.boolean().optional()}),tH=tq.z.object({url:tq.z.string(),thumbnailUrl:tq.z.string().optional(),coverUrl:tq.z.string().optional(),duration:tq.z.number()}),tK=(0,tL.defineCapability)({id:"wan2-6:text2video",name:"Wan 2.6 Text to Video",inputSchema:t$,outputSc
1hema:tH,getBusinessDetails:e=>{let t=("1080p"===e.resolution?35:25)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan26Text2Video",0,tK],798283);let tG=(0,tB.defineModel)({id:"wan2-6",name:"Wan 2.6",description:"High quality video generation model by Alibaba",metadata:{creator:"Alibaba"},capabilities:{image2video:tU,text2video:tK}});e.s(["wan26Model",0,tG],261907);var tX=t,tZ=i,tW=t;let tY=(0,ts.createVideoReferenceWithDurationSchema)({minDuration:2,maxDuration:10}),tJ=tZ.z.object({prompt:tZ.z.string().default("").catch(""),negativePrompt:tZ.z.string().default("").catch(""),videoReference:tY,resolution:tZ.z.enum(["720p","1080p"]).default("720p").catch("720p"),duration:tZ.z.number().int().min(2).max(15).default(5).catch(5),enablePromptExpansion:tZ.z.boolean().default(!0).catch(!0)}),tQ=tZ.z.object({url:tZ.z.string(),thumbnailUrl:tZ.z.string().optional(),duration:tZ.z.number()}),t0=(0,tW.defineCapability)({id:"wan2-7:extend-video",name:"Wan 2.7 Extend Video",inputSchema:tJ,outputSchema:tQ,getBusinessDetails:e=>{let t=("1080p"===e.resolution?35:25)*e.duration;return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["wan27ExtendVideo",0,t0],488263);var t1=i,t2=t;let t3=t1.z.object({type:t1.z.literal("image"),id:t1.z.string(),url:t1.z.string(),label:t1.z.string(),metadata:t1.z.custom().optional()}),t4=t1.z.object({prompt:t1.z.string().optional(),videoCount:t1.z.number().int().min(1).max(8).default(1),startFrame:t3,endFrame:t3.nullable().optional(),resolution:t1.z.enum(["720p","1080p"]).default("720p").catch("720p"),duration:t1.z.number().int().min(2).max(15).default(5).catch(5),negativePrompt:t1.z.string().default("").catch(""),enablePromptExpansion:t1.z.boolean().default(!0).catch(!0)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),t6=t1.z.object({url:t1.z.string(),thumbnailUrl:t1.z.string().optional(),duration:t1.z.number()}),t5=(0,t2.defineCapability)({id:"wan2-7:image2video",name:"Wan 2.7 Image to Video",inputSchema:t4,outputSchema:t6,getBusinessDetails:e=>{let t=("1080p"===e.resolution?35:25)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan27Image2Video",0,t5],758461);var t8=i,t9=a,t7=t;let ie=(0,ts.createVideoReferenceWithDurationSchema)({minDuration:2,maxDuration:10}),it=t8.z.object({prompt:t8.z.string().trim().min(1),negativePrompt:t8.z.string().default("").catch(""),videoReference:ie,visualReferences:t8.z.array(t8.z.union([t9.imageReferenceSchema,t9.characterReferenceSchema,t9.elementReferenceSchema])).max(3).default([]),resolution:t8.z.enum(["720p","1080p"]).default("720p").catch("720p"),duration:t8.z.number().int().min(0).max(10).default(0).catch(0),audioSetting:t8.z.enum(["auto","origin"]).default("auto").catch("auto"),enablePromptExpansion:t8.z.boolean().default(!0).catch(!0)}),ii=t8.z.object({url:t8.z.string(),thumbnailUrl:t8.z.string().optional(),duration:t8.z.number()}),ia=(0,t7.defineCapability)({id:"wan2-7:modify-video",name:"Wan 2.7 Modify Video",inputSchema:it,outputSchema:ii,getBusinessDetails:e=>{let t=2*(e.duration>0?e.duration:Math.floor(e.videoReference?.metadata?.duration??5)),i=("1080p"===e.resolution?35:25)*t;return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["wan27ModifyVideo",0,ia],775854);var ir=i,io=a,is=t,iu=ts;let id=ir.z.object({url:ir.z.string().url(),name:ir.z.string().optional(),duration:ir.z.number().optional(),source:ir.z.enum(["upload","library"]).optional()}),il=io.imageReferenceSchema.extend({voiceReference:id.optional()}),ic=io.characterReferenceSchema.extend({voiceReference:id.optional()}),im=io.elementReferenceSchema.extend({voiceReference:id.optional()}),ih=io.videoReferenceSchema.extend({voiceReference:id.optional()}),ip=ir.z.union([il,ic,im,ih]),ib=(0,iu.createVideoReferenceWithDurationSchema)({minDuration:1,maxDuration:30}),ig={prompt:ir.z.string().min(1),negativePrompt:ir.z.string().default("").catch(""),visualReferences:ir.z.array(ip).max(5).default([]).optional(),resolution:ir.z.enum(["720p","1080p"]).default("720p").catch("720p"),aspectRatio:ir.z.enum(["16:9","9:16","1:1","4:3","3:4"]).default("16:9").catch("16:9"),duration:ir.z.number().int().min(2).max(10).default(5).catch(5),enablePromptExpansion:ir.z.boolean().default(!1).catch(!1),videoCount:ir.z.number().int().min(1).max(8).default(1)},iv=ir.z.object({...ig,videoReference:ib.optional()}).superRefine((e,t)=>
1{let i=+!!e.videoReference+(e.visualReferences?.length??0);0===i&&t.addIssue({code:"custom",message:"At least one reference (video or image) is required.",path:["visualReferences"]}),i>5&&t.addIssue({code:"custom",message:`Total references cannot exceed 5 (got ${i}).`,path:["visualReferences"]})}),iy=ir.z.object({...ig,visualReferences:ir.z.array(ip).min(1).max(5)}),ix=ir.z.object({url:ir.z.string(),thumbnailUrl:ir.z.string().optional(),duration:ir.z.number()}),iz=(0,is.defineCapability)({id:"wan2-7:reference-video",name:"Wan 2.7 Reference Video",inputSchema:iv,outputSchema:ix,getBusinessDetails:e=>{let t=Math.ceil(e.videoReference?.metadata?.duration??0);for(let i of e.visualReferences??[])"video"===i.type&&i.metadata?.duration&&(t+=Math.ceil(i.metadata.duration));let i=t+e.duration,a=("1080p"===e.resolution?35:25)*i;return{unitCredits:a,quantity:e.videoCount??1,totalCredits:a*(e.videoCount??1)}}});e.s(["wan27ReferenceVideo",0,iz,"wan27ReferenceVideoFormSchema",0,iy],51032);var i_=i,iS=t;let iM=i_.z.object({prompt:i_.z.string().min(1),videoCount:i_.z.number().int().min(1).max(8).default(1),resolution:i_.z.enum(["720p","1080p"]).default("720p").catch("720p"),duration:i_.z.number().int().min(2).max(15).default(5).catch(5),negativePrompt:i_.z.string().default("").catch(""),aspectRatio:i_.z.enum(["16:9","9:16","1:1","4:3","3:4"]).default("16:9").catch("16:9"),enablePromptExpansion:i_.z.boolean().default(!0).catch(!0),autoEnhancePrompt:i_.z.boolean().default(!1).catch(!1)}),iI=i_.z.object({url:i_.z.string(),thumbnailUrl:i_.z.string().optional(),duration:i_.z.number()}),iw=(0,iS.defineCapability)({id:"wan2-7:text2video",name:"Wan 2.7 Text to Video",inputSchema:iM,outputSchema:iI,getBusinessDetails:e=>{let t=("1080p"===e.resolution?35:25)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["wan27Text2Video",0,iw],986754);let iC=(0,tX.defineModel)({id:"wan2-7",name:"Wan 2.7",description:"High quality video generation model by Alibaba",metadata:{creator:"Alibaba"},capabilities:{image2video:t5,text2video:iw,"modify-video":ia,"reference-video":iz,"extend-video":t0}});e.s(["wan27Model",0,iC],628329)},187314,e=>{"use strict";var t=e.i(207653);let i=t.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","5:4","4:5","21:9","9:21"]),a=t.z.object({images:t.z.array(t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional()}))}),n={"1K":{"1:1":"1024*1024","4:3":"1176*880","3:4":"880*1176","16:9":"1352*760","9:16":"760*1352","3:2":"1240*824","2:3":"824*1240","5:4":"1136*904","4:5":"904*1136","21:9":"1552*664","9:21":"664*1552"},"2K":{"1:1":"2048*2048","4:3":"2352*1760","3:4":"1760*2352","16:9":"2712*1528","9:16":"1528*2712","3:2":"2488*1656","2:3":"1656*2488","5:4":"2272*1816","4:5":"1816*2272","21:9":"3112*1328","9:21":"1328*3112"},"4K":{"1:1":"4096*4096","4:3":"4704*3528","3:4":"3528*4704","16:9":"5432*3056","9:16":"3056*5432","3:2":"4984*3320","2:3":"3320*4984","5:4":"4552*3640","4:5":"3640*4552","21:9":"6224*2664","9:21":"2664*6224"}};function r(e,t){return n[e]?.[t]??n["2K"]["1:1"]}e.s(["WAN27_IMAGE_SIZE_MAP",0,n,"getWan27ImageSize",()=>r,"wan27ImageAspectRatioSchema",0,i,"wan27ImageOutputSchema",0,a])},145076,750295,218610,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(200744),n=t,r=e.i(187314);let o=i.z.object({prompt:i.z.string().min(1).max(5e3,"Prompt must be 5000 characters or less"),imageCount:i.z.number().int().min(1).max(8).default(1),aspectRatio:r.wan27ImageAspectRatioSchema.default("4:3"),resolution:i.z.enum(["1K","2K"]).default("2K"),references:i.z.array(i.z.union([a.imageReferenceSchema,a.characterReferenceSchema])).min(1).max(9)}),s=(0,n.defineCapability)({id:"wan2-7-image:image2image",name:"Wan 2.7 Image Image to Image",inputSchema:o,outputSchema:r.wan27ImageOutputSchema,getBusinessDetails:e=>{let t=6,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["wan27ImageImage2Image",0,s],750295);var u=i,d=t,l=r;let c=u.z.object({prompt:u.z.string().min(1).max(5e3,"Prompt must be 5000 characters or less"),imageCount:u.z.number().int().min(1).max(8).default(1),aspectRatio:l.wan27ImageAspectRatioSchema.default("4:3"),resolution:u.z.enum(["1K","2K"]).default("2K"),thinkingMode:u.z.boolean().default(!1)}),f=(0,d.defineCapability)({id:"wan2-7-image:text2image",name:"Wan 2.7 Image Text to Image",inputSchema:c,outputSc
1hema:l.wan27ImageOutputSchema,getBusinessDetails:e=>{let t=6,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["wan27ImageText2Image",0,f],218610);let m=(0,t.defineModel)({id:"wan2-7-image",name:"Wan 2.7 Image",description:"Image generation with facial control, text rendering, and palette control",metadata:{creator:"Alibaba Cloud"},capabilities:{text2image:f,image2image:s}});e.s(["wan27ImageModel",0,m],145076)},564968,e=>{"use strict";let t=2;e.s(["WAN27_IMAGE_PRO_MAX_BBOXES_PER_IMAGE",0,t])},507231,150678,70058,136174,199432,336189,837520,290352,714828,87900,468970,806369,253004,411800,155858,612590,504099,152486,187964,660926,986355,162932,208051,393571,33192,293961,47691,263200,743847,243284,787023,202355,733013,624359,827949,282090,163265,560222,643298,875752,186187,947873,458092,748929,864477,300255,678797,822964,820638,45785,120752,88708,904029,955760,261788,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(200744),n=t,r=e.i(187314),o=e.i(564968);let s=i.z.object({x1:i.z.number().int(),y1:i.z.number().int(),x2:i.z.number().int(),y2:i.z.number().int()}),u=i.z.object({boxes:i.z.array(s).max(o.WAN27_IMAGE_PRO_MAX_BBOXES_PER_IMAGE)}),d=i.z.object({prompt:i.z.string().min(1).max(5e3,"Prompt must be 5000 characters or less"),imageCount:i.z.number().int().min(1).max(8).default(1),aspectRatio:r.wan27ImageAspectRatioSchema.default("4:3"),resolution:i.z.enum(["1K","2K"]).default("2K"),references:i.z.array(i.z.union([a.imageReferenceSchema,a.characterReferenceSchema])).min(1).max(9),bboxList:i.z.array(u).optional(),mask:i.z.string().optional(),option:i.z.object({skipDataInspectionHeader:i.z.boolean().optional()}).optional()}),l=(0,n.defineCapability)({id:"wan2-7-image-pro:image2image",name:"Wan 2.7 Image Pro Image to Image",inputSchema:d,outputSchema:r.wan27ImageOutputSchema,getBusinessDetails:e=>{let t=15,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["wan27ImageProImage2Image",0,l],150678);var c=i,f=t,m=r;let h=c.z.object({prompt:c.z.string().min(1).max(5e3,"Prompt must be 5000 characters or less"),imageCount:c.z.number().int().min(1).max(8).default(1),aspectRatio:m.wan27ImageAspectRatioSchema.default("4:3"),resolution:c.z.enum(["1K","2K","4K"]).default("4K"),thinkingMode:c.z.boolean().default(!1)}),p=(0,f.defineCapability)({id:"wan2-7-image-pro:text2image",name:"Wan 2.7 Image Pro Text to Image",inputSchema:h,outputSc
1hema:m.wan27ImageOutputSchema,getBusinessDetails:e=>{let t=15,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["wan27ImageProText2Image",0,p],70058);let b=(0,t.defineModel)({id:"wan2-7-image-pro",name:"Wan 2.7 Image Pro",description:"Premium image generation with 4K output, enhanced composition, and sharper prompt adherence",metadata:{creator:"Alibaba Cloud"},capabilities:{text2image:p,image2image:l}});e.s(["wan27ImageProModel",0,b],507231);var g=t,v=t,y=i,x=a,z=e.i(332097),_=e.i(944029),S=e.i(505807);let M=4500;function I(e){return -1===e?30:e}e.s(["WAN3_PROMPT_MAX_CHARACTERS",0,M],136174);let w={"480p":20,"720p":40,"1080p":80};function C(e){return w[e]}function R(e){return Math.ceil(e.reduce((e,t)=>e+(t.metadata?.duration??0),0))}let E=2,A=30;function P(e){return Math.max(A-e,E)}let T=y.z.object({url:y.z.string(),thumbnailUrl:y.z.string().optional(),duration:y.z.number()}),k=y.z.enum(["480p","720p","1080p"]).default("720p").catch("720p"),D=y.z.union([y.z.literal(-1),y.z.number().int().min(2).max(30)]).default(5).catch(5),B=y.z.boolean().default(!0).catch(!0),j=y.z.boolean().default(!0).catch(!0),O=y.z.number().int().min(0).max(0x7fffffff).optional(),V=y.z.object({prompt:y.z.string().min(1).max(M),videoCount:y.z.number().int().min(1).max(8).default(1),resolution:k,duration:D,aspectRatio:y.z.enum(["16:9","9:16","1:1","4:3","3:4","adaptive"]).default("16:9").catch("16:9"),audio:B,promptExtend:j,autoEnhancePrompt:y.z.boolean().default(!1).catch(!1),seed:O});function N(e){let t=C(e.resolution)*I(e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}let F=y.z.object({type:y.z.literal("image"),id:y.z.string(),url:y.z.string(),label:y.z.string(),metadata:y.z.custom().optional()}),U=y.z.object({prompt:y.z.string().max(M).optional(),videoCount:y.z.number().int().min(1).max(8).default(1),startFrame:F,endFrame:F.nullable().optional(),resolution:k,duration:D,audio:B,promptExtend:j,seed:O}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{for(let i of["startFrame","endFrame"]){let a=e[i]?.metadata;if(!a)continue;let n=(0,z.validateReferenceImageMetadata)(a,S.WAN3_FRAME_IMAGE_CONSTRAINTS);n&&t.addIssue({code:"custom",message:n.message,path:[i]})}});function q(e){let t=C(e.resolution)*I(e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}let L=y.z.discriminatedUnion("type",[x.imageReferenceSchema,x.characterReferenceSchema,x.elementReferenceSchema,x.videoReferenceSchema,x.audioReferenceSchema]),$=10,H=5,K=30,G=1,X=15,Z=15,W=5,Y=1,J=15,Q=15,ee=y.z.object({prompt:y.z.string().min(1).max(M),visualReferences:y.z.array(L).min(1).max(K),resolution:k,aspectRatio:y.z.enum(["16:9","9:16","1:1","4:3","3:4","adaptive"]).default("16:9").catch("16:9"),duration:D,videoCount:y.z.number().int().min(1).max(8).default(1),audio:B,promptExtend:j,seed:O}).superRefine((e,t)=>{let i=e.visualReferences.filter(e=>"video"===e.type),a=e.visualReferences.filter(e=>"audio"===e.type),n=e.visualReferences.filter(e=>"video"!==e.type&&"audio"!==e.type);for(let e of(i.length>H&&t.addIssue({code:"custom",message:`At most ${H} video references are allowed (got ${i.length}).`,path:["visualReferences"]}),n.length>$&&t.addIssue({code:"custom",message:`At most ${$} image references are allowed (got ${n.length}).`,path:["visualReferences"]}),i)){let i=e.metadata?.duration;null!=i&&(i<G||i>X)&&t.addIssue({code:"custom",message:`Each video reference must be between ${G}s and ${X}s (got ${i}s).`,path:["visualReferences"]})}let r=R(i);for(let e of(r>Z&&t.addIssue({code:"custom",message:`Total video reference duration cannot exceed ${Z}s (got ${r}s).`,path:["visualReferences"]}),a.length>W&&t.addIssue({code:"custom",message:`At most ${W} audio references are allowed (got ${a.length}).`,path:["visualReferences"]}),a)){let i=e.metadata?.duration;null!=i&&(i<Y||i>J)&&t.addIssue({code:"custom",message:`Each audio reference must be between ${Y}s and ${J}s (got ${Math.ceil(i)}s).`,path:["visualReferences"]})}let o=R(a);o>Q&&t.addIssue({code:"custom",message:`Total audio reference duration cannot exceed ${Q}s (got ${o}s).`,path:["visualReferences"]}),-1!==e.duration&&r+e.duration>A&&t.addIssue({code:"custom",message:`Video references (${r}s) plus output duration (${e.duration}s) cannot exceed ${A}s.`,path:["duration"]})});function et(e){let t=R(e.visualReferences.filter(e=>"video"===e.type)),i=-1===e.duration?Math.max(I(-1)-t,2):e.duration,a=t+i,n=C(e.resolution)*a;return{unitCredits:n,quantity:e.videoCount??1,totalCredits:n*(e.videoCount??1)}}let ei=1,ea=15,en=2,er=y.z.object({prompt:y.z.string().trim().min(1).max(M),videoReference:(0,_.createVideoReferenceWithDurationSchema)({minDuration:ei,maxDuration:ea}),visualReferences:y.z.array(y.z.discriminatedUnion("type",[x.imageReferenceSchema,x.characterReferenceSchema,x.elementReferenceSchema,x.audioReferenceSchema])).max($+W).default([]),resolution:k,aspectRatio:y.z.enum(["16:9","9:16","1:1","4:3","3:4","adaptive"]).default("adaptive").catch("adaptive"),audio:B,promptExtend:j,seed:O}).superRefine((e,t)=>
1{let i=e.visualReferences.filter(e=>"audio"===e.type),a=e.visualReferences.filter(e=>"audio"!==e.type);for(let e of(a.length>$&&t.addIssue({code:"custom",message:`At most ${$} image references are allowed (got ${a.length}).`,path:["visualReferences"]}),i.length>W&&t.addIssue({code:"custom",message:`At most ${W} audio references are allowed (got ${i.length}).`,path:["visualReferences"]}),i)){let i=e.metadata?.duration;null!=i&&(i<Y||i>J)&&t.addIssue({code:"custom",message:`Each audio reference must be between ${Y}s and ${J}s (got ${Math.ceil(i)}s).`,path:["visualReferences"]})}let n=R(i);n>Q&&t.addIssue({code:"custom",message:`Total audio reference duration cannot exceed ${Q}s (got ${n}s).`,path:["visualReferences"]})});function eo(e){let t=Math.max(Math.ceil(e.videoReference?.metadata?.duration??0),en),i=C(e.resolution)*t*2;return{unitCredits:i,quantity:1,totalCredits:i}}e.s(["WAN3_MAX_OUTPUT_DURATION_SECONDS",0,A,"WAN3_MIN_OUTPUT_DURATION_SECONDS",0,E,"getWan30CreditsPerSecond",()=>C,"getWan30Image2VideoBusinessDetail
1s",()=>q,"getWan30MaxOutputDuration",()=>P,"getWan30ModifyVideoBusinessDetails",()=>eo,"getWan30ReferenceVideoBusinessDetails",()=>et,"getWan30Text2VideoBusinessDetails",()=>N,"sumReferenceDurationSeconds",()=>R,"wan30Image2VideoInputSchema",0,U,"wan30ModifyVideoInputSchema",0,er,"wan30OutputSchema",0,T,"wan30ReferenceVideoInputSchema",0,ee,"wan30Text2VideoInputSchema",0,V,"wan30VisualReferenceSchema",0,L],199432);let es=U,eu=T,ed=(0,v.defineCapability)({id:"wan3-0:image2video",name:"Wan 3.0 Image to Video",inputSchema:es,outputSchema:eu,getBusinessDetails:e=>q(e)});e.s(["wan30Image2Video",0,ed],336189);let el=er,ec=T,ef=(0,t.defineCapability)({id:"wan3-0:modify-video",name:"Wan 3.0 Modify Video",inputSchema:el,outputSchema:ec,getBusinessDetails:e=>eo(e)});e.s(["wan30ModifyVideo",0,ef],837520);let em=ee,eh=T,ep=(0,t.defineCapability)({id:"wan3-0:reference-video",name:"Wan 3.0 Reference Video",inputSchema:em,outputSchema:eh,getBusinessDetails:e=>et(e)});e.s(["wan30ReferenceVideo",0,ep],290352);let eb=V,eg=T,ev=(0,t.defineCapability)({id:"wan3-0:text2video",name:"Wan 3.0 Text to Video",inputSchema:eb,outputSchema:eg,getBusinessDetails:e=>N(e)});e.s(["wan30Text2Video",0,ev],714828);let ey=(0,g.defineModel)({id:"wan3-0",name:"Wan 3.0",description:"All-in-one video generation model by Alibaba with up to 30s duration and multi-modal references",metadata:{creator:"Alibaba"},capabilities:{text2video:ev,image2video:ed,"reference-video":ep,"modify-video":ef}});e.s(["wan30Model",0,ey],87900);var ex=t,ez=t,e_=i,eS=a,eM=z,eI=_,ew=S;let eC=4500;function eR(e){return -1===e?30:e}e.s(["WAN3_PRIME_PROMPT_MAX_CHARACTERS",0,eC],468970);let eE={"480p":35,"720p":70,"1080p":140};function eA(e){return eE[e]}function eP(e){return Math.ceil(e.reduce((e,t)=>e+(t.metadata?.duration??0),0))}let eT=30,ek=e_.z.object({url:e_.z.string(),thumbnailUrl:e_.z.string().optional(),duration:e_.z.number()}),eD=e_.z.enum(["480p","720p","1080p"]).default("720p").catch("720p"),eB=e_.z.union([e_.z.literal(-1),e_.z.number().int().min(2).max(30)]).default(5).catch(5),ej=e_.z.boolean().default(!0).catch(!0),eO=e_.z.boolean().default(!0).catch(!0),eV=e_.z.number().int().min(0).max(0x7fffffff).optional(),eN=e_.z.object({prompt:e_.z.string().min(1).max(eC),videoCount:e_.z.number().int().min(1).max(8).default(1),resolution:eD,duration:eB,aspectRatio:e_.z.enum(["16:9","9:16","1:1","4:3","3:4","adaptive"]).default("16:9").catch("16:9"),audio:ej,promptExtend:eO,autoEnhancePrompt:e_.z.boolean().default(!1).catch(!1),seed:eV});function eF(e){let t=eA(e.resolution)*eR(e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}let eU=e_.z.object({type:e_.z.literal("image"),id:e_.z.string(),url:e_.z.string(),label:e_.z.string(),metadata:e_.z.custom().optional()}),eq=e_.z.object({prompt:e_.z.string().max(eC).optional(),videoCount:e_.z.number().int().min(1).max(8).default(1),startFrame:eU,endFrame:eU.nullable().optional(),resolution:eD,duration:eB,audio:ej,promptExtend:eO,seed:eV}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{for(let i of["startFrame","endFrame"]){let a=e[i]?.metadata;if(!a)continue;let n=(0,eM.validateReferenceImageMetadata)(a,ew.WAN3_FRAME_IMAGE_CONSTRAINTS);n&&t.addIssue({code:"custom",message:n.message,path:[i]})}});function eL(e){let t=eA(e.resolution)*eR(e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}let e$=e_.z.discriminatedUnion("type",[eS.imageReferenceSchema,eS.characterReferenceSchema,eS.elementReferenceSchema,eS.videoReferenceSchema,eS.audioReferenceSchema]),eH=10,eK=5,eG=30,eX=1,eZ=15,eW=15,eY=5,eJ=1,eQ=15,e0=15,e1=e_.z.object({prompt:e_.z.string().min(1).max(eC),visualReferences:e_.z.array(e$).min(1).max(eG),resolution:eD,aspectRatio:e_.z.enum(["16:9","9:16","1:1","4:3","3:4","adaptive"]).default("16:9").catch("16:9"),duration:eB,videoCount:e_.z.number().int().min(1).max(8).default(1),audio:ej,promptExtend:eO,seed:eV}).superRefine((e,t)=>{let i=e.visualReferences.filter(e=>"video"===e.type),a=e.visualReferences.filter(e=>"audio"===e.type),n=e.visualReferences.filter(e=>"video"!==e.type&&"audio"!==e.type);for(let e of(i.length>eK&&t.addIssue({code:"custom",message:`At most ${eK} video references are allowed (got ${i.length}).`,path:["visualReferences"]}),n.length>eH&&t.addIssue({code:"custom",message:`At most ${eH} image references are allowed (got ${n.length}).`,path:["visualReferences"]}),i)){let i=e.metadata?.duration;null!=i&&(i<eX||i>eZ)&&t.addIssue({code:"custom",message:`Each video reference must be between ${eX}s and ${eZ}s (got ${i}s).`,path:["visualReferences"]})}let r=eP(i);for(let e of(r>eW&&t.addIssue({code:"custom",message:`Total video reference duration cannot exceed ${eW}s (got ${r}s).`,path:["visualReferences"]}),a.length>eY&&t.addIssue({code:"custom",message:`At most ${eY} audio references are allowed (got ${a.length}).`,path:["visualReferences"]}),a)){let i=e.metadata?.duration;null!=i&&(i<eJ||i>eQ)&&t.addIssue({code:"custom",message:`Each audio reference must be between ${eJ}s and ${eQ}s (got ${Math.ceil(i)}s).`,path:["visualReferences"]})}let o=eP(a);o>e0&&t.addIssue({code:"custom",message:`Total audio reference duration cannot exceed ${e0}s (got ${o}s).`,path:["visualReferences"]}),-1!==e.duration&&r+e.duration>eT&&t.addIssue({code:"custom",message:`Video references (${r}s) plus output duration (${e.duration}s) cannot exceed ${eT}s.`,path:["duration"]})});function e2(e){let t=eP(e.visualReferences.filter(e=>"video"===e.type)),i=-1===e.duration?Math.max(eR(-1)-t,2):e.duration,a=t+i,n=eA(e.resolution)*a;return{unitCredits:n,quantity:e.videoCount??1,totalCredits:n*(e.videoCount??1)}}let e3=1,e4=15,e6=2,e5=e_.z.object({prompt:e_.z.string().trim().min(1).max(eC),videoReference:(0,eI.createVideoReferenceWithDurationSchema)({minDuration:e3,maxDuration:e4}),visualReferences:e_.z.array(e_.z.discriminatedUnion("type",[eS.imageReferenceSchema,eS.characterReferenceSchema,eS.elementReferenceSchema,eS.audioReferenceSchema])).max(eH+eY).default([]),resolution:eD,aspectRatio:e_.z.enum(["16:9","9:16","1:1","4:3","3:4","adaptive"]).default("adaptive").catch("adaptive"),audio:ej,promptExtend:eO,seed:eV}).superRefine((e,t)=>
1{let i=e.visualReferences.filter(e=>"audio"===e.type),a=e.visualReferences.filter(e=>"audio"!==e.type);for(let e of(a.length>eH&&t.addIssue({code:"custom",message:`At most ${eH} image references are allowed (got ${a.length}).`,path:["visualReferences"]}),i.length>eY&&t.addIssue({code:"custom",message:`At most ${eY} audio references are allowed (got ${i.length}).`,path:["visualReferences"]}),i)){let i=e.metadata?.duration;null!=i&&(i<eJ||i>eQ)&&t.addIssue({code:"custom",message:`Each audio reference must be between ${eJ}s and ${eQ}s (got ${Math.ceil(i)}s).`,path:["visualReferences"]})}let n=eP(i);n>e0&&t.addIssue({code:"custom",message:`Total audio reference duration cannot exceed ${e0}s (got ${n}s).`,path:["visualReferences"]})});function e8(e){let t=Math.max(Math.ceil(e.videoReference?.metadata?.duration??0),e6),i=eA(e.resolution)*t*2;return{unitCredits:i,quantity:1,totalCredits:i}}e.s(["getWan30PrimeCreditsPerSecond",()=>eA,"getWan30PrimeImage2VideoBusinessDetails",()=>eL,"getWan30PrimeModifyVideoBusinessDetails",()=>e8,"getWan30PrimeReferenceVideoBusinessDetails",()=>e2,"getWan30PrimeText2VideoBusinessDetails",()=>eF,"wan30PrimeImage2VideoInputSchema",0,eq,"wan30PrimeModifyVideoInputSchema",0,e5,"wan30PrimeOutputSchema",0,ek,"wan30PrimeReferenceVideoInputSchema",0,e1,"wan30PrimeText2VideoInputSchema",0,eN],806369);let e9=eq,e7=ek,te=(0,ez.defineCapability)({id:"wan3-0-prime:image2video",name:"Wan 3.0 Prime Image to Video",inputSchema:e9,outputSchema:e7,getBusinessDetails:e=>eL(e)});e.s(["wan30PrimeImage2Video",0,te],253004);let tt=e5,ti=ek,ta=(0,t.defineCapability)({id:"wan3-0-prime:modify-video",name:"Wan 3.0 Prime Modify Video",inputSchema:tt,outputSchema:ti,getBusinessDetails:e=>e8(e)});e.s(["wan30PrimeModifyVideo",0,ta],411800);let tn=e1,tr=ek,to=(0,t.defineCapability)({id:"wan3-0-prime:reference-video",name:"Wan 3.0 Prime Reference Video",inputSchema:tn,outputSchema:tr,getBusinessDetails:e=>e2(e)});e.s(["wan30PrimeReferenceVideo",0,to],155858);let ts=eN,tu=ek,td=(0,t.defineCapability)({id:"wan3-0-prime:text2video",name:"Wan 3.0 Prime Text to Video",inputSchema:ts,outputSchema:tu,getBusinessDetails:e=>eF(e)});e.s(["wan30PrimeText2Video",0,td],612590);let tl=(0,ex.defineModel)({id:"wan3-0-prime",name:"Wan 3.0 Prime",description:"Premium tier of Alibaba's all-in-one video model — same capabilities as Wan 3.0 with higher generation quality",metadata:{creator:"Alibaba"},capabilities:{text2video:td,image2video:te,"reference-video":to,"modify-video":ta}});e.s(["wan30PrimeModel",0,tl],504099);var tc=t,tf=i,tm=a,th=t;let tp=277e4,tb=240,tg=tm.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata;i&&("number"==typeof i.width&&"number"==typeof i.height&&i.width*i.height>tp&&t.addIssue({code:tf.z.ZodIssueCode.custom,message:"Video resolution too high (max 2.77M pixels, ~1920×1080 / 1440×1920)",path:["metadata"]}),"number"==typeof i.fps&&"number"==typeof i.duration&&i.fps*i.duration>tb&&t.addIssue({code:tf.z.ZodIssueCode.custom,message:`Video too long (max ${tb} frames)`,path:["metadata","duration"]}))}),tv=tf.z.enum(["auto","fill","select","custom"]).default("auto"),ty=tf.z.object({prompt:tf.z.string().trim().max(2e3).default(""),videoReference:tg,referenceImage:tm.imageReferenceSchema.optional(),alphaMode:tv,maxResolution:tf.z.enum(["720","1080"]).default("1080").catch("1080"),maskUrl:tf.z.string().url().optional(),videoCount:tf.z.number().int().min(1).max(8).default(1)}).superRefine((e,t)=>{e.prompt?.trim()||e.referenceImage||t.addIssue({code:tf.z.ZodIssueCode.custom,message:"Add a prompt or a reference image (or both).",path:["prompt"]}),"select"!==e.alphaMode&&"custom"!==e.alphaMode||e.maskUrl||t.addIssue({code:tf.z.ZodIssueCode.custom,message:"Edit a mask to use Select mode.",path:["maskUrl"]})}),tx=tf.z.object({url:tf.z.string(),thumbnailUrl:tf.z.string().optional(),maskUrl:tf.z.string().optional()}),tz=25,t_=75,tS=(0,th.defineCapability)({id:"switchx-v1:modify-video",name:"Beeble Switch X Modify Video",inputSchema:ty,outputSchema:tx,getBusinessDetails:e=>{let t=Math.max(1,Math.ceil(Math.ceil(Math.max(1,e.videoReference?.metadata?.duration??1)*(e.videoReference?.metadata?.fps??30))/30))*("1080"===e.maxResolution?t_:tz),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["switchxAlphaModeSchema",0,tv,"switchxV1ModifyVideo",0,tS],152486);let tM=(0,tc.defineModel)({id:"switchx-v1",name:"Switch X v1",description:"Beeble Switch X — video-to-video compositing that keeps original pixels and relights the subject to match a new reference.",metadata:{creator:"Beeble",tier:"flagship",aliases:["Switch X","SwitchX","Beeble Switch X","Beeble"]},capabilities:{"modify-video":tS}});e.s(["switchxV1Model",0,tM],187964);var tI=t,tw=i,tC=t;let tR=tw.z.object({prompt:tw.z.string().min(1),imageCount:tw.z.number().int().min(1).max(8).default(2),imagePrompt:tw.z.string().nullable().optional(),width:tw.z.number().int().min(256).max(1440).multipleOf(32).default(1024).catch(1024),height:tw.z.number().int().min(256).max(1440).multipleOf(32).default(1024).catch(1024),promptUpsampling:tw.z.boolean().default(!0).catch(!0),seed:tw.z.number().int().nullable().optional(),safetyTolerance:tw.z.number().int().min(0).max(6).default(6).catch(6),outputFormat:tw.z.enum
1(["jpeg","png"]).nullable().default("png").catch("png"),webhookUrl:tw.z.string().min(1).max(2083).nullable().optional(),webhookSecret:tw.z.string().nullable().optional(),autoEnhancePrompt:tw.z.boolean().optional()}),tE=tw.z.object({url:tw.z.string(),thumbnailUrl:tw.z.string().optional(),width:tw.z.number().optional(),height:tw.z.number().optional(),seed:tw.z.number().optional()}),tA=(0,tC.defineCapability)({id:"flux-1-1-pro:text2image",name:"Flux 1.1 Pro Text to Image",inputSchema:tR,outputSchema:tE,getBusinessDetails:e=>{let t=5,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["flux11ProText2Image",0,tA],660926);let tP=(0,tI.defineModel)({id:"flux-1-1-pro",name:"Flux 1.1 Pro",description:"Flux 1.1 Pro is an image model by BFL",metadata:{creator:"Black Forest Labs",tier:"flagship",aliases:["BFL","Black Forest Labs","Flux Pro"]},capabilities:{text2image:tA}});e.s(["flux11ProModel",0,tP],986355),e.s([],162932);var tT=t,tk=i,tD=t;let tB=tk.z.object({prompt:tk.z.string().min(1),imageCount:tk.z.number().int().min(1).max(8).default(2),imagePrompt:tk.z.string().nullable().optional(),width:tk.z.number().int().min(256).max(1440).multipleOf(32).default(1024).catch(1024),height:tk.z.number().int().min(256).max(1440).multipleOf(32).default(768).catch(768),steps:tk.z.number().int().min(1).max(50).default(28).catch(28).nullable().optional(),promptUpsampling:tk.z.boolean().default(!0).catch(!0),seed:tk.z.number().int().nullable().optional(),guidance:tk.z.number().min(1.5).max(5).default(3).catch(3).nullable().optional(),safetyTolerance:tk.z.number().int().min(0).max(6).default(6).catch(6),outputFormat:tk.z.enum(["jpeg","png"]).nullable().default("png").catch("png"),webhookUrl:tk.z.string().min(1).max(2083).nullable().optional(),webhookSecret:tk.z.string().nullable().optional(),autoEnhancePrompt:tk.z.boolean().optional()}),tj=tk.z.object({url:tk.z.string(),thumbnailUrl:tk.z.string().optional(),width:tk.z.number().optional(),height:tk.z.number().optional()}),tO=(0,tD.defineCapability)({id:"flux-1-dev:text2image",name:"Flux 1 Dev Text to Image",inputSchema:tB,outputSchema:tj,getBusinessDetails:e=>{let t=5,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["flux1DevText2Image",0,tO],208051);let tV=(0,tT.defineModel)({id:"flux-1-dev",name:"Flux 1 Dev",description:"Enhanced style fine-tuning",metadata:{creator:"BFL"},capabilities:{text2image:tO}});e.s(["flux1DevModel",0,tV],393571),e.s([],33192);var tN=t;let tF=1048576,tU=(e,t)=>Math.max(1,Math.ceil((e??1024)*(t??1024)/tF));e.s(["computeFluxMp",0,tU],293961);var tq=i,tL=t;let t$=tq.z.object({prompt:tq.z.string().min(1),imageCount:tq.z.number().int().min(1).max(8).default(2),referenceImages:tq.z.array(tq.z.object({url:tq.z.string()})).max(8).optional(),width:tq.z.number().int().min(64).max(4096).optional(),height:tq.z.number().int().min(64).max(4096).optional(),seed:tq.z.number().int().nullable().optional(),guidance:tq.z.number().min(1.5).max(10).default(5).catch(5),steps:tq.z.number().int().min(1).max(50).default(50).catch(50),promptUpsampling:tq.z.boolean().default(!0).catch(!0),outputFormat:tq.z.enum(["jpeg","png"]).nullable().default("png").catch("png"),safetyTolerance:tq.z.number().int().min(0).max(5).default(5).catch(5),webhookUrl:tq.z.string().min(1).max(2083).nullable().optional(),webhookSecret:tq.z.string().nullable().optional(),autoEnhancePrompt:tq.z.boolean().optional()}),tH=tq.z.object({url:tq.z.string(),thumbnailUrl:tq.z.string().optional(),width:tq.z.number().optional(),height:tq.z.number().optional(),seed:tq.z.number().optional()}),tK=(0,tL.defineCapability)({id:"flux-2-flex:text2image",name:"Flux 2 Flex Text to Image",inputSchema:t$,outputSchema:tH,getBusinessDetails:e=>{let t=15*tU(e.width,e.height),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["flux2FlexText2Image",0,tK],47691);let tG=(0,tN.defineModel)({id:"flux-2-flex",name:"Flux 2 Flex",description:"Flux 2 Flex is an image model by BFL",metadata:{creator:"BFL"},capabilities:{text2image:tK}});e.s(["flux2FlexModel",0,tG],263200),e.s([],743847);var tX=t,tZ=i,tW=t;let tY=tZ.z.object({prompt:tZ.z.string().min(1),imageCount:tZ.z.number().int().min(1).max(8).default(2),referenceImages:tZ.z.array(tZ.z.object({url:tZ.z.string()})).max(4).optional(),width:tZ.z.number().int().min(64).max(4096).optional(),height:tZ.z.number().int().min(64).max(4096).optional(),seed:tZ.z.number().int().nullable().optional(),outputFormat:tZ.z.enum(["jpeg","png"]).nullable().default("png").catch("png"),safetyTolerance:tZ.z.number().int().min(0).max(5).default(5).catch(5),webhookUrl:tZ.z.string().min(1).max(2083).nullable().optional(),webhookSecret:tZ.z.string().nullable().optional(),autoEnhancePrompt:tZ.z.boolean().optional()}),tJ=tZ.z.object({url:tZ.z.string(),thumbnailUrl:tZ.z.string().optional(),width:tZ.z.number().optional(),height:tZ.z.number().optional(),seed:tZ.z.number().optional()}),tQ=(0,tW.defineCapability)({id:"flux-2-klein-9b:text2image",name:"Flux 2 Klein 9B Text to Image",inputSchema:tY,outputSc
1hema:tJ,getBusinessDetails:e=>{let t=5+ +(tU(e.width,e.height)-1),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["flux2Klein9bText2Image",0,tQ],243284);let t0=(0,tX.defineModel)({id:"flux-2-klein-9b",name:"Flux 2 Klein 9B",description:"Flux 2 Klein 9B is an image model by BFL",metadata:{creator:"BFL"},capabilities:{text2image:tQ}});e.s(["flux2Klein9bModel",0,t0],787023),e.s([],202355);var t1=t,t2=i,t3=t;let t4=t2.z.object({prompt:t2.z.string().min(1),imageCount:t2.z.number().int().min(1).max(8).default(2),referenceImages:t2.z.array(t2.z.object({url:t2.z.string()})).max(8).optional(),width:t2.z.number().int().min(64).max(4096).optional(),height:t2.z.number().int().min(64).max(4096).optional(),seed:t2.z.number().int().nullable().optional(),outputFormat:t2.z.enum(["jpeg","png"]).nullable().default("png").catch("png"),safetyTolerance:t2.z.number().int().min(0).max(6).default(6).catch(6),webhookUrl:t2.z.string().min(1).max(2083).nullable().optional(),webhookSecret:t2.z.string().nullable().optional(),autoEnhancePrompt:t2.z.boolean().optional()}),t6=t2.z.object({url:t2.z.string(),thumbnailUrl:t2.z.string().optional(),width:t2.z.number().optional(),height:t2.z.number().optional(),seed:t2.z.number().optional()}),t5=(0,t3.defineCapability)({id:"flux-2-max:text2image",name:"Flux 2 Max Text to Image",inputSchema:t4,outputSchema:t6,getBusinessDetails:e=>{let t=20+8*(tU(e.width,e.height)-1),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["flux2MaxText2Image",0,t5],733013);let t8=(0,t1.defineModel)({id:"flux-2-max",name:"Flux 2 Max",description:"Flux 2 Max is an image model by BFL",metadata:{creator:"BFL"},capabilities:{text2image:t5}});e.s(["flux2MaxModel",0,t8],624359),e.s([],827949);var t9=t,t7=i,ie=t;let it=t7.z.object({prompt:t7.z.string().min(1),imageCount:t7.z.number().int().min(1).max(8).default(2),referenceImages:t7.z.array(t7.z.object({url:t7.z.string()})).max(8).optional(),width:t7.z.number().int().min(64).max(4096).optional(),height:t7.z.number().int().min(64).max(4096).optional(),seed:t7.z.number().int().nullable().optional(),outputFormat:t7.z.enum(["jpeg","png"]).nullable().default("png").catch("png"),safetyTolerance:t7.z.number().int().min(0).max(5).default(5).catch(5),webhookUrl:t7.z.string().min(1).max(2083).nullable().optional(),webhookSecret:t7.z.string().nullable().optional(),autoEnhancePrompt:t7.z.boolean().optional()}),ii=t7.z.object({url:t7.z.string(),thumbnailUrl:t7.z.string().optional(),width:t7.z.number().optional(),height:t7.z.number().optional(),seed:t7.z.number().optional()}),ia=(0,ie.defineCapability)({id:"flux-2-pro:text2image",name:"Flux 2 Pro Text to Image",inputSchema:it,outputSchema:ii,getBusinessDetails:e=>{let t=10+4*(tU(e.width,e.height)-1),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["flux2ProText2Image",0,ia],282090);let ir=(0,t9.defineModel)({id:"flux-2-pro",name:"Flux 2 Pro",description:"Flux 2 Pro is an image model by BFL",metadata:{creator:"BFL"},capabilities:{text2image:ia}});e.s(["flux2ProModel",0,ir],163265),e.s([],560222);var io=i,is=t,iu=_,id=i;let il=5,ic=20,im=10,ih={prompt:id.z.string().min(1),resolution:id.z.enum(["hd","fhd"]).default("hd").catch("hd"),duration:id.z.number().int().min(il).max(ic).default(il),aspectRatio:id.z.enum(["21:9","2:1","16:9","4:3","1:1","3:4","9:16","auto"]).default("16:9").catch("16:9"),audio:id.z.boolean().default(!0).catch(!0)},ip=id.z.object({url:id.z.string(),thumbnailUrl:id.z.string().optional(),duration:id.z.number()});function ib(e){return t=>{let i=e[t.resolution]*t.duration;return{unitCredits:i,quantity:1,totalCredits:i}}}e.s(["FLUX_3_VIDEO_MAX_DURATION_S",0,ic,"FLUX_3_VIDEO_MAX_KEYFRAMES",0,im,"FLUX_3_VIDEO_MIN_DURATION_S",0,il,"flux3VideoBaseFields",0,ih,"flux3VideoCreditsPerSecond",()=>ib,"flux3VideoOutputSchema",0,ip],643298);let ig=io.z.object({...ih,videoReference:(0,iu.createVideoReferenceWithDurationSchema)({minDuration:2,maxDuration:15})}),iv=(0,is.defineCapability)({id:"flux-3-video:extendVideo",name:"FLUX 3 Video Extend Video",inputSchema:ig,outputSchema:ip,getBusinessDetail
1s:ib({hd:300,fhd:380})});e.s(["flux3VideoExtendVideo",0,iv],875752);var iy=i,ix=a,iz=t;let i_=iy.z.object({...ih,keyframes:iy.z.array(ix.imageReferenceSchema).min(1).max(im)}),iS=(0,iz.defineCapability)({id:"flux-3-video:image2video",name:"FLUX 3 Video Image to Video",inputSchema:i_,outputSchema:ip,getBusinessDetails:ib({hd:120,fhd:200})});e.s(["flux3VideoImage2Video",0,iS],186187);var iM=t,iI=t;let iw=i.z.object(ih),iC=(0,iI.defineCapability)({id:"flux-3-video:text2video",name:"FLUX 3 Video Text to Video",inputSchema:iw,outputSchema:ip,getBusinessDetails:ib({hd:120,fhd:200})});e.s(["flux3VideoText2Video",0,iC],947873);let iR=(0,iM.defineModel)({id:"flux-3-video",name:"FLUX 3 Video",description:"FLUX 3 Video is a video model by BFL with native audio and 5-20s durations",metadata:{creator:"BFL"},capabilities:{text2video:iC,image2video:iS,extendVideo:iv}});e.s(["flux3VideoModel",0,iR],458092),e.s([],748929);var iE=t,iA=i,iP=t;let iT=iA.z.object({prompt:iA.z.string().min(1),imageCount:iA.z.number().int().min(1).max(8).default(2),referenceImages:iA.z.array(iA.z.object({url:iA.z.string()})).max(4).optional(),aspectRatio:iA.z.enum(["21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16"]).optional(),seed:iA.z.number().int().nullable().optional(),outputFormat:iA.z.enum(["jpeg","png"]).nullable().default("png").catch("png"),promptUpsampling:iA.z.boolean().default(!0).catch(!0),safetyTolerance:iA.z.number().int().min(0).max(6).default(6).catch(6),webhookUrl:iA.z.string().min(1).max(2083).nullable().optional(),webhookSecret:iA.z.string().nullable().optional(),autoEnhancePrompt:iA.z.boolean().optional()}),ik=iA.z.object({url:iA.z.string(),thumbnailUrl:iA.z.string().optional(),width:iA.z.number().optional(),height:iA.z.number().optional(),seed:iA.z.number().optional()}),iD=(0,iP.defineCapability)({id:"flux-kontext-max:text2image",name:"Flux Kontext Max Text to Image",inputSchema:iT,outputSchema:ik,getBusinessDetails:e=>{let t=15,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["fluxKontextMaxText2Image",0,iD],864477);let iB=(0,iE.defineModel)({id:"flux-kontext-max",name:"Flux Kontext Max",description:"Flux Kontext Max is an image model by BFL",metadata:{creator:"BFL"},capabilities:{text2image:iD}});e.s(["fluxKontextMaxModel",0,iB],300255),e.s([],678797);var ij=t,iO=i,iV=t;let iN=iO.z.object({prompt:iO.z.string().min(1),imageCount:iO.z.number().int().min(1).max(8).default(2),referenceImages:iO.z.array(iO.z.object({url:iO.z.string()})).max(4).optional(),aspectRatio:iO.z.enum(["21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16"]).optional(),seed:iO.z.number().int().nullable().optional(),outputFormat:iO.z.enum(["jpeg","png"]).nullable().default("png").catch("png"),promptUpsampling:iO.z.boolean().default(!0).catch(!0),safetyTolerance:iO.z.number().int().min(0).max(6).default(6).catch(6),webhookUrl:iO.z.string().min(1).max(2083).nullable().optional(),webhookSecret:iO.z.string().nullable().optional(),autoEnhancePrompt:iO.z.boolean().optional()}),iF=iO.z.object({url:iO.z.string(),thumbnailUrl:iO.z.string().optional(),width:iO.z.number().optional(),height:iO.z.number().optional(),seed:iO.z.number().optional()}),iU=(0,iV.defineCapability)({id:"flux-kontext-pro:text2image",name:"Flux Kontext Pro Text to Image",inputSchema:iN,outputSchema:iF,getBusinessDetails:e=>{let t=5,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["fluxKontextProText2Image",0,iU],822964);let iq=(0,ij.defineModel)({id:"flux-kontext-pro",name:"Flux Kontext Pro",description:"Flux Kontext Pro is an image model by BFL",metadata:{creator:"BFL"},capabilities:{text2image:iU}});e.s(["fluxKontextProModel",0,iq],820638),e.s([],45785);var iL=t,i$=i,iH=a,iK=t,iG=_;let iX=i$.z.object({type:i$.z.literal("image"),id:i$.z.string(),url:i$.z.string(),label:i$.z.string()}),iZ=i$.z.object({prompt:i$.z.string().optional(),character:iX,reference:iH.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata?.duration;if(null==i)return void t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["metadata","duration"]});if(i<1)return void t.addIssue({code:"custom",message:`Video too short. Minimum: 1s, your video: ${(0,iG.formatDuration)(i)}s.`,path:["metadata","duration"]});if(Math.round(i)>30)return void t.addIssue({code:"custom",message:`Video too long. Maximum: 30s, your video: ${(0,iG.formatDuration)(i)}s.`,path:["metadata","duration"]});let a=e.metadata?.width,n=e.metadata?.height;if(null!=a&&null!=n){let e=200,i=2048,r=1440;(a<200||n<e||a>i||n>r)&&t.addIssue({code:"custom",message:`Video resolution out of range. Min ${e}\xd7${e}, max ${i}\xd7${r}. Your video: ${a}\xd7${n}.`,path:["metadata","width"]})}}),cutFirstSecond:i$.z.boolean().default(!0)}),iW=i$.z.object({url:i$.z.string(),thumbnailUrl:i$.z.string().optional()}),iY=(0,iK.defineCapability)({id:"byte-plus-dreamactor-m2:motion-sync",name:"BytePlus DreamActor M2.0 Motion Sync",inputSchema:iZ,outputSc
1hema:iW,getBusinessDetails:e=>{let t=e.reference.metadata?.duration;if(null==t)throw Error("Video metadata with duration is required");let i=20*Math.ceil(t);return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["bytePlusDreamActorM2MotionSync",0,iY],120752);let iJ=(0,iL.defineModel)({id:"byte-plus-dreamactor-m2",name:"BytePlus DreamActor M2.0",description:"Motion control model that drives a character image to replicate motion, expressions, and lip movements from a template video.",metadata:{creator:"BytePlus"},capabilities:{motionSync:iY}});e.s(["bytePlusDreamActorM2Model",0,iJ],88708);var iQ=t,i0=i,i1=e.i(402587),i2=t;let i3=i0.z.object({image:i0.z.string().trim().min(1),audio:i0.z.string().trim().min(1),duration:i0.z.number().min(3).max(60),prompt:i0.z.string().trim().max(i1.DEFAULT_PROMPT_MAX_CHARACTERS).default("").catch(""),resolution:i0.z.number().int().min(720).max(1080).default(1080).catch(1080),mode:i0.z.enum(["pro","fast"]).default("pro").catch("pro"),callbackUrl:i0.z.string().optional(),callbackAuthInfo:i0.z.string().optional()}),i4=i0.z.object({url:i0.z.string(),thumbnailUrl:i0.z.string().optional()}),i6=(0,i2.defineCapability)({id:"byte-plus-omni-human-1-5:realman_avatar_picture_omni15_cv",name:"Byte Plus Omni Human 1.5",inputSchema:i3,outputSchema:i4,getBusinessDetails:e=>{if(!e.image||!e.audio||!e.duration)throw Error("Required fields missing");let t=100;return{unitCredits:Math.ceil(e.duration)*t,quantity:1,totalCredits:Math.ceil(e.duration)*t}}});e.s(["bytePlusOmniHuman1_5",0,i6],904029);let i5=(0,iQ.defineModel)({id:"byte-plus-omni-human-1-5",name:"Byte Plus Omni Human 1.5",description:"Omni Human 1.5 generation model by Byte Plus",metadata:{creator:"Byte Plus"},capabilities:{realman_avatar_picture_omni_cv:i6}});e.s(["bytePlusOmniHuman1_5Model",0,i5],955760);var i8=t,i9=i,i7=t;let ae=["mp3","wav","ogg_opus"],at=i9.z.object({prompt:i9.z.string().trim().min(1).max(2048),referenceAudioUrls:i9.z.array(i9.z.string().url()).max(3).optional(),referenceImageUrl:i9.z.string().url().optional(),format:i9.z.enum(ae).default("mp3"),speechRate:i9.z.number().int().min(-50).max(100).default(0),loudnessRate:i9.z.number().int().min(-50).max(100).default(0),pitchRate:i9.z.number().int().min(-12).max(12).default(0)}).refine(e=>!(e.referenceAudioUrls?.length&&e.referenceImageUrl),{message:"Image references cannot be mixed with audio references in the same request"}),ai=i9.z.object({url:i9.z.string(),duration:i9.z.number()}),aa=(0,i7.defineCapability)({id:"seed-audio-1:text2speech",name:"Seed Audio 1.0 Text to Speech",inputSchema:at,outputSchema:ai,getBusinessDetails:e=>{let t=15,i=Math.min(120,Math.max(5,Math.ceil(e.prompt.length/t)));return{unitCredits:i,quantity:1,totalCredits:i}}}),an=(0,i8.defineModel)({id:"seed-audio-1",name:"Seed Audio 1.0",description:"Generative audio model by BytePlus Seed Speech — speech, multi-speaker drama, and ambience from text, with optional audio or image references.",metadata:{creator:"BytePlus",aliases:["BytePlus","ByteDance","Seed Audio","Seed Speech"]},capabilities:{text2speech:aa}});e.s(["bytePlusSeedAudio1Model",0,an],261788)},473294,e=>{"use strict";let t={maxFileSizeBytes:0xa00000,maxTotalPixels:36e6,minDimensionPx:15,maxDimensionPx:6e3,minAspectRatio:1/16,maxAspectRatio:16,maxReferenceImages:10,allowedFormats:["jpeg","jpg","png","webp"]},i={...t,maxReferenceImages:14},a={...t,maxReferenceImages:14},n={...t,maxFileSizeBytes:0x1e00000},r={maxFileSizeBytes:0x1e00000,maxTotalPixels:36e6,minAspectRatio:1/16,maxAspectRatio:16,allowedFormats:["jpeg","jpg","png"]},o={maxFileSizeBytes:0x1e00000,minDimensionPx:300,maxDimensionPx:6e3,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp"]};e.s(["SEEDANCE2_IMAGE_CONSTRAINTS",0,o,"SEEDREAM45_IMAGE_CONSTRAINTS",0,i,"SEEDREAM4_IMAGE_CONSTRAINTS",0,t,"SEEDREAM5_LITE_IMAGE_CONSTRAINTS",0,a,"SEEDREAM5_PRO_IMAGE_CONSTRAINTS",0,n,"SEEDREAM5_PRO_LAYER_IMAGE_CONSTRAINTS",0,r])},67364,e=>{"use strict";var t=e.i(207653),i=e.i(332097),a=e.i(473294);let n=a.SEEDANCE2_IMAGE_CONSTRAINTS.maxFileSizeBytes??0,r=a.SEEDANCE2_IMAGE_CONSTRAINTS.minDimensionPx??0,o=a.SEEDANCE2_IMAGE_CONSTRAINTS.maxDimensionPx??1/0,s=a.SEEDANCE2_IMAGE_CONSTRAINTS.minAspectRatio??0,u=a.SEEDANCE2_IMAGE_CONSTRAINTS.maxAspectRatio??1/0,d=a.SEEDANCE2_IMAGE_CONSTRAINTS.allowedF
1ormats??[],l=new Set(d),c=t.z.object({type:t.z.literal("image"),id:t.z.string(),url:t.z.string(),label:t.z.string(),metadata:t.z.custom().optional()});function f(e,a,c,f){let m=[...c,"metadata"],h=f?.requireMetadata??!0;if(!e){if(!h)return;a.addIssue({code:t.z.ZodIssueCode.custom,message:"Image metadata is required",path:m});return}let p=(0,i.normalizeImageFormat)(e.format);null==p||l.has(p)||a.addIssue({code:t.z.ZodIssueCode.custom,message:`Image format must be one of: ${d.join(", ")}`,path:m});let b=e.width,g=e.height;if(null!=b&&null!=g){(b<r||b>o||g<r||g>o)&&a.addIssue({code:t.z.ZodIssueCode.custom,message:`Image dimensions must be between ${r}px and ${o}px`,path:m});let e=b/g;(e<s||e>u)&&a.addIssue({code:t.z.ZodIssueCode.custom,message:`Image aspect ratio (width/height) must be between ${s} and ${u}`,path:m})}else h&&a.addIssue({code:t.z.ZodIssueCode.custom,message:`Image must be at least ${r}\xd7${r}px`,path:m});null==e.file_size_bytes?h&&a.addIssue({code:t.z.ZodIssueCode.custom,message:"Image file size is unknown. Please re-upload the image.",path:m}):e.file_size_bytes>n&&a.addIssue({code:t.z.ZodIssueCode.custom,message:`Image must not exceed ${Math.round(n/1048576)}MB`,path:m})}e.s(["seedanceFrameSchema",0,c,"validateSeedanceFrame",()=>f])},64455,289532,415782,374837,453213,326567,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=t,n=e.i(67364);let r=i.z.object({prompt:i.z.string().trim(),videoCount:i.z.number().int().min(1).max(8).default(1),duration:i.z.union([i.z.literal(5),i.z.literal(10)]).default(5),resolution:i.z.enum(["480p","720p","1080p"]).default("720p"),startFrame:i.z.object({type:i.z.literal("image"),id:i.z.string(),url:i.z.string(),label:i.z.string(),metadata:i.z.custom().optional()}),endFrame:i.z.object({type:i.z.literal("image"),id:i.z.string(),url:i.z.string(),label:i.z.string(),metadata:i.z.custom().optional()}).nullable().optional(),mode:i.z.enum(["fast","pro"]).default("fast").catch("fast")}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{(0,n.validateSeedanceFrame)(e.startFrame?.metadata,t,["startFrame"],{requireMetadata:!1}),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&(0,n.validateSeedanceFrame)(e.endFrame.metadata,t,["endFrame"],{requireMetadata:!1})}),o=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional()}),s={5:{fast:{"480p":60,"720p":80,"1080p":140},pro:{"480p":150,"720p":200,"1080p":400}},10:{fast:{"480p":80,"720p":140,"1080p":280},pro:{"480p":275,"720p":350,"1080p":800}}},u=(0,a.defineCapability)({id:"byte-plus-seedance-1:image2video",name:"Byte Plus Seedance 1",inputSchema:r,outputSchema:o,getBusinessDetails:e=>{let t=s[e.duration][e.mode][e.resolution];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance1Image2Video",0,u],289532);var d=i,l=t;let c=d.z.object({prompt:d.z.string().trim().min(1),videoCount:d.z.number().int().min(1).max(8).default(1),duration:d.z.union([d.z.literal(5),d.z.literal(10)]).default(5),aspectRatio:d.z.enum(["16:9","4:3","1:1","9:21","21:9","3:4","9:16","auto"]).default("16:9"),mode:d.z.enum(["fast","pro"]).default("fast").catch("fast"),resolution:d.z.enum(["480p","720p","1080p"]).default("720p"),autoEnhancePrompt:d.z.boolean().optional()}),f=d.z.object({url:d.z.string(),thumbnailUrl:d.z.string().optional()}),m={5:{fast:{"480p":60,"720p":80,"1080p":140},pro:{"480p":150,"720p":200,"1080p":400}},10:{fast:{"480p":80,"720p":140,"1080p":280},pro:{"480p":275,"720p":350,"1080p":800}}},h=(0,l.defineCapability)({id:"byte-plus-seedance-1:text2video",name:"Byte Plus Seedance 1",inputSchema:c,outputSchema:f,getBusinessDetails:e=>{let t=m[e.duration][e.mode][e.resolution];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance1Text2Video",0,h],415782);let p=(0,t.defineModel)({id:"byte-plus-seedance-1",name:"Byte Plus Seedance 1",description:"Seedance 1 generation model by Byte Plus",metadata:{creator:"Byte Plus",tier:"legacy",aliases:["ByteDance","字节跳动","字节","即梦"]},capabilities:{image2video:u,text2video:h}});e.s(["bytePlusSeedance1Model",0,p],64455);var b=t,g=i,v=t,y=n;let x=g.z.object({prompt:g.z.string().trim().min(1),videoCount:g.z.number().int().min(1).max(8).default(1),duration:g.z.number().int().min(4).max(12).default(5),aspectRatio:g.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"]).default("16:9"),resolution:g.z.enum(["480p","720p","1080p"]).default("720p"),startFrame:g.z.object({type:g.z.literal("image"),id:g.z.string(),url:g.z.string(),label:g.z.string(),metadata:g.z.custom().optional()}),endFrame:g.z.object({type:g.z.literal("image"),id:g.z.string(),url:g.z.string(),label:g.z.string(),metadata:g.z.custom().optional()}).nullable().optional(),generateAudio:g.z.boolean().default(!0),seed:g.z.number().optional().default(-1),cameraFixed:g.z.boolean().default(!1)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>
1{(0,y.validateSeedanceFrame)(e.startFrame?.metadata,t,["startFrame"],{requireMetadata:!1}),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&(0,y.validateSeedanceFrame)(e.endFrame.metadata,t,["endFrame"],{requireMetadata:!1})}),z=g.z.object({url:g.z.string(),thumbnailUrl:g.z.string().optional()});function _(e,t,i){return"1080p"===e?i?60*t:30*t:"720p"===e?i?30*t:15*t:i?15*t:10*t}let S=(0,v.defineCapability)({id:"byte-plus-seedance-1-5:image2video",name:"Byte Plus Seedance 1.5",inputSchema:x,outputSchema:z,getBusinessDetails:e=>{let t=_(e.resolution,e.duration,e.generateAudio);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance15Image2Video",0,S],374837);var M=i,I=t;let w=M.z.object({prompt:M.z.string().trim().min(1),videoCount:M.z.number().int().min(1).max(8).default(1),duration:M.z.number().int().min(4).max(12).default(5),aspectRatio:M.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:M.z.enum(["480p","720p","1080p"]).default("720p"),generateAudio:M.z.boolean().default(!0),seed:M.z.number().optional().default(-1),cameraFixed:M.z.boolean().default(!1),autoEnhancePrompt:M.z.boolean().optional()}),C=M.z.object({url:M.z.string(),thumbnailUrl:M.z.string().optional()});function R(e,t,i){return"1080p"===e?i?60*t:30*t:"720p"===e?i?30*t:15*t:i?15*t:10*t}let E=(0,I.defineCapability)({id:"byte-plus-seedance-1-5:text2video",name:"Byte Plus Seedance 1.5",inputSchema:w,outputSchema:C,getBusinessDetails:e=>{let t=R(e.resolution,e.duration,e.generateAudio);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance15Text2Video",0,E],453213);let A=(0,b.defineModel)({id:"byte-plus-seedance-1-5",name:"Byte Plus Seedance 1.5",description:"Seedance 1.5 generation model by Byte Plus",metadata:{creator:"Byte Plus",tier:"legacy",aliases:["ByteDance","字节跳动","字节","即梦"]},capabilities:{image2video:S,text2video:E}});e.s(["bytePlusSeedance15Model",0,A],326567)},541876,325402,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(402587),n=e.i(625468);function r(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e).map(e=>e.toLowerCase()):[]}function o(e){return`${Math.round(10*e)/10}s`}function s(e){return e.length<=1?e.join(""):2===e.length?e.join(" or "):`${e.slice(0,-1).join(", ")} or ${e[e.length-1]}`}function u(e,t){let{minDuration:i,maxDuration:a,allowedFormats:n,maxFileSizeBytes:u}=t,d=e.file_size_bytes;if(null!=u&&"number"==typeof d&&d>u){let e=Math.round(u/1048576);return{ok:!1,message:`Audio must not exceed ${e}MB`}}let l=r(e.formats);if(n&&n.length>0&&l.length>0&&!l.some(e=>n.includes(e)))return{ok:!1,message:`Audio format must be ${s(n)}`};let c=e.duration;return null==c?{ok:!1,message:"Audio duration could not be determined"}:null!=i&&c<i?{ok:!1,message:`Audio must be at least ${i}s (current: ${o(c)})`}:null!=a&&c>a?{ok:!1,message:`Audio must not exceed ${a}s (current: ${o(c)})`}:{ok:!0}}e.s(["normalizeAudioFormats",()=>r,"validateAudioConstraints",()=>u],325402);var d=e.i(332097);let l=0x1e00000,c=300,f=6e3,m=.4,h=2.5,p=new Set(["jpeg","jpg","png","webp","bmp","tiff","gif"]),b=2,g=15,v=409600,y=927408,x=.4,z=2.5,_=300,S=6e3,M=24,I=60,w=2,C=15,R=new Set(["wav","mp3"]);function E(e){if(!e||"object"!=typeof e)return!1;let t=e,i="number"==typeof t.width?t.width:null,a="number"==typeof t.height?t.height:null;if(null===i||null===a||i<=0||a<=0||i<c||i>f||a<c||a>f)return!1;let n=i/a;if(n<m||n>h)return!1;let r=(0,d.normalizeImageFormat)(t.format);if(r&&!p.has(r))return!1;let o="number"==typeof t.file_size_bytes?t.file_size_bytes:null;return null!==o&&!(o>l)}let A=t.z.object({prompt:t.z.string().trim().max(a.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:t.z.number().int().min(1).max(8).default(1),duration:t.z.number().int().min(4).max(15).default(5),aspectRatio:t.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:t.z.enum(["480p","720p","1080p","4k"]).default("720p"),visualReferences:t.z.array(i.referenceSchema).max(15).default([]),generateAudio:t.z.boolean().default(!0),seed:t.z.number().optional().default(-1)}).superRefine((e,i)=>{let a=e.visualReferences.filter(e=>"image"===e.type),n=e.visualReferences.filter(e=>"character"===e.type),o=e.visualReferences.filter(e=>"video"===e.type),s=e.visualReferences.filter(e=>"audio"===e.type);a.length+n.length>9&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Maximum 9 images and characters combined",path:["visualReferences"]}),o.length>3&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Maximum 3 videos allowed",path:["visualReferences"]}),s.length>3&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Maximum 3 audios allowed",path:["visualReferences"]});for(let a=0;a<e.visualReferences.length;a++){let n=e.visualReferences[a];if("image"===n.type){let e=n.metadata;if(!e){i.addIssue({code:t.z.ZodIssueCode.custom,message:"Image metadata is required",path:["visualReferences",a]});continue}let r=(0,d.normalizeImageFormat)(e.format);null===r||p.has(r)||i.addIssue({code:t.z.ZodIssueCode.custom,message:"Image format must be one of: jpeg, png, webp, bmp, tiff, gif",path:["visualReferences",a]});
1let o=e.width,s=e.height;if(null!=o&&null!=s){(o<c||o>f||s<c||s>f)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Image dimensions must be between ${c}px and ${f}px`,path:["visualReferences",a]});let e=o/s;(e<m||e>h)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Image aspect ratio (width/height) must be between ${m} and ${h}`,path:["visualReferences",a]})}else(null===o||null===s)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Image must be at least ${c}\xd7${c}px`,path:["visualReferences",a]});null==e.file_size_bytes?i.addIssue({code:t.z.ZodIssueCode.custom,message:"Image file size is unknown. Please re-upload the image.",path:["visualReferences",a]}):e.file_size_bytes>l&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Image must not exceed 30MB",path:["visualReferences",a]})}else if("video"===n.type){let e=n.metadata;if(!e){i.addIssue({code:t.z.ZodIssueCode.custom,message:"Video metadata is required",path:["visualReferences",a]});continue}let r=null!=e.duration?Math.round(10*e.duration)/10:null;(null===r||r<b||r>g)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Video duration must be between ${b}s and ${g}s`,path:["visualReferences",a]});let o=e.width,s=e.height;if(null!=o&&null!=s){(o<_||o>S||s<_||s>S)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Video dimensions must be between ${_}px and ${S}px`,path:["visualReferences",a]});let e=o*s;(e<v||e>y)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Video resolution must be between 480p and 720p",path:["visualReferences",a]});let n=o/s;(n<x||n>z)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${x} and ${z}`,path:["visualReferences",a]})}null!=e.fps&&(e.fps<M||e.fps>I)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Video frame rate must be between ${M} and ${I} FPS`,path:["visualReferences",a]})}else if("audio"===n.type){let e=n.metadata;if(!e){i.addIssue({code:t.z.ZodIssueCode.custom,message:"Audio metadata is required",path:["visualReferences",a]});continue}let o=r(e.formats);o.length>0&&!o.some(e=>R.has(e))&&i.addIssue({code:t.z.ZodIssueCode.custom,message:"Audio format must be wav or mp3",path:["visualReferences",a]});let s=null!=e.duration?Math.round(10*e.duration)/10:null;(null===s||s<w||s>C)&&i.addIssue({code:t.z.ZodIssueCode.custom,message:`Audio duration must be between ${w}s and ${C}s`,path:["visualReferences",a]})}}}),P=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional()}),T={"480p":24,"720p":24,"1080p":24,"4k":24},k={"4k":400,"1080p":200,"720p":80,"480p":35},D={"4k":250,"1080p":120,"720p":50,"480p":20},B={"4k":1.5,"1080p":2.5,"720p":2,"480p":2};function j(e,t=[]){let i=0;for(let e of t){if("video"!==e.type||!e.metadata)continue;let t=e.metadata;i+=(t.width??0)*(t.height??0)*24*(t.duration??0)/1024}return i/1e3*B[e]}function O(e,t,i=[]){return Math.ceil(Math.max(j(e,i)+t*D[e],t*k[e]))}let V=e=>{let t=O(e.resolution,e.duration,e.visualReferences),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}},N=(0,n.defineCapability)({id:"byte-plus-seedance-2:element2video",name:"Byte Plus Seedance 2.0",inputSchema:A,outputSchema:P,getBusinessDetails:V});e.s(["SEEDANCE_2_OUTPUT_FPS_BY_RESOLUTION",0,T,"bytePlusSeedance2Element2Video",0,N,"computeSeedance2UnitCredits",()=>O,"element2videoGetBusinessDetails",0,V,"element2videoInputSchema",0,A,"element2videoOutputSchema",0,P,"isSeedanceImageCompatible",()=>E],541876)},450988,584811,45778,782567,20653,53198,553965,134569,275965,e=>{"use strict";var t=e.i(625468),i=e.i(541876),a=e.i(207653),n=e.i(200744),r=t;function o(e){let t=0;for(let i of e)t+=i.width*i.height*24*i.duration/1024;return t/1e3}e.s(["computeVideoTokenSum",()=>o],584811);let s=2,u=15,d=409600,l=927408,c=.4,f=2.5,m=300,h=6e3,p=24,b=60,g=n.videoReferenceSchema.extend({metadata:a.z.custom(e=>"object"==typeof e&&null!==e,{message:"Video metadata is required. Please re-upload the video."}).superRefine((e,t)=>{null==e.duration&&t.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video."}),(null==e.width||null==e.height)&&t.addIssue({code:"custom",message:"Video dimensions are required. Please re-upload the video."})})}),v=a.z.object({video:g,duration:a.z.number().int().min(4).max(15).default(5),resolution:a.z.enum
1(["480p","720p","1080p","4k"]).default("720p")}).superRefine((e,t)=>{let i=e.video.metadata,n=null!=i.duration?Math.round(10*i.duration)/10:null;(null===n||n<s||n>u)&&t.addIssue({code:a.z.ZodIssueCode.custom,message:`Video duration must be between ${s}s and ${u}s`,path:["video"]});let r=i.width,o=i.height;if(null!=r&&null!=o){(r<m||r>h||o<m||o>h)&&t.addIssue({code:a.z.ZodIssueCode.custom,message:`Video dimensions must be between ${m}px and ${h}px`,path:["video"]});let e=r*o;(e<d||e>l)&&t.addIssue({code:a.z.ZodIssueCode.custom,message:`Video resolution (width \xd7 height) must be between ${d} and ${l} pixels`,path:["video"]});let i=r/o;(i<c||i>f)&&t.addIssue({code:a.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${c} and ${f}`,path:["video"]})}null!=i.fps&&(i.fps<p||i.fps>b)&&t.addIssue({code:a.z.ZodIssueCode.custom,message:`Video frame rate must be between ${p} and ${b} FPS`,path:["video"]})}),y=a.z.object({url:a.z.string(),thumbnailUrl:a.z.string().optional()}),x={"4k":250,"1080p":120,"720p":50,"480p":20},z={"4k":400,"1080p":200,"720p":80,"480p":35},_={"4k":1.5,"1080p":2.5,"720p":2,"480p":2},S=(0,r.defineCapability)({id:"byte-plus-seedance-2:extendVideo",name:"Byte Plus Seedance 2.0",inputSchema:v,outputSchema:y,getBusinessDetails:e=>{let t=e.duration,i=e.video.metadata,a=Math.ceil(Math.max(o([{width:i.width??0,height:i.height??0,duration:i.duration??0}])*_[e.resolution]+t*x[e.resolution],t*z[e.resolution]));return{unitCredits:a,quantity:1,totalCredits:a}}});e.s(["bytePlusSeedance2ExtendVideo",0,S],45778);var M=t,I=i,w=a,C=e.i(402587),R=t,E=e.i(67364);let A=w.z.object({prompt:w.z.string().trim().max(C.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:w.z.number().int().min(1).max(8).default(1),duration:w.z.number().int().min(4).max(15).default(5),aspectRatio:w.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:w.z.enum(["480p","720p","1080p","4k"]).default("720p"),startFrame:E.seedanceFrameSchema,endFrame:E.seedanceFrameSchema.nullable().optional(),generateAudio:w.z.boolean().default(!0),seed:w.z.number().optional().default(-1)}).superRefine((e,t)=>{(e.startFrame?.url?.trim()??"")===""?t.addIssue({code:w.z.ZodIssueCode.custom,message:"Start frame image is required",path:["startFrame"]}):((0,E.validateSeedanceFrame)(e.startFrame.metadata,t,["startFrame"]),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&(0,E.validateSeedanceFrame)(e.endFrame.metadata,t,["endFrame"]))}),P=w.z.object({url:w.z.string(),thumbnailUrl:w.z.string().optional()}),T={"4k":400,"1080p":200,"720p":80,"480p":35};function k(e,t){return T[e]*t}let D=e=>{let t=k(e.resolution,e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}},B=(0,R.defineCapability)({id:"byte-plus-seedance-2:image2video",name:"Byte Plus Seedance 2.0",inputSchema:A,outputSchema:P,getBusinessDetails:D});e.s(["bytePlusSeedance2Image2Video",0,B,"image2videoGetBusinessDetails",0,D,"image2videoInputSchema",0,A,"image2videoOutputSchema",0,P],782567);var j=a,O=n,V=C,N=t,F=e.i(325402),U=e.i(332097);let q=4,L=15,$=409600,H=927408,K=.4,G=2.5,X=300,Z=6e3,W=24,Y=60,J=2,Q=15,ee=0x3200000,et=2,ei=15,ea=0xf00000,en=new Set(["wav","mp3"]),er=0x1e00000,eo=300,es=6e3,eu=.4,ed=2.5,el=new Set(["jpeg","jpg","png","webp","bmp","tiff","gif"]),ec=14,ef=9,em=2,eh=3,ep=15,eb=15,eg=j.z.discriminatedUnion("type",[O.imageReferenceSchema,O.characterReferenceSchema,O.videoReferenceSchema,O.audioReferenceSchema]),ev=O.videoReferenceSchema.extend({metadata:j.z.custom(e=>"object"==typeof e&&null!==e,{message:"Video metadata is required. Please re-upload the video."}).superRefine((e,t)=>{null==e.duration&&t.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video."}),(null==e.width||null==e.height)&&t.addIssue({code:"custom",message:"Video dimensions are required. Please re-upload the video."}),null==e.fps&&t.addIssue({code:"custom",message:"Video frame rate is required. Please re-upload the video."})})}),ey=j.z.object({prompt:j.z.string().trim().max(V.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoReference:ev,visualReferences:j.z.array(eg).max(ec).default([]),videoCount:j.z.number().int().min(1).max(8).default(1),duration:j.z.number().int().min(4).max(15).default(4),aspectRatio:j.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"]).default("adaptive"),resolution:j.z.enum(["480p","720p","1080p","4k"]).default("720p"),generateAudio:j.z.boolean().default(!0),seed:j.z.number().optional().default(-1)});function ex(e,t){let i=e.videoReference.metadata;null!=i.duration&&(i.duration<q||i.duration>L)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video duration must be between ${q}s and ${L}s`,path:["videoReference"]});let a=i.width,n=i.height;if(null!=a&&null!=n){(a<X||a>Z||n<X||n>Z)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video dimensions must be between ${X}px and ${Z}px`,path:["videoReference"]});let e=a*n;(e<$||e>H)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:"Video resolution must be between 480p and 720p",path:["videoReference"]});let i=a/n;(i<K||i>G)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${K} and ${G}`,path:["videoReference"]})}null!=i.fps&&(i.fps<W||i.fps>Y)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video frame rate must be between ${W} and ${Y} FPS`,path:["videoReference"]});let r=i.file_size_bytes;"number"==typeof r&&r>ee&&t.addIssue({code:j.z.ZodIssueCode.custom,message:"Video must not exceed 50MB",path:["videoReference"]});let o=e.visualReferences.filter(e=>"image"===e.type),s=e.visualReferences.filter(e=>"character"===e.type),u=e.visualReferences.filter(e=>"video"===e.type),d=e.visualReferences.filter(e=>"audio"===e.type);o.length+s.length>ef&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Maximum ${ef} images and characters combined`,path:["visualReferences"]}),u.length>em&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Maximum ${em} additional videos allowed`,path:["visualReferences"]}),d.length>eh&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Maximum ${eh} audios allowed`,path:["visualReferences"]});for(let i=0;i<e.visualReferences.length;i++){let a=e.visualReferences[i];if("image"===a.type||"character"===a.type){let e=a.metadata;if(!e){t.addIssue({code:j.z.ZodIssueCode.custom,message:"Image metadata is required",path:["visualReferences",i]});continue}let n=(0,U.normalizeImageFormat)(e.format);null===n||el.has(n)||t.addIssue({code:j.z.ZodIssueCode.custom,message:"Image format must be one of: jpeg, png, webp, bmp, tiff, gif",path:["visualReferences",i]});let r=e.width,o=e.height;if(null!=r&&null!=o){(r<eo||r>es||o<eo||o>es)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Image dimensions must be between ${eo}px and ${es}px`,path:["visualReferences",i]});let e=r/o;(e<eu||e>ed)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Image aspect ratio (width/height) must be between ${eu} and ${ed}`,path:["visualReferences",i]})}else(null===r||null===o)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Image must be at least ${eo}\xd7${eo}px`,path:["visualReferences",i]});null==e.file_size_bytes?t.addIssue({code:j.z.ZodIssueCode.custom,message:"Image file size is unknown. Please re-upload the image.",path:["visualReferences",i]}):e.file_size_bytes>er&&t.addIssue({code:j.z.ZodIssueCode.custom,message:"Image must not exceed 30MB",path:["visualReferences",i]})}else if("video"===a.type){let e=a.metadata;if(!e){t.addIssue({code:j.z.ZodIssueCode.custom,message:"Video metadata is required",path:["visualReferences",i]});continue}(null===e.duration||e.duration<J||e.duration>Q)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video duration must be between ${J}s and ${Q}s`,path:["visualReferences",i]});let n=e.width,r=e.height;if(null!=n&&null!=r){(n<X||n>Z||r<X||r>Z)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video dimensions must be between ${X}px and ${Z}px`,path:["visualReferences",i]});let e=n*r;(e<$||e>H)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:"Video resolution must be between 480p and 720p",path:["visualReferences",i]});let a=n/r;(a<K||a>G)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${K} and ${G}`,path:["visualReferences",i]})}null!=e.fps&&(e.fps<W||e.fps>Y)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Video frame rate must be between ${W} and ${Y} FPS`,path:["visualReferences",i]});let o=e.file_size_bytes;"number"==typeof o&&o>ee&&t.addIssue({code:j.z.ZodIssueCode.custom,message:"Video must not exceed 50MB",path:["visualReferences",i]})}else if("audio"===a.type){let e=a.metadata;if(!e){t.addIssue({code:j.z.ZodIssueCode.custom,message:"Audio metadata is required",path:["visualReferences",i]});continue}let n=(0,F.normalizeAudioFormats)(e.formats);n.length>0&&!n.some(e=>en.has(e))&&t.addIssue({code:j.z.ZodIssueCode.custom,message:"Audio format must be wav or mp3",path:["visualReferences",i]}),(null===e.duration||e.duration<et||e.duration>ei)&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Audio duration must be between ${et}s and ${ei}s`,path:["visualReferences",i]});let r=e.file_size_bytes;"number"==typeof r&&r>ea&&t.addIssue({code:j.z.ZodIssueCode.custom,message:"Audio must not exceed 15MB",path:["visualReferences",i]})}}let l=(i.duration??0)+u.reduce((e,t)=>
1{let i=t.metadata;return e+(i?.duration??0)},0);l>ep&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Total video duration (primary + additional) must not exceed ${ep}s (current: ${Math.round(10*l)/10}s)`,path:["visualReferences"]});let c=d.reduce((e,t)=>{let i=t.metadata;return e+(i?.duration??0)},0);c>eb&&t.addIssue({code:j.z.ZodIssueCode.custom,message:`Total audio duration must not exceed ${eb}s (current: ${Math.round(10*c)/10}s)`,path:["visualReferences"]})}let ez=ey.superRefine(ex),e_=j.z.object({url:j.z.string(),thumbnailUrl:j.z.string().optional()}),eS={"4k":250,"1080p":120,"720p":50,"480p":20},eM={"4k":400,"1080p":200,"720p":80,"480p":35},eI={"4k":1.5,"1080p":2.5,"720p":2,"480p":2};function ew(e,t){let i=[],a=e.metadata;for(let e of(i.push({width:a.width??0,height:a.height??0,duration:a.duration??0}),t)){if("video"!==e.type)continue;let t=e.metadata;t&&i.push({width:t.width??0,height:t.height??0,duration:t.duration??0})}return i}let eC=e=>{let t=e.duration,i=Math.ceil(Math.max(o(ew(e.videoReference,e.visualReferences))*eI[e.resolution]+t*eS[e.resolution],t*eM[e.resolution]));return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}},eR=(0,N.defineCapability)({id:"byte-plus-seedance-2:modifyVideo",name:"Byte Plus Seedance 2.0",inputSchema:ez,outputSchema:e_,getBusinessDetails:eC});e.s(["bytePlusSeedance2ModifyVideo",0,eR,"collectBillableVideos",()=>ew,"modifyVideoBaseSchema",0,ey,"modifyVideoGetBusinessDetails",0,eC,"modifyVideoInputSchema",0,ez,"modifyVideoOutputSchema",0,e_,"modifyVideoValidator",()=>ex],20653);var eE=a,eA=C,eP=t;let eT=eE.z.object({prompt:eE.z.string().trim().min(1).max(eA.SEEDANCE_2_PROMPT_MAX_CHARACTERS,`Prompt must be ${eA.SEEDANCE_2_PROMPT_MAX_CHARACTERS} characters or less`),videoCount:eE.z.number().int().min(1).max(8).default(1),duration:eE.z.number().int().min(4).max(15).default(5),aspectRatio:eE.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:eE.z.enum(["480p","720p","1080p","4k"]).default("720p"),generateAudio:eE.z.boolean().default(!0),seed:eE.z.number().optional().default(-1),autoEnhancePrompt:eE.z.boolean().optional()}),ek=eE.z.object({url:eE.z.string(),thumbnailUrl:eE.z.string().optional()}),eD={"4k":400,"1080p":200,"720p":80,"480p":35};function eB(e,t){return eD[e]*t}let ej=e=>{let t=eB(e.resolution,e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}},eO=(0,eP.defineCapability)({id:"byte-plus-seedance-2:text2video",name:"Byte Plus Seedance 2.0",inputSchema:eT,outputSchema:ek,getBusinessDetails:ej});e.s(["bytePlusSeedance2Text2Video",0,eO,"text2videoGetBusinessDetails",0,ej,"text2videoInputSchema",0,eT,"text2videoOutputSchema",0,ek],53198);let eV=(0,M.defineCapability)({id:"byte-plus-seedance-2-fal:text2video",name:"Byte Plus Seedance 2.0 (fal) Text to Video",internal:!0,inputSchema:eT,outputSchema:ek,getBusinessDetails:ej}),eN=(0,M.defineCapability)({id:"byte-plus-seedance-2-fal:image2video",name:"Byte Plus Seedance 2.0 (fal) Image to Video",internal:!0,inputSchema:A,outputSchema:P,getBusinessDetails:D}),eF=(0,M.defineCapability)({id:"byte-plus-seedance-2-fal:element2video",name:"Byte Plus Seedance 2.0 (fal) Element to Video",internal:!0,inputSchema:I.element2videoInputSchema,outputSchema:I.element2videoOutputSchema,getBusinessDetails:I.element2videoGetBusinessDetails}),eU=(0,M.defineCapability)({id:"byte-plus-seedance-2-fal:modifyVideo",name:"Byte Plus Seedance 2.0 (fal) Modify Video",internal:!0,inputSchema:ez,outputSchema:e_,getBusinessDetails:eC});e.s(["bytePlusSeedance2FalElement2Video",0,eF,"bytePlusSeedance2FalImage2Video",0,eN,"bytePlusSeedance2FalModifyVideo",0,eU,"bytePlusSeedance2FalText2Video",0,eV],553965);var eq=t,eL=i;let e$=(0,eq.defineCapability)({id:"byte-plus-seedance-2-minimax:text2video",name:"Byte Plus Seedance 2.0 (MiniMax) Text to Video",internal:!0,inputSchema:eT,outputSchema:ek,getBusinessDetails:ej}),eH=(0,eq.defineCapability)({id:"byte-plus-seedance-2-minimax:image2video",name:"Byte Plus Seedance 2.0 (MiniMax) Image to Video",internal:!0,inputSchema:A,outputSc
1hema:P,getBusinessDetails:D}),eK=(0,eq.defineCapability)({id:"byte-plus-seedance-2-minimax:element2video",name:"Byte Plus Seedance 2.0 (MiniMax) Element to Video",internal:!0,inputSchema:eL.element2videoInputSchema,outputSchema:eL.element2videoOutputSchema,getBusinessDetails:eL.element2videoGetBusinessDetails}),eG=(0,eq.defineCapability)({id:"byte-plus-seedance-2-minimax:modifyVideo",name:"Byte Plus Seedance 2.0 (MiniMax) Modify Video",internal:!0,inputSchema:ez,outputSchema:e_,getBusinessDetails:eC});e.s(["bytePlusSeedance2MinimaxElement2Video",0,eK,"bytePlusSeedance2MinimaxImage2Video",0,eH,"bytePlusSeedance2MinimaxModifyVideo",0,eG,"bytePlusSeedance2MinimaxText2Video",0,e$],134569);var eX=t,eZ=i;let eW=(0,eX.defineCapability)({id:"byte-plus-seedance-2-rampingup:text2video",name:"Byte Plus Seedance 2.0 (Ramping Up) Text to Video",internal:!0,inputSchema:eT,outputSchema:ek,getBusinessDetails:ej}),eY=(0,eX.defineCapability)({id:"byte-plus-seedance-2-rampingup:image2video",name:"Byte Plus Seedance 2.0 (Ramping Up) Image to Video",internal:!0,inputSchema:A,outputSchema:P,getBusinessDetails:D}),eJ=(0,eX.defineCapability)({id:"byte-plus-seedance-2-rampingup:element2video",name:"Byte Plus Seedance 2.0 (Ramping Up) Element to Video",internal:!0,inputSchema:eZ.element2videoInputSchema,outputSchema:eZ.element2videoOutputSchema,getBusinessDetails:eZ.element2videoGetBusinessDetails}),eQ=(0,eX.defineCapability)({id:"byte-plus-seedance-2-rampingup:modifyVideo",name:"Byte Plus Seedance 2.0 (Ramping Up) Modify Video",internal:!0,inputSchema:ez,outputSchema:e_,getBusinessDetails:eC});e.s(["bytePlusSeedance2RampingUpElement2Video",0,eJ,"bytePlusSeedance2RampingUpImage2Video",0,eY,"bytePlusSeedance2RampingUpModifyVideo",0,eQ,"bytePlusSeedance2RampingUpText2Video",0,eW],275965);let e0=(0,t.defineModel)({id:"byte-plus-seedance-2",name:"Byte Plus Seedance 2.0",description:"Seedance 2.0 video generation model by Byte Plus / ByteDance.",metadata:{creator:"Byte Plus",tier:"flagship",aliases:["ByteDance","Bytedance","Seedance Pro","Seedance 2 Pro","字节跳动","字节","即梦"]},capabilities:{text2video:eO,image2video:B,element2video:i.bytePlusSeedance2Element2Video,extendVideo:S,modifyVideo:eR,text2videoFal:eV,image2videoFal:eN,element2videoFal:eF,modifyVideoFal:eU,text2videoMinimax:e$,image2videoMinimax:eH,element2videoMinimax:eK,modifyVideoMinimax:eG,text2videoRampingUp:eW,image2videoRampingUp:eY,element2videoRampingUp:eJ,modifyVideoRampingUp:eQ}});e.s(["bytePlusSeedance2Model",0,e0],450988)},570218,786035,214489,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(402587),n=e.i(625468),r=t,o=e.i(325402),s=e.i(332097),u=e.i(473294);let d=["480p","720p","1080p"],l=4,c=30,f=30,m=10,h=10,p=50,b=2,g=4,v=30,y=2,x=30,z=u.SEEDANCE2_IMAGE_CONSTRAINTS.maxFileSizeBytes??0,_=u.SEEDANCE2_IMAGE_CONSTRAINTS.minDimensionPx??0,S=u.SEEDANCE2_IMAGE_CONSTRAINTS.maxDimensionPx??1/0,M=u.SEEDANCE2_IMAGE_CONSTRAINTS.minAspectRatio??0,I=u.SEEDANCE2_IMAGE_CONSTRAINTS.maxAspectRatio??1/0,w=new Set(["jpeg","jpg","png","webp","bmp","tiff","gif"]),C=407696,R=8295044,E=300,A=6e3,P=.4,T=2.5,k=24,D=60,B=0x3200000,j=0xf00000,O=new Set(["wav","mp3"]);function V(e){return Math.round(10*e)/10}function N(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function F(e,t,i){if(!e)return void t.addIssue({code:r.z.ZodIssueCode.custom,message:"Image metadata is required",path:i});let a=(0,s.normalizeImageFormat)(e.format);null===a||w.has(a)||t.addIssue({code:r.z.ZodIssueCode.custom,message:"Image format must be one of: jpeg, png, webp, bmp, tiff, gif",path:i});let n=e.width,o=e.height;if(null!=n&&null!=o){(n<_||n>S||o<_||o>S)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Image dimensions must be between ${_}px and ${S}px`,path:i});let e=n/o;(e<M||e>I)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Image aspect ratio (width/height) must be between ${M} and ${I}`,path:i})}else t.addIssue({code:r.z.ZodIssueCode.custom,message:`Image must be at least ${_}\xd7${_}px`,path:i});null==e.file_size_bytes?t.addIssue({code:r.z.ZodIssueCode.custom,message:"Image file size is unknown. Please re-upload the image.",path:i}):e.file_size_bytes>z&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Image must not exceed ${Math.round(z/1048576)}MB`,path:i})}
1function U(e,t,i){let a=e.width,n=e.height;if(null!=a&&null!=n){(a<E||a>A||n<E||n>A)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Video dimensions must be between ${E}px and ${A}px`,path:i});let e=a*n;(e<C||e>R)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:"Video resolution must be between 480p and 4K",path:i});let o=a/n;(o<P||o>T)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${P} and ${T}`,path:i})}else t.addIssue({code:r.z.ZodIssueCode.custom,message:"Video dimensions are required. Please re-upload the video.",path:i});null!=e.fps&&(e.fps<k||e.fps>D)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Video frame rate must be between ${k} and ${D} FPS`,path:i});let o=N(e.file_size_bytes);null!==o&&o>B&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Video must not exceed ${Math.round(B/1048576)}MB`,path:i})}function q(e,t,i,a=["visualReferences"]){let n=e.filter(e=>"image"===e.type||"character"===e.type).length,s=e.filter(e=>"video"===e.type),u=e.filter(e=>"audio"===e.type);n>i.maxImagesAndCharacters&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Maximum ${i.maxImagesAndCharacters} images and characters combined`,path:a}),s.length>i.maxVideos&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Maximum ${i.maxVideos} ${i.videoLabel??"videos"} allowed`,path:a}),u.length>i.maxAudios&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Maximum ${i.maxAudios} audios allowed`,path:a});for(let i=0;i<e.length;i++){let n=e[i],s=[...a,i];if("image"===n.type||"character"===n.type)F(n.metadata,t,s);else if("video"===n.type){let e=n.metadata;if(!e){t.addIssue({code:r.z.ZodIssueCode.custom,message:"Video metadata is required",path:s});continue}let i=null!=e.duration?V(e.duration):null;(null===i||i<b||i>v)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Video duration must be between ${b}s and ${v}s`,path:s}),U(e,t,s)}else if("audio"===n.type){let e=n.metadata;if(!e){t.addIssue({code:r.z.ZodIssueCode.custom,message:"Audio metadata is required",path:s});continue}let i=(0,o.normalizeAudioFormats)(e.formats);i.length>0&&!i.some(e=>O.has(e))&&t.addIssue({code:r.z.ZodIssueCode.custom,message:"Audio format must be wav or mp3",path:s});let a=null!=e.duration?V(e.duration):null;(null===a||a<y||a>x)&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Audio duration must be between ${y}s and ${x}s`,path:s});let u=e.file_size_bytes;"number"==typeof u&&u>j&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Audio must not exceed ${Math.round(j/1048576)}MB`,path:s})}}let d=(i.preSpentVideoDurationS??0)+s.reduce((e,t)=>e+(t.metadata?.duration??0),0);d>v&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Total video duration must not exceed ${v}s (current: ${V(d)}s)`,path:a});let l=u.reduce((e,t)=>e+(t.metadata?.duration??0),0);l>x&&t.addIssue({code:r.z.ZodIssueCode.custom,message:`Total audio duration must not exceed ${x}s (current: ${V(l)}s)`,path:a})}let L={"480p":60.26,"720p":130.23,"1080p":320.76},$={"480p":35.15,"720p":75.97,"1080p":189.54};function H(e=[]){let t=0;for(let i of e)"video"===i.type&&i.metadata&&(t+=i.metadata.duration??0);return t}function K(e){return Math.min(c,Math.max(l,Math.round(e)))}let G=5;function X(e,t,i=0,a){let n=a?.rateNoVideo??L[e],r=a?.rateWithVideo??$[e],o=Math.round(i);return Math.round((i<=0?n*t:r*(Math.max(o,2*t/3)+t))/G)*G}e.s(["SEEDANCE_2_5_MAX_AUDIOS",0,h,"SEEDANCE_2_5_MAX_IMAGES_AND_CHARACTERS",0,f,"SEEDANCE_2_5_MAX_OUTPUT_DURATION_S",0,c,"SEEDANCE_2_5_MAX_TOTAL_AUDIO_DURATION_S",0,x,"SEEDANCE_2_5_MAX_TOTAL_REFERENCES",0,p,"SEEDANCE_2_5_MAX_TOTAL_VIDEO_DURATION_S",0,v,"SEEDANCE_2_5_MAX_VIDEOS",0,m,"SEEDANCE_2_5_MIN_AUDIO_DURATION_S",0,y,"SEEDANCE_2_5_MIN_EDIT_VIDEO_DURATION_S",0,g,"SEEDANCE_2_5_MIN_OUTPUT_DURATION_S",0,l,"SEEDANCE_2_5_MIN_VIDEO_DURATION_S",0,b,"SEEDANCE_2_5_RESOLUTIONS",0,d,"SEEDANCE_2_5_VIDEO_MAX_ASPECT_RATIO",0,T,"SEEDANCE_2_5_VIDEO_MAX_PIXELS",0,R,"SEEDANCE_2_5_VIDEO_MIN_ASPECT_RATIO",0,P,"SEEDANCE_2_5_VIDEO_MIN_PIXELS",0,C,"computeSeedance25UnitCredits",()=>X,"seedance25EditOutputDurationS",()=>K,"sumSeedance25InputVideoSeconds",()=>H,"validateSeedance25References",()=>q,"validateSeedance25VideoShape",()=>U],786035);let Z=t.z.discriminatedUnion("type",[i.imageReferenceSchema,i.characterReferenceSchema,i.videoReferenceSchema,i.audioReferenceSchema]),W=t.z.object({prompt:t.z.string().trim().max(a.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:t.z.number().int().min(1).max(8).default(1),duration:t.z.number().int().min(l).max(c).default(5),aspectRatio:t.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"]).default("16:9"),resolution:t.z.enum(d).default("480p"),visualReferences:t.z.array(Z).max(p).default([]),generateAudio:t.z.boolean().default(!0),seed:t.z.number().optional().default(-1)}).superRefine((e,t)=>
1{q(e.visualReferences,t,{maxImagesAndCharacters:f,maxVideos:m,maxAudios:h})}),Y=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional()}),J=(0,n.defineCapability)({id:"byte-plus-seedance-2-5:element2video",name:"Byte Plus Seedance 2.5",inputSchema:W,outputSchema:Y,getBusinessDetails:e=>{let t=X(e.resolution,e.duration,H(e.visualReferences)),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["bytePlusSeedance25Element2Video",0,J],570218);var Q=t,ee=i,et=a,ei=n;let ea=p-1,en=m-1,er=Q.z.discriminatedUnion("type",[ee.imageReferenceSchema,ee.characterReferenceSchema,ee.videoReferenceSchema,ee.audioReferenceSchema]),eo=ee.videoReferenceSchema.extend({metadata:Q.z.custom(e=>"object"==typeof e&&null!==e,{message:"Video metadata is required. Please re-upload the video."}).superRefine((e,t)=>{null==e.duration&&t.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video."}),(null==e.width||null==e.height)&&t.addIssue({code:"custom",message:"Video dimensions are required. Please re-upload the video."})})}),es=Q.z.object({video:eo,prompt:Q.z.string().trim().max(et.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),visualReferences:Q.z.array(er).max(ea).default([]),duration:Q.z.number().int().min(l).max(c).default(5),resolution:Q.z.enum(d).default("480p")}).superRefine((e,t)=>{let i=e.video.metadata,a=null!=i.duration?Math.round(10*i.duration)/10:null;(null===a||a<b||a>v)&&t.addIssue({code:Q.z.ZodIssueCode.custom,message:`Video duration must be between ${b}s and ${v}s`,path:["video"]}),U(i,t,["video"]),q(e.visualReferences,t,{maxImagesAndCharacters:f,maxVideos:en,maxAudios:h,videoLabel:"additional videos",preSpentVideoDurationS:i.duration??0})}),eu=Q.z.object({url:Q.z.string(),thumbnailUrl:Q.z.string().optional()}),ed=(0,ei.defineCapability)({id:"byte-plus-seedance-2-5:extendVideo",name:"Byte Plus Seedance 2.5",inputSchema:es,outputSc
1hema:eu,getBusinessDetails:e=>{let t=X(e.resolution,e.duration,(e.video.metadata.duration??0)+H(e.visualReferences));return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["bytePlusSeedance25ExtendVideo",0,ed],214489)},421300,430636,188255,764304,e=>{"use strict";var t=e.i(625468),i=e.i(570218),a=e.i(214489),n=e.i(207653),r=e.i(402587),o=t,s=e.i(67364),u=e.i(786035);let d=n.z.object({prompt:n.z.string().trim().max(r.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:n.z.number().int().min(1).max(8).default(1),duration:n.z.number().int().min(u.SEEDANCE_2_5_MIN_OUTPUT_DURATION_S).max(u.SEEDANCE_2_5_MAX_OUTPUT_DURATION_S).default(5),resolution:n.z.enum(u.SEEDANCE_2_5_RESOLUTIONS).default("480p"),startFrame:s.seedanceFrameSchema,endFrame:s.seedanceFrameSchema.nullable().optional(),generateAudio:n.z.boolean().default(!0),seed:n.z.number().optional().default(-1)}).superRefine((e,t)=>{(e.startFrame?.url?.trim()??"")===""?t.addIssue({code:n.z.ZodIssueCode.custom,message:"Start frame image is required",path:["startFrame"]}):((0,s.validateSeedanceFrame)(e.startFrame.metadata,t,["startFrame"]),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&(0,s.validateSeedanceFrame)(e.endFrame.metadata,t,["endFrame"]))}),l=n.z.object({url:n.z.string(),thumbnailUrl:n.z.string().optional()}),c=(0,o.defineCapability)({id:"byte-plus-seedance-2-5:image2video",name:"Byte Plus Seedance 2.5",inputSchema:d,outputSchema:l,getBusinessDetails:e=>{let t=(0,u.computeSeedance25UnitCredits)(e.resolution,e.duration),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["bytePlusSeedance25Image2Video",0,c],430636);var f=n,m=e.i(200744),h=r,p=t,b=u;let g=b.SEEDANCE_2_5_MAX_TOTAL_REFERENCES-1,v=b.SEEDANCE_2_5_MAX_VIDEOS-1,y=f.z.discriminatedUnion("type",[m.imageReferenceSchema,m.characterReferenceSchema,m.videoReferenceSchema,m.audioReferenceSchema]),x=m.videoReferenceSchema.extend({metadata:f.z.custom(e=>"object"==typeof e&&null!==e,{message:"Video metadata is required. Please re-upload the video."}).superRefine((e,t)=>{null==e.duration&&t.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video."}),(null==e.width||null==e.height)&&t.addIssue({code:"custom",message:"Video dimensions are required. Please re-upload the video."}),null==e.fps&&t.addIssue({code:"custom",message:"Video frame rate is required. Please re-upload the video."})})});function z(e,t){let i=e.videoReference.metadata;null!=i.duration&&(i.duration<b.SEEDANCE_2_5_MIN_EDIT_VIDEO_DURATION_S||i.duration>b.SEEDANCE_2_5_MAX_TOTAL_VIDEO_DURATION_S)&&t.addIssue({code:f.z.ZodIssueCode.custom,message:`Video duration must be between ${b.SEEDANCE_2_5_MIN_EDIT_VIDEO_DURATION_S}s and ${b.SEEDANCE_2_5_MAX_TOTAL_VIDEO_DURATION_S}s`,path:["videoReference"]}),(0,b.validateSeedance25VideoShape)(i,t,["videoReference"]),(0,b.validateSeedance25References)(e.visualReferences,t,{maxImagesAndCharacters:b.SEEDANCE_2_5_MAX_IMAGES_AND_CHARACTERS,maxVideos:v,maxAudios:b.SEEDANCE_2_5_MAX_AUDIOS,videoLabel:"additional videos",preSpentVideoDurationS:i.duration??0})}let _=f.z.object({prompt:f.z.string().trim().max(h.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoReference:x,visualReferences:f.z.array(y).max(g).default([]),videoCount:f.z.number().int().min(1).max(8).default(1),resolution:f.z.enum(b.SEEDANCE_2_5_RESOLUTIONS).default("480p"),generateAudio:f.z.boolean().default(!0),seed:f.z.number().optional().default(-1)}).superRefine(z),S=f.z.object({url:f.z.string(),thumbnailUrl:f.z.string().optional()}),M=(0,p.defineCapability)({id:"byte-plus-seedance-2-5:modifyVideo",name:"Byte Plus Seedance 2.5",inputSchema:_,outputSchema:S,getBusinessDetails:e=>{let t=e.videoReference.metadata.duration??0,i=t+(0,b.sumSeedance25InputVideoSeconds)(e.visualReferences),a=(0,b.computeSeedance25UnitCredits)(e.resolution,(0,b.seedance25EditOutputDurationS)(t),i),n=e.videoCount??1;return{unitCredits:a,quantity:n,totalCredits:a*n}}});e.s(["bytePlusSeedance25ModifyVideo",0,M],188255);var I=n,w=r,C=t,R=u;let E=I.z.object({prompt:I.z.string().trim().min(1).max(w.SEEDANCE_2_PROMPT_MAX_CHARACTERS,`Prompt must be ${w.SEEDANCE_2_PROMPT_MAX_CHARACTERS} characters or less`),videoCount:I.z.number().int().min(1).max(8).default(1),duration:I.z.number().int().min(R.SEEDANCE_2_5_MIN_OUTPUT_DURATION_S).max(R.SEEDANCE_2_5_MAX_OUTPUT_DURATION_S).default(5),aspectRatio:I.z.enum
1(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"]).default("16:9"),resolution:I.z.enum(R.SEEDANCE_2_5_RESOLUTIONS).default("480p"),generateAudio:I.z.boolean().default(!0),seed:I.z.number().optional().default(-1),autoEnhancePrompt:I.z.boolean().optional()}),A=I.z.object({url:I.z.string(),thumbnailUrl:I.z.string().optional()}),P=(0,C.defineCapability)({id:"byte-plus-seedance-2-5:text2video",name:"Byte Plus Seedance 2.5",inputSchema:E,outputSchema:A,getBusinessDetails:e=>{let t=(0,R.computeSeedance25UnitCredits)(e.resolution,e.duration),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["bytePlusSeedance25Text2Video",0,P],764304);let T=(0,t.defineModel)({id:"byte-plus-seedance-2-5",name:"Byte Plus Seedance 2.5",description:"Seedance 2.5 video generation model by Byte Plus / ByteDance.",metadata:{creator:"Byte Plus",tier:"flagship",aliases:["ByteDance","Bytedance","Seedance 2.5","Seedance 2.5 Pro","字节跳动","字节","即梦"]},capabilities:{text2video:P,image2video:c,element2video:i.bytePlusSeedance25Element2Video,extendVideo:a.bytePlusSeedance25ExtendVideo,modifyVideo:M}});e.s(["bytePlusSeedance25Model",0,T],421300)},566487,182589,575855,318165,747782,982434,328252,258144,281265,660901,492599,749733,710778,604953,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(200744),n=e.i(402587),r=t,o=e.i(325402),s=e.i(332097);let u=0x1e00000,d=300,l=6e3,c=.4,f=2.5,m=new Set(["jpeg","jpg","png","webp","bmp","tiff","gif"]),h=2,p=15,b=409600,g=927408,v=.4,y=2.5,x=300,z=6e3,_=24,S=60,M=2,I=15,w=new Set(["wav","mp3"]),C=i.z.object({prompt:i.z.string().trim().max(n.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:i.z.number().int().min(1).max(8).default(1),duration:i.z.number().int().min(4).max(15).default(5),aspectRatio:i.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:i.z.enum(["480p","720p"]).default("720p"),visualReferences:i.z.array(a.referenceSchema).max(15).default([]),generateAudio:i.z.boolean().default(!0),seed:i.z.number().optional().default(-1)}).superRefine((e,t)=>{let a=e.visualReferences.filter(e=>"image"===e.type),n=e.visualReferences.filter(e=>"character"===e.type),r=e.visualReferences.filter(e=>"video"===e.type),C=e.visualReferences.filter(e=>"audio"===e.type);a.length+n.length>9&&t.addIssue({code:i.z.ZodIssueCode.custom,message:"Maximum 9 images and characters combined",path:["visualReferences"]}),r.length>3&&t.addIssue({code:i.z.ZodIssueCode.custom,message:"Maximum 3 videos allowed",path:["visualReferences"]}),C.length>3&&t.addIssue({code:i.z.ZodIssueCode.custom,message:"Maximum 3 audios allowed",path:["visualReferences"]});for(let a=0;a<e.visualReferences.length;a++){let n=e.visualReferences[a];if("image"===n.type){let e=n.metadata;if(!e){t.addIssue({code:i.z.ZodIssueCode.custom,message:"Image metadata is required",path:["visualReferences",a]});continue}let r=(0,s.normalizeImageFormat)(e.format);null===r||m.has(r)||t.addIssue({code:i.z.ZodIssueCode.custom,message:"Image format must be one of: jpeg, png, webp, bmp, tiff, gif",path:["visualReferences",a]});let o=e.width,h=e.height;if(null!=o&&null!=h){(o<d||o>l||h<d||h>l)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Image dimensions must be between ${d}px and ${l}px`,path:["visualReferences",a]});let e=o/h;(e<c||e>f)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Image aspect ratio (width/height) must be between ${c} and ${f}`,path:["visualReferences",a]})}else(null===o||null===h)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Image must be at least ${d}\xd7${d}px`,path:["visualReferences",a]});null==e.file_size_bytes?t.addIssue({code:i.z.ZodIssueCode.custom,message:"Image file size is unknown. Please re-upload the image.",path:["visualReferences",a]}):e.file_size_bytes>u&&t.addIssue({code:i.z.ZodIssueCode.custom,message:"Image must not exceed 30MB",path:["visualReferences",a]})}else if("video"===n.type){let e=n.metadata;if(!e){t.addIssue({code:i.z.ZodIssueCode.custom,message:"Video metadata is required",path:["visualReferences",a]});continue}let r=null!=e.duration?Math.round(10*e.duration)/10:null;(null===r||r<h||r>p)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Video duration must be between ${h}s and ${p}s`,path:["visualReferences",a]});
1let o=e.width,s=e.height;if(null!=o&&null!=s){(o<x||o>z||s<x||s>z)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Video dimensions must be between ${x}px and ${z}px`,path:["visualReferences",a]});let e=o*s;(e<b||e>g)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Video resolution (width \xd7 height) must be between ${b} and ${g} pixels`,path:["visualReferences",a]});let n=o/s;(n<v||n>y)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${v} and ${y}`,path:["visualReferences",a]})}null!=e.fps&&(e.fps<_||e.fps>S)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Video frame rate must be between ${_} and ${S} FPS`,path:["visualReferences",a]})}else if("audio"===n.type){let e=n.metadata;if(!e){t.addIssue({code:i.z.ZodIssueCode.custom,message:"Audio metadata is required",path:["visualReferences",a]});continue}let r=(0,o.normalizeAudioFormats)(e.formats);r.length>0&&!r.some(e=>w.has(e))&&t.addIssue({code:i.z.ZodIssueCode.custom,message:"Audio format must be wav or mp3",path:["visualReferences",a]});let s=null!=e.duration?Math.round(10*e.duration)/10:null;(null===s||s<M||s>I)&&t.addIssue({code:i.z.ZodIssueCode.custom,message:`Audio duration must be between ${M}s and ${I}s`,path:["visualReferences",a]})}}}),R=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional()}),E={"720p":70,"480p":30},A={"720p":40,"480p":15},P=1.5;function T(e=[]){let t=0;for(let i of e){if("video"!==i.type||!i.metadata)continue;let e=i.metadata;t+=(e.width??0)*(e.height??0)*24*(e.duration??0)/1024}return t/1e3*P}let k=(0,r.defineCapability)({id:"byte-plus-seedance-2-fast:element2video",name:"Byte Plus Seedance 2.0 Fast",inputSchema:C,outputSchema:R,getBusinessDetails:e=>{let t=e.duration,i=Math.ceil(Math.max(T(e.visualReferences)+t*A[e.resolution],t*E[e.resolution]));return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["bytePlusSeedance2FastElement2Video",0,k],182589);var D=i,B=a,j=t,O=e.i(584811);let V=2,N=15,F=409600,U=927408,q=.4,L=2.5,$=300,H=6e3,K=24,G=60,X=B.videoReferenceSchema.extend({metadata:D.z.custom(e=>"object"==typeof e&&null!==e,{message:"Video metadata is required. Please re-upload the video."}).superRefine((e,t)=>{null==e.duration&&t.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video."}),(null==e.width||null==e.height)&&t.addIssue({code:"custom",message:"Video dimensions are required. Please re-upload the video."})})}),Z=D.z.object({video:X,duration:D.z.number().int().min(4).max(15).default(5),resolution:D.z.enum(["480p","720p"]).default("720p")}).superRefine((e,t)=>{let i=e.video.metadata,a=null!=i.duration?Math.round(10*i.duration)/10:null;(null===a||a<V||a>N)&&t.addIssue({code:D.z.ZodIssueCode.custom,message:`Video duration must be between ${V}s and ${N}s`,path:["video"]});let n=i.width,r=i.height;if(null!=n&&null!=r){(n<$||n>H||r<$||r>H)&&t.addIssue({code:D.z.ZodIssueCode.custom,message:`Video dimensions must be between ${$}px and ${H}px`,path:["video"]});let e=n*r;(e<F||e>U)&&t.addIssue({code:D.z.ZodIssueCode.custom,message:`Video resolution (width \xd7 height) must be between ${F} and ${U} pixels`,path:["video"]});let i=n/r;(i<q||i>L)&&t.addIssue({code:D.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${q} and ${L}`,path:["video"]})}null!=i.fps&&(i.fps<K||i.fps>G)&&t.addIssue({code:D.z.ZodIssueCode.custom,message:`Video frame rate must be between ${K} and ${G} FPS`,path:["video"]})}),W=D.z.object({url:D.z.string(),thumbnailUrl:D.z.string().optional()}),Y={"720p":40,"480p":15},J={"720p":70,"480p":30},Q=1.5,ee=(0,j.defineCapability)({id:"byte-plus-seedance-2-fast:extendVideo",name:"Byte Plus Seedance 2.0 Fast",inputSchema:Z,outputSc
1hema:W,getBusinessDetails:e=>{let t=e.duration,i=e.video.metadata,a=[{width:i.width??0,height:i.height??0,duration:i.duration??0}],n=Math.ceil(Math.max((0,O.computeVideoTokenSum)(a)*Q+t*Y[e.resolution],t*J[e.resolution]));return{unitCredits:n,quantity:1,totalCredits:n}}});e.s(["bytePlusSeedance2FastExtendVideo",0,ee],575855);var et=i,ei=n,ea=t,en=e.i(67364);let er=et.z.object({prompt:et.z.string().trim().max(ei.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:et.z.number().int().min(1).max(8).default(1),duration:et.z.number().int().min(4).max(15).default(5),aspectRatio:et.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:et.z.enum(["480p","720p"]).default("720p"),startFrame:en.seedanceFrameSchema,endFrame:en.seedanceFrameSchema.nullable().optional(),generateAudio:et.z.boolean().default(!0),seed:et.z.number().optional().default(-1)}).superRefine((e,t)=>{(e.startFrame?.url?.trim()??"")===""?t.addIssue({code:et.z.ZodIssueCode.custom,message:"Start frame image is required",path:["startFrame"]}):((0,en.validateSeedanceFrame)(e.startFrame.metadata,t,["startFrame"]),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&(0,en.validateSeedanceFrame)(e.endFrame.metadata,t,["endFrame"]))}),eo=et.z.object({url:et.z.string(),thumbnailUrl:et.z.string().optional()}),es={"720p":70,"480p":30};function eu(e,t){return es[e]*t}let ed=(0,ea.defineCapability)({id:"byte-plus-seedance-2-fast:image2video",name:"Byte Plus Seedance 2.0 Fast",inputSchema:er,outputSchema:eo,getBusinessDetails:e=>{let t=eu(e.resolution,e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance2FastImage2Video",0,ed],318165);var el=i,ec=t,ef=e.i(20653),em=O;let eh=ef.modifyVideoBaseSchema.extend({resolution:el.z.enum(["480p","720p"]).default("720p")}).superRefine(ef.modifyVideoValidator),ep=el.z.object({url:el.z.string(),thumbnailUrl:el.z.string().optional()}),eb={"720p":40,"480p":15},eg={"720p":70,"480p":30},ev=1.5,ey=(0,ec.defineCapability)({id:"byte-plus-seedance-2-fast:modifyVideo",name:"Byte Plus Seedance 2.0 Fast",inputSchema:eh,outputSchema:ep,getBusinessDetails:e=>{let t=e.duration,i=(0,ef.collectBillableVideos)(e.videoReference,e.visualReferences),a=Math.ceil(Math.max((0,em.computeVideoTokenSum)(i)*ev+t*eb[e.resolution],t*eg[e.resolution]));return{unitCredits:a,quantity:e.videoCount??1,totalCredits:a*(e.videoCount??1)}}});e.s(["bytePlusSeedance2FastModifyVideo",0,ey],747782);var ex=i,ez=n,e_=t;let eS=ex.z.object({prompt:ex.z.string().trim().min(1).max(ez.SEEDANCE_2_PROMPT_MAX_CHARACTERS,`Prompt must be ${ez.SEEDANCE_2_PROMPT_MAX_CHARACTERS} characters or less`),videoCount:ex.z.number().int().min(1).max(8).default(1),duration:ex.z.number().int().min(4).max(15).default(5),aspectRatio:ex.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:ex.z.enum(["480p","720p"]).default("720p"),generateAudio:ex.z.boolean().default(!0),seed:ex.z.number().optional().default(-1),autoEnhancePrompt:ex.z.boolean().optional()}),eM=ex.z.object({url:ex.z.string(),thumbnailUrl:ex.z.string().optional()}),eI={"720p":70,"480p":30};function ew(e,t){return eI[e]*t}let eC=(0,e_.defineCapability)({id:"byte-plus-seedance-2-fast:text2video",name:"Byte Plus Seedance 2.0 Fast",inputSchema:eS,outputSchema:eM,getBusinessDetails:e=>{let t=ew(e.resolution,e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance2FastText2Video",0,eC],982434);let eR=(0,t.defineModel)({id:"byte-plus-seedance-2-fast",name:"Byte Plus Seedance 2.0 Fast",description:"Seedance 2.0 Fast generation model by Byte Plus / ByteDance",metadata:{creator:"Byte Plus",tier:"fast",aliases:["ByteDance","Bytedance","字节跳动","字节","即梦"]},capabilities:{text2video:eC,image2video:ed,element2video:k,extendVideo:ee,modifyVideo:ey}});e.s(["bytePlusSeedance2FastModel",0,eR],566487);var eE=t,eA=i,eP=a,eT=n,ek=t,eD=o,eB=s;let ej=0x1e00000,eO=300,eV=6e3,eN=.4,eF=2.5,eU=new Set(["jpeg","jpg","png","webp","bmp","tiff","gif"]),eq=2,eL=15,e$=409600,eH=927408,eK=.4,eG=2.5,eX=300,eZ=6e3,eW=24,eY=60,eJ=2,eQ=15,e0=new Set(["wav","mp3"]),e1=eA.z.object({prompt:eA.z.string().trim().max(eT.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:eA.z.number().int().min(1).max(8).default(1),duration:eA.z.number().int().min(4).max(15).default(5),aspectRatio:eA.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:eA.z.enum(["480p","720p"]).default("720p"),visualReferences:eA.z.array(eP.referenceSchema).max(15).default([]),generateAudio:eA.z.boolean().default(!0),seed:eA.z.number().optional().default(-1)}).superRefine((e,t)=>
1{let i=e.visualReferences.filter(e=>"image"===e.type),a=e.visualReferences.filter(e=>"character"===e.type),n=e.visualReferences.filter(e=>"video"===e.type),r=e.visualReferences.filter(e=>"audio"===e.type);i.length+a.length>9&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Maximum 9 images and characters combined",path:["visualReferences"]}),n.length>3&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Maximum 3 videos allowed",path:["visualReferences"]}),r.length>3&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Maximum 3 audios allowed",path:["visualReferences"]});for(let i=0;i<e.visualReferences.length;i++){let a=e.visualReferences[i];if("image"===a.type){let e=a.metadata;if(!e){t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Image metadata is required",path:["visualReferences",i]});continue}let n=(0,eB.normalizeImageFormat)(e.format);null===n||eU.has(n)||t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Image format must be one of: jpeg, png, webp, bmp, tiff, gif",path:["visualReferences",i]});let r=e.width,o=e.height;if(null!=r&&null!=o){(r<eO||r>eV||o<eO||o>eV)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Image dimensions must be between ${eO}px and ${eV}px`,path:["visualReferences",i]});let e=r/o;(e<eN||e>eF)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Image aspect ratio (width/height) must be between ${eN} and ${eF}`,path:["visualReferences",i]})}else t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Image must be at least ${eO}\xd7${eO}px`,path:["visualReferences",i]});null==e.file_size_bytes?t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Image file size is unknown. Please re-upload the image.",path:["visualReferences",i]}):e.file_size_bytes>ej&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Image must not exceed 30MB",path:["visualReferences",i]})}else if("video"===a.type){let e=a.metadata;if(!e){t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Video metadata is required",path:["visualReferences",i]});continue}let n=null!=e.duration?Math.round(10*e.duration)/10:null;(null===n||n<eq||n>eL)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Video duration must be between ${eq}s and ${eL}s`,path:["visualReferences",i]});let r=e.width,o=e.height;if(null!=r&&null!=o){(r<eX||r>eZ||o<eX||o>eZ)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Video dimensions must be between ${eX}px and ${eZ}px`,path:["visualReferences",i]});let e=r*o;(e<e$||e>eH)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Video resolution must be between 480p and 720p",path:["visualReferences",i]});let a=r/o;(a<eK||a>eG)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${eK} and ${eG}`,path:["visualReferences",i]})}else t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Video dimensions are required. Please re-upload the video.",path:["visualReferences",i]});null!=e.fps&&(e.fps<eW||e.fps>eY)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Video frame rate must be between ${eW} and ${eY} FPS`,path:["visualReferences",i]})}else if("audio"===a.type){let e=a.metadata;if(!e){t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Audio metadata is required",path:["visualReferences",i]});continue}let n=(0,eD.normalizeAudioFormats)(e.formats);n.length>0&&!n.some(e=>e0.has(e))&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:"Audio format must be wav or mp3",path:["visualReferences",i]});let r=null!=e.duration?Math.round(10*e.duration)/10:null;(null===r||r<eJ||r>eQ)&&t.addIssue({code:eA.z.ZodIssueCode.custom,message:`Audio duration must be between ${eJ}s and ${eQ}s`,path:["visualReferences",i]})}}}),e2=eA.z.object({url:eA.z.string(),thumbnailUrl:eA.z.string().optional()}),e3={"720p":40,"480p":20},e4={"720p":25,"480p":10},e6=1.2;function e5(e){let t=0;for(let i of e){if("video"!==i.type||!i.metadata)continue;let e=i.metadata;t+=(e.width??0)*(e.height??0)*24*(e.duration??0)/1024}return t/1e3*e6}function e8(e,t,i){return Math.ceil(Math.max(e5(i)+t*e4[e],t*e3[e]))}let e9=(0,ek.defineCapability)({id:"byte-plus-seedance-2-mini:element2video",name:"Byte Plus Seedance 2.0 Mini",inputSchema:e1,outputSc
1hema:e2,getBusinessDetails:e=>{let t=e8(e.resolution,e.duration,e.visualReferences),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["bytePlusSeedance2MiniElement2Video",0,e9],328252);var e7=i,te=n,tt=t,ti=en;let ta=e7.z.object({prompt:e7.z.string().trim().max(te.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoCount:e7.z.number().int().min(1).max(8).default(1),duration:e7.z.number().int().min(4).max(15).default(5),aspectRatio:e7.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:e7.z.enum(["480p","720p"]).default("720p"),startFrame:ti.seedanceFrameSchema,endFrame:ti.seedanceFrameSchema.nullable().optional(),generateAudio:e7.z.boolean().default(!0),seed:e7.z.number().optional().default(-1)}).superRefine((e,t)=>{(e.startFrame?.url?.trim()??"")===""?t.addIssue({code:e7.z.ZodIssueCode.custom,message:"Start frame image is required",path:["startFrame"]}):((0,ti.validateSeedanceFrame)(e.startFrame.metadata,t,["startFrame"]),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&(0,ti.validateSeedanceFrame)(e.endFrame.metadata,t,["endFrame"]))}),tn=e7.z.object({url:e7.z.string(),thumbnailUrl:e7.z.string().optional()}),tr={"720p":40,"480p":20};function to(e,t){return tr[e]*t}let ts=(0,tt.defineCapability)({id:"byte-plus-seedance-2-mini:image2video",name:"Byte Plus Seedance 2.0 Mini",inputSchema:ta,outputSchema:tn,getBusinessDetails:e=>{let t=to(e.resolution,e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance2MiniImage2Video",0,ts],258144);var tu=i,td=a,tl=n,tc=t,tf=o,tm=s,th=O;let tp=4,tb=15,tg=409600,tv=927408,ty=.4,tx=2.5,tz=300,t_=6e3,tS=24,tM=60,tI=2,tw=15,tC=0x3200000,tR=2,tE=15,tA=0xf00000,tP=new Set(["wav","mp3"]),tT=0x1e00000,tk=300,tD=6e3,tB=.4,tj=2.5,tO=new Set(["jpeg","jpg","png","webp","bmp","tiff","gif"]),tV=14,tN=9,tF=2,tU=3,tq=15,tL=15,t$=tu.z.discriminatedUnion("type",[td.imageReferenceSchema,td.characterReferenceSchema,td.videoReferenceSchema,td.audioReferenceSchema]),tH=td.videoReferenceSchema.extend({metadata:tu.z.custom(e=>"object"==typeof e&&null!==e,{message:"Video metadata is required. Please re-upload the video."}).superRefine((e,t)=>{null==e.duration&&t.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video."}),(null==e.width||null==e.height)&&t.addIssue({code:"custom",message:"Video dimensions are required. Please re-upload the video."}),null==e.fps&&t.addIssue({code:"custom",message:"Video frame rate is required. Please re-upload the video."})})});function tK(e,t){let i=e.videoReference.metadata;null!=i.duration&&(i.duration<tp||i.duration>tb)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video duration must be between ${tp}s and ${tb}s`,path:["videoReference"]});let a=i.width,n=i.height;if(null!=a&&null!=n){(a<tz||a>t_||n<tz||n>t_)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video dimensions must be between ${tz}px and ${t_}px`,path:["videoReference"]});let e=a*n;(e<tg||e>tv)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Video resolution must be between 480p and 720p",path:["videoReference"]});let i=a/n;(i<ty||i>tx)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${ty} and ${tx}`,path:["videoReference"]})}null!=i.fps&&(i.fps<tS||i.fps>tM)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video frame rate must be between ${tS} and ${tM} FPS`,path:["videoReference"]});let r=i.file_size_bytes;"number"==typeof r&&r>tC&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Video must not exceed 50MB",path:["videoReference"]});let o=e.visualReferences.filter(e=>"image"===e.type),s=e.visualReferences.filter(e=>"character"===e.type),u=e.visualReferences.filter(e=>"video"===e.type),d=e.visualReferences.filter(e=>"audio"===e.type);o.length+s.length>tN&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Maximum ${tN} images and characters combined`,path:["visualReferences"]}),u.length>tF&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Maximum ${tF} additional videos allowed`,path:["visualReferences"]}),d.length>tU&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Maximum ${tU} audios allowed`,path:["visualReferences"]});for(let i=0;i<e.visualReferences.length;i++){let a=e.visualReferences[i];if("image"===a.type||"character"===a.type){let e=a.metadata;if(!e){t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Image metadata is required",path:["visualReferences",i]});continue}let n=(0,tm.normalizeImageFormat)(e.format);null===n||tO.has(n)||t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Image format must be one of: jpeg, png, webp, bmp, tiff, gif",path:["visualReferences",i]});let r=e.width,o=e.height;if(null!=r&&null!=o){(r<tk||r>tD||o<tk||o>tD)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Image dimensions must be between ${tk}px and ${tD}px`,path:["visualReferences",i]});let e=r/o;(e<tB||e>tj)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Image aspect ratio (width/height) must be between ${tB} and ${tj}`,path:["visualReferences",i]})}else t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Image must be at least ${tk}\xd7${tk}px`,path:["visualReferences",i]});null==e.file_size_bytes?t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Image file size is unknown. Please re-upload the image.",path:["visualReferences",i]}):e.file_size_bytes>tT&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Image must not exceed 30MB",path:["visualReferences",i]})}else if("video"===a.type){let e=a.metadata;if(!e){t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Video metadata is required",path:["visualReferences",i]});continue}(null==e.duration||e.duration<tI||e.duration>tw)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video duration must be between ${tI}s and ${tw}s`,path:["visualReferences",i]});let n=e.width,r=e.height;if(null!=n&&null!=r){(n<tz||n>t_||r<tz||r>t_)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video dimensions must be between ${tz}px and ${t_}px`,path:["visualReferences",i]});let e=n*r;(e<tg||e>tv)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Video resolution must be between 480p and 720p",path:["visualReferences",i]});let a=n/r;(a<ty||a>tx)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video aspect ratio (width/height) must be between ${ty} and ${tx}`,path:["visualReferences",i]})}else t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Video dimensions are required. Please re-upload the video.",path:["visualReferences",i]});null!=e.fps&&(e.fps<tS||e.fps>tM)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Video frame rate must be between ${tS} and ${tM} FPS`,path:["visualReferences",i]});let o=e.file_size_bytes;"number"==typeof o&&o>tC&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Video must not exceed 50MB",path:["visualReferences",i]})}else if("audio"===a.type){let e=a.metadata;if(!e){t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Audio metadata is required",path:["visualReferences",i]});continue}let n=(0,tf.normalizeAudioFormats)(e.formats);n.length>0&&!n.some(e=>tP.has(e))&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Audio format must be wav or mp3",path:["visualReferences",i]}),(null==e.duration||e.duration<tR||e.duration>tE)&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Audio duration must be between ${tR}s and ${tE}s`,path:["visualReferences",i]});let r=e.file_size_bytes;"number"==typeof r&&r>tA&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:"Audio must not exceed 15MB",path:["visualReferences",i]})}}let l=(i.duration??0)+u.reduce((e,t)=>
1{let i=t.metadata;return e+(i?.duration??0)},0);l>tq&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Total video duration (primary + additional) must not exceed ${tq}s (current: ${Math.round(10*l)/10}s)`,path:["visualReferences"]});let c=d.reduce((e,t)=>{let i=t.metadata;return e+(i?.duration??0)},0);c>tL&&t.addIssue({code:tu.z.ZodIssueCode.custom,message:`Total audio duration must not exceed ${tL}s (current: ${Math.round(10*c)/10}s)`,path:["visualReferences"]})}let tG=tu.z.object({prompt:tu.z.string().trim().max(tl.SEEDANCE_2_PROMPT_MAX_CHARACTERS).default(""),videoReference:tH,visualReferences:tu.z.array(t$).max(tV).default([]),videoCount:tu.z.number().int().min(1).max(8).default(1),duration:tu.z.number().int().min(4).max(15).default(4),aspectRatio:tu.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive"]).default("adaptive"),resolution:tu.z.enum(["480p","720p"]).default("720p"),generateAudio:tu.z.boolean().default(!0),seed:tu.z.number().optional().default(-1)}).superRefine(tK),tX=tu.z.object({url:tu.z.string(),thumbnailUrl:tu.z.string().optional()}),tZ={"720p":25,"480p":10},tW={"720p":40,"480p":20},tY=1.2;function tJ(e,t){let i=[],a=e.metadata;for(let e of(i.push({width:a.width??0,height:a.height??0,duration:a.duration??0}),t)){if("video"!==e.type)continue;let t=e.metadata;t&&i.push({width:t.width??0,height:t.height??0,duration:t.duration??0})}return i}let tQ=(0,tc.defineCapability)({id:"byte-plus-seedance-2-mini:modifyVideo",name:"Byte Plus Seedance 2.0 Mini",inputSchema:tG,outputSchema:tX,getBusinessDetails:e=>{let t=e.duration,i=tJ(e.videoReference,e.visualReferences),a=Math.ceil(Math.max((0,th.computeVideoTokenSum)(i)*tY+t*tZ[e.resolution],t*tW[e.resolution]));return{unitCredits:a,quantity:e.videoCount??1,totalCredits:a*(e.videoCount??1)}}});e.s(["bytePlusSeedance2MiniModifyVideo",0,tQ],281265);var t0=i,t1=n,t2=t;let t3=t0.z.object({prompt:t0.z.string().trim().min(1).max(t1.SEEDANCE_2_PROMPT_MAX_CHARACTERS,`Prompt must be ${t1.SEEDANCE_2_PROMPT_MAX_CHARACTERS} characters or less`),videoCount:t0.z.number().int().min(1).max(8).default(1),duration:t0.z.number().int().min(4).max(15).default(5),aspectRatio:t0.z.enum(["16:9","4:3","1:1","3:4","9:16","21:9","adaptive","auto"]).default("16:9"),resolution:t0.z.enum(["480p","720p"]).default("720p"),generateAudio:t0.z.boolean().default(!0),seed:t0.z.number().optional().default(-1),autoEnhancePrompt:t0.z.boolean().optional()}),t4=t0.z.object({url:t0.z.string(),thumbnailUrl:t0.z.string().optional()}),t6={"720p":40,"480p":20};function t5(e,t){return t6[e]*t}let t8=(0,t2.defineCapability)({id:"byte-plus-seedance-2-mini:text2video",name:"Byte Plus Seedance 2.0 Mini",inputSchema:t3,outputSchema:t4,getBusinessDetails:e=>{let t=t5(e.resolution,e.duration);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["bytePlusSeedance2MiniText2Video",0,t8],660901);let t9=(0,eE.defineModel)({id:"byte-plus-seedance-2-mini",name:"Byte Plus Seedance 2.0 Mini",description:"Seedance 2.0 Mini video generation model by Byte Plus / ByteDance.",metadata:{creator:"Byte Plus",tier:"lite",aliases:["ByteDance","Bytedance","Seedance Mini","Seedance 2.0 Mini","字节跳动","字节","即梦"]},capabilities:{text2video:t8,image2video:ts,element2video:e9,modifyVideo:tQ}});e.s(["bytePlusSeedance2MiniModel",0,t9],492599);var t7=t,ie=i,it=a,ii=t;let ia=ie.z.object({prompt:ie.z.string().trim().min(1),resolution:ie.z.enum(["1K","2K","4K"]).default("2K"),aspectRatio:ie.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),references:ie.z.array(it.referenceSchema).min(1).max(10),imageCount:ie.z.number().int().min(1).max(8).default(1)}),ir=ie.z.object({url:ie.z.string(),thumbnailUrl:ie.z.string()}),io=(0,ii.defineCapability)({id:"byte-plus-seedream-4:image2image",name:"Byte Plus Seedream 4",inputSchema:ia,outputSchema:ir,getBusinessDetails:e=>{let t=15;return{unitCredits:15,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream4Image2Image",0,io],749733);var is=i,iu=t;let id=is.z.object({prompt:is.z.string().trim().min(1),resolution:is.z.enum(["1K","2K","4K"]).default("2K"),aspectRatio:is.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),imageCount:is.z.number().int().min(1).max(8).default(1),autoEnhancePrompt:is.z.boolean().optional()}),il=is.z.object({url:is.z.string(),thumbnailUrl:is.z.string()}),ic=(0,iu.defineCapability)({id:"byte-plus-seedream-4:text2image",name:"Byte Plus Seedream 4",inputSchema:id,outputSc
1hema:il,getBusinessDetails:e=>{let t=15;return{unitCredits:15,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream4Text2Image",0,ic],710778);let im=(0,t7.defineModel)({id:"byte-plus-seedream-4",name:"Byte Plus Seedream 4",description:"Seedream 4 image generation model by Byte Plus / ByteDance",metadata:{creator:"Byte Plus",tier:"flagship",aliases:["ByteDance","Bytedance","字节跳动","字节","即梦"]},capabilities:{image2image:io,text2image:ic}});e.s(["bytePlusSeedream4Model",0,im],604953)},509315,e=>{"use strict";var t=e.i(625468),i=e.i(779640),a=e.i(595415);let n=(0,t.defineModel)({id:"byte-plus-seedream-4-5",name:"Byte Plus Seedream 4.5",description:"Seedream 4.5 image generation model by Byte Plus / ByteDance",metadata:{creator:"Byte Plus",tier:"latest",aliases:["ByteDance","Bytedance","字节跳动","字节","即梦"]},capabilities:{image2image:i.bytePlusSeedream45Image2Image,text2image:a.bytePlusSeedream45Text2Image}});e.s(["bytePlusSeedream45Model",0,n])},21520,953001,26574,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(200744),n=t;let r=i.z.object({prompt:i.z.string().trim().min(1),resolution:i.z.enum(["2K","3K"]).default("2K"),aspectRatio:i.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),references:i.z.array(a.referenceSchema).min(1).max(14),imageCount:i.z.number().int().min(1).max(8).default(1)}),o=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string()}),s=(0,n.defineCapability)({id:"byte-plus-seedream-5-lite:image2image",name:"Byte Plus Seedream 5.0 Lite",inputSchema:r,outputSchema:o,getBusinessDetails:e=>{let t=15;return{unitCredits:15,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream5LiteImage2Image",0,s],953001);var u=i,d=t;let l=u.z.object({prompt:u.z.string().trim().min(1),resolution:u.z.enum(["2K","3K"]).default("2K"),aspectRatio:u.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),imageCount:u.z.number().int().min(1).max(8).default(1),autoEnhancePrompt:u.z.boolean().optional()}),c=u.z.object({url:u.z.string(),thumbnailUrl:u.z.string()}),f=(0,d.defineCapability)({id:"byte-plus-seedream-5-lite:text2image",name:"Byte Plus Seedream 5.0 Lite",inputSchema:l,outputSchema:c,getBusinessDetails:e=>{let t=15;return{unitCredits:15,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream5LiteText2Image",0,f],26574);let m=(0,t.defineModel)({id:"byte-plus-seedream-5-lite",name:"Byte Plus Seedream 5.0 Lite",description:"Seedream 5.0 Lite generation model by Byte Plus",metadata:{creator:"Byte Plus",tier:"lite",aliases:["ByteDance","字节跳动","字节","即梦"]},capabilities:{image2image:s,text2image:f}});e.s(["bytePlusSeedream5LiteModel",0,m],21520)},580621,630,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(625468);let n=10;function r(e){return e?.length?Math.min(e.reduce((e,t)=>e+1+("character"===t.type&&Array.isArray(t.extraUrls)?t.extraUrls.length:0),0),n):0}e.s(["countSeedream5ProReferenceImages",()=>r],630);let o=t.z.object({prompt:t.z.string().trim().min(1),resolution:t.z.enum(["1K","2K"]).default("1K"),aspectRatio:t.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),references:t.z.array(i.referenceSchema).min(1).max(10),imageCount:t.z.number().int().min(1).max(8).default(1),background:t.z.literal("transparent").optional()}),s=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string()}),u=(0,a.defineCapability)({id:"byte-plus-seedream-5-pro:image2image",name:"Byte Plus Seedream 5.0 Pro",inputSchema:o,outputSchema:s,getBusinessDetails:e=>{let t=("2K"===e.resolution?60:30)+2*Math.max(0,r(e.references)-1);return{unitCredits:t,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream5ProImage2Image",0,u],580621)},69514,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(625468);let n=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number()]),r=t.z.number().min(0).max(1e3),o=t.z.object({x1:r,y1:r,x2:r,y2:r}).refine(({x1:e,y1:t,x2:i,y2:a})=>e<i&&t<a,"Bounding box must have x1 < x2 and y1 < y2"),s=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string(),zIndex:t.z.number().int().min(1).max(16),boundingBox:t.z.object({absolute:n,normalized:n}),name:t.z.string(),description:t.z.string()}),u=t.z.object({image:i.imageReferenceSchema,layerCount:t.z.number().int().min(1).max(16).optional(),boundingBoxes:t.z.array(o).min(1).max(16).optional(),resolution:t.z.enum(["auto","1K","1.5K","2K"]).default("auto")}).superRefine((e,i)=>{1!==Number(void 0!==e.layerCount)+Number(void 0!==e.boundingBoxes)&&i.addIssue({code:t.z.ZodIssueCode.custom,path:["layerCount"],message:"Provide exactly one of layerCount or boundingBoxes"})}),d=t.z.object({base:t.z.object({url:t.z.string(),thumbnailUrl:t.z.string(),zIndex:t.z.literal(0)}),layers:t.z.array(s).min(1).max(16)}),l=261e4,c=8,f=16,m=(0,a.defineCapability)({id:"byte-plus-seedream-5-pro:layerDecomposition",name:"Byte Plus Seedream 5.0 Pro Layer Decomposition",inputSchema:u,outputSc
1hema:d,getBusinessDetails:e=>{let t=e.image.metadata?.width,i=e.image.metadata?.height,a="number"==typeof t&&Number.isFinite(t)&&t>0&&"number"==typeof i&&Number.isFinite(i)&&i>0&&t*i<l?c:f;"2K"===e.resolution?a=f:("1K"===e.resolution||"1.5K"===e.resolution)&&(a=c);let n=a*((e.layerCount??e.boundingBoxes?.length??0)+1);return{unitCredits:n,quantity:1,totalCredits:n}}});e.s(["bytePlusSeedream5ProLayerDecomposition",0,m,"layerDecompositionBoundingBoxSchema",0,o])},23535,105723,e=>{"use strict";var t=e.i(625468),i=e.i(580621),a=e.i(69514),n=e.i(207653),r=t;let o=n.z.object({prompt:n.z.string().trim().min(1),resolution:n.z.enum(["1K","2K"]).default("1K"),aspectRatio:n.z.enum(["1:1","4:3","3:4","16:9","9:16","3:2","2:3","21:9"]).default("4:3"),imageCount:n.z.number().int().min(1).max(8).default(1),autoEnhancePrompt:n.z.boolean().optional()}),s=n.z.object({url:n.z.string(),thumbnailUrl:n.z.string()}),u=(0,r.defineCapability)({id:"byte-plus-seedream-5-pro:text2image",name:"Byte Plus Seedream 5.0 Pro",inputSchema:o,outputSchema:s,getBusinessDetails:e=>{let t="2K"===e.resolution?60:30;return{unitCredits:t,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["bytePlusSeedream5ProText2Image",0,u],105723);let d=(0,t.defineModel)({id:"byte-plus-seedream-5-pro",name:"Byte Plus Seedream 5.0 Pro",description:"Seedream 5.0 Pro generation model by Byte Plus",metadata:{creator:"Byte Plus",tier:"flagship",aliases:["ByteDance","字节跳动","字节","即梦"]},capabilities:{image2image:i.bytePlusSeedream5ProImage2Image,layerDecomposition:a.bytePlusSeedream5ProLayerDecomposition,text2image:u}});e.s(["bytePlusSeedream5ProModel",0,d],23535)},512336,806355,63463,661962,728828,68904,111280,621707,279859,704805,39825,891410,388582,670326,726375,848518,311847,248195,11645,292234,823056,698688,81433,5361,441486,362426,268596,716729,9949,943376,852155,248670,639600,881674,478445,927280,129018,324888,62624,644380,328663,851048,214655,152808,133557,965758,466390,747887,978213,834651,40336,377376,587920,329320,905113,884589,732337,786835,482453,495910,710015,691188,914792,955010,346476,76798,120213,509045,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(402587),n=t;let r=["aurora_v1","aurora_v1_fast"],o={aurora_v1:50,aurora_v1_fast:25},s=i.z.object({image:i.z.string().trim().min(1),audio:i.z.string().trim().min(1),duration:i.z.number().int().min(1).max(60),prompt:i.z.string().trim().max(a.DEFAULT_PROMPT_MAX_CHARACTERS).default("").catch(""),modelVersion:i.z.enum(r).default("aurora_v1").catch("aurora_v1")}),u=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional()}),d=(0,n.defineCapability)({id:"creatify-aurora:lipSync",name:"Creatify Aurora Lip Sync",inputSchema:s,outputSchema:u,getBusinessDetails:e=>{if(!e.image||!e.audio||!e.duration)throw Error("Required fields missing");let t=o[e.modelVersion],i=Math.ceil(e.duration)*t;return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["creatifyAuroraLipSync",0,d],806355);let l=(0,t.defineModel)({id:"creatify-aurora",name:"Creatify Aurora",description:"Creatify Aurora creates realistic lip-sync videos with natural facial motion and precise speech alignment.",metadata:{creator:"Creatify"},capabilities:{lipSync:d}});e.s(["creatifyAuroraModel",0,l],512336);var c=t,f=i,m=t;let h=f.z.object({audio:f.z.string().trim().min(1),voiceId:f.z.string().trim().min(1),duration:f.z.number().min(1).default(1).catch(1),stability:f.z.number().min(0).max(1).nullable().optional().default(.5).catch(.5),useSpeakerBoost:f.z.boolean().nullable().optional().default(!0).catch(!0),similarityBoost:f.z.number().min(0).max(1).nullable().optional().default(.75).catch(.75),style:f.z.number().min(0).max(1).nullable().optional().default(0).catch(0)}),p=f.z.object({url:f.z.string()}),b=(0,m.defineCapability)({id:"eleven_english_sts_v2:speech2speech",name:"Eleven English STS v2",inputSchema:h,outputSc
1hema:p,getBusinessDetails:e=>{let t=1,i=Math.max(1,Math.ceil(e.duration*t));return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["elevenlabElevenEnglishStsV2",0,b],63463);let g=(0,c.defineModel)({id:"eleven_english_sts_v2",name:"Eleven English STS v2",description:"English speech-to-speech voice conversion model by ElevenLabs.",metadata:{creator:"ElevenLabs",aliases:["ElevenLabs","11Labs","Eleven Labs"]},capabilities:{speech2speech:b}});e.s(["elevenlabElevenEnglishStsV2Model",0,g],661962),e.s([],728828);var v=t,y=i,x=t;let z=y.z.object({audio:y.z.string().trim().min(1),voiceId:y.z.string().trim().min(1),duration:y.z.number().min(1).default(1).catch(1),stability:y.z.number().min(0).max(1).nullable().optional().default(.5).catch(.5),useSpeakerBoost:y.z.boolean().nullable().optional().default(!0).catch(!0),similarityBoost:y.z.number().min(0).max(1).nullable().optional().default(.75).catch(.75),style:y.z.number().min(0).max(1).nullable().optional().default(0).catch(0)}),_=y.z.object({url:y.z.string()}),S=(0,x.defineCapability)({id:"eleven_multilingual_v2:speech2speech",name:"Eleven Multilingual v2",inputSchema:z,outputSchema:_,getBusinessDetails:e=>{let t=1,i=Math.max(1,Math.ceil(e.duration*t));return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["elevenlabElevenMultilingualV2Speech2Speech",0,S],68904);var M=i,I=t;let w=M.z.object({prompt:M.z.string().trim().min(1).max(1e4),voiceId:M.z.string().trim().min(1),stability:M.z.number().min(0).max(1).nullable().optional().default(.5).catch(.5),useSpeakerBoost:M.z.boolean().nullable().optional().default(!0).catch(!0),similarityBoost:M.z.number().min(0).max(1).nullable().optional().default(.75).catch(.75),style:M.z.number().min(0).max(1).nullable().optional().default(0).catch(0),speed:M.z.number().min(.7).max(1.2).nullable().optional().default(1).catch(1)}),C=M.z.object({url:M.z.string()}),R=(0,I.defineCapability)({id:"eleven_multilingual_v2:text2speech",name:"Eleven Multilingual v2",inputSchema:w,outputSchema:C,getBusinessDetails:e=>{let t=25,i=5*Math.ceil(Math.max(1,Math.ceil(e.prompt.length/t))/5);return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["elevenlabElevenMultilingualV2Text2Speech",0,R],111280);let E=(0,v.defineModel)({id:"eleven_multilingual_v2",name:"Eleven Multilingual v2",description:"Multilingual text-to-speech and voice conversion model by ElevenLabs. Supports 29 languages.",metadata:{creator:"ElevenLabs",aliases:["ElevenLabs","11Labs","Eleven Labs"]},capabilities:{text2speech:R,speech2speech:S}});e.s(["elevenlabElevenMultilingualV2Model",0,E],621707),e.s([],279859);var A=t,P=i,T=t;let k=P.z.object({audioUrl:P.z.string().url(),languageCode:P.z.string().optional()}),D=P.z.object({text:P.z.string(),start:P.z.number(),end:P.z.number(),type:P.z.enum(["word","audio_event"])}),B=P.z.object({words:P.z.array(D.extend({sep:P.z.string(),logprob:P.z.number().nullable()})),audioEvents:P.z.array(D),durationSecs:P.z.number(),language:P.z.string()}),j=(0,T.defineCapability)({id:"eleven_scribe_v1:speech2text",name:"Scribe v1 Speech to Text",inputSchema:k,outputSchema:B,getBusinessDetails:()=>({unitCredits:0,quantity:0,totalCredits:0})}),O=(0,A.defineModel)({id:"eleven_scribe_v1",name:"Scribe v1",description:"High-accuracy speech-to-text transcription model by ElevenLabs.",metadata:{creator:"ElevenLabs",aliases:["ElevenLabs","11Labs","Eleven Labs","Scribe"]},capabilities:{speech2text:j}});e.s(["elevenScribeV1Model",0,O],704805),e.s([],39825);var V=t,N=i,F=t;let U=N.z.object({prompt:N.z.string().trim().min(1).max(1e3),durationSeconds:N.z.number().min(.5).max(30).optional(),promptInfluence:N.z.number().min(0).max(1).default(.3),loop:N.z.boolean().default(!1)}),q=N.z.object({url:N.z.string()}),L=.12,$=.0026,H=10,K=(0,F.defineCapability)({id:"eleven_text_to_sound_v2:text2sfx",name:"Eleven Sound Effects v2",inputSchema:U,outputSchema:q,getBusinessDetails:e=>{let t=Math.max(5,5*Math.ceil((e.durationSeconds??H)/60*L/$/5));return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["elevenlabTextToSoundV2Text2Sfx",0,K],891410);let G=(0,V.defineModel)({id:"eleven_text_to_sound_v2",name:"Eleven Sound Effects v2",description:"Text-to-sound-effect generation by ElevenLabs. Royalty-free SFX up to 30s.",metadata:{creator:"ElevenLabs",aliases:["ElevenLabs","11Labs","Eleven Labs"]},capabilities:{text2sfx:K}});e.s(["elevenlabTextToSoundV2Model",0,G],388582),e.s([],670326);var X=t,Z=i,W=t;let Y=Z.z.object({prompt:Z.z.string().trim().min(1).max(5e3),voiceId:Z.z.string().trim().min(1)}),J=Z.z.object({url:Z.z.string()}),Q=(0,W.defineCapability)({id:"eleven_v3:text2speech",name:"Eleven v3",inputSchema:Y,outputSc
1hema:J,getBusinessDetails:e=>{let t=25,i=5*Math.ceil(Math.max(1,Math.ceil(e.prompt.length/t))/5);return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["elevenlabElevenV3Text2Speech",0,Q],726375);let ee=(0,X.defineModel)({id:"eleven_v3",name:"Eleven v3",description:"High-fidelity text-to-speech voice synthesis model by ElevenLabs.",metadata:{creator:"ElevenLabs",aliases:["ElevenLabs","11Labs","Eleven Labs"]},capabilities:{text2speech:Q}});e.s(["elevenlabElevenV3Model",0,ee],848518),e.s([],311847);var et=t,ei=t;let ea=1;var en=i,er=e.i(200744);let eo=en.z.object({width:en.z.number().int().min(256).max(1024).multipleOf(8),height:en.z.number().int().min(256).max(1024).multipleOf(8)}),es=en.z.union([en.z.enum(["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"]),eo]),eu=en.z.object({path:en.z.string().min(1),scale:en.z.number().min(0).max(4).default(1)}),ed="cartoon, painting, illustration, worst quality, low quality, normal quality",el=en.z.object({prompt:en.z.string().min(1),imageCount:en.z.number().int().min(1).max(8).default(1),negativePrompt:en.z.string().default(ed),promptWeighting:en.z.boolean().default(!0),loras:en.z.array(eu).default([]),imageSize:es.default("square_hd"),steps:en.z.number().int().min(1).max(150).default(30),cfgScale:en.z.number().min(0).max(30).default(7.5),predictionType:en.z.enum(["epsilon","v_prediction"]).default("epsilon"),imageFormat:en.z.enum(["jpeg","png"]).default("jpeg"),tileWidth:en.z.number().int().min(256).default(1024),tileHeight:en.z.number().int().min(256).default(1024),tileStrideWidth:en.z.number().int().min(128).default(512),tileStrideHeight:en.z.number().int().min(128).default(512),enableSafetyChecker:en.z.boolean().default(!1),seed:en.z.number().int().optional(),autoEnhancePrompt:en.z.boolean().optional()}),ec=[{check:e=>e.tileStrideWidth<=e.tileWidth,path:["tileStrideWidth"],message:"tileStrideWidth must be less than or equal to tileWidth"},{check:e=>e.tileStrideHeight<=e.tileHeight,path:["tileStrideHeight"],message:"tileStrideHeight must be less than or equal to tileHeight"}],ef=ec.reduce((e,{check:t,path:i,message:a})=>e.refine(t,{path:[...i],message:a}),el),em=ec.reduce((e,{check:t,path:i,message:a})=>e.refine(t,{path:[...i],message:a}),el.omit({autoEnhancePrompt:!0}).extend({referenceImages:en.z.array(er.imageReferenceSchema).min(1).max(1),noiseStrength:en.z.number().min(0).max(1).default(.5)})).refine(e=>!!e.referenceImages[0]?.url?.trim(),{message:"Reference image URL must be non-empty",path:["referenceImages",0,"url"]}),eh=en.z.object({images:en.z.array(en.z.object({url:en.z.string(),thumbnailUrl:en.z.string().optional(),width:en.z.number(),height:en.z.number()})),seed:en.z.number().optional()});e.s(["sdxlFalLoraDefaultNegativePrompt",0,ed,"sdxlFalLoraImage2ImageInputSchema",0,em,"sdxlFalLoraImageOutputSchema",0,eh,"sdxlFalLoraText2ImageInputSchema",0,ef],248195);let ep=(0,ei.defineCapability)({id:"dynavision-xl:image2image",name:"DynaVision XL Image to Image",inputSchema:em,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["dynavisionXlImage2Image",0,ep],11645);let eb=(0,t.defineCapability)({id:"dynavision-xl:text2image",name:"DynaVision XL Text to Image",inputSchema:ef,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["dynavisionXlText2Image",0,eb],292234);let eg=(0,et.defineModel)({id:"dynavision-xl",name:"DynaVision XL",description:"Stylized 3D all-in-one SDXL checkpoint from CivitAI. No refiner needed.",metadata:{creator:"Fal"},capabilities:{text2image:eb,image2image:ep}});e.s(["dynavisionXlModel",0,eg],823056);var ev=t,ey=i,ex=t;let ez=ey.z.enum(["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"]),e_=ey.z.union([ez,ey.z.object({width:ey.z.number().int().min(64),height:ey.z.number().int().min(64)})]),eS=ey.z.object({prompt:ey.z.string().min(1),imageCount:ey.z.number().int().min(1).max(8).default(1),imageSize:e_.optional().default("landscape_4_3"),steps:ey.z.number().int().min(1).max(50).default(40),cfgScale:ey.z.number().min(0).max(20).default(2.5),loraScale:ey.z.number().min(0).max(2).default(1),acceleration:ey.z.enum
1(["none","regular"]).default("regular"),seed:ey.z.number().int().default(-1),syncMode:ey.z.boolean().default(!1),enableSafetyChecker:ey.z.boolean().default(!0),outputFormat:ey.z.enum(["jpeg","png"]).default("png"),autoEnhancePrompt:ey.z.boolean().optional()}),eM=ey.z.object({images:ey.z.array(ey.z.object({url:ey.z.string(),thumbnailUrl:ey.z.string().optional(),width:ey.z.number().optional(),height:ey.z.number().optional()})),seed:ey.z.number().optional(),prompt:ey.z.string().optional()}),eI=(0,ex.defineCapability)({id:"flux-2-lora-gallery-realism:text2image",name:"Flux 2 LoRA Gallery Realism Text to Image",inputSchema:eS,outputSchema:eM,getBusinessDetails:e=>{let t=5,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["flux2LoraGalleryRealismText2Image",0,eI],698688);let ew=(0,ev.defineModel)({id:"flux-2-lora-gallery-realism",name:"Flux 2 LoRA Gallery Realism",description:"Flux 2 LoRA Gallery realism model for photorealistic images.",metadata:{creator:"Fal"},capabilities:{text2image:eI}});e.s(["flux2LoraGalleryRealismModel",0,ew],81433);var eC=t,eR=i,eE=t;let eA=eR.z.object({prompt:eR.z.string().min(1),imageCount:eR.z.number().int().min(1).max(8).default(2),imagePrompt:eR.z.string().min(1),seed:eR.z.number().int().nullable().optional(),numInferenceSteps:eR.z.number().int().min(1).default(28).catch(28).nullable().optional(),guidanceScale:eR.z.number().min(0).default(2.5).catch(2.5).nullable().optional(),outputFormat:eR.z.enum(["jpeg","png"]).default("png").catch("png"),enableSafetyChecker:eR.z.boolean().default(!1).catch(!1),syncMode:eR.z.boolean().default(!1).catch(!1),acceleration:eR.z.enum(["none","regular","high"]).default("none").catch("none"),resolutionMode:eR.z.enum(["auto","match_input","1:1","16:9","21:9","3:2","2:3","4:5","5:4","3:4","4:3","9:16","9:21"]).default("auto").catch("auto"),autoEnhancePrompt:eR.z.boolean().optional()}),eP=eR.z.object({images:eR.z.array(eR.z.object({url:eR.z.string(),thumbnailUrl:eR.z.string().optional(),width:eR.z.number(),height:eR.z.number()})),seed:eR.z.number().optional(),prompt:eR.z.string().optional()}),eT=(0,eE.defineCapability)({id:"flux-kontext-dev:text2image",name:"Flux Kontext Dev Text to Image",inputSchema:eA,outputSchema:eP,getBusinessDetails:e=>{let t=5,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["fluxKontextDevText2Image",0,eT],5361);let ek=(0,eC.defineModel)({id:"flux-kontext-dev",name:"Flux Kontext Dev",description:"Enhanced identity preservation",metadata:{creator:"Fal"},capabilities:{text2image:eT}});e.s(["fluxKontextDevModel",0,ek],441486);var eD=t,eB=i,ej=er,eO=t;let eV=["480P","768P"],eN="480P",eF="768P",eU=6e3,eq=5,eL=15,e$={"480P":25,"768P":40},eH={"480P":25,"768P":40},eK=4096,eG=.01,eX=1,eZ={"480P":2886,"768P":7459};function eW(e){return e$[e]??e$[eF]}function eY(e){return eH[e]??eH[eF]}function eJ(e){return eZ[e]??eZ[eF]}function eQ(e){return Math.max(0,e-eK)*eG}let e0=["21:9","16:9","4:3","1:1","3:4","9:16"],e1=12,e2=2,e3=15,e4=15,e6=.08,e5=2,e8=15,e9=15,e7=["balanced"],te="balanced";e.s(["H3_MAX_ASPECT_RATIOS",0,e0,"H3_MAX_AUDIO_DURATION_UNDERCOUNT_S",0,e6,"H3_MAX_AUDIO_MAX_DURATION_S",0,e8,"H3_MAX_AUDIO_MIN_DURATION_S",0,e5,"H3_MAX_AUDIO_TOTAL_MAX_DURATION_S",0,e9,"H3_MAX_CREDITS_PER_REFERENCE_AUDIO_SECOND",0,eX,"H3_MAX_DEFAULT_PROMPT_EXPANSION_MODE",0,te,"H3_MAX_DEFAULT_RESOLUTION",0,eN,"H3_MAX_MAX_DURATION_S",0,eL,"H3_MAX_MIN_DURATION_S",0,eq,"H3_MAX_PROMPT_EXPANSION_MODES",0,e7,"H3_MAX_PROMPT_MAX_CHARACTERS",0,eU,"H3_MAX_RESOLUTIONS",0,eV,"H3_MAX_TOTAL_REFERENCES",0,e1,"H3_MAX_VIDEO_MAX_DURATION_S",0,e3,"H3_MAX_VIDEO_MIN_DURATION_S",0,e2,"H3_MAX_VIDEO_TOTAL_MAX_DURATION_S",0,e4,"h3MaxCreditsPerSecond",()=>eW,"h3MaxElement2VideoCreditsPerSecond",()=>eY,"h3MaxReferenceCredits",()=>eQ,"h3MaxReferenceTokensPerVideoSecond",()=>eJ],362426);let tt=eB.z.union([ej.imageReferenceSchema,ej.characterReferenceSchema,ej.elementReferenceSchema,ej.videoReferenceSchema,ej.audioReferenceSchema]);function ti(e,t,i){let a=(i?.layer??"capability")==="capability",n=e.filter(e=>"image"===e.type||"character"===e.type||"element"===e.type),r=e.filter(e=>"video"===e.type),o=e.filter(e=>"audio"===e.type);for(let i of(e.length>e1&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:`Maximum ${e1} references allowed`,path:["visualReferences"]}),a&&o.length>0&&0===n.length&&0===r.length&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:"Audio must be paired with at least one image or video",path:["visualReferences"]}),n)){let n=i.metadata;!("number"==typeof n?.width&&Number.isFinite(n.width)&&n.width>0&&"number"==typeof n?.height&&Number.isFinite(n.height)&&n.height>0)&&a&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:"Image metadata is required",path:["visualReferences",e.indexOf(i)]})}let s=0;for(let i of r){let n=e.indexOf(i),r=i.metadata?.duration;if("number"!=typeof r||!Number.isFinite(r)){a&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:"Video metadata is required",path:["visualReferences",n]});continue}(r<e2||r>e3)&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:`Video duration must be between ${e2}s and ${e3}s`,path:["visualReferences",n]}),s+=r}s>e4&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:`Total video duration must not exceed ${e4}s (current: ${s.toFixed(2)}s)`,path:["visualReferences"]});let u=0;for(let i of o){let n=e.indexOf(i),r=i.metadata?.duration;if("number"!=typeof r||!Number.isFinite(r)){a&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:"Audio metadata is required",path:["visualReferences",n]});continue}(r<e5||r>e8)&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:`Audio duration must be between ${e5}s and ${e8}s`,path:["visualReferences",n]}),u+=r+e6}u>e9&&t.addIssue({code:eB.z.ZodIssueCode.custom,message:`Total audio duration must not exceed ${e9}s (current: ${u.toFixed(2)}s)`,path:["visualReferences"]})}let ta=eB.z.object({prompt:eB.z.string().trim().min(1).max(eU,`Prompt must be ${eU} characters or less`),videoCount:eB.z.number().int().min(1).max(8).default(1),duration:eB.z.number().int().min(eq).max(eL).default(eq).cat
1ch(eq),aspectRatio:eB.z.enum(e0).default("16:9").catch("16:9"),resolution:eB.z.enum(eV).default(eN).catch(eN),visualReferences:eB.z.array(tt).min(1),seed:eB.z.number().int().optional(),promptExpansionMode:eB.z.enum(e7).default(te).catch(te),autoEnhancePrompt:eB.z.boolean().optional()}).superRefine((e,t)=>{ti(e.visualReferences,t)}),tn=eB.z.object({url:eB.z.string(),thumbnailUrl:eB.z.string().optional()});function tr(e){let t=0,i=0;for(let a of e.visualReferences){let e=a.metadata;if("image"===a.type||"character"===a.type||"element"===a.type){let{width:i,height:a}=e??{};"number"==typeof i&&"number"==typeof a&&(t+=i*a);continue}if("video"===a.type){let t=e?.duration;"number"==typeof t&&Number.isFinite(t)&&(i+=t)}}return t/1024+Math.round(i)*eJ(e.resolution)}function to(e){let t=0;for(let i of e){if("audio"!==i.type)continue;let e=i.metadata?.duration;"number"==typeof e&&Number.isFinite(e)&&(t+=e)}return Math.round(t)}function ts(e){return Math.ceil(eY(e.resolution)*e.duration+eQ(tr(e))+to(e.visualReferences)*eX)}let tu=(0,eO.defineCapability)({id:"fal-h3-max:element2video",name:"MiniMax H3 Max Element to Video",inputSchema:ta,outputSchema:tn,getBusinessDetails:e=>{let t=ts(e),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["falH3MaxElement2Video",0,tu,"validateH3MaxReferences",()=>ti],268596);var td=i,tl=er,tc=t,tf=e.i(332097),tm=i;let th={maxFileSizeBytes:0x1e00000,minDimensionPx:256,maxDimensionPx:5760,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp","heic","heif"],maxReferenceImages:e1},tp={minDuration:e2,maxDuration:e3,totalMaxDuration:e4,maxFileSizeBytes:0x3200000},tb={minDuration:e5,maxDuration:e8,totalMaxDuration:e9,maxFileSizeBytes:0xf00000,allowedFormats:["wav","mp3"]},tg={max:e1};function tv(e,t,i,a){let n=[...i,"metadata"];if(!e){(a?.requireMetadata??!0)&&t.addIssue({code:tm.z.ZodIssueCode.custom,message:"Image metadata is required",path:n});return}let r=(0,tf.validateReferenceImageMetadata)(e,th);r&&t.addIssue({code:tm.z.ZodIssueCode.custom,message:r.message,path:n})}e.s(["H3_MAX_AUDIO_CONSTRAINTS",0,tb,"H3_MAX_IMAGE_CONSTRAINTS",0,th,"H3_MAX_REFERENCE_MEDIA_LIMITS",0,tg,"H3_MAX_VIDEO_CONSTRAINTS",0,tp,"validateH3MaxFrame",()=>tv],716729);let ty=td.z.object({prompt:td.z.string().trim().min(1).max(eU,`Prompt must be ${eU} characters or less`),videoCount:td.z.number().int().min(1).max(8).default(1),duration:td.z.number().int().min(eq).max(eL).default(eq).cat
1ch(eq),resolution:td.z.enum(eV).default(eN).catch(eN),startFrame:tl.imageReferenceSchema,endFrame:tl.imageReferenceSchema.nullable().optional(),seed:td.z.number().int().optional(),promptExpansionMode:td.z.enum(e7).default(te).catch(te)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{let i={requireMetadata:!1};tv(e.startFrame?.metadata,t,["startFrame"],i),e.endFrame&&tv(e.endFrame.metadata,t,["endFrame"],i)}),tx=td.z.object({url:td.z.string(),thumbnailUrl:td.z.string().optional()}),tz=(0,tc.defineCapability)({id:"fal-h3-max:image2video",name:"MiniMax H3 Max Image to Video",inputSchema:ty,outputSchema:tx,getBusinessDetails:e=>{let t=eW(e.resolution)*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["falH3MaxImage2Video",0,tz],9949);var t_=i,tS=t;let tM=t_.z.object({prompt:t_.z.string().trim().min(1).max(eU,`Prompt must be ${eU} characters or less`),videoCount:t_.z.number().int().min(1).max(8).default(1),duration:t_.z.number().int().min(eq).max(eL).default(eq).cat
1ch(eq),aspectRatio:t_.z.enum(e0).default("16:9").catch("16:9"),resolution:t_.z.enum(eV).default(eN).catch(eN),seed:t_.z.number().int().optional(),promptExpansionMode:t_.z.enum(e7).default(te).catch(te),autoEnhancePrompt:t_.z.boolean().optional()}),tI=t_.z.object({url:t_.z.string(),thumbnailUrl:t_.z.string().optional()}),tw=(0,tS.defineCapability)({id:"fal-h3-max:text2video",name:"MiniMax H3 Max Text to Video",inputSchema:tM,outputSchema:tI,getBusinessDetails:e=>{let t=eW(e.resolution)*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["falH3MaxText2Video",0,tw],943376);let tC=(0,eD.defineModel)({id:"fal-h3-max",name:"MiniMax H3 Max",description:"MiniMax H3 Max video generation model",metadata:{creator:"Fal",aliases:["MiniMax-H3-Max","H3 Max"]},capabilities:{text2video:tw,image2video:tz,element2video:tu}});e.s(["falH3MaxModel",0,tC],852155);var tR=t,tE=i,tA=er,tP=t;let tT=["480P","768P","1080P"],tk="480P",tD="1080P",tB=6e3,tj=5,tO=15,tV={"480P":15,"768P":20,"1080P":40};function tN(e){return tV[e]??tV[tD]}function tF(e){let t=e.videoCount??1,i=tN(e.resolution)*e.duration;return{unitCredits:i,quantity:t,totalCredits:i*t}}let tU=["21:9","16:9","4:3","1:1","3:4","9:16"],tq=["balanced"],tL="balanced";e.s(["H3_MAX_TURBO_ASPECT_RATIOS",0,tU,"H3_MAX_TURBO_DEFAULT_PROMPT_EXPANSION_MODE",0,tL,"H3_MAX_TURBO_DEFAULT_RESOLUTION",0,tk,"H3_MAX_TURBO_MAX_DURATION_S",0,tO,"H3_MAX_TURBO_MIN_DURATION_S",0,tj,"H3_MAX_TURBO_PROMPT_EXPANSION_MODES",0,tq,"H3_MAX_TURBO_PROMPT_MAX_CHARACTERS",0,tB,"H3_MAX_TURBO_RESOLUTIONS",0,tT,"h3MaxTurboBusinessDetails",()=>tF],248670);var t$=tf,tH=i;let tK={maxFileSizeBytes:0x1e00000,minDimensionPx:256,maxDimensionPx:5760,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp","heic","heif"],maxReferenceImages:2};function tG(e,t,i,a){let n=[...i,"metadata"];if(!e){(a?.requireMetadata??!0)&&t.addIssue({code:tH.z.ZodIssueCode.custom,message:"Image metadata is required",path:n});return}let r=(0,t$.validateReferenceImageMetadata)(e,tK);r&&t.addIssue({code:tH.z.ZodIssueCode.custom,message:r.message,path:n})}e.s(["H3_MAX_TURBO_IMAGE_CONSTRAINTS",0,tK,"validateH3MaxTurboFrame",()=>tG],639600);let tX=tE.z.object({prompt:tE.z.string().trim().min(1).max(tB,`Prompt must be ${tB} characters or less`),videoCount:tE.z.number().int().min(1).max(8).default(1),duration:tE.z.number().int().min(tj).max(tO).default(tj).catch(tj),resolution:tE.z.enum(tT).default(tk).catch(tk),startFrame:tA.imageReferenceSchema,endFrame:tA.imageReferenceSchema.nullable().optional(),seed:tE.z.number().int().optional(),promptExpansionMode:tE.z.enum(tq).default(tL).catch(tL)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{let i={requireMetadata:!1};tG(e.startFrame?.metadata,t,["startFrame"],i),e.endFrame&&tG(e.endFrame.metadata,t,["endFrame"],i)}),tZ=tE.z.object({url:tE.z.string(),thumbnailUrl:tE.z.string().optional()}),tW=(0,tP.defineCapability)({id:"fal-h3-max-turbo:image2video",name:"MiniMax H3 Max Turbo Image to Video",inputSchema:tX,outputSchema:tZ,getBusinessDetails:e=>tF(e)});e.s(["falH3MaxTurboImage2Video",0,tW],881674);var tY=i,tJ=t;let tQ=tY.z.object({prompt:tY.z.string().trim().min(1).max(tB,`Prompt must be ${tB} characters or less`),videoCount:tY.z.number().int().min(1).max(8).default(1),duration:tY.z.number().int().min(tj).max(tO).default(tj).catch(tj),aspectRatio:tY.z.enum(tU).default("16:9").catch("16:9"),resolution:tY.z.enum(tT).default(tk).catch(tk),seed:tY.z.number().int().optional(),promptExpansionMode:tY.z.enum(tq).default(tL).catch(tL),autoEnhancePrompt:tY.z.boolean().optional()}),t0=tY.z.object({url:tY.z.string(),thumbnailUrl:tY.z.string().optional()}),t1=(0,tJ.defineCapability)({id:"fal-h3-max-turbo:text2video",name:"MiniMax H3 Max Turbo Text to Video",inputSchema:tQ,outputSchema:t0,getBusinessDetails:e=>tF(e)});e.s(["falH3MaxTurboText2Video",0,t1],478445);let t2=(0,tR.defineModel)({id:"fal-h3-max-turbo",name:"MiniMax H3 Max Turbo",description:"Faster MiniMax H3 Max variant — text- and image-to-vi
1deo only",metadata:{creator:"Fal",aliases:["MiniMax-H3-Max-Turbo","H3 Max Turbo"]},capabilities:{text2video:t1,image2video:tW}});e.s(["falH3MaxTurboModel",0,t2],927280);var t3=t,t4=i,t6=er,t5=t;let t8=t4.z.object({prompt:t4.z.string().min(1),referenceImages:t4.z.array(t6.imageReferenceSchema).min(1).max(1),imageCount:t4.z.number().int().min(1).max(8).default(1),strength:t4.z.number().min(.01).max(1).default(.95),steps:t4.z.number().int().min(1).max(100).default(40),cfgScale:t4.z.number().min(0).max(20).default(3.5),enableSafetyChecker:t4.z.boolean().default(!1),outputFormat:t4.z.enum(["jpeg","png"]).default("png")}),t9=t4.z.object({images:t4.z.array(t4.z.object({url:t4.z.string(),thumbnailUrl:t4.z.string().optional(),width:t4.z.number(),height:t4.z.number()})),seed:t4.z.number().optional()}),t7=(0,t5.defineCapability)({id:"juggernaut-flux-pro:image2image",name:"Juggernaut Flux Pro Image to Image",inputSchema:t8,outputSchema:t9,getBusinessDetails:e=>{let t=5,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["juggernautFluxProImage2Image",0,t7],129018);var ie=i,it=t;let ii=ie.z.enum(["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"]),ia=ie.z.union([ii,ie.z.object({width:ie.z.number().int().min(64),height:ie.z.number().int().min(64)})]),ir=ie.z.object({prompt:ie.z.string().min(1),imageCount:ie.z.number().int().min(1).max(8).default(1),imageSize:ia.optional().default("landscape_4_3"),steps:ie.z.number().int().min(1).max(100).default(28),cfgScale:ie.z.number().min(0).max(20).default(3.5),enableSafetyChecker:ie.z.boolean().default(!1),outputFormat:ie.z.enum(["jpeg","png"]).default("png"),autoEnhancePrompt:ie.z.boolean().optional()}),io=ie.z.object({images:ie.z.array(ie.z.object({url:ie.z.string(),thumbnailUrl:ie.z.string().optional(),width:ie.z.number(),height:ie.z.number()})),seed:ie.z.number().optional()}),is=(0,it.defineCapability)({id:"juggernaut-flux-pro:text2image",name:"Juggernaut Flux Pro Text to Image",inputSchema:ir,outputSchema:io,getBusinessDetails:e=>{let t=5,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["juggernautFluxProText2Image",0,is],324888);let iu=(0,t3.defineModel)({id:"juggernaut-flux-pro",name:"Juggernaut Flux Pro",description:"High-realism text and image-guided generation in the Juggernaut style.",metadata:{creator:"Fal"},capabilities:{text2image:is,image2image:t7}});e.s(["juggernautFluxProModel",0,iu],62624);var id=t;let il=(0,t.defineCapability)({id:"juggernaut-xl:image2image",name:"Juggernaut XL Image to Image",inputSchema:em,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["juggernautXlImage2Image",0,il],644380);let ic=(0,t.defineCapability)({id:"juggernaut-xl:text2image",name:"Juggernaut XL Text to Image",inputSchema:ef,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["juggernautXlText2Image",0,ic],328663);let im=(0,id.defineModel)({id:"juggernaut-xl",name:"Juggernaut XL",description:"High-realism text and image-guided SDXL generation in the Juggernaut XL style.",metadata:{creator:"Fal"},capabilities:{text2image:ic,image2image:il}});e.s(["juggernautXlModel",0,im],851048);var ih=t;let ip=(0,t.defineCapability)({id:"openart-sdxl:image2image",name:"OpenArt SDXL Image to Image",inputSchema:em,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["openartSdxlImage2Image",0,ip],214655);let ib=(0,t.defineCapability)({id:"openart-sdxl:text2image",name:"OpenArt SDXL Text to Image",inputSchema:ef,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["openartSdxlText2Image",0,ib],152808);let ig=(0,ih.defineModel)({id:"openart-sdxl",name:"OpenArt SDXL",description:"Versatile text and image-guided SDXL generation in the OpenArt style.",metadata:{creator:"Fal"},capabilities:{text2image:ib,image2image:ip}});e.s(["openartSdxlModel",0,ig],133557);var iv=t,iy=i,ix=t;let iz=iy.z.enum(["1080p","1440p","2160p"]),i_=iy.z.object({imageUrl:iy.z.string().url(),targetResolution:iz}),iS=iy.z.object({url:iy.z.string(),thumbnailUrl:iy.z.string().optional(),width:iy.z.number().optional(),height:iy.z.number().optional()}),iM={"1080p":5,"1440p":10,"2160p":20}
1,iI=(0,ix.defineCapability)({id:"seedvr:upscale",name:"SeedVR Image Upscale",inputSchema:i_,outputSchema:iS,getBusinessDetails:e=>{let t=iM[e.targetResolution]??10;return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["seedvrUpscale",0,iI],965758);let iw=(0,iv.defineModel)({id:"seedvr",name:"SeedVR",description:"High-quality image upscaling model by fal.ai",metadata:{creator:"seedvr"},capabilities:{upscale:iI}});e.s(["seedvrModel",0,iw],466390);var iC=t;let iR=(0,t.defineCapability)({id:"wai-ani-nsfw-ponyxl:image2image",name:"WAI-ANI PonyXL Image to Image",inputSchema:em,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["waiAniNsfwPonyxlImage2Image",0,iR],747887);let iE=(0,t.defineCapability)({id:"wai-ani-nsfw-ponyxl:text2image",name:"WAI-ANI PonyXL Text to Image",inputSchema:ef,outputSchema:eh,getBusinessDetails:e=>{let t=ea,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["waiAniNsfwPonyxlText2Image",0,iE],978213);let iA=(0,iC.defineModel)({id:"wai-ani-nsfw-ponyxl",name:"WAI-ANI PonyXL",description:"Pony-based SDXL anime checkpoint from CivitAI (WAI-ANI-PONYXL v6.0).",metadata:{creator:"Fal"},capabilities:{text2image:iE,image2image:iR}});e.s(["waiAniNsfwPonyxlModel",0,iA],834651);var iP=t,iT=i,ik=t,iD=i,iB=t;let ij=4e6;function iO(e,t){let i,a;if("auto"===t)return{width:1024,height:1024};let n=Number.parseInt(e.split("x")[0]||"1024",10);switch(t){case"1:1":default:i=n,a=n;break;case"3:4":i=Math.round(3/4*n),a=n;break;case"4:3":i=n,a=Math.round(3/4*n);break;case"9:16":i=Math.round(9/16*n),a=n;break;case"16:9":i=n,a=Math.round(9/16*n)}let r=i*a;if(r>ij){let e=Math.sqrt(ij/r);i=Math.round(i*e),a=Math.round(a*e)}return{width:i,height:a}}let iV=["1:1","3:4","4:3","9:16","16:9","auto"],iN=["1024x1024","1536x1536","2000x2000"],iF=iD.z.object({prompt:iD.z.string().min(1),imageCount:iD.z.number().int().min(1).max(8).default(1),quality:iD.z.enum(["low","medium","high"]).default("medium").describe("Quality level: low (1 step, fastest), medium (4 steps), high (8 steps)"),aspectRatio:iD.z.enum(iV).default("1:1").optional().describe("Aspect ratio; 'auto' = default size (t2i) or match reference image (i2i)"),resolution:iD.z.enum(iN).default("1024x1024").optional(),autoEnhancePrompt:iD.z.boolean().optional()}),iU=iD.z.object({images:iD.z.array(iD.z.object({url:iD.z.string(),thumbnailUrl:iD.z.string().optional(),width:iD.z.number(),height:iD.z.number()})),seed:iD.z.number().optional()}),iq=(0,iB.defineCapability)({id:"z-image:text2image",name:"Z-Image Text to Image",inputSchema:iF,outputSchema:iU,getBusinessDetails:e=>{let t,{width:i,height:a}=iO(e.resolution||"1024x1024",e.aspectRatio||"1:1"),n=i*a/1e6;t=n<=1?5:n<=2?8:5+Math.ceil((n-1)*3);let r=e.imageCount,o=t*r;return{unitCredits:t,quantity:r,totalCredits:o}}});e.s(["getZImageDimensions",()=>iO,"zImageText2Image",0,iq],40336);let iL=["1:1","3:4","4:3","9:16","16:9","auto"],i$=["1024x1024","1536x1536","2000x2000"],iH=iT.z.object({prompt:iT.z.string().min(1),referenceImages:iT.z.array(iT.z.object({url:iT.z.string()})).min(1).max(1),imageCount:iT.z.number().int().min(1).max(8).default(1),quality:iT.z.enum(["low","medium","high"]).default("medium").describe("Quality level: low (1 step, fastest), medium (4 steps), high (8 steps)"),strength:iT.z.number().min(0).max(1).default(.25).describe("Creativity level: 0 (closer to original) to 1 (more different)"),aspectRatio:iT.z.enum(iL).default("1:1").optional().describe("Aspect ratio; 'auto' = match reference image size"),resolution:iT.z.enum(i$).default("1024x1024").optional()}),iK=iT.z.object({images:iT.z.array(iT.z.object({url:iT.z.string(),thumbnailUrl:iT.z.string().optional(),width:iT.z.number(),height:iT.z.number()})),seed:iT.z.number().optional()}),iG=(0,ik.defineCapability)({id:"z-image:image2image",name:"Z-Image Image to Image",inputSchema:iH,outputSc
1hema:iK,getBusinessDetails:e=>{let t,{width:i,height:a}=iO(e.resolution||"1024x1024",e.aspectRatio||"1:1"),n=i*a/1e6;t=n<=1?5:n<=2?8:5+Math.ceil((n-1)*3);let r=e.imageCount,o=t*r;return{unitCredits:t,quantity:r,totalCredits:o}}});e.s(["zImageImage2Image",0,iG],377376);let iX=(0,iP.defineModel)({id:"z-image",name:"Z-Image",description:"Text-to-image generation model",metadata:{creator:"Fal"},capabilities:{text2image:iq,image2image:iG}});e.s(["zImageModel",0,iX],587920);var iZ=t,iW=i,iY=t;let iJ=iW.z.object({prompt:iW.z.string().min(1,"Text is required"),referenceAudio:iW.z.string().url("Reference audio URL is required")}),iQ=iW.z.object({url:iW.z.string()}),i0=(0,iY.defineCapability)({id:"fish-s2-1-pro:voice-clone",name:"OpenArt Voice Clone",inputSchema:iJ,outputSchema:iQ,getBusinessDetails:e=>{let t=20*Math.ceil(new TextEncoder().encode(e.prompt).length/2e3);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["fishS21ProVoiceClone",0,i0],329320);let i1=(0,iZ.defineModel)({id:"fish-s2-1-pro",name:"OpenArt Voice Clone",capabilities:{voiceClone:i0}});e.s(["fishS21ProModel",0,i1],905113);var i2=t,i3=i,i4=t,i6=e.i(944029);let i5=3,i8=1,i9=10,i7=10,ae=13,at={minDuration:1,maxDuration:10,maxFileSizeBytes:0x6400000},ai=2,aa=10,an={minDuration:2,maxDuration:10,maxFileSizeBytes:0x6400000};e.s(["GEMINI_OMNI_1_1_FLASH_EXTEND_VIDEO_CONSTRAINTS",0,an,"GEMINI_OMNI_1_1_FLASH_MAX_REFERENCES",0,ae,"GEMINI_OMNI_1_1_FLASH_MAX_REFERENCE_IMAGES",0,i7,"GEMINI_OMNI_1_1_FLASH_MAX_REFERENCE_VIDEOS",0,i5,"GEMINI_OMNI_1_1_FLASH_MAX_REFERENCE_VIDEO_SECONDS",0,i9,"GEMINI_OMNI_1_1_FLASH_MAX_SOURCE_VIDEO_SECONDS",0,aa,"GEMINI_OMNI_1_1_FLASH_MIN_REFERENCE_VIDEO_SECONDS",0,i8,"GEMINI_OMNI_1_1_FLASH_MIN_SOURCE_VIDEO_SECONDS",0,ai,"GEMINI_OMNI_1_1_FLASH_REFERENCE_VIDEO_CONSTRAINTS",0,at],884589);var ar=i;let ao=["360p","720p","1080p","4k"],as=["16:9","9:16"],au=3,ad=10,al=5,ac="720p",af={"360p":15,"720p":50,"1080p":75,"4k":150},am=ar.z.object({videoCount:ar.z.number().int().min(1).max(8).default(1),duration:ar.z.number().int().min(au).max(ad).default(al).catch(al),aspectRatio:ar.z.enum(as).default("16:9").catch("16:9"),resolution:ar.z.enum(ao).default(ac).catch(ac)}),ah=ar.z.object({url:ar.z.string(),thumbnailUrl:ar.z.string().optional(),duration:ar.z.number()});function ap(e){let t=af[e.resolution]*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}e.s(["GEMINI_OMNI_1_1_FLASH_ASPECT_RATIOS",0,as,"GEMINI_OMNI_1_1_FLASH_MAX_DURATION_S",0,ad,"GEMINI_OMNI_1_1_FLASH_MIN_DURATION_S",0,au,"GEMINI_OMNI_1_1_FLASH_RESOLUTIONS",0,ao,"getOmni11VideoBusinessDetails",()=>ap,"omni11VideoOutputSchema",0,ah,"omni11VideoOutputSettingsSchema",0,am],732337);let ab=am.omit({videoCount:!0,aspectRatio:!0}).extend({prompt:i3.z.string().trim().default(""),videoReference:(0,i6.createVideoReferenceWithDurationSchema)({minDuration:ai,maxDuration:aa})}),ag=(0,i4.defineCapability)({id:"gemini-omni-1-1-flash:extendVideo",name:"Gemini Omni 1.1 Flash Extend Video",inputSchema:ab,outputSchema:ah,getBusinessDetails:ap});e.s(["geminiOmni11FlashExtendVideo",0,ag],786835);var av=i,ay=t;let ax=av.z.object({type:av.z.literal("image"),id:av.z.string(),url:av.z.string(),label:av.z.string(),metadata:av.z.custom().optional()}),az=am.extend({prompt:av.z.string().optional(),startFrame:ax,endFrame:ax.nullable().optional()}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),a_=(0,ay.defineCapability)({id:"gemini-omni-1-1-flash:image2video",name:"Gemini Omni 1.1 Flash Image to Video",inputSchema:az,outputSchema:ah,getBusinessDetails:ap});e.s(["geminiOmni11FlashImage2Video",0,a_],482453);var aS=i,aM=t,aI=i6;let aw=aS.z.object({type:aS.z.enum(["image","element","character"]),id:aS.z.string(),url:aS.z.string(),label:aS.z.string()}),aC=(0,aI.createVideoReferenceWithDurationSchema)({minDuration:i8,maxDuration:i9}),aR=aS.z.union([aw,aC]),aE=am.extend({prompt:aS.z.string().trim().default(""),visualReferences:aS.z.array(aR).min(1).max(ae)}).superRefine((e,t)=>{e.visualReferences.filter(e=>"video"!==e.type).length>i7&&t.addIssue({code:"custom",message:`Maximum ${i7} reference images allowed`,path:["visualReferences"]}),e.visualReferences.filter(e=>"video"===e.type).length>i5&&t.addIssue({code:"custom",message:`Maximum ${i5} reference videos allowed`,path:["visualReferences"]})}),aA=(0,aM.defineCapability)({id:"gemini-omni-1-1-flash:reference2video",name:"Gemini Omni 1.1 Flash Reference to Video",inputSchema:aE,outputSc
1hema:ah,getBusinessDetails:ap});e.s(["geminiOmni11FlashReference2Video",0,aA],495910);var aP=i,aT=t;let ak=am.extend({prompt:aP.z.string().min(1)}),aD=(0,aT.defineCapability)({id:"gemini-omni-1-1-flash:text2video",name:"Gemini Omni 1.1 Flash Text to Video",inputSchema:ak,outputSchema:ah,getBusinessDetails:ap});e.s(["geminiOmni11Flash",0,aD],710015);let aB=(0,i2.defineModel)({id:"gemini-omni-1-1-flash",name:"Gemini Omni 1.1 Flash",description:"Google Gemini Omni 1.1 Flash — text, reference and first/last-frame video generation up to 4K, plus clip extension.",metadata:{creator:"Google",tier:"flagship",aliases:["Gemini Omni 1.1","Omni 1.1","Omni 1.1 Flash"]},capabilities:{text2video:aD,image2video:a_,reference2video:aA,extendVideo:ag}});e.s(["geminiOmni11FlashModel",0,aB],691188);var aj=t,aO=i,aV=t,aN=i;let aF=50,aU=aN.z.object({url:aN.z.string(),thumbnailUrl:aN.z.string().optional(),duration:aN.z.number()});function aq(e){let t=aF*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}function aL(e){return Math.min(10,Math.max(1,Math.floor(e??5)))}e.s(["GEMINI_OMNI_FLASH_CREDITS_PER_SECOND",0,aF,"clampOmniModifyDuration",()=>aL,"getOmniVideoBusinessDetails",()=>aq,"omniVideoOutputSchema",0,aU],914792);let a$=aO.z.object({type:aO.z.literal("image"),id:aO.z.string(),url:aO.z.string(),label:aO.z.string(),metadata:aO.z.custom().optional()}),aH=aO.z.object({prompt:aO.z.string().optional(),videoCount:aO.z.number().int().min(1).max(8).default(1),startFrame:a$,duration:aO.z.number().int().min(3).max(10).default(5).catch(5),aspectRatio:aO.z.enum(["16:9","9:16"]).default("16:9").catch("16:9")}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),aK=(0,aV.defineCapability)({id:"gemini-omni-flash:image2video",name:"Gemini Omni Flash Image to Video",inputSchema:aH,outputSchema:aU,getBusinessDetails:aq});e.s(["geminiOmniFlashImage2Video",0,aK],955010);var aG=i,aX=t,aZ=i6;let aW=(0,aZ.createVideoReferenceWithDurationSchema)({minDuration:1,maxDuration:10}).superRefine((e,t)=>{let i=e.metadata?.duration;null!=i&&i>10&&t.addIssue({code:"custom",message:`Video too long. The source must be 10s or less, your video: ${(0,aZ.formatDuration)(i)}s.`,path:["metadata","duration"]})}),aY=aG.z.object({prompt:aG.z.string().trim().min(1),videoReference:aW}),aJ=(0,aX.defineCapability)({id:"gemini-omni-flash:modify-video",name:"Gemini Omni Flash Modify Video",inputSchema:aY,outputSchema:aU,getBusinessDetails:e=>{let t=aF*aL(e.videoReference?.metadata?.duration);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["geminiOmniFlashModifyVideo",0,aJ],346476);var aQ=i,a0=t;let a1=aQ.z.object({type:aQ.z.enum(["image","element","character"]),id:aQ.z.string(),url:aQ.z.string(),label:aQ.z.string()}),a2=aQ.z.object({prompt:aQ.z.string().min(1),videoCount:aQ.z.number().int().min(1).max(8).default(1),duration:aQ.z.number().int().min(3).max(10).default(5).catch(5),aspectRatio:aQ.z.enum(["16:9","9:16"]).default("16:9").catch("16:9"),visualReferences:aQ.z.array(a1).min(1).max(5)}),a3=(0,a0.defineCapability)({id:"gemini-omni-flash:reference2video",name:"Gemini Omni Flash Reference to Video",inputSchema:a2,outputSchema:aU,getBusinessDetails:aq});e.s(["geminiOmniFlashReference2Video",0,a3],76798);var a4=i,a6=t;let a5=a4.z.object({prompt:a4.z.string().min(1),videoCount:a4.z.number().int().min(1).max(8).default(1),duration:a4.z.number().int().min(3).max(10).default(5).catch(5),aspectRatio:a4.z.enum(["16:9","9:16"]).default("16:9").catch("16:9")}),a8=(0,a6.defineCapability)({id:"gemini-omni-flash:text2video",name:"Gemini Omni Flash Text to Video",inputSchema:a5,outputSchema:aU,getBusinessDetails:aq});e.s(["geminiOmniFlash",0,a8],120213);let a9=(0,aj.defineModel)({id:"gemini-omni-flash",name:"Gemini Omni Flash",description:"Google Gemini Omni Flash — conversational text-to-video generation.",metadata:{creator:"Google",tier:"flagship",aliases:["Gemini Omni","Omni Flash"]},capabilities:{text2video:a8,image2video:aK,reference2video:a3,"modify-video":aJ}});e.s(["geminiOmniFlashModel",0,a9],509045)},386777,746872,980796,360253,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=t,n=i;let r=n.z.array(n.z.string().url().refine(e=>e.startsWith("https://cdn.openart.ai/"),{message:"Image URL must be from cdn.openart.ai"})).max(10).optional(),o=n.z.object({url:n.z.string()}),s={prompt:n.z.string().trim().min(1).max(1e4),bpm:n.z.number().int().min(40).max(300).optional(),intensity:n.z.number().int().min(1).max(10).optional(),key:n.z.string().trim().min(1).max(30).regex(/^[A-Za-z0-9#b ]+$/,{message:"Key must contain only letters, numbers, sharps (#), flats (b), and spaces"}).optional(),instrumental:n.z.boolean().default(!1),lyrics:n.z.string().max(5e3).optional(),outputFormat:n.z.enum(["mp3"]).default("mp3"),images:r},u=i.z.object(s),d=(0,a.defineCapability)({id:"lyria-3-clip-preview:text2music",name:"Lyria 3 Clip Preview Text to Music",inputSchema:u,outputSc
1hema:o,getBusinessDetails:e=>({unitCredits:25,quantity:1,totalCredits:25})});e.s(["lyria3ClipPreviewText2Music",0,d],746872);let l=(0,t.defineModel)({id:"lyria-3-clip-preview",name:"Lyria 3 Clip Preview",description:"Google Lyria 3 clip-preview text-to-music generation (30s)",metadata:{creator:"Google"},capabilities:{text2music:d}});e.s(["lyria3ClipPreviewModel",0,l],386777);var c=t,f=i,m=t;let h=f.z.object({...s,duration:f.z.number().int().min(1).max(184).optional()}),p=(0,m.defineCapability)({id:"lyria-3-pro-preview:text2music",name:"Lyria 3 Pro Preview Text to Music",inputSchema:h,outputSchema:o,getBusinessDetails:e=>({unitCredits:50,quantity:1,totalCredits:50})});e.s(["lyria3ProPreviewText2Music",0,p],980796);let b=(0,c.defineModel)({id:"lyria-3-pro-preview",name:"Lyria 3 Pro Preview",description:"Google Lyria 3 pro-preview text-to-music generation (1–184s)",metadata:{creator:"Google"},capabilities:{text2music:p}});e.s(["lyria3ProPreviewModel",0,b],360253)},351027,819572,21329,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(200744),n=t,r=e.i(983467);let o=i.z.object({prompt:i.z.string().min(1),references:i.z.array(a.referenceSchema).min(1),imageCount:i.z.number().int().min(1).max(8).default(1),aspectRatio:r.aspectRatioSchema.optional()}),s=i.z.object({images:i.z.array(i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional()})),seed:i.z.number().optional()}),u=(0,n.defineCapability)({id:"nano-banana:image2image",name:"Nano Banana Image to Image",inputSchema:o,outputSchema:s,getBusinessDetails:e=>{let t=15,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["nanoBananaImage2Image",0,u],819572);var d=i,l=t,c=r;let f=d.z.object({prompt:d.z.string().min(1),imageCount:d.z.number().int().min(1).max(8).default(1),aspectRatio:c.aspectRatioSchema,autoEnhancePrompt:d.z.boolean().optional()}),m=d.z.object({images:d.z.array(d.z.object({url:d.z.string(),thumbnailUrl:d.z.string().optional()})),seed:d.z.number().optional()}),h=(0,l.defineCapability)({id:"nano-banana:text2image",name:"Nano Banana Text to Image",inputSchema:f,outputSchema:m,getBusinessDetails:e=>{let t=15,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["nanoBananaText2Image",0,h],21329);let p=(0,t.defineModel)({id:"nano-banana",name:"Nano Banana",description:"A demo text-to-image model for testing.",metadata:{creator:"Google",tier:"legacy",aliases:["谷歌","Gemini Image"]},capabilities:{text2image:h,image2image:u}});e.s(["nanoBananaModel",0,p],351027)},257556,e=>{"use strict";var t=e.i(402390);let i=t.default.enum(["21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16"]),a=t.default.enum(["1K","2K","4K"]);e.s(["aspectRatioSchema",0,i,"resolutionSchema",0,a])},560394,610265,830883,331283,683480,562607,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(200744),n=t,r=e.i(257556);let o=i.z.object({prompt:i.z.string().min(1),references:i.z.array(a.referenceSchema).min(1),imageCount:i.z.number().int().min(1).max(8).default(1),aspectRatio:r.aspectRatioSchema.optional(),resolution:r.resolutionSchema.optional()}),s=i.z.object({images:i.z.array(i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional()})),seed:i.z.number().optional()}),u=(0,n.defineCapability)({id:"nano-banana-2:image2image",name:"Nano Banana 2 Image to Image",inputSchema:o,outputSchema:s,getBusinessDetails:e=>{let t={"1K":20,"2K":30,"4K":50}[e.resolution??"1K"],i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["nanoBanana2Image2Image",0,u],610265);var d=i,l=t,c=r;let f=d.z.object({prompt:d.z.string().min(1),imageCount:d.z.number().int().min(1).max(8).default(1),aspectRatio:c.aspectRatioSchema,resolution:c.resolutionSchema,autoEnhancePrompt:d.z.boolean().optional()}),m=d.z.object({images:d.z.array(d.z.object({url:d.z.string(),thumbnailUrl:d.z.string().optional()})),seed:d.z.number().optional()}),h=(0,l.defineCapability)({id:"nano-banana-2:text2image",name:"Nano Banana 2 Text to Image",inputSchema:f,outputSchema:m,getBusinessDetails:e=>{let t={"1K":20,"2K":30,"4K":50},i=t[e.resolution]??t["1K"],a=e.imageCount,n=i*a;return{unitCredits:i,quantity:a,totalCredits:n}}});e.s(["nanoBanana2Text2Image",0,h],830883);let p=(0,t.defineModel)({id:"nano-banana-2",name:"Nano Banana 2",description:"Google's Gemini 3.1 Flash image generation model.",metadata:{creator:"Google",tier:"latest",aliases:["谷歌","Gemini 3.1 Flash Image","Gemini Image"]},capabilities:{text2image:h,image2image:u}});e.s(["nanoBanana2Model",0,p],560394);var b=t,g=i,v=a,y=t,x=e.i(983467);let z=g.z.object({prompt:g.z.string().min(1),references:g.z.array(v.referenceSchema).min(1),imageCount:g.z.number().int().min(1).max(8).default(1),aspectRatio:x.aspectRatioSchema.optional()}),_=g.z.object({images:g.z.array(g.z.object({url:g.z.string(),thumbnailUrl:g.z.string().optional()})),seed:g.z.number().optional()}),S=(0,y.defineCapability)({id:"nano-banana-2-lite:image2image",name:"Nano Banana 2 Lite Image to Image",inputSchema:z,outputSc
1hema:_,getBusinessDetails:e=>{let t=15,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["nanoBanana2LiteImage2Image",0,S],331283);var M=i,I=t,w=x;let C=M.z.object({prompt:M.z.string().min(1),imageCount:M.z.number().int().min(1).max(8).default(1),aspectRatio:w.aspectRatioSchema,autoEnhancePrompt:M.z.boolean().optional()}),R=M.z.object({images:M.z.array(M.z.object({url:M.z.string(),thumbnailUrl:M.z.string().optional()})),seed:M.z.number().optional()}),E=(0,I.defineCapability)({id:"nano-banana-2-lite:text2image",name:"Nano Banana 2 Lite Text to Image",inputSchema:C,outputSchema:R,getBusinessDetails:e=>{let t=15,i=e.imageCount,a=t*i;return{unitCredits:t,quantity:i,totalCredits:a}}});e.s(["nanoBanana2LiteText2Image",0,E],683480);let A=(0,b.defineModel)({id:"nano-banana-2-lite",name:"Nano Banana 2 Lite",description:"High-efficiency Gemini image model: Nano Banana 1-level quality at lower cost and latency.",metadata:{creator:"Google",tier:"fast",aliases:["Gemini Image"]},capabilities:{text2image:E,image2image:S}});e.s(["nanoBanana2LiteModel",0,A],562607)},968411,e=>{"use strict";var t=e.i(625468),i=e.i(665230),a=e.i(13671);let n=(0,t.defineModel)({id:"nano-banana-pro",name:"Nano Banana Pro",description:"Nano Banana Pro — 4K text-to-image and image editing model by Google (Gemini 3 Pro Image).",metadata:{creator:"Google",tier:"flagship",aliases:["Gemini 3 Pro Image","gemini-3-pro-image","谷歌"]},capabilities:{text2image:a.nanoBananaProText2Image,image2image:i.nanoBananaProImage2Image}});e.s(["nanoBananaProModel",0,n])},19527,e=>{"use strict";var t=e.i(207653),i=e.i(625468);let a=t.z.object({type:t.z.enum(["image","element","character"]),id:t.z.string(),url:t.z.string(),label:t.z.string()}),n=t.z.object({prompt:t.z.string().min(1),resolution:t.z.enum(["720p","1080p","4k"]).default("720p").catch("720p"),duration:t.z.literal(8).default(8).catch(8),aspectRatio:t.z.enum(["16:9","9:16","auto"]).default("16:9").catch("16:9"),generateAudio:t.z.boolean().default(!0).catch(!0),mode:t.z.enum(["fast","normal"]).default("normal").catch("normal"),videoCount:t.z.number().int().min(1).max(8).default(1),visualReferences:t.z.array(a).min(1).max(3)}),r=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),duration:t.z.number()}),o={"720p":{fast:{audio:35,noAudio:35},normal:{audio:135,noAudio:70}},"1080p":{fast:{audio:40,noAudio:35},normal:{audio:135,noAudio:70}},"4k":{fast:{audio:100,noAudio:100},normal:{audio:200,noAudio:135}}},s=(e,t,i,a)=>{let n=o[a]?.[i];return(n?t?n.audio:n.noAudio:70)*e},u=(0,i.defineCapability)({id:"veo3-1:reference2video",name:"Veo 3.1 Reference to Video",inputSchema:n,outputSchema:r,getBusinessDetails:e=>{let t=s(e.duration,e.generateAudio,e.mode,e.resolution);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["veo31Reference2Video",0,u])},919746,e=>{"use strict";var t=e.i(625468),i=e.i(708783),a=e.i(19527),n=e.i(267646);let r=(0,t.defineModel)({id:"veo3-1",name:"Veo 3.1",description:"Google Veo 3.1 — latest text/image/reference-to-video model.",metadata:{creator:"Google",tier:"flagship",aliases:["Google Veo","Veo","谷歌"]},capabilities:{text2video:n.veo31,image2video:i.veo31Image2Video,reference2video:a.veo31Reference2Video}});e.s(["veo31Model",0,r])},518870,936459,9882,697064,628119,983662,706839,516120,522135,82776,122152,536853,615090,741159,99290,71814,430920,651681,223630,633388,975547,825443,73617,60655,472735,770568,661194,539240,544583,105702,205751,479940,862732,443184,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(402587),n=t;let r=i.z.object({image:i.z.string().trim().min(1),audio:i.z.string().trim().min(1),duration:i.z.number().int().min(1).max(60),prompt:i.z.string().trim().max(a.DEFAULT_PROMPT_MAX_CHARACTERS).default("").catch(""),resolution:i.z.number().int().min(540).max(720).default(720).catch(720),ratio:i.z.enum(["16:9","9:16","1:1"]).default("16:9").catch("16:9")}),o=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional()}),s=(0,n.defineCapability)({id:"hedra:character",name:"Hedra Character",inputSchema:r,outputSc
1hema:o,getBusinessDetails:e=>{if(!e.image||!e.audio||!e.duration)throw Error("Required fields missing");let t=15;return{unitCredits:Math.ceil(e.duration)*t,quantity:1,totalCredits:Math.ceil(e.duration)*t}}});e.s(["hedraCharacter",0,s],936459);let u=(0,t.defineModel)({id:"hedra:character",name:"Hedra Character",description:"Hedra Character generation model by Hedra",metadata:{creator:"Hedra"},capabilities:{character:s}});e.s(["hedraCharacterModel",0,u],518870);var d=t,l=i,c=t,f=i,m=e.i(200744),h=e.i(944029),p=e.i(981499);let b=720,g=2160,v=0xc800000,y=m.videoReferenceSchema.extend({metadata:f.z.custom(e=>"object"==typeof e&&null!==e,{message:"Invalid video metadata"}).superRefine((e,t)=>{let i=e.duration;if(null==i)return void t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["duration"]});if(i<3)return void t.addIssue({code:"custom",message:`Video too short. Minimum: 3s, your video: ${(0,h.formatDuration)(i)}s.`,path:["duration"]});Math.round(i)>10&&t.addIssue({code:"custom",message:`Video too long. Maximum: 10s, your video: ${(0,h.formatDuration)(i)}s.`,path:["duration"]});let{width:a,height:n}=e,r=e=>e<b||e>g;null!=a&&null!=n&&(r(a)||r(n))&&t.addIssue({code:"custom",message:`Video dimensions must be between ${b}px and ${g}px on each side. Your video: ${a}\xd7${n}px.`,path:["dimensions"]});let o=e.file_size_bytes;null!=o&&o>v&&t.addIssue({code:"custom",message:`Video file too large. Maximum: ${Math.round(v/1048576)}MB, your video: ${Math.round(o/1048576)}MB.`,path:["fileSize"]})})}),x=f.z.object({index:f.z.number().int(),prompt:f.z.string().max(512).refine(e=>e.trim().length>0),duration:f.z.number().int().min(1)});function z(e){let t=!0===e.generateSound||"on"===e.generateSound;if("std"===e.resolution)return t?35:25;if("pro"===e.resolution)return t?40:35;if("4k"===e.resolution)return 120;throw Error(`Invalid resolution: ${e.resolution}`)}function _(e){return"pro"===e?50:35}e.s(["getKling3OmniReferenceVideoCredits",()=>_,"getKling3OmniVideoCreditsPerSecond",()=>z,"multiPromptSchema",0,x,"videoReferenceWithDurationSchema",0,y],9882);var S=p;e.s(["characterReferenceSchema",()=>S.klingCharacterReferenceSchema],697064);var S=p,M=m,I=p;e.s(["imageReferenceSchema",()=>I.klingImageReferenceSchema],628119);var I=p;let w={generateSound:l.z.boolean().default(!0),resolution:l.z.enum(["std","pro","4k"]).default("std"),aspectRatio:l.z.enum(["16:9","9:16","1:1"]).default("16:9"),duration:l.z.number().int().min(3).max(15).default(5),visualReferences:l.z.array(l.z.union([I.klingImageReferenceSchema,S.klingCharacterReferenceSchema,M.elementReferenceSchema])).min(1).max(7)},C=l.z.object({...w,multiShot:l.z.literal(!1).default(!1),prompt:l.z.string().trim().min(1).max(2500),shotType:l.z.enum(["customize"]).optional(),multiPrompt:l.z.array(l.z.unknown()).optional(),videoCount:l.z.number().int().min(1).max(8).default(1)}),R=l.z.object({...w,multiShot:l.z.literal(!0),videoCount:l.z.number().int().min(1).max(8).default(1),prompt:l.z.string().trim().max(2500).default(""),shotType:l.z.literal("customize").default("
1customize"),multiPrompt:x.array().min(1).max(6)}).refine(e=>e.multiPrompt.reduce((e,t)=>e+t.duration,0)===e.duration,{message:"Total duration of all shots must be equal to the overall duration",path:["multiPrompt"]}),E=l.z.discriminatedUnion("multiShot",[C,R]),A=l.z.object({url:l.z.string(),thumbnailUrl:l.z.string().optional()}),P=(0,c.defineCapability)({id:"kling-3-omni:element2video",name:"Kling 3.0 Omni Element to Video",inputSchema:E,outputSchema:A,getBusinessDetails:e=>{let t=z(e),i=e.duration*t;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["element2VideoMultiShotSchema",0,R,"element2VideoSingleShotSchema",0,C,"kling3OmniElement2Video",0,P],983662);var T=i,k=t,S=p,D=m,I=p;let B=T.z.object({prompt:T.z.string().trim().min(1).max(2500),resolution:T.z.enum(["1k","2k","4k"]).default("1k"),resultType:T.z.enum(["single","series"]).default("single"),seriesAmount:T.z.number().int().min(2).max(9).default(4),aspectRatio:T.z.enum(["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9","auto"]).default("4:3"),visualReferences:T.z.array(T.z.union([I.klingImageReferenceSchema,D.elementReferenceSchema,S.klingCharacterReferenceSchema])).min(1).max(10),imageCount:T.z.number().int().min(1).max(8).default(1)}),j=T.z.object({url:T.z.string(),thumbnailUrl:T.z.string()}),O=(0,k.defineCapability)({id:"kling-3-omni:image2image",name:"Kling 3.0 Omni Image to Image",inputSchema:B,outputSchema:j,getBusinessDetails:e=>{let t="4k"===e.resolution?20:10;return{unitCredits:t,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["kling3OmniImage2Image",0,O],706839);var V=i,N=t,S=p,I=p;let F={generateSound:V.z.boolean().default(!0),resolution:V.z.enum(["std","pro","4k"]).default("std"),duration:V.z.number().int().min(3).max(15).default(5),startFrame:V.z.union([I.klingImageReferenceSchema,S.klingCharacterReferenceSchema]),endFrame:V.z.union([I.klingImageReferenceSchema,S.klingCharacterReferenceSchema]).nullable().optional()},U=V.z.object({...F,multiShot:V.z.literal(!1).default(!1),videoCount:V.z.number().int().min(1).max(8).default(1),prompt:V.z.string().max(2500).refine(e=>e.trim().length>0),shotType:V.z.enum(["customize"]).optional(),multiPrompt:V.z.array(V.z.unknown()).optional()}),q=V.z.object({...F,multiShot:V.z.literal(!0),videoCount:V.z.number().int().min(1).max(8).default(1),prompt:V.z.string().default(""),shotType:V.z.literal("customize").default("
1customize"),multiPrompt:x.array().min(1).max(6)}).refine(e=>e.multiPrompt.reduce((e,t)=>e+t.duration,0)===e.duration,{message:"Total duration of all shots must be equal to the overall duration",path:["multiPrompt"]}),L=V.z.discriminatedUnion("multiShot",[U,q]),$=V.z.object({url:V.z.string(),thumbnailUrl:V.z.string().optional()}),H=(0,N.defineCapability)({id:"kling-3-omni:image2video",name:"Kling 3.0 Omni Image to Video",inputSchema:L,outputSchema:$,getBusinessDetails:e=>{let t=z(e),i=e.duration*t;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["kling3OmniImage2Video",0,H],516120);var K=i,G=t,S=p,X=m,I=p;let Z=K.z.number().min(3).max(10),W=K.z.object({prompt:K.z.string().trim().min(1).max(2500),multiShot:K.z.boolean().default(!1),shotType:K.z.enum(["customize"]).optional(),multiPrompt:x.array().optional(),resolution:K.z.enum(["std","pro"]).default("std"),videoReference:y,visualReferences:K.z.array(K.z.union([I.klingImageReferenceSchema,S.klingCharacterReferenceSchema,X.elementReferenceSchema])).max(4).nullable().optional(),duration:Z,keepOriginalSound:K.z.boolean().default(!1)}),Y=K.z.object({url:K.z.string(),thumbnailUrl:K.z.string().optional()}),J=(0,G.defineCapability)({id:"kling-3-omni:modify-video",name:"Kling 3.0 Omni Modify Video",inputSchema:W,outputSchema:Y,getBusinessDetails:e=>{let t=_(e.resolution),i=Math.round(e.duration)*t;return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["kling3OmniModifyVideo",0,J],522135);var Q=i,ee=m,et=t,ei=h,S=p,I=p;let ea=720,en=2160,er=0xc800000,eo=Q.z.object({prompt:Q.z.string().trim().min(1).max(2500),multiShot:Q.z.boolean().default(!1),shotType:Q.z.enum(["customize"]).optional(),multiPrompt:x.array().optional(),resolution:Q.z.enum(["std","pro"]).default("std"),aspectRatio:Q.z.enum(["16:9","9:16","1:1"]).default("16:9"),duration:Q.z.number().int().min(3).max(10).default(5),videoReference:ee.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata?.duration;null!=i&&i<3&&t.addIssue({code:"custom",message:`Video too short. Minimum: 3s, your video: ${(0,ei.formatDuration)(i)}s.`,path:["metadata","duration"]}),null!=i&&Math.round(i)>10&&t.addIssue({code:"custom",message:`Video too long. Maximum: 10s, your video: ${(0,ei.formatDuration)(i)}s.`,path:["metadata","duration"]});let{width:a,height:n}=e.metadata??{},r=e=>e<ea||e>en;null!=a&&null!=n&&(r(a)||r(n))&&t.addIssue({code:"custom",message:`Video dimensions must be between ${ea}px and ${en}px on each side. Your video: ${a}\xd7${n}px.`,path:["metadata","dimensions"]});let o=e.metadata?.file_size_bytes;null!=o&&o>er&&t.addIssue({code:"custom",message:`Video file too large. Maximum: ${Math.round(er/1048576)}MB, your video: ${Math.round(o/1048576)}MB.`,path:["metadata","fileSize"]})}),visualReferences:Q.z.array(Q.z.union([I.klingImageReferenceSchema,S.klingCharacterReferenceSchema,ee.elementReferenceSchema])).max(4).default([]).optional(),keepOriginalSound:Q.z.boolean().default(!1),videoCount:Q.z.number().int().min(1).max(8).default(1)}),es=Q.z.object({url:Q.z.string(),thumbnailUrl:Q.z.string().optional()}),eu=(0,et.defineCapability)({id:"kling-3-omni:reference-video",name:"Kling 3.0 Omni Reference Video",inputSchema:eo,outputSchema:es,getBusinessDetails:e=>{let t=_(e.resolution),i=e.duration*t;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["kling3OmniReferenceVideo",0,eu],82776);var ed=i,el=t;let ec=ed.z.object({prompt:ed.z.string().trim().min(1).max(2500),resolution:ed.z.enum(["1k","2k","4k"]).default("1k"),resultType:ed.z.enum(["single","series"]).default("single"),seriesAmount:ed.z.number().int().min(2).max(9).default(4),aspectRatio:ed.z.enum(["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9"]).default("4:3"),imageCount:ed.z.number().int().min(1).max(8).default(1),autoEnhancePrompt:ed.z.boolean().optional()}),ef=ed.z.object({url:ed.z.string(),thumbnailUrl:ed.z.string()}),em=(0,el.defineCapability)({id:"kling-3-omni:text2image",name:"Kling 3.0 Omni Text to Image",inputSchema:ec,outputSchema:ef,getBusinessDetails:e=>{let t="4k"===e.resolution?20:10;return{unitCredits:t,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["kling3OmniText2Image",0,em],122152);var eh=i,ep=t;let eb={generateSound:eh.z.boolean().default(!0),resolution:eh.z.enum(["std","pro","4k"]).default("std"),aspectRatio:eh.z.enum(["16:9","9:16","1:1"]).default("16:9"),duration:eh.z.number().int().min(3).max(15).default(5)}
1,eg=eh.z.object({...eb,multiShot:eh.z.literal(!1).default(!1),prompt:eh.z.string().trim().min(1).max(2500),videoCount:eh.z.number().int().min(1).max(8).default(1),shotType:eh.z.enum(["customize"]).optional(),multiPrompt:eh.z.array(eh.z.unknown()).optional(),autoEnhancePrompt:eh.z.boolean().optional()}),ev=eh.z.object({...eb,multiShot:eh.z.literal(!0),videoCount:eh.z.number().int().min(1).max(8).default(1),prompt:eh.z.string().trim().max(2500).default(""),shotType:eh.z.literal("customize").default("customize"),multiPrompt:x.array().min(1).max(6),autoEnhancePrompt:eh.z.boolean().optional()}).refine(e=>e.multiPrompt.reduce((e,t)=>e+t.duration,0)===e.duration,{message:"Total duration of all shots must be equal to the overall duration",path:["multiPrompt"]}),ey=eh.z.discriminatedUnion("multiShot",[eg,ev]),ex=eh.z.object({url:eh.z.string(),thumbnailUrl:eh.z.string().optional()}),ez=(0,ep.defineCapability)({id:"kling-3-omni:text2video",name:"Kling 3.0 Omni Text to Video",inputSchema:ey,outputSchema:ex,getBusinessDetails:e=>{let t=z(e),i=e.duration*t;return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["kling3OmniText2Video",0,ez,"text2VideoMultiShotSchema",0,ev,"text2VideoSingleShotSchema",0,eg],536853);let e_=(0,d.defineModel)({id:"kling-3-omni",name:"Kling 3.0 Omni",description:"Kling 3.0 Omni image and video generation model by Kuaishou",metadata:{creator:"Kling",tier:"flagship",aliases:["Kling O3","Kling 3","Kling 3 Omni","Kuaishou","快手","可灵"]},capabilities:{text2image:em,image2image:O,text2video:ez,element2video:P,image2video:H,"modify-video":J,"reference-video":eu}});e.s(["kling3Model",0,e_],615090);var eS=t,eM=i,eI=t;let ew=eM.z.object({prompt:eM.z.string().max(2500).default(""),image:eM.z.string().trim().min(1),duration:eM.z.number().int().min(2).max(300),audio:eM.z.string().trim().min(1),mode:eM.z.enum(["pro","std"]).default("std").catch("std"),callbackUrl:eM.z.string().optional(),externalTaskId:eM.z.string().optional()}),eC=eM.z.object({url:eM.z.string(),thumbnailUrl:eM.z.string().optional()}),eR=(0,eI.defineCapability)({id:"kling-avatar:image2video",name:"Kling Avatar Image to Video",inputSchema:ew,outputSc
1hema:eC,getBusinessDetails:e=>{if(!e.image||!e.audio||!e.duration)throw Error("Required fields missing");let t=15;return"pro"===e.mode&&(t+=10),{unitCredits:e.duration*t,quantity:1,totalCredits:e.duration*t}}});e.s(["klingAvatarImage2Video",0,eR],741159);let eE=(0,eS.defineModel)({id:"kling-avatar",name:"Kling Avatar",description:"Avatar generation model by Kling",metadata:{creator:"Kling"},capabilities:{image2video:eR}});e.s(["klingAvatarModel",0,eE],99290);var eA=t,eP=i,eT=t;let ek=eP.z.object({video:eP.z.string().trim().min(1),videoDuration:eP.z.number().int().min(2).max(300),callbackUrl:eP.z.string().optional()}),eD=ek.extend({mode:eP.z.literal("text2video"),text:eP.z.string().trim().min(1),voiceLanguage:eP.z.enum(["en","zh"]).default("en").catch("en"),voiceId:eP.z.string().trim().min(1),voiceSpeed:eP.z.number().min(.8).max(2).default(1).catch(1),audioType:eP.z.enum(["file","url"]).optional(),audioFile:eP.z.string().trim().min(1).optional(),audio:eP.z.string().trim().min(1).optional()}),eB=ek.extend({mode:eP.z.literal("audio2video"),audioType:eP.z.literal("file"),audioFile:eP.z.string().trim().min(1),audio:eP.z.string().trim().min(1).optional(),text:eP.z.string().trim().min(1).optional(),voiceLanguage:eP.z.enum(["en","zh"]).optional(),voiceId:eP.z.string().trim().min(1).optional(),voiceSpeed:eP.z.number().min(.8).max(2).optional()}),ej=ek.extend({mode:eP.z.literal("audio2video"),audioType:eP.z.literal("url"),audio:eP.z.string().trim().min(1),audioFile:eP.z.string().trim().min(1).optional(),text:eP.z.string().trim().min(1).optional(),voiceLanguage:eP.z.enum(["en","zh"]).optional(),voiceId:eP.z.string().trim().min(1).optional(),voiceSpeed:eP.z.number().min(.8).max(2).optional()}),eO=eP.z.union([eD,eB,ej]),eV=eP.z.object({url:eP.z.string(),thumbnailUrl:eP.z.string().optional()}),eN=(0,eT.defineCapability)({id:"kling-lipsync-v1:lipSync",name:"Kling Lipsync V1",inputSchema:eO,outputSchema:eV,getBusinessDetails:e=>{if(!e.video||!e.videoDuration)throw Error("Required fields missing");let t=20,i=Math.ceil(e.videoDuration/5);return{unitCredits:i*t,quantity:1,totalCredits:i*t}}});e.s(["klingLipsyncV1",0,eN],71814);let eF=(0,eA.defineModel)({id:"kling-lipsync-v1",name:"Kling Lipsync V1",description:"Lipsync generation model by Kling",metadata:{creator:"Kling"},capabilities:{lipSync:eN}});e.s(["klingLipsyncV1Model",0,eF],430920);var eU=t,eq=i,eL=t,S=p,e$=m,I=p;let eH=eq.z.object({resolution:eq.z.enum(["std","pro"]).default("pro"),prompt:eq.z.string().min(1).max(2500),videoCount:eq.z.number().int().min(1).max(8).default(1),duration:eq.z.union([eq.z.literal(5),eq.z.literal(10)]).default(5),aspectRatio:eq.z.enum(["16:9","9:16","1:1","auto"]).default("16:9"),references:eq.z.array(eq.z.union([I.klingImageReferenceSchema,e$.elementReferenceSchema,S.klingCharacterReferenceSchema])).min(1).max(7).default([])}),eK=eq.z.object({url:eq.z.string(),thumbnailUrl:eq.z.string().optional()}),eG=(0,eL.defineCapability)({id:"kling-O1:element2video",name:"Kling O1 Element to Video",inputSchema:eH,outputSchema:eK,getBusinessDetails:e=>{let t=30*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["klingO1Element2Video",0,eG],651681);var eX=i,eZ=t,S=p,eW=m,I=p;let eY=eX.z.object({prompt:eX.z.string().trim().min(1).max(2500),resolution:eX.z.enum(["1k","2k"]).default("1k"),aspectRatio:eX.z.enum(["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9","auto"]).default("4:3"),references:eX.z.array(eX.z.union([I.klingImageReferenceSchema,S.klingCharacterReferenceSchema,eW.elementReferenceSchema])).min(1).max(10),imageCount:eX.z.number().int().min(1).max(8).default(1)}),eJ=eX.z.object({url:eX.z.string(),thumbnailUrl:eX.z.string()}),eQ=(0,eZ.defineCapability)({id:"kling-O1:image2image",name:"Kling O1 Image to Image",inputSchema:eY,outputSchema:eJ,getBusinessDetails:e=>{let t=10;return{unitCredits:10,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["klingO1Image2Image",0,eQ],223630);var e0=i,e1=t,I=p;let e2=e0.z.object({prompt:e0.z.string().min(1).max(2500),videoCount:e0.z.number().int().min(1).max(8).default(1),duration:e0.z.union([e0.z.literal(5),e0.z.literal(10)]).catch(5),resolution:e0.z.enum
1(["std","pro"]).default("pro"),startFrame:I.klingImageReferenceSchema,endFrame:I.klingImageReferenceSchema.nullable().optional(),audio:e0.z.boolean().default(!1),voice:e0.z.boolean().default(!1)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),e3=e0.z.object({url:e0.z.string(),thumbnailUrl:e0.z.string().optional()}),e4=(0,e1.defineCapability)({id:"kling-O1:image2video",name:"Kling O1 Image to Video",inputSchema:e2,outputSchema:e3,getBusinessDetails:e=>{let t=("std"===e.resolution?20:30)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["klingO1Image2Video",0,e4],633388);var e6=i,e5=m,e8=t,e9=h,S=p,I=p;let e7=3,te=10,tt=720,ti=2160,ta=0xc800000,tn={minDuration:3,maxDuration:10,minSide:720,maxSide:2160,maxFileSizeBytes:0xc800000};e.s(["KLING_O1_SOURCE_VIDEO_CONSTRAINTS",0,tn,"KLING_O1_VIDEO_MAX_DIMENSION_PX",0,ti,"KLING_O1_VIDEO_MAX_DURATION_S",0,te,"KLING_O1_VIDEO_MAX_FILE_SIZE_BYTES",0,ta,"KLING_O1_VIDEO_MIN_DIMENSION_PX",0,tt,"KLING_O1_VIDEO_MIN_DURATION_S",0,e7],975547);let tr=e5.videoReferenceSchema.extend({metadata:e6.z.custom(e=>"object"==typeof e&&null!==e).superRefine((e,t)=>{if(!e)return void t.addIssue({code:"custom",message:"Video metadata is required. Please re-upload the video."});let i=e.duration;if(null==i)return void t.addIssue({code:"custom",message:"Video duration is required. Please re-upload the video.",path:["duration"]});if(i<e7)return void t.addIssue({code:"custom",message:`Video too short. Minimum: ${e7}s, your video: ${(0,e9.formatDuration)(i)}s.`,path:["duration"]});Math.round(i)>te&&t.addIssue({code:"custom",message:`Video too long. Maximum: ${te}s, your video: ${(0,e9.formatDuration)(i)}s.`,path:["duration"]});let{width:a,height:n}=e,r=e=>e<tt||e>ti;null!=a&&null!=n&&(r(a)||r(n))&&t.addIssue({code:"custom",message:`Video dimensions must be between ${tt}px and ${ti}px on each side. Your video: ${a}\xd7${n}px.`,path:["dimensions"]});let o=e.file_size_bytes;null!=o&&o>ta&&t.addIssue({code:"custom",message:`Video file too large. Maximum: ${Math.round(ta/1048576)}MB, your video: ${Math.round(o/1048576)}MB.`,path:["fileSize"]})})}),to=e6.z.object({prompt:e6.z.string().trim().min(1).max(2500),resolution:e6.z.enum(["std","pro"]).default("pro"),videoReference:tr,visualReferences:e6.z.array(e6.z.union([I.klingImageReferenceSchema,e5.elementReferenceSchema,S.klingCharacterReferenceSchema])).max(4).optional().default([]),sound:e6.z.boolean().default(!1),voice:e6.z.boolean().default(!1)}),ts=e6.z.object({url:e6.z.string(),thumbnailUrl:e6.z.string().optional()}),tu=(0,e8.defineCapability)({id:"kling-O1:modify-video",name:"Kling O1 Modify Video",inputSchema:to,outputSchema:ts,getBusinessDetails:e=>{let t=e.videoReference?.metadata?.duration;if(!t)return{unitCredits:0,quantity:1,totalCredits:0};let i=("pro"===e.resolution?40:30)*Math.ceil(t);return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["klingO1ModifyVideo",0,tu],825443);var td=i,tl=m,tc=t,tf=h,S=p,I=p;let tm=td.z.object({prompt:td.z.string().trim().min(1).max(2500),resolution:td.z.enum(["std","pro"]).default("pro").catch("pro"),videoReference:tl.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata?.duration;null!=i&&i<e7&&t.addIssue({code:"custom",message:`Video too short. Minimum: ${e7}s, your video: ${(0,tf.formatDuration)(i)}s.`,path:["metadata","duration"]}),null!=i&&Math.round(i)>te&&t.addIssue({code:"custom",message:`Video too long. Maximum: ${te}s, your video: ${(0,tf.formatDuration)(i)}s.`,path:["metadata","duration"]});let{width:a,height:n}=e.metadata??{},r=e=>e<tt||e>ti;null!=a&&null!=n&&(r(a)||r(n))&&t.addIssue({code:"custom",message:`Video dimensions must be between ${tt}px and ${ti}px on each side. Your video: ${a}\xd7${n}px.`,path:["metadata","dimensions"]});let o=e.metadata?.file_size_bytes;null!=o&&o>ta&&t.addIssue({code:"custom",message:`Video file too large. Maximum: ${Math.round(ta/1048576)}MB, your video: ${Math.round(o/1048576)}MB.`,path:["metadata","fileSize"]})}),visualReferences:td.z.array(td.z.union([I.klingImageReferenceSchema,tl.elementReferenceSchema,S.klingCharacterReferenceSchema])).max(4).optional().default([]),duration:td.z.union([td.z.literal(5),td.z.literal(10)]).default(5).catch(5),sound:td.z.boolean().default(!1),voice:td.z.boolean().default(!1),aspectRatio:td.z.enum(["16:9","9:16","1:1","auto"]).default("16:9").catch("16:9"),videoCount:td.z.number().int().min(1).max(8).default(1)}),th=td.z.object({url:td.z.string(),thumbnailUrl:td.z.string().optional()}),tp=(0,tc.defineCapability)({id:"kling-O1:reference-video",name:"Kling O1 Reference Video",inputSchema:tm,outputSc
1hema:th,getBusinessDetails:e=>{let t=("pro"===e.resolution?40:30)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["klingO1ReferenceVideo",0,tp],73617);var tb=i,tg=t;let tv=tb.z.object({prompt:tb.z.string().trim().min(1).max(2500),resolution:tb.z.enum(["1k","2k"]).default("1k"),aspectRatio:tb.z.enum(["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9"]).default("4:3"),imageCount:tb.z.number().int().min(1).max(8).default(1),autoEnhancePrompt:tb.z.boolean().optional()}),ty=tb.z.object({url:tb.z.string(),thumbnailUrl:tb.z.string()}),tx=(0,tg.defineCapability)({id:"kling-O1:text2image",name:"Kling O1 Text to Image",inputSchema:tv,outputSchema:ty,getBusinessDetails:e=>{let t=10;return{unitCredits:10,quantity:e.imageCount,totalCredits:t*e.imageCount}}});e.s(["klingO1Text2Image",0,tx],60655);var tz=i,t_=t;let tS=tz.z.object({prompt:tz.z.string().min(1).max(2500),videoCount:tz.z.number().int().min(1).max(8).default(1),duration:tz.z.union([tz.z.literal(5),tz.z.literal(10)]).default(5),aspectRatio:tz.z.enum(["16:9","9:16","1:1","auto"]).default("16:9"),resolution:tz.z.enum(["std","pro"]).default("pro"),autoEnhancePrompt:tz.z.boolean().optional()}),tM=tz.z.object({url:tz.z.string(),thumbnailUrl:tz.z.string().optional()}),tI=(0,t_.defineCapability)({id:"kling-O1:text2video",name:"Kling O1 Text to Video",inputSchema:tS,outputSchema:tM,getBusinessDetails:e=>{let t=30*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["klingO1Text2Video",0,tI],472735);let tw=(0,eU.defineModel)({id:"kling-O1",name:"Kling O1",description:"Multimodal model with video editing and multi-element control",metadata:{creator:"Kling",aliases:["Kuaishou","快手","可灵"]},capabilities:{text2image:tx,image2image:eQ,text2video:tI,image2video:e4,element2video:eG,"modify-video":tu,"reference-video":tp}});e.s(["klingO1Model",0,tw],770568);var tC=t,tR=i,tE=t,tA=p;let tP=tR.z.union([tA.klingImageReferenceSchema,tA.klingCharacterReferenceSchema]),tT=tR.z.object({prompt:tR.z.string().max(2500),videoCount:tR.z.number().int().min(1).max(8).default(1),duration:tR.z.union([tR.z.literal(5),tR.z.literal(10)]).default(5),mode:tR.z.enum(["std","pro"]).default("pro"),negativePrompt:tR.z.string().default(""),startFrame:tP,endFrame:tP.nullable().optional()}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),tk=tR.z.object({url:tR.z.string(),thumbnailUrl:tR.z.string().optional()}),tD={5:{std:150,pro:300},10:{std:300,pro:600}},tB=(0,tE.defineCapability)({id:"kling2-1:image2video",name:"Kling 2.1 Image to Video",inputSchema:tT,outputSchema:tk,getBusinessDetails:e=>{let t=tD[e.duration][e.mode];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["kling21Image2Video",0,tB],661194);let tj=(0,tC.defineModel)({id:"kling2-1",name:"Kling 2.1",description:"High quality video generation model by Kuaishou with std/pro modes",metadata:{creator:"Kling"},capabilities:{image2video:tB}});e.s(["kling21Model",0,tj],539240);var tO=t,tV=i,tN=t,tF=p;let tU=tV.z.union([tF.klingImageReferenceSchema,tF.klingCharacterReferenceSchema]),tq=tV.z.object({prompt:tV.z.string().max(2500),videoCount:tV.z.number().int().min(1).max(8).default(1),duration:tV.z.union([tV.z.literal(5),tV.z.literal(10)]).default(5),negativePrompt:tV.z.string().default(""),startFrame:tU,endFrame:tU.nullable().optional()}),tL=tV.z.object({url:tV.z.string(),thumbnailUrl:tV.z.string().optional()}),t$={5:500,10:1e3},tH=(0,tN.defineCapability)({id:"kling2-1-master:image2video",name:"Kling 2.1 Master Image to Video",inputSchema:tq,outputSchema:tL,getBusinessDetails:e=>{let t=t$[e.duration];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["kling21MasterImage2Video",0,tH],544583);var tK=i,tG=t;let tX=tK.z.object({prompt:tK.z.string().min(1).max(2500),videoCount:tK.z.number().int().min(1).max(8).default(1),duration:tK.z.union([tK.z.literal(5),tK.z.literal(10)]).default(5),aspectRatio:tK.z.enum(["16:9","9:16","1:1"]).default("16:9"),negativePrompt:tK.z.string().default(""),autoEnhancePrompt:tK.z.boolean().optional()}),tZ=tK.z.object({url:tK.z.string(),thumbnailUrl:tK.z.string().optional()}),tW={5:500,10:1e3},tY=(0,tG.defineCapability)({id:"kling2-1-master:text2video",name:"Kling 2.1 Master Text to Video",inputSchema:tX,outputSc
1hema:tZ,getBusinessDetails:e=>{let t=tW[e.duration];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["kling21MasterText2Video",0,tY],105702);let tJ=(0,tO.defineModel)({id:"kling2-1-master",name:"Kling 2.1",description:"High quality video generation model by Kuaishou",metadata:{creator:"Kling"},capabilities:{text2video:tY,image2video:tH}});e.s(["kling21MasterModel",0,tJ],205751);var tQ=t,t0=i,t1=t,t2=p;let t3=t0.z.union([t2.klingImageReferenceSchema,t2.klingCharacterReferenceSchema]),t4=t0.z.object({prompt:t0.z.string().max(2500),videoCount:t0.z.number().int().min(1).max(8).default(1),duration:t0.z.union([t0.z.literal(5),t0.z.literal(10)]).default(5),mode:t0.z.enum(["std","pro"]).default("pro"),negativePrompt:t0.z.string().default(""),startFrame:t3,endFrame:t3.nullable().optional()}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),t6=t0.z.object({url:t0.z.string(),thumbnailUrl:t0.z.string().optional()}),t5={5:{std:80,pro:100},10:{std:160,pro:200}},t8=(0,t1.defineCapability)({id:"kling2-5:image2video",name:"Kling 2.5 Image to Video",inputSchema:t4,outputSchema:t6,getBusinessDetails:e=>{let t=t5[e.duration][e.mode];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["kling25Image2Video",0,t8],479940);var t9=i,t7=t;let ie=t9.z.object({prompt:t9.z.string().min(1).max(2500),videoCount:t9.z.number().int().min(1).max(8).default(1),duration:t9.z.union([t9.z.literal(5),t9.z.literal(10)]).default(5),mode:t9.z.enum(["pro"]).default("pro"),aspectRatio:t9.z.enum(["16:9","9:16","1:1","auto"]).default("16:9"),negativePrompt:t9.z.string().default(""),autoEnhancePrompt:t9.z.boolean().optional()}),it=t9.z.object({url:t9.z.string(),thumbnailUrl:t9.z.string().optional()}),ii={5:{std:80,pro:100},10:{std:160,pro:200}},ia=(0,t7.defineCapability)({id:"kling2-5:text2video",name:"Kling 2.5 Text to Video",inputSchema:ie,outputSchema:it,getBusinessDetails:e=>{let t=ii[e.duration][e.mode];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["kling25Text2Video",0,ia],862732);let ir=(0,tQ.defineModel)({id:"kling2-5",name:"Kling 2.5",description:"High quality video generation model by Kuaishou",metadata:{creator:"Kling",tier:"legacy",aliases:["Kuaishou","快手","可灵"]},capabilities:{text2video:ia,image2video:t8}});e.s(["kling25Model",0,ir],443184)},872254,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(625468),n=e.i(944029),r=e.i(981499);let o=340,s=3850,u=t.z.object({prompt:t.z.string().max(2500).optional(),character:r.klingImageReferenceSchema,keepOriginalSound:t.z.enum(["yes","no"]).default("yes"),videoMode:t.z.enum(["std","pro"]).default("std")}),d=u.extend({characterOrientation:t.z.literal("image"),reference:i.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata?.duration;if(null==i)return void t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["metadata","duration"]});if(i<3)return void t.addIssue({code:"custom",message:`Video too short. Minimum: 3s, your video: ${(0,n.formatDuration)(i)}s.`,path:["metadata","duration"]});Math.round(i)>10&&t.addIssue({code:"custom",message:`Video too long. Maximum: 10s, your video: ${(0,n.formatDuration)(i)}s.`,path:["metadata","duration"]});let a=e.metadata?.width,r=e.metadata?.height;null!=a&&null!=r&&(a<o||a>s||r<o||r>s)&&t.addIssue({code:"custom",message:`Video resolution out of range. Each side must be ${o}–${s}px. Your video: ${a}\xd7${r}.`,path:["metadata","width"]})})}),l=u.extend({characterOrientation:t.z.literal("video"),reference:i.videoReferenceSchema.superRefine((e,t)=>{let i=e.metadata?.duration;if(null==i)return void t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["metadata","duration"]});if(i<3)return void t.addIssue({code:"custom",message:`Video too short. Minimum: 3s, your video: ${(0,n.formatDuration)(i)}s.`,path:["metadata","duration"]});Math.round(i)>30&&t.addIssue({code:"custom",message:`Video too long. Maximum: 30s, your video: ${(0,n.formatDuration)(i)}s.`,path:["metadata","duration"]});let a=e.metadata?.width,r=e.metadata?.height;null!=a&&null!=r&&(a<o||a>s||r<o||r>s)&&t.addIssue({code:"custom",message:`Video resolution out of range. Each side must be ${o}–${s}px. Your video: ${a}\xd7${r}.`,path:["metadata","width"]})})}),c=t.z.discriminatedUnion("characterOrientation",[d,l]),f=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional()}),m=(0,a.defineCapability)({id:"kling2-6:motion-sync",name:"Kling 2.6 Motion Sync",inputSchema:c,outputSc
1hema:f,getBusinessDetails:e=>{let t=e.reference.metadata?.duration;if(null==t)throw Error("Video metadata with duration is required");let i=Math.ceil(t),a=("pro"===e.videoMode?30:20)*i;return{unitCredits:a,quantity:1,totalCredits:a}}});e.s(["kling26MotionSync",0,m])},206778,245329,634658,287962,519674,710310,351384,111424,160326,641877,877940,934416,861882,372895,906117,315846,471968,480786,502993,181763,754985,250519,908701,80203,158347,70374,e=>{"use strict";var t=e.i(625468),i=e.i(22668),a=e.i(872254),n=e.i(976385);let r=(0,t.defineModel)({id:"kling2-6",name:"Kling 2.6",description:"High quality video generation model by Kuaishou",metadata:{creator:"Kling",tier:"latest",aliases:["Kuaishou","快手","可灵"]},capabilities:{text2video:n.kling26Text2Video,image2video:i.kling26Image2Video,motionSync:a.kling26MotionSync}});e.s(["kling26Model",0,r],206778);var o=t,s=e.i(200744),u=e.i(207653),d=t;let l={"ltx-2-5":{mp3:["mp3"],m4a:["aac_lc"]},"ltx-2-x":{wav:["aac_lc","mp3","vorbis","flac"],mp3:["mp3"],m4a:["aac_lc"],ogg:["opus","vorbis"]}},c={"ltx-2-5":"MP3, AAC-LC","ltx-2-x":"AAC-LC, MP3, Vorbis, FLAC, Opus"};function f(e){return Object.keys(l[e]).map(e=>e.toUpperCase()).join(", ")}function m(e){return[...new Set(Object.values(l[e]).flat())]}function h(e){return e.trim().toLowerCase().replace(/[\s-]+/g,"_")}function p(e,t){let i=h(e);return"aac"===i?"aac_lc":m(t).find(e=>i.includes(e))??i}function b(e,t){for(let i of e){let e=h(i);if(e in l[t])return e}}function g(e,t="ltx-2-5"){let i=l[t],a=e.formats??[],n=e.codec?.trim()?p(e.codec,t):void 0;if(a.length>0&&!b(a,t))return{supported:!1,message:`Unsupported audio file format "${a[0]}". Supported containers: ${f(t)}.`};if(!n)return{supported:!0};if(!m(t).includes(n))return{supported:!1,message:`Unsupported audio codec "${e.codec}". Supported codecs: ${c[t]}. PCM and HE-AAC are not supported.`};let r=b(a,t);if(r&&!i[r].includes(n)){let e=r.toUpperCase(),t=i[r].map(e=>e.toUpperCase()).join(", ");return{supported:!1,message:`A ${e} file cannot hold ${n.toUpperCase()} audio. ${e} supports ${t}.`}}return{supported:!0}}function v(e,t,i,a="ltx-2-5"){if(!e)return;let n=g(e,a);n.supported||t.addIssue({code:"custom",message:n.message,path:i})}function y(e){return`Supported formats: ${f(e)}.`}e.s(["checkLtxAudioSupport",()=>g,"getLtxAudioFormatHint",()=>y,"refineLtxAudioSupport",()=>v],245329);let x=u.z.object({type:u.z.literal("image"),id:u.z.string(),url:u.z.string(),label:u.z.string()}),z=2,_=20,S=u.z.object({audioReference:s.audioReferenceSchema,startFrame:x.nullish(),prompt:u.z.string().optional(),resolution:u.z.literal("1920x1080").default("1920x1080"),autoEnhancePrompt:u.z.boolean().optional(),mode:u.z.enum(["ltx-2-pro"]).optional(),videoCount:u.z.number().int().min(1).max(8).default(1)}).refine(e=>{let t=(e.startFrame?.url?.trim()??"")!=="",i=(e.prompt?.trim()??"")!=="";return t||i},{message:"Either start frame image or prompt is required",path:["prompt"]}).refine(e=>(e.audioReference?.url?.trim()??"")!=="",{message:"Audio file is required",path:["audioReference"]}).superRefine((e,t)=>{v(e.audioReference?.metadata,t,["audioReference"],"ltx-2-x")}).refine(e=>null!=e.audioReference?.metadata?.duration,{message:"Audio duration metadata is required",path:["audioReference"]}).refine(e=>{let t=e.audioReference?.metadata?.duration;return null!=t&&t>=z&&t<=_},{message:`Audio duration must be between ${z} and ${_} seconds`,path:["audioReference"]}),M=u.z.object({url:u.z.string(),thumbnailUrl:u.z.string().optional()}),I=50,w=(0,d.defineCapability)({id:"ltx2:audio2video",name:"LTX 2 Audio to Video",internal:!0,inputSchema:S,outputSchema:M,getBusinessDetails:e=>{let t=e.audioReference?.metadata?.duration;if(null==t)throw Error("Audio duration metadata is required for creation");let i=I*Math.round(t);return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});var C=u,R=t;let E=C.z.object({type:C.z.literal("image"),id:C.z.string(),url:C.z.string(),label:C.z.string(),metadata:C.z.custom().optional()}),A=C.z.enum(["1920x1080","2560x1440","3840x2160"]),P=C.z.object({prompt:C.z.string().min(1),videoCount:C.z.number().int().min(1).max(8).default(1),startFrame:E,duration:C.z.union([C.z.literal(6),C.z.literal(8),C.z.literal(10),C.z.literal(12),C.z.literal(14),C.z.literal(16),C.z.literal(18),C.z.literal(20)]).default(8).catch(8),resolution:A.default("1920x1080").catch("1920x1080"),mode:C.z.enum(["ltx-2-fast","ltx-2-pro"]).default("ltx-2-fast").catch("ltx-2-fast")}).refine(e=>("ltx-2-pro"!==e.mode||!(e.duration>10))&&("ltx-2-fast"!==e.mode||"2560x1440"!==e.resolution&&"3840x2160"!==e.resolution||!(e.duration>10)),{message:"Pro mode and 1440p/4K resolutions only support 6, 8, or 10 second duration",path:["duration"]}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),T=C.z.object({url:C.z.string(),thumbnailUrl:C.z.string().optional(),duration:C.z.number()}
1),k={"ltx-2-fast":{"1920x1080":20,"2560x1440":40,"3840x2160":80},"ltx-2-pro":{"1920x1080":30,"2560x1440":60,"3840x2160":120}};function D(e,t){return k[e]?.[t]??20}let B=(0,R.defineCapability)({id:"ltx2:image2video",name:"LTX 2 Image to Video",internal:!0,inputSchema:P,outputSchema:T,getBusinessDetails:e=>{let t=D(e.mode,e.resolution)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});var j=u,O=t;let V=j.z.enum(["1920x1080","2560x1440","3840x2160"]),N=j.z.object({prompt:j.z.string().min(1),videoCount:j.z.number().int().min(1).max(8).default(1),duration:j.z.union([j.z.literal(6),j.z.literal(8),j.z.literal(10),j.z.literal(12),j.z.literal(14),j.z.literal(16),j.z.literal(18),j.z.literal(20)]).default(8).catch(8),resolution:V.default("1920x1080").catch("1920x1080"),mode:j.z.enum(["ltx-2-fast","ltx-2-pro"]).default("ltx-2-fast").catch("ltx-2-fast"),autoEnhancePrompt:j.z.boolean().optional()}).refine(e=>("ltx-2-pro"!==e.mode||!(e.duration>10))&&("ltx-2-fast"!==e.mode||"2560x1440"!==e.resolution&&"3840x2160"!==e.resolution||!(e.duration>10)),{message:"Pro mode and 1440p/4K resolutions only support 6, 8, or 10 second duration",path:["duration"]}),F=j.z.object({url:j.z.string(),thumbnailUrl:j.z.string().optional(),duration:j.z.number()}),U={"ltx-2-fast":{"1920x1080":20,"2560x1440":40,"3840x2160":80},"ltx-2-pro":{"1920x1080":30,"2560x1440":60,"3840x2160":120}};function q(e,t){return U[e]?.[t]??20}let L=(0,O.defineCapability)({id:"ltx2:text2video",name:"LTX 2 Text to Video",internal:!0,inputSchema:N,outputSchema:F,getBusinessDetails:e=>{let t=q(e.mode,e.resolution)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});var $=u,H=s,K=t,G=e.i(944029);let X=5e3,Z=`Prompt must be ${X} characters or fewer`;e.s(["LTX_MAX_PROMPT_CHARS",0,X,"LTX_PROMPT_TOO_LONG_MESSAGE",0,Z],634658);let W=3,Y=21,J=2,Q=21,ee=H.videoReferenceSchema.extend({metadata:$.z.custom(e=>"object"==typeof e&&null!==e).optional().superRefine((e,t)=>{if(!e||null==e.duration)return;let i=e.duration;i<W?t.addIssue({code:"custom",message:`Video too short. Minimum: ${W}s, your video: ${(0,G.formatDuration)(i)}s.`,path:["duration"]}):Math.round(i)>Y&&t.addIssue({code:"custom",message:`Video too long. Maximum: ${Y}s, your video: ${(0,G.formatDuration)(i)}s.`,path:["duration"]})})}),et=$.z.enum(["replace_audio","replace_video","replace_audio_and_video"]),ei=$.z.object({prompt:$.z.string().max(X).default("").catch(""),videoReference:ee,startTime:$.z.number().min(0).default(0).catch(0),duration:$.z.number().min(J).max(Q).default(5).catch(5),mode:et.default("replace_audio_and_video").catch("replace_audio_and_video")}).refine(e=>{let t=e.videoReference.metadata?.duration;return null==t||e.startTime+e.duration<=t},{message:"Section (startTime + duration) must be within the input video duration",path:["duration"]}),ea=$.z.object({url:$.z.string(),thumbnailUrl:$.z.string().optional(),duration:$.z.number()}),en=50,er=(0,K.defineCapability)({id:"ltx2:video2video",name:"LTX 2 Retake (Video to Video)",internal:!0,inputSchema:ei,outputSc
1hema:ea,getBusinessDetails:e=>{if(!e?.videoReference)return{unitCredits:0,quantity:1,totalCredits:0};let t=en*Math.ceil(e.duration);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["ltx2Video2Video",0,er],287962);let eo=(0,o.defineModel)({id:"ltx2",name:"LTX 2",description:"Lightricks LTX-2 video generation (image-to-video, text-to-video, audio-to-video, and video-to-video)",metadata:{creator:"Lightricks"},capabilities:{text2video:L,image2video:B,audio2video:w,video2video:er}});e.s(["ltx2Model",0,eo],519674);var es=t,eu=s,ed=u,el=t;let ec={"ltx-2-3-fast":{"1920x1080":30,"1080x1920":30,"2560x1440":60,"1440x2560":60,"3840x2160":120,"2160x3840":120},"ltx-2-3-pro":{"1920x1080":40,"1080x1920":40,"2560x1440":80,"1440x2560":80,"3840x2160":160,"2160x3840":160}};function ef(e,t){return ec[e]?.[t]??30}var em=e.i(332097),eh=u;function ep(e,t,i,a){let n=[...i,"metadata"];if(!e)return;let r=a.allowedFormats??[],o=a.maxFileSizeBytes??0,s=(0,em.normalizeImageFormat)(e.format);null==s||r.includes(s)||t.addIssue({code:eh.z.ZodIssueCode.custom,message:`Image format must be one of: ${r.join(", ")}`,path:n}),null!=e.file_size_bytes&&e.file_size_bytes>o&&t.addIssue({code:eh.z.ZodIssueCode.custom,message:`Image must not exceed ${Math.round(o/1048576)}MB`,path:n})}let eb=0xf00000,eg=["jpeg","jpg","png","webp"],ev={maxFileSizeBytes:0xf00000,allowedFormats:eg};function ey(e,t,i){ep(e,t,i,ev)}let ex=ed.z.object({type:ed.z.literal("image"),id:ed.z.string(),url:ed.z.string(),label:ed.z.string(),metadata:ed.z.custom().optional()}),ez=2,e_=20,eS=ed.z.enum(["1920x1080","2560x1440","3840x2160","1080x1920","1440x2560","2160x3840"]),eM=ed.z.object({audioReference:eu.audioReferenceSchema,startFrame:ex.nullish(),prompt:ed.z.string().max(X,Z).optional(),resolution:eS.default("1920x1080").catch("1920x1080"),mode:ed.z.enum(["ltx-2-3-pro"]).default("ltx-2-3-pro").catch("ltx-2-3-pro"),videoCount:ed.z.number().int().min(1).max(8).default(1),guidanceScale:ed.z.number().optional()}).refine(e=>(e.audioReference?.url?.trim()??"")!=="",{message:"Audio file is required",path:["audioReference"]}).superRefine((e,t)=>{v(e.audioReference?.metadata,t,["audioReference"],"ltx-2-x")}).refine(e=>null!=e.audioReference?.metadata?.duration,{message:"Audio duration metadata is required",path:["audioReference"]}).refine(e=>{let t=e.audioReference?.metadata?.duration;return null!=t&&t>=ez&&t<=e_},{message:`Audio duration must be between ${ez} and ${e_} seconds`,path:["audioReference"]}).refine(e=>{let t=(e.startFrame?.url?.trim()??"")!=="",i=(e.prompt?.trim()??"")!=="";return t||i},{message:"Either start frame image or prompt is required",path:["prompt"]}).superRefine((e,t)=>{(e.startFrame?.url?.trim()??"")!==""&&ey(e.startFrame?.metadata,t,["startFrame"])}),eI=ed.z.object({url:ed.z.string(),thumbnailUrl:ed.z.string().optional()}),ew=(0,el.defineCapability)({id:"ltx2-3:audio2video",name:"LTX 2.3 Audio to Video",inputSchema:eM,outputSchema:eI,getBusinessDetails:e=>{let t=e.audioReference?.metadata?.duration;if(null==t)throw Error("Audio duration metadata is required for creation");let i=ef(e.mode,e.resolution)*Math.round(t);return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});var eC=u,eR=t,eE=G;let eA=3,eP=21,eT=s.videoReferenceSchema.extend({metadata:eC.z.custom(e=>"object"==typeof e&&null!==e).optional().superRefine((e,t)=>{if(!e||null==e.duration)return;let i=e.duration;i<eA?t.addIssue({code:"custom",message:`Video too short. Minimum: ${eA}s, your video: ${(0,eE.formatDuration)(i)}s.`,path:["duration"]}):Math.round(i)>eP&&t.addIssue({code:"custom",message:`Video too long. Maximum: ${eP}s, your video: ${(0,eE.formatDuration)(i)}s.`,path:["duration"]})})}),ek=eC.z.object({videoReference:eT,duration:eC.z.number().min(2).max(20),prompt:eC.z.string().max(X,Z).optional(),mode:eC.z.enum(["start","end"]).default("end").catch("end")}),eD=eC.z.object({url:eC.z.string(),thumbnailUrl:eC.z.string().optional(),duration:eC.z.number()}),eB=50,ej=(0,eR.defineCapability)({id:"ltx2-3:extend",name:"LTX 2.3 Extend Video",inputSchema:ek,outputSchema:eD,getBusinessDetail
1s:e=>{let t=eB*Math.ceil(e.duration);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["ltx23Extend",0,ej],710310);var eO=u,eV=t;let eN=eO.z.object({type:eO.z.literal("image"),id:eO.z.string(),url:eO.z.string(),label:eO.z.string(),metadata:eO.z.custom().optional()}),eF=eO.z.enum(["1920x1080","2560x1440","3840x2160","1080x1920","1440x2560","2160x3840"]),eU=eO.z.enum(["dolly_in","dolly_out","dolly_left","dolly_right","jib_up","jib_down","static","focus_shift"]),eq=eO.z.object({prompt:eO.z.string().min(1).max(X,Z),videoCount:eO.z.number().int().min(1).max(8).default(1),startFrame:eN,endFrame:eN.optional(),duration:eO.z.union([eO.z.literal(6),eO.z.literal(8),eO.z.literal(10),eO.z.literal(12),eO.z.literal(14),eO.z.literal(16),eO.z.literal(18),eO.z.literal(20)]).default(6).catch(6),resolution:eF.default("1920x1080").catch("1920x1080"),mode:eO.z.enum(["ltx-2-3-fast","ltx-2-3-pro"]).default("ltx-2-3-fast").catch("ltx-2-3-fast"),generateAudio:eO.z.boolean().optional(),cameraMotion:eU.optional()}).refine(e=>("ltx-2-3-pro"!==e.mode||!(e.duration>10))&&("ltx-2-3-fast"!==e.mode||"2560x1440"!==e.resolution&&"3840x2160"!==e.resolution&&"1440x2560"!==e.resolution&&"2160x3840"!==e.resolution||!(e.duration>10))&&!0,{message:"Pro mode and 1440p/4K resolutions only support 6, 8, or 10 second duration",path:["duration"]}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{ey(e.startFrame?.metadata,t,["startFrame"]),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&ey(e.endFrame.metadata,t,["endFrame"])}),eL=eO.z.object({url:eO.z.string(),thumbnailUrl:eO.z.string().optional(),duration:eO.z.number()}),e$=(0,eV.defineCapability)({id:"ltx2-3:image2video",name:"LTX 2.3 Image to Video",inputSchema:eq,outputSchema:eL,getBusinessDetails:e=>{let t=ef(e.mode,e.resolution)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["ltx23Image2Video",0,e$],351384);var eH=u,eK=t;let eG=eH.z.enum(["1920x1080","2560x1440","3840x2160","1080x1920","1440x2560","2160x3840"]),eX=eH.z.enum(["dolly_in","dolly_out","dolly_left","dolly_right","jib_up","jib_down","static","focus_shift"]),eZ=eH.z.object({prompt:eH.z.string().min(1).max(X,Z),videoCount:eH.z.number().int().min(1).max(8).default(1),duration:eH.z.union([eH.z.literal(6),eH.z.literal(8),eH.z.literal(10),eH.z.literal(12),eH.z.literal(14),eH.z.literal(16),eH.z.literal(18),eH.z.literal(20)]).default(6).catch(6),resolution:eG.default("1920x1080").catch("1920x1080"),mode:eH.z.enum(["ltx-2-3-fast","ltx-2-3-pro"]).default("ltx-2-3-fast").catch("ltx-2-3-fast"),generateAudio:eH.z.boolean().optional(),cameraMotion:eX.optional(),autoEnhancePrompt:eH.z.boolean().optional()}).refine(e=>("ltx-2-3-pro"!==e.mode||!(e.duration>10))&&("ltx-2-3-fast"!==e.mode||"2560x1440"!==e.resolution&&"3840x2160"!==e.resolution&&"1440x2560"!==e.resolution&&"2160x3840"!==e.resolution||!(e.duration>10))&&!0,{message:"Pro mode and 1440p/4K resolutions only support 6, 8, or 10 second duration",path:["duration"]}),eW=eH.z.object({url:eH.z.string(),thumbnailUrl:eH.z.string().optional(),duration:eH.z.number()}),eY=(0,eK.defineCapability)({id:"ltx2-3:text2video",name:"LTX 2.3 Text to Video",inputSchema:eZ,outputSchema:eW,getBusinessDetails:e=>{let t=ef(e.mode,e.resolution)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["ltx23Text2Video",0,eY],111424);var eJ=u,eQ=t,e0=G;let e1=3,e2=21,e3=2,e4=21,e6=s.videoReferenceSchema.extend({metadata:eJ.z.custom(e=>"object"==typeof e&&null!==e).optional().superRefine((e,t)=>{if(!e||null==e.duration)return;let i=e.duration;i<e1?t.addIssue({code:"custom",message:`Video too short. Minimum: ${e1}s, your video: ${(0,e0.formatDuration)(i)}s.`,path:["duration"]}):Math.round(i)>e2&&t.addIssue({code:"custom",message:`Video too long. Maximum: ${e2}s, your video: ${(0,e0.formatDuration)(i)}s.`,path:["duration"]})})}),e5=eJ.z.enum(["replace_audio","replace_video","replace_audio_and_video"]),e8=eJ.z.object({prompt:eJ.z.string().max(X,Z).default(""),videoReference:e6,startTime:eJ.z.number().min(0).default(0).catch(0),duration:eJ.z.number().min(e3).max(e4).default(5).catch(5),mode:e5.default("replace_audio_and_video").catch("replace_audio_and_video")}).refine(e=>{let t=e.videoReference.metadata?.duration;return null==t||e.startTime+e.duration<=t},{message:"Section (startTime + duration) must be within the input video duration",path:["duration"]}),e9=eJ.z.object({url:eJ.z.string(),thumbnailUrl:eJ.z.string().optional(),duration:eJ.z.number()}),e7=50,te=(0,eQ.defineCapability)({id:"ltx2-3:video2video",name:"LTX 2.3 Retake (Video to Video)",inputSchema:e8,outputSc
1hema:e9,getBusinessDetails:e=>{if(!e?.videoReference)return{unitCredits:0,quantity:1,totalCredits:0};let t=e7*Math.ceil(e.duration);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["ltx23Video2Video",0,te],160326);let tt=(0,es.defineModel)({id:"ltx2-3",name:"LTX 2.3",description:"Lightricks LTX-2.3 video generation (text-to-video, image-to-video, audio-to-video, retake, and extend)",metadata:{creator:"Lightricks"},capabilities:{text2video:eY,image2video:e$,audio2video:ew,video2video:te,extend:ej}});e.s(["ltx23Model",0,tt],641877);var ti=t,ta=s,tn=u,tr=t;let to=["ltx-2-5-fast","ltx-2-5-pro"],ts="ltx-2-5-fast",tu=["720p","1080p","1440p","2160p"],td={"720p":{landscape:"1280x720",portrait:"720x1280"},"1080p":{landscape:"1920x1080",portrait:"1080x1920"},"1440p":{landscape:"2560x1440",portrait:"1440x2560"},"2160p":{landscape:"3840x2160",portrait:"2160x3840"}},tl=["1280x720","720x1280","1920x1080","1080x1920","2560x1440","1440x2560","3840x2160","2160x3840"],tc={"ltx-2-5-fast":tu,"ltx-2-5-pro":["720p","1080p"]},tf=24,tm={"ltx-2-5-fast":[24,25,48,50],"ltx-2-5-pro":[24,25,50]},th=[6,8,10,12,14,16,18,20],tp=[6,8,10],tb=new Set(["720p","1080p"]);function tg(e,t){return td[e][t]}function tv(e){return tu.find(t=>td[t].landscape===e||td[t].portrait===e)}function ty(e){return tc[e]}function tx(e,t){let i=tv(e);return null!=i&&ty(t).includes(i)}function tz(e,t){return tm[t].includes(e)}function t_(e,t,i=tf){return"ltx-2-5-pro"===t?tp:tb.has(e)&&(24===i||25===i)?th:tp}function tS(e,t,i){let a=tv(e);return a?t_(a,i,t):tp}function tM(e,t,i){let a=tS(e,t,i);return a[a.length-1]}function tI(e,t,i,a){return tS(t,i,a).includes(e)}function tw(e,t){let i=t_(e,t);return i[i.length-1]}let tC=2,tR="1440p, 4K and 48/50 fps only support 6, 8, or 10 second duration",tE="LTX 2.5 Pro only supports 6, 8, or 10 second duration",tA="LTX 2.5 Pro only supports 720p and 1080p",tP="LTX 2.5 Pro does not support 48 fps",tT="Automatic duration cannot be combined with an end frame — a last frame fixes where the clip ends, which requires a known length",tk=8;e.s(["LTX25_A2V_MIN_AUDIO_DURATION",0,tC,"LTX25_AUTO_DURATION_WITH_END_FRAME_MESSAGE",0,tT,"LTX25_DEFAULT_FPS",0,tf,"LTX25_DEFAULT_MODE",0,ts,"LTX25_DURATION_MESSAGE",0,tR,"LTX25_MAX_VIDEO_COUNT",0,tk,"LTX25_MODES",0,to,"LTX25_PRO_DURATION_MESSAGE",0,tE,"LTX25_PRO_FPS_MESSAGE",0,tP,"LTX25_PRO_RESOLUTION_MESSAGE",0,tA,"LTX25_RESOLUTIONS",0,tl,"LTX25_RESOLUTION_TIERS",0,tu,"getLtx25A2vMaxAudioDuration",()=>tw,"getLtx25MaxDuration",()=>tM,"getLtx25Resolution",()=>tg,"getLtx25Tier",()=>tv,"getLtx25TierDurations",()=>t_,"getLtx25Tiers",()=>ty,"isLtx25DurationAllowed",()=>tI,"isLtx25FpsAllowed",()=>tz,"isLtx25ResolutionAllowed",()=>tx],877940);let tD={"ltx-2-5-fast":{"1280x720":60,"720x1280":60,"1920x1080":85,"1080x1920":85,"2560x1440":120,"1440
1x2560":120,"3840x2160":190,"2160x3840":190},"ltx-2-5-pro":{"1280x720":80,"720x1280":80,"1920x1080":110,"1080x1920":110}},tB={"ltx-2-5-fast":85,"ltx-2-5-pro":110};function tj(e,t){return tD[t][e]??tB[t]}let tO={maxFileSizeBytes:eb,allowedFormats:eg};function tV(e,t,i){ep(e,t,i,tO)}e.s(["LTX25_IMAGE_CONSTRAINTS",0,tO,"validateLtx25Frame",()=>tV],934416);var tN=u,tF=t,tU=u,tq=t;let tL=tU.z.enum(tl),t$=tU.z.union([tU.z.literal(24),tU.z.literal(25),tU.z.literal(48),tU.z.literal(50)]).default(tf).catch(tf),tH=tU.z.union([tU.z.literal(6),tU.z.literal(8),tU.z.literal(10),tU.z.literal(12),tU.z.literal(14),tU.z.literal(16),tU.z.literal(18),tU.z.literal(20),tU.z.null()]),tK=tU.z.enum(["dolly_in","dolly_out","dolly_left","dolly_right","jib_up","jib_down","static","focus_shift"]),tG=tU.z.enum(to).default(ts).catch(ts),tX=tU.z.object({prompt:tU.z.string().min(1).max(X,Z),videoCount:tU.z.number().int().min(1).max(tk).default(1),duration:tH,resolution:tL.default("1920x1080").catch("1920x1080"),fps:t$,mode:tG,generateAudio:tU.z.boolean().optional(),cameraMotion:tK.optional(),autoEnhancePrompt:tU.z.boolean().optional()}).superRefine((e,t)=>{tY(e,t),null===e.duration||tI(e.duration,e.resolution,e.fps,e.mode)||t.addIssue({code:tU.z.ZodIssueCode.custom,message:tJ(e.mode),path:["duration"]})}),tZ=tU.z.object({url:tU.z.string(),thumbnailUrl:tU.z.string().optional(),duration:tU.z.number().optional()});function tW(e){return e.duration??tM(e.resolution,e.fps,e.mode??ts)}function tY(e,t){tx(e.resolution,e.mode)||t.addIssue({code:tU.z.ZodIssueCode.custom,message:tA,path:["resolution"]}),null==e.fps||tz(e.fps,e.mode)||t.addIssue({code:tU.z.ZodIssueCode.custom,message:tP,path:["fps"]})}function tJ(e){return"ltx-2-5-pro"===e?tE:tR}let tQ=(0,tq.defineCapability)({id:"ltx2-5:text2video",name:"LTX 2.5 Text to Video",inputSchema:tX,outputSchema:tZ,getBusinessDetails:e=>{let t=tj(e.resolution,e.mode)*tW(e);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["getLtx25BillableSeconds",()=>tW,"ltx25CameraMotionSchema",0,tK,"ltx25DurationMessage",()=>tJ,"ltx25DurationSchema",0,tH,"ltx25FpsSchema",0,t$,"ltx25ModeSchema",0,tG,"ltx25Res
1olutionSchema",0,tL,"ltx25Text2Video",0,tQ,"refineLtx25ModeLimits",()=>tY],861882);let t0=tN.z.object({type:tN.z.literal("image"),id:tN.z.string(),url:tN.z.string(),label:tN.z.string(),metadata:tN.z.custom().optional()}),t1=tN.z.object({prompt:tN.z.string().min(1).max(X,Z),videoCount:tN.z.number().int().min(1).max(tk).default(1),startFrame:t0,endFrame:t0.nullish(),duration:tH,resolution:tL.default("1920x1080").catch("1920x1080"),fps:t$,mode:tG,generateAudio:tN.z.boolean().optional(),cameraMotion:tK.optional()}).superRefine((e,t)=>{tY(e,t),null===e.duration||tI(e.duration,e.resolution,e.fps,e.mode)||t.addIssue({code:tN.z.ZodIssueCode.custom,message:tJ(e.mode),path:["duration"]})}).refine(e=>null!==e.duration||(e.endFrame?.url?.trim()??"")==="",{message:tT,path:["duration"]}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{tV(e.startFrame?.metadata,t,["startFrame"]),e.endFrame&&(e.endFrame.url?.trim()??"")!==""&&tV(e.endFrame.metadata,t,["endFrame"])}),t2=tN.z.object({url:tN.z.string(),thumbnailUrl:tN.z.string().optional(),duration:tN.z.number().optional()}),t3=(0,tF.defineCapability)({id:"ltx2-5:image2video",name:"LTX 2.5 Image to Video",inputSchema:t1,outputSchema:t2,getBusinessDetails:e=>{let t=tj(e.resolution,e.mode)*tW(e);return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});function t4(e,t){return tM(e,tf,t)}e.s(["ltx25Image2Video",0,t3,"ltx25ImageReferenceSchema",0,t0],372895);let t6=tn.z.object({audioReference:ta.audioReferenceSchema,startFrame:t0.nullish(),endFrame:t0.nullish(),prompt:tn.z.string().max(X,Z).optional(),resolution:tL.default("1920x1080").catch("1920x1080"),mode:tG,videoCount:tn.z.number().int().min(1).max(tk).default(1),cameraMotion:tK.optional(),guidanceScale:tn.z.number().optional()}).refine(e=>(e.audioReference?.url?.trim()??"")!=="",{message:"Audio file is required",path:["audioReference"]}).superRefine(tY).superRefine((e,t)=>{v(e.audioReference?.metadata,t,["audioReference"],"ltx-2-5")}).refine(e=>null!=e.audioReference?.metadata?.duration,{message:"Audio duration metadata is required",path:["audioReference"]}).superRefine((e,t)=>{let i=e.audioReference?.metadata?.duration;if(null==i)return;let a=t4(e.resolution,e.mode);i>=tC&&i<=a||t.addIssue({code:"custom",message:`Audio duration must be between ${tC} and ${a} seconds at ${e.resolution}`,path:["audioReference"]})}).refine(e=>{let t=(e.startFrame?.url?.trim()??"")!=="",i=(e.prompt?.trim()??"")!=="";return t||i},{message:"Either start frame image or prompt is required",path:["prompt"]}).refine(e=>(e.endFrame?.url?.trim()??"")===""||(e.startFrame?.url?.trim()??"")!=="",{message:"An end frame requires a start frame",path:["endFrame"]}).superRefine((e,t)=>{(e.startFrame?.url?.trim()??"")!==""&&tV(e.startFrame?.metadata,t,["startFrame"]),(e.endFrame?.url?.trim()??"")!==""&&tV(e.endFrame?.metadata,t,["endFrame"])}),t5=tn.z.object({url:tn.z.string(),thumbnailUrl:tn.z.string().optional()}),t8=(0,tr.defineCapability)({id:"ltx2-5:audio2video",name:"LTX 2.5 Audio to Video",inputSchema:t6,outputSchema:t5,getBusinessDetails:e=>{let t=e.audioReference?.metadata?.duration;if(null==t)throw Error("Audio duration metadata is required for creation");let i=tj(e.resolution,e.mode)*Math.round(t);return{unitCredits:i,quantity:e.videoCount??1,totalCredits:i*(e.videoCount??1)}}});e.s(["ltx25Audio2Video",0,t8],906117);let t9=(0,ti.defineModel)({id:"ltx2-5",name:"LTX 2.5",description:"Lightricks LTX-2.5 video generation (text-to-vi
1deo, image-to-video, and audio-to-video)",metadata:{creator:"Lightricks"},capabilities:{text2video:tQ,image2video:t3,audio2video:t8}});e.s(["ltx25Model",0,t9],315846);var t7=t,ie=u,it=t;let ii=4,ia=30,ir=60,io=15,is=30,iu=ie.z.enum(["1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2"]).default("1:1").catch("1:1"),id=ie.z.enum(["fast","turbo"]).default("fast").catch("fast"),il=ie.z.union([ie.z.literal(1),ie.z.literal(2),ie.z.literal(4)]).default(1).catch(1),ic=ie.z.object({prompt:ie.z.string().trim().min(1).max(4e3),imageCount:ie.z.literal(ii).default(ii),aspectRatio:iu,mode:id,isDraft:ie.z.boolean().default(!1),quality:il,chaos:ie.z.number().int().min(0).max(100).default(0),stylize:ie.z.number().int().min(0).max(1e3).default(100),autoEnhancePrompt:ie.z.boolean().optional()}).superRefine((e,t)=>{e.isDraft&&4===e.quality&&t.addIssue({code:ie.z.ZodIssueCode.custom,path:["quality"],message:"Midjourney v7 draft mode only supports quality 1 or 2"})}),im=ie.z.object({resourceId:ie.z.string(),url:ie.z.string(),thumbnailUrl:ie.z.string().optional(),width:ie.z.number().int().positive().optional(),height:ie.z.number().int().positive().optional()}),ih=ie.z.object({resources:ie.z.array(im).length(ii)});function ip(e,t){return t?"turbo"===e?is:io:"turbo"===e?ir:ia}let ib=(0,it.defineCapability)({id:"midjourney-v7:text2image",name:"Midjourney v7 Text to Image",inputSchema:ic,outputSchema:ih,getBusinessDetails:e=>{let t=ip(e.mode,e.isDraft);return{unitCredits:t,quantity:ii,totalCredits:t*ii}}});e.s(["MIDJOURNEY_V7_OUTPUT_COUNT",0,ii,"midjourneyV7Text2Image",0,ib],471968);let ig=(0,t7.defineModel)({id:"midjourney-v7",name:"Midjourney v7",description:"Midjourney v7 fixed four-image text-to-image generation",metadata:{creator:"Midjourney",tier:"flagship"},capabilities:{text2image:ib}});e.s(["midjourneyV7Model",0,ig],480786);var iv=t,iy=u,ix=t;let iz=4,i_=30,iS=1.5,iM=iy.z.enum(["1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2"]).default("1:1").catch("1:1"),iI=iy.z.union([iy.z.literal(1),iy.z.literal(4)]).default(1).catch(1),iw=iy.z.enum(["1k","2k"]).default("1k").catch("1k"),iC=iy.z.object({prompt:iy.z.string().trim().min(1).max(4e3),imageCount:iy.z.literal(iz).default(iz),aspectRatio:iM,quality:iI,resolution:iw,chaos:iy.z.number().int().min(0).max(100).default(0),stylize:iy.z.number().int().min(0).max(1e3).default(100),autoEnhancePrompt:iy.z.boolean().optional()}),iR=iy.z.object({resourceId:iy.z.string(),url:iy.z.string(),thumbnailUrl:iy.z.string().optional(),width:iy.z.number().int().positive().optional(),height:iy.z.number().int().positive().optional()}),iE=iy.z.object({resources:iy.z.array(iR).length(iz)});function iA(e){let t=i_;return"2k"===e?Math.ceil(t*iS):t}let iP=(0,ix.defineCapability)({id:"midjourney-v8-1:text2image",name:"Midjourney v8.1 Text to Image",inputSchema:iC,outputSchema:iE,getBusinessDetails:e=>{let t=iA(e.resolution);return{unitCredits:t,quantity:iz,totalCredits:t*iz}}});e.s(["MIDJOURNEY_V8_1_OUTPUT_COUNT",0,iz,"midjourneyV81Text2Image",0,iP],502993);let iT=(0,iv.defineModel)({id:"midjourney-v8-1",name:"Midjourney v8.1",description:"Midjourney v8.1 fixed four-image text-to-image generation",metadata:{creator:"Midjourney",tier:"flagship"},capabilities:{text2image:iP}});e.s(["midjourneyV81Model",0,iT],181763);var ik=t,iD=u,iB=s,ij=t;let iO=["768P","2K"],iV="2K",iN=6e3,iF=5,iU=15,iq={"768P":60,"2K":90};function iL(e){return iq[e]??iq[iV]}let i$={"768P":60,"2K":90};function iH(e){return i$[e]??i$[iV]}let iK=5,iG=25,iX=["21:9","16:9","4:3","1:1","3:4","9:16"],iZ=9,iW=3,iY=2,iJ=15,iQ=15,i0=2,i1=.08,i2=15,i3=15,i4=3;e.s(["H3_ASPECT_RATIOS",0,iX,"H3_AUDIO_DURATION_UNDERCOUNT_S",0,i1,"H3_AUDIO_MAX_DURATION_S",0,i2,"H3_AUDIO_MIN_DURATION_S",0,i0,"H3_AUDIO_TOTAL_MAX_DURATION_S",0,i3,"H3_CREDITS_PER_EXTRA_INPUT_IMAGE",0,iG,"H3_DEFAULT_RESOLUTION",0,iV,"H3_FREE_INPUT_IMAGES",0,iK,"H3_MAX_DURATION_S",0,iU,"H3_MAX_REFERENCE_AUDIOS",0,i4,"H3_MAX_REFERENCE_IMAGES",0,iZ,"H3_MAX_REFERENCE_VIDEOS",0,iW,"H3_MIN_DURATION_S",0,iF,"H3_PROMPT_MAX_CHARACTERS",0,iN,"H3_RESOLUTIONS",0,iO,"H3_VIDEO_MAX_DURATION_S",0,iJ,"H3_VIDEO_MIN_DURATION_S",0,iY,"H3_VIDEO_TOTAL_MAX_DURATION_S",0,iQ,"h3CreditsPerInputVideoSecond",()=>iH,"h3CreditsPerSecond",()=>iL],754985);let i6=iD.z.union([iB.imageReferenceSchema,iB.characterReferenceSchema,iB.elementReferenceSchema,iB.videoReferenceSchema,iB.audioReferenceSchema]);function i5(e,t,i){let a=(i?.layer??"capability")==="capability",n=e.filter(e=>"image"===e.type||"character"===e.type||"element"===e.type),r=e.filter(e=>"video"===e.type),o=e.filter(e=>"audio"===e.type);n.length>iZ&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:`Maximum ${iZ} images allowed`,path:["visualReferences"]}),r.length>iW&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:`Maximum ${iW} videos allowed`,path:["visualReferences"]}),o.length>i4&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:`Maximum ${i4} audios allowed`,path:["visualReferences"]}),a&&o.length>0&&0===n.length&&0===r.length&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:"Audio must be paired with at least one image or video",path:["visualReferences"]});let s=0;for(let i of r){let n=e.indexOf(i),r=i.metadata?.duration;if("number"!=typeof r||!Number.isFinite(r)){a&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:"Video metadata is required",path:["visualReferences",n]});continue}(r<iY||r>iJ)&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:`Video duration must be between ${iY}s and ${iJ}s`,path:["visualReferences",n]}),s+=r}s>iQ&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:`Total video duration must not exceed ${iQ}s (current: ${s.toFixed(2)}s)`,path:["visualReferences"]});let u=0;for(let i of o){let n=e.indexOf(i),r=i.metadata?.duration;if("number"!=typeof r||!Number.isFinite(r)){a&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:"Audio metadata is required",path:["visualReferences",n]});continue}(r<i0||r>i2)&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:`Audio duration must be between ${i0}s and ${i2}s`,path:["visualReferences",n]}),u+=r+i1}u>i3&&t.addIssue({code:iD.z.ZodIssueCode.custom,message:`Total audio duration must not exceed ${i3}s (current: ${u.toFixed(2)}s)`,path:["visualReferences"]})}let i8=iD.z.object({prompt:iD.z.string().trim().min(1).max(iN,`Prompt must be ${iN} characters or less`),videoCount:iD.z.number().int().min(1).max(8).default(1),duration:iD.z.number().int().min(iF).max(iU).default(iF).c
1atch(iF),aspectRatio:iD.z.enum(iX).default("16:9").catch("16:9"),resolution:iD.z.enum(iO).default(iV).catch(iV),visualReferences:iD.z.array(i6).min(1),autoEnhancePrompt:iD.z.boolean().optional()}).superRefine((e,t)=>{i5(e.visualReferences,t)}),i9=iD.z.object({url:iD.z.string(),thumbnailUrl:iD.z.string().optional()});function i7(e){let t=Math.max(0,e.visualReferences.filter(e=>"image"===e.type||"character"===e.type||"element"===e.type).length-iK),i=e.visualReferences.reduce((e,t)=>{if("video"!==t.type)return e;let i=t.metadata?.duration;return e+("number"==typeof i?i:0)},0);return iL(e.resolution)*e.duration+iG*t+iH(e.resolution)*Math.ceil(i)}let ae=(0,ij.defineCapability)({id:"minimax-h3:element2video",name:"MiniMax H3 Element to Video",inputSchema:i8,outputSchema:i9,getBusinessDetails:e=>{let t=i7(e),i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["minimaxH3Element2Video",0,ae,"validateH3ReferenceCounts",()=>i5],250519);var at=u,ai=s,aa=t,an=em,ar=u;let ao={maxFileSizeBytes:0x1e00000,minDimensionPx:256,maxDimensionPx:5760,minAspectRatio:.4,maxAspectRatio:2.5,allowedFormats:["jpeg","jpg","png","webp","heic","heif"],maxReferenceImages:iZ},as={minDuration:iY,maxDuration:iJ,totalMaxDuration:iQ,maxFileSizeBytes:0x3200000},au={minDuration:i0,maxDuration:i2,totalMaxDuration:i3,maxFileSizeBytes:0xf00000,allowedFormats:["wav","mp3"]},ad={max:iZ+iW+i4,maxPerType:{video:iW,audio:i4}};function al(e,t,i,a){let n=[...i,"metadata"];if(!e){(a?.requireMetadata??!0)&&t.addIssue({code:ar.z.ZodIssueCode.custom,message:"Image metadata is required",path:n});return}let r=(0,an.validateReferenceImageMetadata)(e,ao);r&&t.addIssue({code:ar.z.ZodIssueCode.custom,message:r.message,path:n})}e.s(["H3_AUDIO_CONSTRAINTS",0,au,"H3_IMAGE_CONSTRAINTS",0,ao,"H3_REFERENCE_MEDIA_LIMITS",0,ad,"H3_VIDEO_CONSTRAINTS",0,as,"validateH3Frame",()=>al],908701);let ac=at.z.object({prompt:at.z.string().trim().min(1).max(iN,`Prompt must be ${iN} characters or less`),videoCount:at.z.number().int().min(1).max(8).default(1),duration:at.z.number().int().min(iF).max(iU).default(iF).catch(iF),resolution:at.z.enum(iO).default(iV).catch(iV),startFrame:ai.imageReferenceSchema,endFrame:ai.imageReferenceSchema.nullable().optional()}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}).superRefine((e,t)=>{let i={requireMetadata:!1};al(e.startFrame?.metadata,t,["startFrame"],i),e.endFrame&&al(e.endFrame.metadata,t,["endFrame"],i)}),af=at.z.object({url:at.z.string(),thumbnailUrl:at.z.string().optional()}),am=(0,aa.defineCapability)({id:"minimax-h3:image2video",name:"MiniMax H3 Image to Video",inputSchema:ac,outputSchema:af,getBusinessDetails:e=>{let t=iL(e.resolution)*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["minimaxH3Image2Video",0,am],80203);var ah=u,ap=t;let ab=ah.z.object({prompt:ah.z.string().trim().min(1).max(iN,`Prompt must be ${iN} characters or less`),videoCount:ah.z.number().int().min(1).max(8).default(1),duration:ah.z.number().int().min(iF).max(iU).default(iF).catch(iF),aspectRatio:ah.z.enum(iX).default("16:9").catch("16:9"),resolution:ah.z.enum(iO).default(iV).catch(iV),autoEnhancePrompt:ah.z.boolean().optional()}),ag=ah.z.object({url:ah.z.string(),thumbnailUrl:ah.z.string().optional()}),av=(0,ap.defineCapability)({id:"minimax-h3:text2video",name:"MiniMax H3 Text to Video",inputSchema:ab,outputSchema:ag,getBusinessDetails:e=>{let t=iL(e.resolution)*e.duration,i=e.videoCount??1;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["minimaxH3Text2Video",0,av],158347);let ay=(0,ik.defineModel)({id:"minimax-h3",name:"MiniMax H3",description:"MiniMax H3 (Hailuo 3.0) 2K video generation model",metadata:{creator:"Minimax",aliases:["MiniMax-H3","Hailuo 3.0","Hailuo H3","Hailuo 03","海螺"]},capabilities:{text2video:av,image2video:am,element2video:ae}});e.s(["minimaxH3Model",0,ay],70374)},849776,808892,943543,895963,583412,344740,3338,575552,266473,45689,813925,234751,860080,940477,483653,218075,224037,920111,e=>{"use strict";var t=e.i(625468),i=e.i(176590),a=e.i(795106);let n=(0,t.defineModel)({id:"hailuo-2-3",name:"Hailuo 2.3",description:"Minimax Hailuo 2.3 video generation model",metadata:{creator:"Minimax"},capabilities:{text2video:a.hailuo23Text2Video,image2video:i.hailuo23Image2Video}});e.s(["hailuo23Model",0,n],849776);var r=t,o=e.i(207653),s=t;let u=o.z.object({type:o.z.literal("image"),id:o.z.string(),url:o.z.string(),label:o.z.string(),metadata:o.z.custom().optional()}),d=o.z.object({prompt:o.z.string().min(1),videoCount:o.z.number().int().min(1).max(8).default(1),startFrame:u,endFrame:u.nullable().optional(),duration:o.z.union([o.z.literal(6),o.z.literal(10)]).default(6).catch(6),resolution:o.z.enum
1(["512p","768p","1080p"]).default("768p").catch("768p")}).refine(e=>10!==e.duration||"1080p"!==e.resolution,{message:"10s duration only supports 512p or 768p resolution",path:["resolution"]}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),l=o.z.object({url:o.z.string(),thumbnailUrl:o.z.string().optional(),duration:o.z.number()}),c={6:{"512p":50,"768p":150,"1080p":300},10:{"512p":75,"768p":300,"1080p":0}},f=(0,s.defineCapability)({id:"hailuo-02:image2video",name:"Hailuo 02 Image to Video",inputSchema:d,outputSchema:l,getBusinessDetails:e=>{let t=c[6===e.duration?"6":"10"][e.resolution];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["hailuo02Image2Video",0,f],808892);var m=o,h=t;let p=m.z.object({prompt:m.z.string().min(1),videoCount:m.z.number().int().min(1).max(8).default(1),duration:m.z.union([m.z.literal(6),m.z.literal(10)]).default(6).catch(6),resolution:m.z.enum(["768p","1080p"]).default("768p").catch("768p"),autoEnhancePrompt:m.z.boolean().optional()}).refine(e=>10!==e.duration||"1080p"!==e.resolution,{message:"10s duration only supports 768p resolution",path:["resolution"]}),b=m.z.object({url:m.z.string(),thumbnailUrl:m.z.string().optional(),duration:m.z.number()}),g={6:{"768p":150,"1080p":300},10:{"768p":300,"1080p":0}},v=(0,h.defineCapability)({id:"hailuo-02:text2video",name:"Hailuo 02 Text to Video",inputSchema:p,outputSc
1hema:b,getBusinessDetails:e=>{let t=g[6===e.duration?"6":"10"][e.resolution];return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["hailuo02Text2Video",0,v],943543);let y=(0,r.defineModel)({id:"hailuo-02",name:"Hailuo 02",description:"Minimax Hailuo 02 video generation model",metadata:{creator:"Minimax"},capabilities:{text2video:v,image2video:f}});e.s(["hailuo02Model",0,y],895963);var x=t,z=o,_=t;let S=z.z.object({prompt:z.z.string().trim().min(1).max(1e4),voiceId:z.z.string().min(1),speed:z.z.number().min(.5).max(2).default(1).catch(1),vol:z.z.number().min(.1).max(10).default(1).catch(1),pitch:z.z.number().min(-12).max(12).default(0).catch(0),tone:z.z.number().min(-100).max(100).default(0).catch(0),intensity:z.z.number().min(-100).max(100).default(0).catch(0),timbre:z.z.number().min(-100).max(100).default(0).catch(0)}),M=z.z.object({url:z.z.string()}),I=(0,_.defineCapability)({id:"minimax-speech-2-8-hd:text2speech",name:"Minimax Speech 2.8 HD",inputSchema:S,outputSchema:M,getBusinessDetails:e=>{let t=25,i=1,a=5*Math.ceil(Math.max(1,Math.ceil(e.prompt.length*i/t))/5);return{unitCredits:a,quantity:1,totalCredits:a}}});e.s(["minimaxMinimaxSpeech28Hd",0,I],583412);let w=(0,x.defineModel)({id:"minimax-speech-2-8-hd",name:"Minimax Speech 2.8 HD",capabilities:{text2speech:I}});e.s(["minimaxMinimaxSpeech28HdModel",0,w],344740),e.s([],3338);var C=t,R=o,E=t;let A=R.z.object({prompt:R.z.string().trim().min(1).max(1e4),voiceId:R.z.string().min(1),speed:R.z.number().min(.5).max(2).default(1).catch(1),vol:R.z.number().min(.1).max(10).default(1).catch(1),pitch:R.z.number().min(-12).max(12).default(0).catch(0),tone:R.z.number().min(-100).max(100).default(0).catch(0),intensity:R.z.number().min(-100).max(100).default(0).catch(0),timbre:R.z.number().min(-100).max(100).default(0).catch(0)}),P=R.z.object({url:R.z.string()}),T=(0,E.defineCapability)({id:"minimax-speech-2-8-turbo:text2speech",name:"Minimax Speech 2.8 Turbo",inputSchema:A,outputSchema:P,getBusinessDetails:e=>{let t=25,i=.6,a=5*Math.ceil(Math.max(1,Math.ceil(e.prompt.length*i/t))/5);return{unitCredits:a,quantity:1,totalCredits:a}}});e.s(["minimaxMinimaxSpeech28Turbo",0,T],575552);let k=(0,C.defineModel)({id:"minimax-speech-2-8-turbo",name:"Minimax Speech 2.8 Turbo",capabilities:{text2speech:T}});e.s(["minimaxMinimaxSpeech28TurboModel",0,k],266473),e.s([],45689);let D="Hi, I'm your OpenArt voice. Use me to bring your character to life.",B=1,j=250;e.s(["DEFAULT_VOICE_DESIGN_PREVIEW_SCRIPT",0,D,"MINIMAX_SAVE_BINDING_CREDITS",0,j,"MINIMAX_VOICE_DESIGN_CREDITS_PER_CALL",0,B],813925);var O=o,V=t;let N=O.z.object({voiceDescription:O.z.string().trim().min(1).max(1e4),previewText:O.z.string().trim().min(1).max(500).default(D).catch(D),voiceCount:O.z.number().int().min(1).max(4).default(1).catch(1)}).transform(e=>({...e,prompt:e.previewText})),F=O.z.object({url:O.z.string(),voiceId:O.z.string().min(1)}),U=(0,V.defineCapability)({id:"minimax-voice-design:design-voice",name:"Minimax Voice Design",inputSchema:N,outputSchema:F,getBusinessDetails:e=>{let t=e.voiceCount;return{unitCredits:B,quantity:t,totalCredits:B*t}}});e.s(["minimaxVoiceDesignDesignVoice",0,U],234751);let q=(0,t.defineModel)({id:"minimax-voice-design",name:"Minimax Voice Design",description:"Design a custom voice from a description (Minimax /v1/voice_design). Returns a durable voice id usable with Minimax t2a_v2 plus a preview audio.",metadata:{creator:"Minimax",aliases:["minimax voice design","voice design"]},capabilities:{"design-voice":U}});e.s(["minimaxVoiceDesignModel",0,q],860080),e.s([],940477);var L=t,$=o,H=e.i(200744),K=t;let G={low:6,medium:25,high:90};function X(e){return G["auto"===e?"high":e]}let Z=262144,W=.3,Y=1024;function J(e){return 0===e.length?0:Math.max(1,Math.ceil(W*e.reduce((e,t)=>e+Math.ceil((t.metadata?.width??Y)*(t.metadata?.height??Y)/Z),0)))}e.s(["getGptImage15InputCredits",()=>J,"getGptImage15OutputCredits",()=>X],483653);let Q=$.z.enum(["1024x1024","1536x1024","1024x1536","auto"]).default("1024x1024"),ee=$.z.enum(["low","medium","high","auto"]).default("auto"),et=$.z.enum(["png","jpeg","webp"]).default("png"),ei=$.z.enum(["transparent","opaque","auto"]).default("auto"),ea=$.z.object({prompt:$.z.string().trim().min(1),imageCount:$.z.number().int().min(1).max(8).default(1),size:Q,quality:ee,outputFormat:et,outputCompression:$.z.number().int().min(0).max(100).optional(),background:ei,references:$.z.array($.z.union([H.imageReferenceSchema,H.characterReferenceSchema])).min(1).max(16),inputFidelity:$.z.enum(["low","high"]).optional()}),en=$.z.object({images:$.z.array($.z.object({url:$.z.string(),thumbnailUrl:$.z.string().optional(),width:$.z.number().optional(),height:$.z.number().optional()}))}),er=(0,K.defineCapability)({id:"gpt-image-1-5:image2image",name:"GPT Image 1.5 Image to Image",inputSchema:ea,outputSc
1hema:en,getBusinessDetails:e=>{let t=X(e.quality)+J(e.references),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["gptImage15Image2Image",0,er],218075);var eo=o,es=t;let eu=eo.z.enum(["1024x1024","1536x1024","1024x1536","auto"]).default("1024x1024"),ed=eo.z.enum(["low","medium","high","auto"]).default("auto"),el=eo.z.enum(["png","jpeg","webp"]).default("png"),ec=eo.z.enum(["transparent","opaque","auto"]).default("auto"),ef=eo.z.object({prompt:eo.z.string().trim().min(1),imageCount:eo.z.number().int().min(1).max(8).default(2),size:eu,quality:ed,outputFormat:el,outputCompression:eo.z.number().int().min(0).max(100).optional(),background:ec,autoEnhancePrompt:eo.z.boolean().optional()}),em=eo.z.object({images:eo.z.array(eo.z.object({url:eo.z.string(),thumbnailUrl:eo.z.string().optional(),width:eo.z.number().optional(),height:eo.z.number().optional()}))}),eh=(0,es.defineCapability)({id:"gpt-image-1-5:text2image",name:"GPT Image 1.5 Text to Image",inputSchema:ef,outputSchema:em,getBusinessDetails:e=>{let t=X(e.quality),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["gptImage15Text2Image",0,eh],224037);let ep=(0,L.defineModel)({id:"gpt-image-1-5",name:"GPT Image 1.5",description:"OpenAI GPT Image 1.5 image generation",metadata:{creator:"OpenAI",tier:"legacy"},capabilities:{text2image:eh,image2image:er}});e.s(["gptImage15Model",0,ep],920111)},173694,e=>{"use strict";let t={low:256,medium:2304,high:9216},i=5e-7,a=.0073,n=5,r=e=>{let[t,i]=e.split("x").map(Number);return Number.isFinite(t)&&Number.isFinite(i)?t*i:1048576};function o(e,o){return Math.ceil(t["auto"===o?"high":o]*(1+r(e)*i)*a/n)*n}let s=262144,u=.3,d=1024;function l(e){return 0===e.length?0:Math.max(1,Math.ceil(u*e.reduce((e,t)=>e+Math.ceil((t.metadata?.width??d)*(t.metadata?.height??d)/s),0)))}e.s(["getGptImage2InputCredits",()=>l,"getGptImage2OutputCredits",()=>o])},365596,130150,461341,333804,208062,e=>{"use strict";var t=e.i(207653),i=e.i(200744),a=e.i(625468),n=e.i(173694);let r=655360,o=8294400,s=3840,u=16,d=3,l={"21:9":{"1k":{width:2352,height:1008},"2k":{width:3136,height:1344},"4k":{width:3808,height:1632}},"16:9":{"1k":{width:1792,height:1008},"2k":{width:2304,height:1296},"4k":{width:3584,height:2016}},"3:2":{"1k":{width:1536,height:1024},"2k":{width:2016,height:1344},"4k":{width:3072,height:2048}},"4:3":{"1k":{width:1344,height:1008},"2k":{width:1792,height:1344},"4k":{width:2688,height:2016}},"5:4":{"1k":{width:1280,height:1024},"2k":{width:1680,height:1344},"4k":{width:2560,height:2048}},"1:1":{"1k":{width:1024,height:1024},"2k":{width:1360,height:1360},"4k":{width:2048,height:2048}},"9:21":{"1k":{width:1008,height:2352},"2k":{width:1344,height:3136},"4k":{width:1632,height:3808}},"9:16":{"1k":{width:1008,height:1792},"2k":{width:1296,height:2304},"4k":{width:2016,height:3584}},"2:3":{"1k":{width:1024,height:1536},"2k":{width:1344,height:2016},"4k":{width:2048,height:3072}},"3:4":{"1k":{width:1008,height:1344},"2k":{width:1344,height:1792},"4k":{width:2016,height:2688}},"4:5":{"1k":{width:1024,height:1280},"2k":{width:1344,height:1680},"4k":{width:2048,height:2560}}},c=`Both edges must be multiples of ${u}, max edge ${s}, long/short ratio <= ${d}:1, total pixels ${r}-${o}.`,f=`Valid sizes by aspect ratio: ${Object.entries(l).map(([e,t])=>`${e} ${Object.keys(t).map(e=>`${t[e].width}x${t[e].height} (${e.toUpperCase()})`).join(" | ")}`).join("; ")}.`,m=`Output resolution as "WxH" in pixels. ${c} ${f} Prefer a listed size; any other WxH meeting the constraints is also accepted.`,h=`invalid gpt-image-2 size. ${c} ${f}`,p=(e,t)=>{for(let[i,a]of Object.entries(l))for(let n of Object.keys(a)){let r=a[n];if(r.width===e&&r.height===t)return{aspectRatio:i,tier:n}}return null},b=e=>Object.hasOwn(l,e),g={"1k":1024,"2k":1360,"4k":2048},v=e=>Math.floor(e/u)*u,y=e=>Math.round(e/u)*u,x=(e,t)=>{let i=Math.abs(Math.round(e)),a=Math.abs(Math.round(t));for(;a;)[i,a]=[a,i%a];return i||1},z=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<=0||e%u!=0||t%u!=0||Math.max(e,t)>s||Math.max(e,t)/Math.min(e,t)>d)return!1;let i=e*t;return i>=r&&i<=o},_=e=>{let t=e.split(":");if(2!==t.length)return null;let i=Number(t[0]),a=Number(t[1]);return!Number.isFinite(i)||!Number.isFinite(a)||i<=0||a<=0?null:{longRatio:Math.max(i,a),shortRatio:Math.min(i,a),isLandscape:i>=a}},S=(e,t)=>{let i=l[e]?.[t];if(i)return{...i};let a=_(e);if(!a)return null;
1let{longRatio:n,shortRatio:r,isLandscape:o}=a;if(n/r>d)return null;let c=x(n,r),f=n/c,m=r/c,h=Math.min(Math.floor(g[t]/(u*m)),Math.floor(s/(u*f)));if(h<=0)return null;let p=u*f*h,b=u*m*h,v=o?p:b,y=o?b:p;return z(v,y)?{width:v,height:y}:null},M=(e,t)=>{let i={width:1024,height:1024};if(!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<=0)return i;let a=y(e),n=y(t);if(a<u&&(a=u),n<u&&(n=u),Math.max(a,n)>s){let e=s/Math.max(a,n);a=v(a*e),n=v(n*e),a<u&&(a=u),n<u&&(n=u)}if(Math.max(a,n)/Math.min(a,n)>d&&(a>n?a=v(n*d):n=v(a*d)),a*n>o){let e=Math.sqrt(o/(a*n));a=v(a*e),n=v(n*e)}if(a*n<r){let e=Math.sqrt(r/(a*n));if(Math.max(a=Math.ceil(a*e/u)*u,n=Math.ceil(n*e/u)*u)>s){let e=s/Math.max(a,n);a=v(a*e),n=v(n*e)}Math.max(a,n)/Math.min(a,n)>d&&(a>n?a=v(n*d):n=v(a*d))}return z(a,n)?{width:a,height:n}:i},I=(e,t)=>`${e}x${t}`,w=(e,t,i)=>{let a;if(!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<=0)return null;let n=Math.log(e/t),r=1/0;for(let e of Object.keys(l)){let t=_(e);if(!t)continue;let i=Math.abs(n-Math.log(t.isLandscape?t.longRatio/t.shortRatio:t.shortRatio/t.longRatio));i<r&&(r=i,a=e)}return a?S(a,i):null};e.s(["GPT_IMAGE_2_INVALID_SIZE_MESSAGE",0,h,"GPT_IMAGE_2_SIZE_DESCRIPTION",0,m,"computeGptImage2Size",0,S,"findClosestGptImage2Size",0,w,"findGptImage2CanonicalSizePreset",0,p,"formatSize",0,I,"isGptImage2CanonicalAspectRatio",0,b,"isValidGptImage2Size",0,z,"snapToValidGptImage2Size",0,M],130150);let C=t.z.string().regex(/^\d+x\d+$/).refine(e=>{let[t,i]=e.split("x").map(Number);return z(t,i)},h).describe(m),R=t.z.enum(["low","medium","high","auto"]).default("auto"),E=t.z.enum(["png","jpeg","webp"]).default("png"),A=t.z.object({prompt:t.z.string().trim().min(1),imageCount:t.z.number().int().min(1).max(8).default(1),size:C,quality:R,outputFormat:E,outputCompression:t.z.number().int().min(0).max(100).optional(),references:t.z.array(t.z.union([i.imageReferenceSchema,i.characterReferenceSchema])).min(1).max(16),inputFidelity:t.z.enum(["low","high"]).optional()}),P=t.z.object({images:t.z.array(t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),width:t.z.number().optional(),height:t.z.number().optional()}))}),T=e=>{let t=(0,n.getGptImage2OutputCredits)(e.size,e.quality)+(0,n.getGptImage2InputCredits)(e.references),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}},k=(0,a.defineCapability)({id:"gpt-image-2:image2image",name:"GPT Image 2 Image to Image",inputSchema:A,outputSchema:P,getBusinessDetails:T});e.s(["gptImage2Image2Image",0,k,"image2imageGetBusinessDetails",0,T,"image2imageInputSchema",0,A,"image2imageOutputSchema",0,P],365596);var D=a,B=t,j=a,O=n;let V=B.z.string().regex(/^\d+x\d+$/).refine(e=>{let[t,i]=e.split("x").map(Number);return z(t,i)},h).describe(m),N=B.z.enum(["low","medium","high","auto"]).default("auto"),F=B.z.enum(["png","jpeg","webp"]).default("png"),U=B.z.object({prompt:B.z.string().trim().min(1),imageCount:B.z.number().int().min(1).max(8).default(2),size:V,quality:N,outputFormat:F,outputCompression:B.z.number().int().min(0).max(100).optional(),autoEnhancePrompt:B.z.boolean().optional()}),q=B.z.object({images:B.z.array(B.z.object({url:B.z.string(),thumbnailUrl:B.z.string().optional(),width:B.z.number().optional(),height:B.z.number().optional()}))}),L=e=>{let t=(0,O.getGptImage2OutputCredits)(e.size,e.quality),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}},$=(0,j.defineCapability)({id:"gpt-image-2:text2image",name:"GPT Image 2 Text to Image",inputSchema:U,outputSchema:q,getBusinessDetails:L});e.s(["gptImage2Text2Image",0,$,"text2imageGetBusinessDetails",0,L,"text2imageInputSchema",0,U,"text2imageOutputSchema",0,q],461341);let H=(0,D.defineCapability)({id:"gpt-image-2-minimax:text2image",name:"GPT Image 2 (Minimax) Text to Image",internal:!0,inputSchema:U,outputSchema:q,getBusinessDetails:L}),K=(0,D.defineCapability)({id:"gpt-image-2-minimax:image2image",name:"GPT Image 2 (Minimax) Image to Image",internal:!0,inputSchema:A,outputSchema:P,getBusinessDetails:T});e.s(["gptImage2MinimaxImage2Image",0,K,"gptImage2MinimaxText2Image",0,H],333804);var G=a;let X=(0,G.defineCapability)({id:"gpt-image-2-rampingup:text2image",name:"GPT Image 2 (
1Ramping Up) Text to Image",internal:!0,inputSchema:U,outputSchema:q,getBusinessDetails:L}),Z=(0,G.defineCapability)({id:"gpt-image-2-rampingup:image2image",name:"GPT Image 2 (Ramping Up) Image to Image",internal:!0,inputSchema:A,outputSchema:P,getBusinessDetails:T});e.s(["gptImage2RampingUpImage2Image",0,Z,"gptImage2RampingUpText2Image",0,X],208062)},658108,e=>{"use strict";var t=e.i(207653),i=e.i(625468),a=e.i(173694);let n=t.z.enum(["1024x1024","1536x1024","1024x1536","auto"]).default("auto"),r=t.z.enum(["low","medium","high","auto"]).default("auto"),o=t.z.enum(["png","jpeg","webp"]).default("png"),s=t.z.enum(["transparent","opaque","auto"]).default("auto"),u=t.z.object({prompt:t.z.string().trim().min(1),instructions:t.z.string().trim().optional(),previousResponseId:t.z.string().trim().min(1).optional(),references:t.z.array(t.z.string().url()).max(16).default([]),size:n,quality:r,outputFormat:o,outputCompression:t.z.number().int().min(0).max(100).optional(),background:s,orchestratorModel:t.z.string().trim().default("gpt-5.4")}),d=t.z.object({images:t.z.array(t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional(),width:t.z.number().optional(),height:t.z.number().optional()})),revisedPrompt:t.z.string(),videoPrompt:t.z.string(),responseId:t.z.string().trim().min(1)}),l=(0,i.defineCapability)({id:"gpt-image-2:responses-image-gen",name:"GPT Image 2 via Responses API",inputSchema:u,outputSchema:d,getBusinessDetails:e=>{let t="auto"===e.size?"1024x1024":e.size,i=(0,a.getGptImage2OutputCredits)(t,e.quality);return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["gptImage2ResponsesImageGen",0,l])},759307,988523,498485,473072,393912,96623,e=>{"use strict";var t=e.i(625468),i=e.i(365596),a=e.i(333804),n=e.i(208062),r=e.i(658108),o=e.i(461341);let s=(0,t.defineModel)({id:"gpt-image-2",name:"GPT Image 2",description:"OpenAI GPT Image 2 image generation",metadata:{creator:"OpenAI",tier:"flagship"},capabilities:{text2image:o.gptImage2Text2Image,image2image:i.gptImage2Image2Image,"responses-image-gen":r.gptImage2ResponsesImageGen,text2imageMinimax:a.gptImage2MinimaxText2Image,image2imageMinimax:a.gptImage2MinimaxImage2Image,text2imageRampingUp:n.gptImage2RampingUpText2Image,image2imageRampingUp:n.gptImage2RampingUpImage2Image}});e.s(["gptImage2Model",0,s],759307);var u=e.i(207653),d=t,l=i,c=o;let f=["flare","sunburst"],m=u.z.enum(["low","medium","high"]).default("low"),h=c.text2imageInputSchema.extend({quality:m}),p=u.z.string().min(1).optional().describe("Optional inpainting mask, as a URL to a PNG under 4 MB whose FULLY TRANSPARENT pixels mark the region to edit and whose dimensions match the first reference image exactly. Produced by an editing canvas — leave unset unless you already hold such a mask; an ordinary image URL is not a mask and OpenAI will reject it."),b=l.image2imageInputSchema.omit({inputFidelity:!0}).extend({quality:m,mask:p}),g={flare:"Flare",sunburst:"Sunburst"};function v(e,t,i){let a=`gpt-image-2-5-${e}`,n=`GPT Image 2.5 ${g[e]}`,r=(0,d.defineCapability)({id:`${a}:text2image`,name:`${n}
1 Text to Image`,inputSchema:h,outputSchema:c.text2imageOutputSchema,getBusinessDetails:c.text2imageGetBusinessDetails}),o=(0,d.defineCapability)({id:`${a}:image2image`,name:`${n} Image to Image`,inputSchema:b,outputSchema:l.image2imageOutputSchema,getBusinessDetails:l.image2imageGetBusinessDetails});return{model:(0,d.defineModel)({id:a,name:n,description:t,metadata:{creator:"OpenAI",tier:"latest",aliases:["GPT Image 2.5",`gpt-image-2.5-${e}`]},capabilities:{text2image:r,image2image:o,text2imageMinimax:i.text2image,image2imageMinimax:i.image2image}}),text2image:r,image2image:o}}e.s(["GPT_IMAGE_2_5_VARIANTS",0,f,"VARIANT_DISPLAY_NAME",0,g,"defineGptImage25Variant",()=>v,"gptImage25Image2ImageInputSchema",0,b,"gptImage25Text2ImageInputSchema",0,h],988523);var y=t,x=i,z=o;let _="-minimax";function S(e){let t=`gpt-image-2-5-${e}${_}`,i=`GPT Image 2.5 ${g[e]} (Minimax)`;return{text2image:(0,y.defineCapability)({id:`${t}:text2image`,name:`${i} Text to Image`,internal:!0,inputSchema:h,outputSchema:z.text2imageOutputSchema,getBusinessDetails:z.text2imageGetBusinessDetails}),image2image:(0,y.defineCapability)({id:`${t}:image2image`,name:`${i} Image to Image`,internal:!0,inputSchema:b,outputSchema:x.image2imageOutputSchema,getBusinessDetails:x.image2imageGetBusinessDetails})}}let M=S("flare"),I=v("flare","OpenAI GPT Image 2.5 Flare — the speed-focused GPT Image 2.5: fast, high-quality everyday image generation and editing.",M),w=I.model,C=I.text2image,R=I.image2image;M.text2image,M.image2image,e.s(["gptImage25FlareImage2Image",0,R,"gptImage25FlareModel",0,w,"gptImage25FlareText2Image",0,C],498485);let E=S("sunburst"),A=v("sunburst","OpenAI GPT Image 2.5 Sunburst — the quality- and control-focused GPT Image 2.5: OpenAI's strongest image quality and the most precise editing.",E),P=A.model,T=A.text2image,k=A.image2image;E.text2image,E.image2image,e.s(["gptImage25SunburstImage2Image",0,k,"gptImage25SunburstModel",0,P,"gptImage25SunburstText2Image",0,T],473072),e.s([],393912);var D=t,B=u,j=t;let O=3,V=["auto","en","zh","es","fr","de","ja","ko","pt","ru","ar","hi","it","nl","sv","da","nb","fi","pl","tr","th","vi","ms","tl"],N=B.z.object({audioUrl:B.z.string().url(),language:B.z.enum
1(V).optional(),segmentStrategy:B.z.enum(["word","segment"]).optional()}),F=B.z.object({text:B.z.string(),startMs:B.z.number(),endMs:B.z.number()}),U=B.z.object({segments:B.z.array(F),durationMs:B.z.number()}),q=(0,j.defineCapability)({id:"whisper-1:speech2text",name:"Whisper 1 Speech to Text",inputSchema:N,outputSchema:U,getBusinessDetails:()=>({unitCredits:O,quantity:0,totalCredits:0})}),L=(0,D.defineModel)({id:"whisper-1",name:"Whisper 1",description:"OpenAI's speech-to-text transcription model",metadata:{creator:"OpenAI"},capabilities:{speech2text:q}});e.s(["whisper1Model",0,L],96623)},450274,913227,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=t;let n=i.z.object({type:i.z.literal("image"),url:i.z.string(),id:i.z.string(),label:i.z.string()}),r=i.z.enum(["fast","ultra"]).default("ultra"),o=i.z.object({angleX:i.z.number().min(-90).max(90),angleY:i.z.number().min(-45).max(45),cameraMove:i.z.string().optional().default(""),cameraType:i.z.string().optional().default("")}),s=[{angleX:45,angleY:0,cameraMove:"",cameraType:""},{angleX:90,angleY:0,cameraMove:"",cameraType:""},{angleX:-45,angleY:0,cameraMove:"",cameraType:""},{angleX:-90,angleY:0,cameraMove:"",cameraType:""},{angleX:0,angleY:45,cameraMove:"",cameraType:""},{angleX:0,angleY:-45,cameraMove:"",cameraType:""},{angleX:30,angleY:-45,cameraMove:"",cameraType:""},{angleX:-30,angleY:-45,cameraMove:"",cameraType:""},{angleX:0,angleY:0,cameraMove:"",cameraType:"close-up"},{angleX:0,angleY:0,cameraMove:"",cameraType:"wide-angle"},{angleX:0,angleY:0,cameraMove:"backward",cameraType:""}],u=i.z.object({mode:r,image:n,cameraMove:i.z.string().optional().default(""),cameraType:i.z.string().optional().default("")}).extend({angleX:i.z.number().min(-90).max(90),angleY:i.z.number().min(-45).max(45),createAll:i.z.boolean().default(!1),angles:i.z.array(o).min(1).optional()}),d=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string()}),l=e=>"angles"in e&&e.angles?.length?e.angles.length:e.createAll?s.length:1,c=(0,a.defineCapability)({id:"openart-camera-angle-control:v1",name:"OpenArt Camera Angle Control",inputSchema:u,outputSchema:d,getBusinessDetails:e=>{let t=l(e),i="fast"===e.mode?10:20;return{unitCredits:i,quantity:t,totalCredits:i*t}}});e.s(["openartCameraAngleControl",0,c],913227);let f=(0,t.defineModel)({id:"camera-angle-control",name:"OpenArt Camera Angle Control",description:"Generate camera angle variations from a single image",metadata:{creator:"OpenArt"},capabilities:{"camera-angle-control":c}});e.s(["openartCameraAngleControlModel",0,f],450274)},389477,(e,t,i)=>{var a=e.r(259390),n=a.Buffer;function r(e,t){for(var i in e)t[i]=e[i]}function o(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=a:(r(a,i),i.Buffer=o),r(n,o),o.from=function(e,t,i){if("number"==typeof e)throw TypeError("Argument must not be a number");return n(e,t,i)},o.alloc=function(e,t,i){if("number"!=typeof e)throw TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof i?a.fill(t,i):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return a.SlowBuffer(e)}},826733,(e,t,i)=>{"use strict";var a=e.r(389477).Buffer,n=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=r(e);if("string"!=typeof t&&(a.isEncoding===n||!n(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=h,this.end=p,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=b,this.end=g,t=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function d(e,t,i){var a=t.length-1;if(a<i)return 0;var n=u(t[a]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--a<i||-2===n?0:(n=u(t[a]))>=0?(n>0&&(e.lastNeed=n-2),n):--a<i||-2===n?0:(n=u(t[a]))>=0?(n>0&&(2===n?n=0:e.lastNeed=n-3),n):0}function l(e,t,i){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function c(e){var t=this.lastTotal-this.lastNeed,i=l(this,e,t);return void 0!==i?i:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var i=d(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var a=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",t,a)}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var a=i.charCodeAt(i.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function b(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-i))}function g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}i.StringDecoder=s,s.prototype.write=function(e){var t,i;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""},s.prototype.end=m,s.prototype.text=f,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},651040,(__turbopack_context__,module,exports)=>{!function(){var __webpack_modules__={950:function(__unused_webpack_module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0;i<e.length;i++)if(e[i]===t)return i;return -1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var i in e)t.push(i);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var i=0;i<e.length;i++)t(e[i],i,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,i){Object.defineProperty(e,t,{writable:!0,enumerable:!1,
1configurable:!0,value:i})}}catch(e){return function(e,t,i){e[t]=i}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var i=t.contentWindow,a=i.eval,n=i.execScript;!a&&n&&(n.call(i,"null"),a=i.eval),forEach(Object_keys(e),function(t){i[t]=e[t]}),forEach(globals,function(t){e[t]&&(i[t]=e[t])});var r=Object_keys(i),o=a.call(i,this.code);return forEach(Object_keys(i),function(t){(t in e||-1===indexOf(r,t))&&(e[t]=i[t])}),forEach(globals,function(t){t in e||defineProp(e,t,i[t])}),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),i=this.runInContext(t);return e&&forEach(Object_keys(t),function(i){e[i]=t[i]}),i},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var i=Script(t);return i[e].apply(i,[].slice.call(arguments,1))}}),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(i){t[i]=e[i]}),t}}};"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_react-_e42671282c17525e509920a1c7285b47/node_modules/next/dist/compiled/vm-browserify/");var __webpack_exports__={};__webpack_modules__[950](0,__webpack_exports__),module.exports=__webpack_exports__}()},254497,(e,t,i)=>{var a=e.i(459249),n=e.i(362558);!function(){var i={7160:function(e,t,i){var a=t;a.bignum=i(711),a.define=i(495).define,a.base=i(853),a.constants=i(7335),a.decoders=i(6701),a.encoders=i(3418)},495:function(e,t,i){var a=i(7160),n=i(3782);function r(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new r(e,t)},r.prototype._createNamed=function(e){var t;try{t=i(6144).runInThisContext("(function "+this.name+"(entity) {\n  this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return n(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},r.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(a.decoders[e])),this.decoders[e]},r.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i)},r.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(a.encoders[e])),this.encoders[e]},r.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i)}},6483:function(e,t,i){var a=i(3782),n=i(853).Reporter,r=i(4300).Buffer;function o(e,t){(n.call(this,t),r.isBuffer(e))?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=r.byteLength(e);else{if(!r.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}a(o,n),t.C=o,o.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},o.prototype.restore=function(e){var t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var i=new o(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.prototype.join=function(e,t){return e||(e=new r(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,t),t+=i.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):r.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},853:function(e,t,i){var a=t;a.Reporter=i(1293).b,a.DecoderBuffer=i(6483).C,a.EncoderBuffer=i(6483).R,a.Node=i(9374)},9374:function(e,t,i){var a=i(853).Reporter,n=i(853).EncoderBuffer,r=i(853).DecoderBuffer,o=i(3523),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s),d=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function l(e,t){var i={};this._baseState=i,i.enc=e,i.parent=t||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}
1e.exports=l;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var e=this._baseState,t={};c.forEach(function(i){t[i]=e[i]});var i=new this.constructor(t.parent);return i._baseState=t,i},l.prototype._wrap=function(){var e=this._baseState;u.forEach(function(t){this[t]=function(){var i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}},this)},l.prototype._init=function(e){var t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),o.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,i=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==i.length&&(o(null===t.children),t.children=i,i.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(i){i==(0|i)&&(i|=0),t[e[i]]=i}),t}))},d.forEach(function(e){l.prototype[e]=function(){throw Error(e+" not implemented for encoding: "+this._baseState.enc)}}),s.forEach(function(e){l.prototype[e]=function(){var t=this._baseState,i=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(i),this}}),l.prototype.use=function(e){o(e);var t=this._baseState;return o(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState;return o(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},l.prototype.contains=function(e){var t=this._baseState;return o(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var i,a=this._baseState;if(null===a.parent)return e.wrapResult(a.children[0]._decode(e,t));var n=a.default,o=!0,s=null;if(null!==a.key&&(s=e.enterKey(a.key)),a.optional){var u=null;if(null!==a.explicit?u=a.explicit:null!==a.implicit?u=a.implicit:null!==a.tag&&(u=a.tag),null!==u||a.any){if(o=this._peekTag(e,u,a.any),e.isError(o))return o}else{var d=e.save();try{null===a.choice?this._decodeGeneric(a.tag,e,t):this._decodeChoice(e,t),o=!0}
1catch(e){o=!1}e.restore(d)}}if(a.obj&&o&&(i=e.enterObject()),o){if(null!==a.explicit){var l=this._decodeTag(e,a.explicit);if(e.isError(l))return l;e=l}var c=e.offset;if(null===a.use&&null===a.choice){if(a.any)var d=e.save();var f=this._decodeTag(e,null!==a.implicit?a.implicit:a.tag,a.any);if(e.isError(f))return f;a.any?n=e.raw(d):e=f}if(t&&t.track&&null!==a.tag&&t.track(e.path(),c,e.length,"tagged"),t&&t.track&&null!==a.tag&&t.track(e.path(),e.offset,e.length,"content"),a.any||(n=null===a.choice?this._decodeGeneric(a.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(a.any||null!==a.choice||null===a.children||a.children.forEach(function(i){i._decode(e,t)}),a.contains&&("octstr"===a.tag||"bitstr"===a.tag)){var m=new r(n);n=this._getUse(a.contains,e._reporterState.obj)._decode(m,t)}}return a.obj&&o&&(n=e.leaveObject(i)),null!==a.key&&(null!==n||!0===o)?e.leaveKey(s,a.key,n):null!==s&&e.exitKey(s),n},l.prototype._decodeGeneric=function(e,t,i){var a=this._baseState;if("seq"===e||"set"===e)return null;if("seqof"===e||"setof"===e)return this._decodeList(t,e,a.args[0],i);if(/str$/.test(e))return this._decodeStr(t,e,i);if("objid"===e&&a.args)return this._decodeObjid(t,a.args[0],a.args[1],i);if("objid"===e)return this._decodeObjid(t,null,null,i);if("gentime"===e||"utctime"===e)return this._decodeTime(t,e,i);else if("null_"===e)return this._decodeNull(t,i);else if("bool"===e)return this._decodeBool(t,i);else if("objDesc"===e)return this._decodeStr(t,e,i);else if("int"===e||"enum"===e)return this._decodeInt(t,a.args&&a.args[0],i);return null!==a.use?this._getUse(a.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var i=this._baseState;return i.useDecoder=this._use(e,t),o(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},l.prototype._decodeChoice=function(e,t){var i=this._baseState,a=null,n=!1;return(Object.keys(i.choice).some(function(r){var o=e.save(),s=i.choice[r];try{var u=s._decode(e,t);if(e.isError(u))return!1;a={type:r,value:u},n=!0}catch(t){return e.restore(o),!1}return!0},this),n)?a:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},l.prototype._encode=function(e,t,i){var a=this._baseState;if(null===a.default||a.default!==e){var n=this._encodeValue(e,t,i);if(void 0!==n&&!this._skipDefault(n,t,i))return n}},l.prototype._encodeValue=function(e,t,i){var n,r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new a);var n=null;if(this.reporter=t,r.optional&&void 0===e)if(null===r.default)return;else e=r.default;var o=null,s=!1;if(r.any)n=this._createEncoderBuffer(e);else if(r.choice)n=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,i)._encode(e,t),s=!0;else if(r.children)o=r.children.map(function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");var a=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(a),n},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!(r.args&&1===r.args.length))return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(i){var a=this._baseState;return this._getUse(a.args[0],e)._encode(i,t)},u))}else null!==r.use?n=this._getUse(r.use,i)._encode(e,t):(o=this._encodePrimitive(r.tag,e),s=!0);if(!r.any&&null===r.choice){var d=null!==r.implicit?r.implicit:r.tag,l=null===r.implicit?"universal":"context";null===d?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(n=this._encodeComposite(d,s,l,o))}return null!==r.explicit&&(n=this._encodeComposite(r.explicit,!1,"context",n)),n},l.prototype._encodeChoice=function(e,t){var i=this._baseState,a=i.choice[e.type];return a||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),a._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();else if("int"===e||"enum"===e)return this._encodeInt(t,i.args&&i.reverseArgs[0]);else if("bool"===e)return this._encodeBool(t);else if("objDesc"===e)return this._encodeStr(t,e);else throw Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},1293:function(e,t,i){var a=i(3782);function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function r(e,t){this.path=e,this.rethrow(t)}t.b=n,n.prototype.isError=function(e){return e instanceof r},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,i){var a=this._reporterState;this.exitKey(e),null!==a.obj&&(a.obj[t]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,i=t.obj;return t.obj=e,i},n.prototype.error=function(e){var t,i=this._reporterState,a=e instanceof r;if(t=a?e:new r(i.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw t;return a||i.errors.push(t),t},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},a(r,Error),r.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw Error(this.message)}catch(e){this.stack=e.stack}return this}},9791:function(e,t,i){var a=i(7335);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=a._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=a._reverse(t.tag)},7335:function(e,t,i){var a=t;a._reverse=function(e){var t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0),t[e[i]]=i}),t},a.der=i(9791)},2259:function(e,t,i){var a=i(3782),n=i(7160),r=n.base,o=n.bignum,s=n.
1constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){r.Node.call(this,"der",e)}function l(e,t){var i=e.readUInt8(t);if(e.isError(i))return i;var a=s.tagClass[i>>6],n=(32&i)==0;if((31&i)==31){var r=i;for(i=0;(128&r)==128;){if(r=e.readUInt8(t),e.isError(r))return r;i<<=7,i|=127&r}}else i&=31;var o=s.tag[i];return{cls:a,primitive:n,tag:i,tagStr:o}}function c(e,t,i){var a=e.readUInt8(i);if(e.isError(a))return a;if(!t&&128===a)return null;if((128&a)==0)return a;var n=127&a;if(n>4)return e.error("length octect is too long");a=0;for(var r=0;r<n;r++){a<<=8;var o=e.readUInt8(i);if(e.isError(o))return o;a|=o}return a}e.exports=u,u.prototype.decode=function(e,t){return e instanceof r.DecoderBuffer||(e=new r.DecoderBuffer(e,t)),this.tree._decode(e,t)},a(d,r.Node),d.prototype._peekTag=function(e,t,i){if(e.isEmpty())return!1;var a=e.save(),n=l(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(a),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||i)},d.prototype._decodeTag=function(e,t,i){var a=l(e,'Failed to decode tag of "'+t+'"');if(e.isError(a))return a;var n=c(e,a.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!i&&a.tag!==t&&a.tagStr!==t&&a.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(a.primitive||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');var r=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(n=e.offset-r.offset,e.restore(r),e.skip(n,'Failed to match body of: "'+t+'"'))},d.prototype._skipUntilEnd=function(e,t){for(;;){var i,a=l(e,t);if(e.isError(a))return a;var n=c(e,a.primitive,t);if(e.isError(n))return n;if(i=a.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===a.tagStr)break}},d.prototype._decodeList=function(e,t,i,a){for(var n=[];!e.isEmpty();){var r=this._peekTag(e,"end");if(e.isError(r))return r;var o=i.decode(e,"der",a);if(e.isError(o)&&r)break;n.push(o)}return n},d.prototype._decodeStr=function(e,t){if("bitstr"===t){var i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}if("bmpstr"===t){var a=e.raw();if(a.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var n="",r=0;r<a.length/2;r++)n+=String.fromCharCode(a.readUInt16BE(2*r));return n}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();else if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}else if(/str$/.test(t))return e.raw().toString();else return e.error("Decoding of string type: "+t+" unsupported")},d.prototype._decodeObjid=function(e,t,i){for(var a,n=[],r=0;!e.isEmpty();){var o=e.readUInt8();r<<=7,r|=127&o,(128&o)==0&&(n.push(r),r=0)}128&o&&n.push(r);var s=n[0]/40|0,u=n[0]%40;if(a=i?n:[s,u].concat(n.slice(1)),t){var d=t[a.join(" ")];void 0===d&&(d=t[a.join(".")]),void 0!==d&&(a=d)}return a},d.prototype._decodeTime=function(e,t){var i=e.raw().toString();if("gentime"===t)var a=0|i.slice(0,4),n=0|i.slice(4,6),r=0|i.slice(6,8),o=0|i.slice(8,10),s=0|i.slice(10,12),u=0|i.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");var a=0|i.slice(0,2),n=0|i.slice(2,4),r=0|i.slice(4,6),o=0|i.slice(6,8),s=0|i.slice(8,10),u=0|i.slice(10,12);a=a<70?2e3+a:1900+a}return Date.UTC(a,n-1,r,o,s,u,0)},d.prototype._decodeNull=function(e){return null},d.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},d.prototype._decodeInt=function(e,t){var i=new o(e.raw());return t&&(i=t[i.toString(10)]||i),i},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},6701:function(e,t,i){var a=t;a.der=i(2259),a.pem=i(8527)},8527:function(e,t,i){var a=i(3782),n=i(4300).Buffer,r=i(2259);function o(e){r.call(this,e),this.enc="pem"}a(o,r),e.exports=o,o.prototype.decode=function(e,t){for(var i=e.toString().split(/[\r\n]+/g),a=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,d=0;d<i.length;d++){var l=i[d].match(o);if(null!==l&&l[2]===a)if(-1===s){if("BEGIN"!==l[1])break;s=d}else{if("END"!==l[1])break;u=d;break}}if(-1===s||-1===u)throw Error("PEM section not found for: "+a);var c=i.slice(s+1,u).join("");
1c.replace(/[^a-z0-9\+\/=]+/gi,"");var f=new n(c,"base64");return r.prototype.decode.call(this,f,t)}},7804:function(e,t,i){var a=i(3782),n=i(4300).Buffer,r=i(7160),o=r.base,s=r.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new d,this.tree._init(e.body)}function d(e){o.Node.call(this,"der",e)}function l(e){return e<10?"0"+e:e}function c(e,t,i,a){var n;if("seqof"===e?e="seq":"setof"===e&&(e="set"),s.tagByName.hasOwnProperty(e))n=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return a.error("Unknown tag: "+e);n=e}return n>=31?a.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=s.tagClassByName[i||"universal"]<<6)}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},a(d,o.Node),d.prototype._encodeComposite=function(e,t,i,a){var r=c(e,t,i,this.reporter);if(a.length<128){var o=new n(2);return o[0]=r,o[1]=a.length,this._createEncoderBuffer([o,a])}for(var s=1,u=a.length;u>=256;u>>=8)s++;var o=new n(2+s);o[0]=r,o[1]=128|s;for(var u=1+s,d=a.length;d>0;u--,d>>=8)o[u]=255&d;return this._createEncoderBuffer([o,a])},d.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var i=new n(2*e.length),a=0;a<e.length;a++)i.writeUInt16BE(e.charCodeAt(a),2*a);return this._createEncoderBuffer(i)}if("numstr"===t)return this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space");if("printstr"===t)return this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark");if(/str$/.test(t))return this._createEncoderBuffer(e);else if("objDesc"===t)return this._createEncoderBuffer(e);else return this.reporter.error("Encoding of string type: "+t+" unsupported")},d.prototype._encodeObjid=function(e,t,i){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var a=0;a<e.length;a++)e[a]|=0}else if(Array.isArray(e)){e=e.slice();for(var a=0;a<e.length;a++)e[a]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var r=0,a=0;a<e.length;a++){var o=e[a];for(r++;o>=128;o>>=7)r++}for(var s=new n(r),u=s.length-1,a=e.length-1;a>=0;a--){var o=e[a];for(s[u--]=127&o;(o>>=7)>0;)s[u--]=128|127&o}return this._createEncoderBuffer(s)},d.prototype._encodeTime=function(e,t){var i,a=new Date(e);return"gentime"===t?i=""+l(a.getFullYear())+l(a.getUTCMonth()+1)+l(a.getUTCDate())+l(a.getUTCHours())+l(a.getUTCMinutes())+l(a.getUTCSeconds())+"Z":"utctime"===t?i=""+l(a.getFullYear()%100)+l(a.getUTCMonth()+1)+l(a.getUTCDate())+l(a.getUTCHours())+l(a.getUTCMinutes())+l(a.getUTCSeconds())+"Z":this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr")},d.prototype._encodeNull=function(){return this._createEncoderBuffer("")},d.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!n.isBuffer(e)){var i=e.toArray();!e.sign&&128&i[0]&&i.unshift(0),e=new n(i)}if(n.isBuffer(e)){var a=e.length;0===e.length&&a++;var r=new n(a);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,o=e;o>=256;o>>=8)a++;for(var r=Array(a),o=r.length-1;o>=0;o--)r[o]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(new n(r))},d.prototype._encodeBool=function(e){return this._createEncoderBuffer(255*!!e)},d.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},d.prototype._skipDefault=function(e,t,i){var a,n=this._baseState;if(null===n.default)return!1;var r=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,i).join()),r.length!==n.defaultBuffer.length)return!1;for(a=0;a<r.length;a++)if(r[a]!==n.defaultBuffer[a])return!1;return!0}},3418:function(e,t,i){var a=t;a.der=i(7804),a.pem=i(1564)},1564:function(e,t,i){var a=i(3782),n=i(7804);function r(e){n.call(this,e),this.enc="pem"}a(r,n),e.exports=r,r.prototype.encode=function(e,t){for(var i=n.prototype.encode.call(this,e).toString("base64"),a=["-----BEGIN "+t.label+"-----"],r=0;r<i.length;r+=64)a.push(i.slice(r,r+64));return a.push("-----END "+t.label+"-----"),a.join("\n")}},711:function(e,t,i){!function(e,t){"use strict";function a(e,t){if(!e)throw Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function r(e,t,i){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(i=t,t=10),this._init(e||0,t||10,i||"be"))}
vendor: 4,871 bytes, line 1
1"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{u=i(4300).Buffer}catch(e){}function o(e,t,i){for(var a=0,n=Math.min(e.length,i),r=t;r<n;r++){var o=e.charCodeAt(r)-48;a<<=4,o>=49&&o<=54?a|=o-49+10:o>=17&&o<=22?a|=o-17+10:a|=15&o}return a}function s(e,t,i,a){for(var n=0,r=Math.min(e.length,i),o=t;o<r;o++){var s=e.charCodeAt(o)-48;n*=a,s>=49?n+=s-49+10:s>=17?n+=s-17+10:n+=s}return n}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return 0>e.cmp(t)?e:t},r.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i)},r.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<0x4000000?(this.words=[0x3ffffff&e],this.length=1):e<0x10000000000000?(this.words=[0x3ffffff&e,e/0x4000000&0x3ffffff],this.length=2):(a(e<0x20000000000000),this.words=[0x3ffffff&e,e/0x4000000&0x3ffffff,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},r.prototype._initArray=function(e,t,i){if(a("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var n,r,o=0;o<this.length;o++)this.words[o]=0;var s=0;if("be"===i)for(o=e.length-1,n=0;o>=0;o-=3)r=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[n]|=r<<s&0x3ffffff,this.words[n+1]=r>>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,n++);else if("le"===i)for(o=0,n=0;o<e.length;o+=3)r=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[n]|=r<<s&0x3ffffff,this.words[n+1]=r>>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,n++);return this.strip()},r.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var i,a,n=0;n<this.length;n++)this.words[n]=0;var r=0;for(n=e.length-6,i=0;n>=t;n-=6)a=o(e,n,n+6),this.words[i]|=a<<r&0x3ffffff,this.words[i+1]|=a>>>26-r&4194303,(r+=24)>=26&&(r-=26,i++);n+6!==t&&(a=o(e,t,n+6),this.words[i]|=a<<r&0x3ffffff,this.words[i+1]|=a>>>26-r&4194303),this.strip()},r.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var a=0,n=1;n<=0x3ffffff;n*=t)a++;a--,n=n/t|0;for(var r=e.length-i,o=r%a,u=Math.min(r,r-o)+i,d=0,l=i;l<u;l+=a)d=s(e,l,l+a,t),this.imuln(n),this.words[0]+d<0x4000000?this.words[0]+=d:this._iaddn(d);if(0!==o){var c=1;for(d=s(e,l,e.length,t),l=0;l<o;l++)c*=t;this.imuln(c),this.words[0]+d<0x4000000?this.words[0]+=d:this._iaddn(d)}},r.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},r.prototype.clone=function(){var e=new r(null);return this.copy(e),e},r.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},r.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u,d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,0x2000000,0x290d741,0x1000000,0x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function f(e){for(var t=Array(e.bitLength()),i=0;i<t.length;i++){var a=i/26|0,n=i%26;t[i]=(e.words[a]&1<<n)>>>n}return t}function m(e,t,i){i.negative=t.negative^e.negative;var a=e.length+t.length|0;i.length=a,a=a-1|0;var n=0|e.words[0],r=0|t.words[0],o=n*r,s=0x3ffffff&o,u=o/0x4000000|0;i.words[0]=s;for(var d=1;d<a;d++){for(var l=u>>>26,c=0x3ffffff&u,f=Math.min(d,t.length-1),m=Math.max(0,d-e.length+1);m<=f;m++){var h=d-m|0;l+=(o=(n=0|e.words[h])*(r=0|t.words[m])+c)/0x4000000|0,c=0x3ffffff&o}i.words[d]=0|c,u=0|l}return 0!==u?i.words[d]=0|u:i.length--,i.strip()}r.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){for(var i="",n=0,r=0,o=0;o<this.length;
vendor: 5,453 bytes, line 1
1o++){var s=this.words[o],u=((s<<n|r)&0xffffff).toString(16);i=0!=(r=s>>>24-n&0xffffff)||o!==this.length-1?d[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,o--)}for(0!==r&&(i=r.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var f=l[e],m=c[e];i="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(m).toString(e);i=(h=h.idivn(m)).isZero()?p+i:d[f-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?e+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(e,t){return a(void 0!==u),this.toArrayLike(u,e,t)},r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},r.prototype.toArrayLike=function(e,t,i){var n,r,o=this.byteLength(),s=i||Math.max(1,o);a(o<=s,"byte array longer than desired length"),a(s>0,"Requested array length <= 0"),this.strip();var u="le"===t,d=new e(s),l=this.clone();if(u){for(r=0;!l.isZero();r++)n=l.andln(255),l.iushrn(8),d[r]=n;for(;r<s;r++)d[r]=0}else{for(r=0;r<s-o;r++)d[r]=0;for(r=0;!l.isZero();r++)n=l.andln(255),l.iushrn(8),d[s-r-1]=n}return d},Math.clz32?r.prototype._countBits=function(e){return 32-Math.clz32(e)}:r.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return(8191&t)==0&&(i+=13,t>>>=13),(127&t)==0&&(i+=7,t>>>=7),(15&t)==0&&(i+=4,t>>>=4),(3&t)==0&&(i+=2,t>>>=2),(1&t)==0&&i++,i},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},r.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return 0!==this.negative},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},r.prototype.ior=function(e){return a((this.negative|e.negative)==0),this.iuor(e)},r.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},r.prototype.iand=function(e){return a((this.negative|e.negative)==0),this.iuand(e)},r.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){this.length>e.length?(t=this,i=e):(t=e,i=this);for(var t,i,a=0;a<i.length;a++)this.words[a]=t.words[a]^i.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this.strip()},r.prototype.ixor=function(e){return a((this.negative|e.negative)==0),this.iuxor(e)},r.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=0x3ffffff&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&0x3ffffff>>26-i),this.strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),t?this.words[i]=this.words[i]|1<<n:this.words[i]=this.words[i]&~(1<<n),this.strip()},r.prototype.iadd=function(e){if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,a=e):(i=e,a=this);for(var t,i,a,n=0,r=0;r<a.length;r++)t=(0|i.words[r])+(0|a.words[r])+n,this.words[r]=0x3ffffff&t,n=t>>>26;for(;0!==n&&r<i.length;r++)t=(0|i.words[r])+n,this.words[r]=0x3ffffff&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;r<i.length;r++)this.words[r]=i.words[r];return this},r.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;
vendor: 32,759 bytes, line 1
1var t,i,a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,i=e):(t=e,i=this);for(var r=0,o=0;o<i.length;o++)r=(a=(0|t.words[o])-(0|i.words[o])+r)>>26,this.words[o]=0x3ffffff&a;for(;0!==r&&o<t.length;o++)r=(a=(0|t.words[o])+r)>>26,this.words[o]=0x3ffffff&a;if(0===r&&o<t.length&&t!==this)for(;o<t.length;o++)this.words[o]=t.words[o];return this.length=Math.max(this.length,o),t!==this&&(this.negative=1),this.strip()},r.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,i){var a,n,r,o=e.words,s=t.words,u=i.words,d=0,l=0|o[0],c=8191&l,f=l>>>13,m=0|o[1],h=8191&m,p=m>>>13,b=0|o[2],g=8191&b,v=b>>>13,y=0|o[3],x=8191&y,z=y>>>13,_=0|o[4],S=8191&_,M=_>>>13,I=0|o[5],w=8191&I,C=I>>>13,R=0|o[6],E=8191&R,A=R>>>13,P=0|o[7],T=8191&P,k=P>>>13,D=0|o[8],B=8191&D,j=D>>>13,O=0|o[9],V=8191&O,N=O>>>13,F=0|s[0],U=8191&F,q=F>>>13,L=0|s[1],$=8191&L,H=L>>>13,K=0|s[2],G=8191&K,X=K>>>13,Z=0|s[3],W=8191&Z,Y=Z>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,et=0|s[5],ei=8191&et,ea=et>>>13,en=0|s[6],er=8191&en,eo=en>>>13,es=0|s[7],eu=8191&es,ed=es>>>13,el=0|s[8],ec=8191&el,ef=el>>>13,em=0|s[9],eh=8191&em,ep=em>>>13;i.negative=e.negative^t.negative,i.length=19,a=Math.imul(c,U);var eb=(d+a|0)+((8191&(n=(n=Math.imul(c,q))+Math.imul(f,U)|0))<<13)|0;d=((r=Math.imul(f,q))+(n>>>13)|0)+(eb>>>26)|0,eb&=0x3ffffff,a=Math.imul(h,U),n=(n=Math.imul(h,q))+Math.imul(p,U)|0,r=Math.imul(p,q),a=a+Math.imul(c,$)|0;var eg=(d+a|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(f,$)|0))<<13)|0;d=((r=r+Math.imul(f,H)|0)+(n>>>13)|0)+(eg>>>26)|0,eg&=0x3ffffff,a=Math.imul(g,U),n=(n=Math.imul(g,q))+Math.imul(v,U)|0,r=Math.imul(v,q),a=a+Math.imul(h,$)|0,n=(n=n+Math.imul(h,H)|0)+Math.imul(p,$)|0,r=r+Math.imul(p,H)|0,a=a+Math.imul(c,G)|0;var ev=(d+a|0)+((8191&(n=(n=n+Math.imul(c,X)|0)+Math.imul(f,G)|0))<<13)|0;d=((r=r+Math.imul(f,X)|0)+(n>>>13)|0)+(ev>>>26)|0,ev&=0x3ffffff,a=Math.imul(x,U),n=(n=Math.imul(x,q))+Math.imul(z,U)|0,r=Math.imul(z,q),a=a+Math.imul(g,$)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(v,$)|0,r=r+Math.imul(v,H)|0,a=a+Math.imul(h,G)|0,n=(n=n+Math.imul(h,X)|0)+Math.imul(p,G)|0,r=r+Math.imul(p,X)|0,a=a+Math.imul(c,W)|0;var ey=(d+a|0)+((8191&(n=(n=n+Math.imul(c,Y)|0)+Math.imul(f,W)|0))<<13)|0;d=((r=r+Math.imul(f,Y)|0)+(n>>>13)|0)+(ey>>>26)|0,ey&=0x3ffffff,a=Math.imul(S,U),n=(n=Math.imul(S,q))+Math.imul(M,U)|0,r=Math.imul(M,q),a=a+Math.imul(x,$)|0,n=(n=n+Math.imul(x,H)|0)+Math.imul(z,$)|0,r=r+Math.imul(z,H)|0,a=a+Math.imul(g,G)|0,n=(n=n+Math.imul(g,X)|0)+Math.imul(v,G)|0,r=r+Math.imul(v,X)|0,a=a+Math.imul(h,W)|0,n=(n=n+Math.imul(h,Y)|0)+Math.imul(p,W)|0,r=r+Math.imul(p,Y)|0,a=a+Math.imul(c,Q)|0;var ex=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(f,Q)|0))<<13)|0;d=((r=r+Math.imul(f,ee)|0)+(n>>>13)|0)+(ex>>>26)|0,ex&=0x3ffffff,a=Math.imul(w,U),n=(n=Math.imul(w,q))+Math.imul(C,U)|0,r=Math.imul(C,q),a=a+Math.imul(S,$)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,H)|0,a=a+Math.imul(x,G)|0,n=(n=n+Math.imul(x,X)|0)+Math.imul(z,G)|0,r=r+Math.imul(z,X)|0,a=a+Math.imul(g,W)|0,n=(n=n+Math.imul(g,Y)|0)+Math.imul(v,W)|0,r=r+Math.imul(v,Y)|0,a=a+Math.imul(h,Q)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(p,Q)|0,r=r+Math.imul(p,ee)|0,a=a+Math.imul(c,ei)|0;var ez=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ea)|0)+Math.imul(f,ei)|0))<<13)|0;d=((r=r+Math.imul(f,ea)|0)+(n>>>13)|0)+(ez>>>26)|0,ez&=0x3ffffff,a=Math.imul(E,U),n=(n=Math.imul(E,q))+Math.imul(A,U)|0,r=Math.imul(A,q),a=a+Math.imul(w,$)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,H)|0,a=a+Math.imul(S,G)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(M,G)|0,r=r+Math.imul(M,X)|0,a=a+Math.imul(x,W)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(z,W)|0,r=r+Math.imul(z,Y)|0,a=a+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(v,Q)|0,r=r+Math.imul(v,ee)|0,a=a+Math.imul(h,ei)|0,n=(n=n+Math.imul(h,ea)|0)+Math.imul(p,ei)|0,r=r+Math.imul(p,ea)|0,a=a+Math.imul(c,er)|0;var e_=(d+a|0)+((8191&(n=(n=n+Math.imul(c,eo)|0)+Math.imul(f,er)|0))<<13)|0;d=((r=r+Math.imul(f,eo)|0)+(n>>>13)|0)+(e_>>>26)|0,e_&=0x3ffffff,a=Math.imul(T,U),n=(n=Math.imul(T,q))+Math.imul(k,U)|0,r=Math.imul(k,q),a=a+Math.imul(E,$)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,H)|0,a=a+Math.imul(w,G)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(C,G)|0,r=r+Math.imul(C,X)|0,a=a+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(M,W)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(z,Q)|0,r=r+Math.imul(z,ee)|0,a=a+Math.imul(g,ei)|0,n=(n=n+Math.imul(g,ea)|0)+Math.imul(v,ei)|0,r=r+Math.imul(v,ea)|0,a=a+Math.imul(h,er)|0,n=(n=n+Math.imul(h,eo)|0)+Math.imul(p,er)|0,r=r+Math.imul(p,eo)|0,a=a+Math.imul(c,eu)|0;var eS=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ed)|0)+Math.imul(f,eu)|0))<<13)|0;d=((r=r+Math.imul(f,ed)|0)+(n>>>13)|0)+(eS>>>26)|0,eS&=0x3ffffff,a=Math.imul(B,U),n=(n=Math.imul(B,q))+Math.imul(j,U)|0,r=Math.imul(j,q),a=a+Math.imul(T,$)|0,n=(n=n+Math.imul(T,H)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,H)|0,a=a+Math.imul(E,G)|0,n=(n=n+Math.imul(E,X)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,X)|0,a=a+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(C,W)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(x,ei)|0,n=(n=n+Math.imul(x,ea)|0)+Math.imul(z,ei)|0,r=r+Math.imul(z,ea)|0,a=a+Math.imul(g,er)|0,n=(n=n+Math.imul(g,eo)|0)+Math.imul(v,er)|0,r=r+Math.imul(v,eo)|0,a=a+Math.imul(h,eu)|0,n=(n=n+Math.imul(h,ed)|0)+Math.imul(p,eu)|0,r=r+Math.imul(p,ed)|0,a=a+Math.imul(c,ec)|0;var eM=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ef)|0)+Math.imul(f,ec)|0))<<13)|0;d=((r=r+Math.imul(f,ef)|0)+(n>>>13)|0)+(eM>>>26)|0,eM&=0x3ffffff,a=Math.imul(V,U),n=(n=Math.imul(V,q))+Math.imul(N,U)|0,r=Math.imul(N,q),a=a+Math.imul(B,$)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(j,$)|0,r=r+Math.imul(j,H)|0,a=a+Math.imul(T,G)|0,n=(n=n+Math.imul(T,X)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,X)|0,a=a+Math.imul(E,W)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(A,W)|0,r=r+Math.imul(A,Y)|0,a=a+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(C,Q)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(S,ei)|0,n=(n=n+Math.imul(S,ea)|0)+Math.imul(M,ei)|0,r=r+Math.imul(M,ea)|0,a=a+Math.imul(x,er)|0,n=(n=n+Math.imul(x,eo)|0)+Math.imul(z,er)|0,r=r+Math.imul(z,eo)|0,a=a+Math.imul(g,eu)|0,n=(n=n+Math.imul(g,ed)|0)+Math.imul(v,eu)|0,r=r+Math.imul(v,ed)|0,a=a+Math.imul(h,ec)|0,n=(n=n+Math.imul(h,ef)|0)+Math.imul(p,ec)|0,r=r+Math.imul(p,ef)|0,a=a+Math.imul(c,eh)|0;var eI=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ep)|0)+Math.imul(f,eh)|0))<<13)|0;d=((r=r+Math.imul(f,ep)|0)+(n>>>13)|0)+(eI>>>26)|0,eI&=0x3ffffff,a=Math.imul(V,$),n=(n=Math.imul(V,H))+Math.imul(N,$)|0,r=Math.imul(N,H),a=a+Math.imul(B,G)|0,n=(n=n+Math.imul(B,X)|0)+Math.imul(j,G)|0,r=r+Math.imul(j,X)|0,a=a+Math.imul(T,W)|0,n=(n=n+Math.imul(T,Y)|0)+Math.imul(k,W)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(A,Q)|0,r=r+Math.imul(A,ee)|0,a=a+Math.imul(w,ei)|0,n=(n=n+Math.imul(w,ea)|0)+Math.imul(C,ei)|0,r=r+Math.imul(C,ea)|0,a=a+Math.imul(S,er)|0,n=(n=n+Math.imul(S,eo)|0)+Math.imul(M,er)|0,r=r+Math.imul(M,eo)|0,a=a+Math.imul(x,eu)|0,n=(n=n+Math.imul(x,ed)|0)+Math.imul(z,eu)|0,r=r+Math.imul(z,ed)|0,a=a+Math.imul(g,ec)|0,n=(n=n+Math.imul(g,ef)|0)+Math.imul(v,ec)|0,r=r+Math.imul(v,ef)|0,a=a+Math.imul(h,eh)|0;var ew=(d+a|0)+((8191&(n=(n=n+Math.imul(h,ep)|0)+Math.imul(p,eh)|0))<<13)|0;d=((r=r+Math.imul(p,ep)|0)+(n>>>13)|0)+(ew>>>26)|0,ew&=0x3ffffff,a=Math.imul(V,G),n=(n=Math.imul(V,X))+Math.imul(N,G)|0,r=Math.imul(N,X),a=a+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(j,W)|0,r=r+Math.imul(j,Y)|0,a=a+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(k,Q)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(E,ei)|0,n=(n=n+Math.imul(E,ea)|0)+Math.imul(A,ei)|0,r=r+Math.imul(A,ea)|0,a=a+Math.imul(w,er)|0,n=(n=n+Math.imul(w,eo)|0)+Math.imul(C,er)|0,r=r+Math.imul(C,eo)|0,a=a+Math.imul(S,eu)|0,n=(n=n+Math.imul(S,ed)|0)+Math.imul(M,eu)|0,r=r+Math.imul(M,ed)|0,a=a+Math.imul(x,ec)|0,n=(n=n+Math.imul(x,ef)|0)+Math.imul(z,ec)|0,r=r+Math.imul(z,ef)|0,a=a+Math.imul(g,eh)|0;var eC=(d+a|0)+((8191&(n=(n=n+Math.imul(g,ep)|0)+Math.imul(v,eh)|0))<<13)|0;d=((r=r+Math.imul(v,ep)|0)+(n>>>13)|0)+(eC>>>26)|0,eC&=0x3ffffff,a=Math.imul(V,W),n=(n=Math.imul(V,Y))+Math.imul(N,W)|0,r=Math.imul(N,Y),a=a+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(j,Q)|0,r=r+Math.imul(j,ee)|0,a=a+Math.imul(T,ei)|0,n=(n=n+Math.imul(T,ea)|0)+Math.imul(k,ei)|0,r=r+Math.imul(k,ea)|0,a=a+Math.imul(E,er)|0,n=(n=n+Math.imul(E,eo)|0)+Math.imul(A,er)|0,r=r+Math.imul(A,eo)|0,a=a+Math.imul(w,eu)|0,n=(n=n+Math.imul(w,ed)|0)+Math.imul(C,eu)|0,r=r+Math.imul(C,ed)|0,a=a+Math.imul(S,ec)|0,n=(n=n+Math.imul(S,ef)|0)+Math.imul(M,ec)|0,r=r+Math.imul(M,ef)|0,a=a+Math.imul(x,eh)|0;var eR=(d+a|0)+((8191&(n=(n=n+Math.imul(x,ep)|0)+Math.imul(z,eh)|0))<<13)|0;d=((r=r+Math.imul(z,ep)|0)+(n>>>13)|0)+(eR>>>26)|0,eR&=0x3ffffff,a=Math.imul(V,Q),n=(n=Math.imul(V,ee))+Math.imul(N,Q)|0,r=Math.imul(N,ee),a=a+Math.imul(B,ei)|0,n=(n=n+Math.imul(B,ea)|0)+Math.imul(j,ei)|0,r=r+Math.imul(j,ea)|0,a=a+Math.imul(T,er)|0,n=(n=n+Math.imul(T,eo)|0)+Math.imul(k,er)|0,r=r+Math.imul(k,eo)|0,a=a+Math.imul(E,eu)|0,n=(n=n+Math.imul(E,ed)|0)+Math.imul(A,eu)|0,r=r+Math.imul(A,ed)|0,a=a+Math.imul(w,ec)|0,n=(n=n+Math.imul(w,ef)|0)+Math.imul(C,ec)|0,r=r+Math.imul(C,ef)|0,a=a+Math.imul(S,eh)|0;var eE=(d+a|0)+((8191&(n=(n=n+Math.imul(S,ep)|0)+Math.imul(M,eh)|0))<<13)|0;d=((r=r+Math.imul(M,ep)|0)+(n>>>13)|0)+(eE>>>26)|0,eE&=0x3ffffff,a=Math.imul(V,ei),n=(n=Math.imul(V,ea))+Math.imul(N,ei)|0,r=Math.imul(N,ea),a=a+Math.imul(B,er)|0,n=(n=n+Math.imul(B,eo)|0)+Math.imul(j,er)|0,r=r+Math.imul(j,eo)|0,a=a+Math.imul(T,eu)|0,n=(n=n+Math.imul(T,ed)|0)+Math.imul(k,eu)|0,r=r+Math.imul(k,ed)|0,a=a+Math.imul(E,ec)|0,n=(n=n+Math.imul(E,ef)|0)+Math.imul(A,ec)|0,r=r+Math.imul(A,ef)|0,a=a+Math.imul(w,eh)|0;var eA=(d+a|0)+((8191&(n=(n=n+Math.imul(w,ep)|0)+Math.imul(C,eh)|0))<<13)|0;d=((r=r+Math.imul(C,ep)|0)+(n>>>13)|0)+(eA>>>26)|0,eA&=0x3ffffff,a=Math.imul(V,er),n=(n=Math.imul(V,eo))+Math.imul(N,er)|0,r=Math.imul(N,eo),a=a+Math.imul(B,eu)|0,n=(n=n+Math.imul(B,ed)|0)+Math.imul(j,eu)|0,r=r+Math.imul(j,ed)|0,a=a+Math.imul(T,ec)|0,n=(n=n+Math.imul(T,ef)|0)+Math.imul(k,ec)|0,r=r+Math.imul(k,ef)|0,a=a+Math.imul(E,eh)|0;var eP=(d+a|0)+((8191&(n=(n=n+Math.imul(E,ep)|0)+Math.imul(A,eh)|0))<<13)|0;d=((r=r+Math.imul(A,ep)|0)+(n>>>13)|0)+(eP>>>26)|0,eP&=0x3ffffff,a=Math.imul(V,eu),n=(n=Math.imul(V,ed))+Math.imul(N,eu)|0,r=Math.imul(N,ed),a=a+Math.imul(B,ec)|0,n=(n=n+Math.imul(B,ef)|0)+Math.imul(j,ec)|0,r=r+Math.imul(j,ef)|0,a=a+Math.imul(T,eh)|0;var eT=(d+a|0)+((8191&(n=(n=n+Math.imul(T,ep)|0)+Math.imul(k,eh)|0))<<13)|0;d=((r=r+Math.imul(k,ep)|0)+(n>>>13)|0)+(eT>>>26)|0,eT&=0x3ffffff,a=Math.imul(V,ec),n=(n=Math.imul(V,ef))+Math.imul(N,ec)|0,r=Math.imul(N,ef),a=a+Math.imul(B,eh)|0;var ek=(d+a|0)+((8191&(n=(n=n+Math.imul(B,ep)|0)+Math.imul(j,eh)|0))<<13)|0;d=((r=r+Math.imul(j,ep)|0)+(n>>>13)|0)+(ek>>>26)|0,ek&=0x3ffffff,a=Math.imul(V,eh);var eD=(d+a|0)+((8191&(n=(n=Math.imul(V,ep))+Math.imul(N,eh)|0))<<13)|0;return d=((r=Math.imul(N,ep))+(n>>>13)|0)+(eD>>>26)|0,eD&=0x3ffffff,u[0]=eb,u[1]=eg,u[2]=ev,u[3]=ey,u[4]=ex,u[5]=ez,u[6]=e_,u[7]=eS,u[8]=eM,u[9]=eI,u[10]=ew,u[11]=eC,u[12]=eR,u[13]=eE,u[14]=eA,u[15]=eP,u[16]=eT,u[17]=ek,u[18]=eD,0!==d&&(u[19]=d,i.length++),i};function p(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var a=0,n=0,r=0;r<i.length-1;r++){var o=n;n=0;for(var s=0x3ffffff&a,u=Math.min(r,t.length-1),d=Math.max(0,r-e.length+1);d<=u;d++){var l=r-d,c=(0|e.words[l])*(0|t.words[d]),f=0x3ffffff&c;o=o+(c/0x4000000|0)|0,s=0x3ffffff&(f=f+s|0),n+=(o=o+(f>>>26)|0)>>>26,o&=0x3ffffff}i.words[r]=s,a=o,o=n}return 0!==a?i.words[r]=a:i.length--,i.strip()}function b(e,t,i){return(new g).mulp(e,t,i)}function g(e,t){this.x=e,this.y=t}Math.imul||(h=m),r.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):i<63?m(this,e,t):i<1024?p(this,e,t):b(this,e,t)},g.prototype.makeRBT=function(e){for(var t=Array(e),i=r.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,i,e);return t},g.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var a=0,n=0;n<t;n++)a|=(1&e)<<t-n-1,e>>=1;return a},g.prototype.permute=function(e,t,i,a,n,r){for(var o=0;o<r;o++)a[o]=t[e[o]],n[o]=i[e[o]]},g.prototype.transform=function(e,t,i,a,n,r){this.permute(r,e,t,i,a,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),d=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var c=u,f=d,m=0;m<o;m++){var h=i[l+m],p=a[l+m],b=i[l+m+o],g=a[l+m+o],v=c*b-f*g;g=c*g+f*b,b=v,i[l+m]=h+b,a[l+m]=p+g,i[l+m+o]=h-b,a[l+m+o]=p-g,m!==s&&(v=u*c-d*f,f=u*f+d*c,c=v)}},g.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),a=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+a},g.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var a=0;a<i/2;a++){var n=e[a];e[a]=e[i-a-1],e[i-a-1]=n,n=t[a],t[a]=-t[i-a-1],t[i-a-1]=-n}},g.prototype.normalize13b=function(e,t){for(var i=0,a=0;a<t/2;a++){var n=8192*Math.round(e[2*a+1]/t)+Math.round(e[2*a]/t)+i;e[a]=0x3ffffff&n,i=n<0x4000000?0:n/0x4000000|0}return e},g.prototype.convert13b=function(e,t,i,n){for(var r=0,o=0;o<t;o++)r+=0|e[o],i[2*o]=8191&r,r>>>=13,i[2*o+1]=8191&r,r>>>=13;for(o=2*t;o<n;++o)i[o]=0;a(0===r),a((-8192&r)==0)},g.prototype.stub=function(e){for(var t=Array(e),i=0;i<e;i++)t[i]=0;return t},g.prototype.mulp=function(e,t,i){var a=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(a),r=this.stub(a),o=Array(a),s=Array(a),u=Array(a),d=Array(a),l=Array(a),c=Array(a),f=i.words;f.length=a,this.convert13b(e.words,e.length,o,a),this.convert13b(t.words,t.length,d,a),this.transform(o,r,s,u,a,n),this.transform(d,r,l,c,a,n);for(var m=0;m<a;m++){var h=s[m]*l[m]-u[m]*c[m];u[m]=s[m]*c[m]+u[m]*l[m],s[m]=h}return this.conjugate(s,u,a),this.transform(s,u,f,r,a,n),this.conjugate(f,r,a),this.normalize13b(f,a),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},r.prototype.mul=function(e){var t=new r(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},r.prototype.mulf=function(e){var t=new r(null);return t.words=Array(this.length+e.length),b(this,e,t)},r.prototype.imul=function(e){return this.clone().mulTo(e,this)},r.prototype.imuln=function(e){a("number"==typeof e),a(e<0x4000000);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,r=(0x3ffffff&n)+(0x3ffffff&t);t>>=26,t+=(n/0x4000000|0)+(r>>>26),this.words[i]=0x3ffffff&r}return 0!==t&&(this.words[i]=t,this.length++),this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=f(e);if(0===t.length)return new r(1);for(var i=this,a=0;a<t.length&&0===t[a];a++,i=i.sqr());if(++a<t.length)for(var n=i.sqr();a<t.length;a++,n=n.sqr())0!==t[a]&&(i=i.mul(n));return i},r.prototype.iushln=function(e){a("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,r=0x3ffffff>>>26-i<<26-i;if(0!==i){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&r,u=(0|this.words[t])-s<<i;this.words[t]=u|o,o=s>>>26-i}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},r.prototype.ishln=function(e){return a(0===this.negative),this.iushln(e)},r.prototype.iushrn=function(e,t,i){a("number"==typeof e&&e>=0);var n=t?(t-t%26)/26:0,r=e%26,o=Math.min((e-r)/26,this.length),s=0x3ffffff^0x3ffffff>>>r<<r,u=i;if(n-=o,n=Math.max(0,n),u){for(var d=0;d<o;d++)u.words[d]=this.words[d];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,d=0;d<this.length;d++)this.words[d]=this.words[d+o];else this.words[0]=0,this.length=1;var l=0;for(d=this.length-1;d>=0&&(0!==l||d>=n);d--){var c=0|this.words[d];this.words[d]=l<<26-r|c>>>r,l=c&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(e,t,i){return a(0===this.negative),this.iushrn(e,t,i)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i)&&!!(this.words[i]&n)},r.prototype.imaskn=function(e){a("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=0x3ffffff^0x3ffffff>>>t<<t;this.words[this.length-1]&=n}return this.strip()},r.prototype.maskn=function(e){return this.clone().imaskn(e)},r.prototype.iaddn=function(e){return(a("number"==typeof e),a(e<0x4000000),e<0)?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},r.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=0x4000000;t++)this.words[t]-=0x4000000,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"==typeof e),a(e<0x4000000),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=0x4000000,this.words[t+1]-=1;return this.strip()},r.prototype.addn=function(e){return this.clone().iaddn(e)},r.prototype.subn=function(e){return this.clone().isubn(e)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(e,t,i){var n,r,o=e.length+i;this._expand(o);var s=0;for(n=0;n<e.length;n++){r=(0|this.words[n+i])+s;var u=(0|e.words[n])*t;r-=0x3ffffff&u,s=(r>>26)-(u/0x4000000|0),this.words[n+i]=0x3ffffff&r}for(;n<this.length-i;n++)s=(r=(0|this.words[n+i])+s)>>26,this.words[n+i]=0x3ffffff&r;if(0===s)return this.strip();for(a(-1===s),s=0,n=0;n<this.length;n++)s=(r=-(0|this.words[n])+s)>>26,this.words[n]=0x3ffffff&r;return this.negative=1,this.strip()},r.prototype._wordDiv=function(e,t){var i,a=this.length-e.length,n=this.clone(),o=e,s=0|o.words[o.length-1];0!=(a=26-this._countBits(s))&&(o=o.ushln(a),n.iushln(a),s=0|o.words[o.length-1]);var u=n.length-o.length;if("mod"!==t){(i=new r(null)).length=u+1,i.words=Array(i.length);for(var d=0;d<i.length;d++)i.words[d]=0}var l=n.clone()._ishlnsubmul(o,1,u);0===l.negative&&(n=l,i&&(i.words[u]=1));for(var c=u-1;c>=0;c--){var f=(0|n.words[o.length+c])*0x4000000+(0|n.words[o.length+c-1]);for(f=Math.min(f/s|0,0x3ffffff),n._ishlnsubmul(o,f,c);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,c),n.isZero()||(n.negative^=1);i&&(i.words[c]=f)}return i&&i.strip(),n.strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:i||null,mod:n}},r.prototype.divmod=function(e,t,i){var n,o,s;return(a(!e.isZero()),this.isZero())?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),i&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),i&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||0>this.cmp(e)?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modn(e.words[0]))}:this._wordDiv(e,t)},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),n=e.andln(1),r=i.cmp(a);return r<0||1===n&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modn=function(e){a(e<=0x3ffffff);for(var t=0x4000000%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},r.prototype.idivn=function(e){a(e<=0x3ffffff);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+0x4000000*t;this.words[i]=n/e|0,t=n%e}return this.strip()},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new r(1),o=new r(0),s=new r(0),u=new r(1),d=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++d;for(var l=i.clone(),c=t.clone();!t.isZero();){for(var f=0,m=1;(t.words[0]&m)==0&&f<26;++f,m<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var h=0,p=1;(i.words[0]&p)==0&&h<26;++h,p<<=1);if(h>0)for(i.iushrn(h);h-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(c)),s.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(s),o.isub(u)):(i.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:i.iushln(d)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t,i=this,n=e.clone();i=0!==i.negative?i.umod(e):i.clone();for(var o=new r(1),s=new r(0),u=n.clone();i.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,l=1;(i.words[0]&l)==0&&d<26;++d,l<<=1);if(d>0)for(i.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var c=0,f=1;(n.words[0]&f)==0&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(n)>=0?(i.isub(n),o.isub(s)):(n.isub(i),s.isub(o))}return 0>(t=0===i.cmpn(1)?o:s).cmpn(0)&&t.iadd(e),t},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var a=0;t.isEven()&&i.isEven();a++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var r=t;t=i,i=r}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return(1&this.words[0])==0},r.prototype.isOdd=function(){return(1&this.words[0])==1},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var r=n,o=i;0!==r&&o<this.length;o++){var s=0|this.words[o];s+=r,r=s>>>26,s&=0x3ffffff,this.words[o]=s}return 0!==r&&(this.words[o]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return -1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),a(e<=0x3ffffff,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},r.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return -1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},r.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return -1;for(var t=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],n=0|e.words[i];if(a!==n){a<n?t=-1:a>n&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return -1===this.cmpn(e)},r.prototype.lt=function(e){return -1===this.cmp(e)},r.prototype.lten=function(e){return 0>=this.cmpn(e)},r.prototype.lte=function(e){return 0>=this.cmp(e)},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new M(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function z(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new r(null);return e.words=Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,i=e;do this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength();while(t>this.n)var a=t<this.n?-1:i.ucmp(this.p);return 0===a?(i.words[0]=0,i.length=1):a>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(x,y),x.prototype.split=function(e,t){for(var i=4194303,a=Math.min(e.length,9),n=0;n<a;n++)t.words[n]=e.words[n];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var r=e.words[9];for(n=10,t.words[t.length++]=r&i;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(o&i)<<4|r>>>22,r=o}r>>>=22,e.words[n-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var a=0|e.words[i];t+=977*a,e.words[i]=0x3ffffff&t,t=64*a+(t/0x4000000|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(z,y),n(_,y),n(S,y),S.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var a=(0|e.words[i])*19+t,n=0x3ffffff&a;a>>>=26,e.words[i]=n,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){var t;if(v[e])return v[e];if("k256"===e)t=new x;else if("p224"===e)t=new z;else if("p192"===e)t=new _;else if("p25519"===e)t=new S;else throw Error("Unknown prime "+e);return v[e]=t,t},M.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){a((e.negative|t.negative)==0,"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return 0>i.cmpn(0)&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return 0>i.cmpn(0)&&i.iadd(this.m),i},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2==1),3===t){var i=this.m.add(new r(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);a(!n.isZero());var s=new r(1).toRed(this),u=s.redNeg(),d=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);0!==this.pow(l,d).cmp(u);)l.redIAdd(u);for(var c=this.pow(l,n),f=this.pow(e,n.addn(1).iushrn(1)),m=this.pow(e,n),h=o;0!==m.cmp(s);){for(var p=m,b=0;0!==p.cmp(s);b++)p=p.redSqr();a(b<h);var g=this.pow(c,new r(1).iushln(h-b-1));f=f.redMul(g),c=g.redSqr(),m=m.redMul(c),h=b}return f},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new r(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=4,a=Array(16);a[0]=new r(1).toRed(this),a[1]=e;for(var n=2;n<a.length;n++)a[n]=this.mul(a[n-1],e);var o=a[0],s=0,u=0,d=t.bitLength()%26;for(0===d&&(d=26),n=t.length-1;n>=0;n--){for(var l=t.words[n],c=d-1;c>=0;c--){var f=l>>c&1;if(o!==a[0]&&(o=this.sqr(o)),0===f&&0===s){u=0;continue}s<<=1,s|=f,(++u===i||0===n&&0===c)&&(o=this.mul(o,a[s]),u=0,s=0)}d=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new I(e)},n(I,M),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),a=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(a).iushrn(this.shift),r=n;return n.cmp(this.m)>=0?r=n.isub(this.m):0>n.cmpn(0)&&(r=n.iadd(this.m)),r._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var i=e.mul(t),a=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(a).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):0>n.cmpn(0)&&(o=n.iadd(this.m)),o._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=i.nmd(e),this)},1670:function(e,t,i){!function(e,t){"use strict";function a(e,t){if(!e)throw Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function r(e,t,i){if(r.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(i=t,t=10),this._init(e||0,t||10,i||"be"))}
vendor: 4,225 bytes, line 1
1"object"==typeof e?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;try{l=i(4300).Buffer}catch(e){}function o(e,t,i){for(var n=0,r=Math.min(e.length,i),o=0,s=t;s<r;s++){var u,d=e.charCodeAt(s)-48;n<<=4,n|=u=d>=49&&d<=54?d-49+10:d>=17&&d<=22?d-17+10:d,o|=u}return a(!(240&o),"Invalid character in "+e),n}function s(e,t,i,n){for(var r=0,o=0,s=Math.min(e.length,i),u=t;u<s;u++){var d=e.charCodeAt(u)-48;r*=n,o=d>=49?d-49+10:d>=17?d-17+10:d,a(d>=0&&o<n,"Invalid character"),r+=o}return r}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}r.isBN=function(e){return e instanceof r||null!==e&&"object"==typeof e&&e.constructor.wordSize===r.wordSize&&Array.isArray(e.words)},r.max=function(e,t){return e.cmp(t)>0?e:t},r.min=function(e,t){return 0>e.cmp(t)?e:t},r.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),a(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this._strip(),"le"===i&&this._initArray(this.toArray(),t,i)},r.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<0x4000000?(this.words=[0x3ffffff&e],this.length=1):e<0x10000000000000?(this.words=[0x3ffffff&e,e/0x4000000&0x3ffffff],this.length=2):(a(e<0x20000000000000),this.words=[0x3ffffff&e,e/0x4000000&0x3ffffff,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},r.prototype._initArray=function(e,t,i){if(a("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=Array(this.length);for(var n,r,o=0;o<this.length;o++)this.words[o]=0;var s=0;if("be"===i)for(o=e.length-1,n=0;o>=0;o-=3)r=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[n]|=r<<s&0x3ffffff,this.words[n+1]=r>>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,n++);else if("le"===i)for(o=0,n=0;o<e.length;o+=3)r=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[n]|=r<<s&0x3ffffff,this.words[n+1]=r>>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,n++);return this._strip()},r.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var i,a,n=0;n<this.length;n++)this.words[n]=0;var r=0;for(n=e.length-6,i=0;n>=t;n-=6)a=o(e,n,n+6),this.words[i]|=a<<r&0x3ffffff,this.words[i+1]|=a>>>26-r&4194303,(r+=24)>=26&&(r-=26,i++);n+6!==t&&(a=o(e,t,n+6),this.words[i]|=a<<r&0x3ffffff,this.words[i+1]|=a>>>26-r&4194303),this._strip()},r.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var a=0,n=1;n<=0x3ffffff;n*=t)a++;a--,n=n/t|0;for(var r=e.length-i,o=r%a,u=Math.min(r,r-o)+i,d=0,l=i;l<u;l+=a)d=s(e,l,l+a,t),this.imuln(n),this.words[0]+d<0x4000000?this.words[0]+=d:this._iaddn(d);if(0!==o){var c=1;for(d=s(e,l,e.length,t),l=0;l<o;l++)c*=t;this.imuln(c),this.words[0]+d<0x4000000?this.words[0]+=d:this._iaddn(d)}},r.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},r.prototype._move=function(e){u(e,this)},r.prototype.clone=function(){var e=new r(null);return this.copy(e),e},r.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},r.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?r.prototype[Symbol.for("nodejs.util.inspect.custom")]=d:r.prototype.inspect=d;var l,c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,0x2000000,0x290d741,0x1000000,
vendor: 35,648 bytes, line 1
10x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];r.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){for(var i="",n=0,r=0,o=0;o<this.length;o++){var s=this.words[o],u=((s<<n|r)&0xffffff).toString(16);i=0!=(r=s>>>24-n&0xffffff)||o!==this.length-1?c[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,o--)}for(0!==r&&(i=r.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],l=m[e];i="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modrn(l).toString(e);i=(h=h.idivn(l)).isZero()?p+i:c[d-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}a(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?e+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},r.prototype.toJSON=function(){return this.toString(16,2)},l&&(r.prototype.toBuffer=function(e,t){return this.toArrayLike(l,e,t)}),r.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var h=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function p(e){for(var t=Array(e.bitLength()),i=0;i<t.length;i++){var a=i/26|0,n=i%26;t[i]=e.words[a]>>>n&1}return t}function b(e,t,i){i.negative=t.negative^e.negative;var a=e.length+t.length|0;i.length=a,a=a-1|0;var n=0|e.words[0],r=0|t.words[0],o=n*r,s=0x3ffffff&o,u=o/0x4000000|0;i.words[0]=s;for(var d=1;d<a;d++){for(var l=u>>>26,c=0x3ffffff&u,f=Math.min(d,t.length-1),m=Math.max(0,d-e.length+1);m<=f;m++){var h=d-m|0;l+=(o=(n=0|e.words[h])*(r=0|t.words[m])+c)/0x4000000|0,c=0x3ffffff&o}i.words[d]=0|c,u=0|l}return 0!==u?i.words[d]=0|u:i.length--,i._strip()}r.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),r=i||Math.max(1,n);a(n<=r,"byte array longer than desired length"),a(r>0,"Requested array length <= 0");var o=h(e,r);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,n),o},r.prototype._toArrayLikeLE=function(e,t){for(var i=0,a=0,n=0,r=0;n<this.length;n++){var o=this.words[n]<<r|a;e[i++]=255&o,i<e.length&&(e[i++]=o>>8&255),i<e.length&&(e[i++]=o>>16&255),6===r?(i<e.length&&(e[i++]=o>>24&255),a=0,r=0):(a=o>>>24,r+=2)}if(i<e.length)for(e[i++]=a;i<e.length;)e[i++]=0},r.prototype._toArrayLikeBE=function(e,t){for(var i=e.length-1,a=0,n=0,r=0;n<this.length;n++){var o=this.words[n]<<r|a;e[i--]=255&o,i>=0&&(e[i--]=o>>8&255),i>=0&&(e[i--]=o>>16&255),6===r?(i>=0&&(e[i--]=o>>24&255),a=0,r=0):(a=o>>>24,r+=2)}if(i>=0)for(e[i--]=a;i>=0;)e[i--]=0},Math.clz32?r.prototype._countBits=function(e){return 32-Math.clz32(e)}:r.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},r.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return(8191&t)==0&&(i+=13,t>>>=13),(127&t)==0&&(i+=7,t>>>=7),(15&t)==0&&(i+=4,t>>>=4),(3&t)==0&&(i+=2,t>>>=2),(1&t)==0&&i++,i},r.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},r.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return 0!==this.negative},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},r.prototype.ior=function(e){return a((this.negative|e.negative)==0),this.iuor(e)},r.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},r.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},r.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this._strip()},r.prototype.iand=function(e){return a((this.negative|e.negative)==0),this.iuand(e)},r.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},r.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},r.prototype.iuxor=function(e){this.length>e.length?(t=this,i=e):(t=e,i=this);for(var t,i,a=0;a<i.length;a++)this.words[a]=t.words[a]^i.words[a];if(this!==t)for(;a<t.length;a++)this.words[a]=t.words[a];return this.length=t.length,this._strip()},r.prototype.ixor=function(e){return a((this.negative|e.negative)==0),this.iuxor(e)},r.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},r.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},r.prototype.inotn=function(e){a("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=0x3ffffff&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&0x3ffffff>>26-i),this._strip()},r.prototype.notn=function(e){return this.clone().inotn(e)},r.prototype.setn=function(e,t){a("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),t?this.words[i]=this.words[i]|1<<n:this.words[i]=this.words[i]&~(1<<n),this._strip()},r.prototype.iadd=function(e){if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,a=e):(i=e,a=this);for(var t,i,a,n=0,r=0;r<a.length;r++)t=(0|i.words[r])+(0|a.words[r])+n,this.words[r]=0x3ffffff&t,n=t>>>26;for(;0!==n&&r<i.length;r++)t=(0|i.words[r])+n,this.words[r]=0x3ffffff&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;r<i.length;r++)this.words[r]=i.words[r];return this},r.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},r.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,i,a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,i=e):(t=e,i=this);for(var r=0,o=0;o<i.length;o++)r=(a=(0|t.words[o])-(0|i.words[o])+r)>>26,this.words[o]=0x3ffffff&a;for(;0!==r&&o<t.length;o++)r=(a=(0|t.words[o])+r)>>26,this.words[o]=0x3ffffff&a;if(0===r&&o<t.length&&t!==this)for(;o<t.length;o++)this.words[o]=t.words[o];return this.length=Math.max(this.length,o),t!==this&&(this.negative=1),this._strip()},r.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,i){var a,n,r,o=e.words,s=t.words,u=i.words,d=0,l=0|o[0],c=8191&l,f=l>>>13,m=0|o[1],h=8191&m,p=m>>>13,b=0|o[2],g=8191&b,v=b>>>13,y=0|o[3],x=8191&y,z=y>>>13,_=0|o[4],S=8191&_,M=_>>>13,I=0|o[5],w=8191&I,C=I>>>13,R=0|o[6],E=8191&R,A=R>>>13,P=0|o[7],T=8191&P,k=P>>>13,D=0|o[8],B=8191&D,j=D>>>13,O=0|o[9],V=8191&O,N=O>>>13,F=0|s[0],U=8191&F,q=F>>>13,L=0|s[1],$=8191&L,H=L>>>13,K=0|s[2],G=8191&K,X=K>>>13,Z=0|s[3],W=8191&Z,Y=Z>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,et=0|s[5],ei=8191&et,ea=et>>>13,en=0|s[6],er=8191&en,eo=en>>>13,es=0|s[7],eu=8191&es,ed=es>>>13,el=0|s[8],ec=8191&el,ef=el>>>13,em=0|s[9],eh=8191&em,ep=em>>>13;i.negative=e.negative^t.negative,i.length=19,a=Math.imul(c,U);var eb=(d+a|0)+((8191&(n=(n=Math.imul(c,q))+Math.imul(f,U)|0))<<13)|0;d=((r=Math.imul(f,q))+(n>>>13)|0)+(eb>>>26)|0,eb&=0x3ffffff,a=Math.imul(h,U),n=(n=Math.imul(h,q))+Math.imul(p,U)|0,r=Math.imul(p,q),a=a+Math.imul(c,$)|0;var eg=(d+a|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(f,$)|0))<<13)|0;d=((r=r+Math.imul(f,H)|0)+(n>>>13)|0)+(eg>>>26)|0,eg&=0x3ffffff,a=Math.imul(g,U),n=(n=Math.imul(g,q))+Math.imul(v,U)|0,r=Math.imul(v,q),a=a+Math.imul(h,$)|0,n=(n=n+Math.imul(h,H)|0)+Math.imul(p,$)|0,r=r+Math.imul(p,H)|0,a=a+Math.imul(c,G)|0;var ev=(d+a|0)+((8191&(n=(n=n+Math.imul(c,X)|0)+Math.imul(f,G)|0))<<13)|0;d=((r=r+Math.imul(f,X)|0)+(n>>>13)|0)+(ev>>>26)|0,ev&=0x3ffffff,a=Math.imul(x,U),n=(n=Math.imul(x,q))+Math.imul(z,U)|0,r=Math.imul(z,q),a=a+Math.imul(g,$)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(v,$)|0,r=r+Math.imul(v,H)|0,a=a+Math.imul(h,G)|0,n=(n=n+Math.imul(h,X)|0)+Math.imul(p,G)|0,r=r+Math.imul(p,X)|0,a=a+Math.imul(c,W)|0;var ey=(d+a|0)+((8191&(n=(n=n+Math.imul(c,Y)|0)+Math.imul(f,W)|0))<<13)|0;d=((r=r+Math.imul(f,Y)|0)+(n>>>13)|0)+(ey>>>26)|0,ey&=0x3ffffff,a=Math.imul(S,U),n=(n=Math.imul(S,q))+Math.imul(M,U)|0,r=Math.imul(M,q),a=a+Math.imul(x,$)|0,n=(n=n+Math.imul(x,H)|0)+Math.imul(z,$)|0,r=r+Math.imul(z,H)|0,a=a+Math.imul(g,G)|0,n=(n=n+Math.imul(g,X)|0)+Math.imul(v,G)|0,r=r+Math.imul(v,X)|0,a=a+Math.imul(h,W)|0,n=(n=n+Math.imul(h,Y)|0)+Math.imul(p,W)|0,r=r+Math.imul(p,Y)|0,a=a+Math.imul(c,Q)|0;var ex=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(f,Q)|0))<<13)|0;d=((r=r+Math.imul(f,ee)|0)+(n>>>13)|0)+(ex>>>26)|0,ex&=0x3ffffff,a=Math.imul(w,U),n=(n=Math.imul(w,q))+Math.imul(C,U)|0,r=Math.imul(C,q),a=a+Math.imul(S,$)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(M,$)|0,r=r+Math.imul(M,H)|0,a=a+Math.imul(x,G)|0,n=(n=n+Math.imul(x,X)|0)+Math.imul(z,G)|0,r=r+Math.imul(z,X)|0,a=a+Math.imul(g,W)|0,n=(n=n+Math.imul(g,Y)|0)+Math.imul(v,W)|0,r=r+Math.imul(v,Y)|0,a=a+Math.imul(h,Q)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(p,Q)|0,r=r+Math.imul(p,ee)|0,a=a+Math.imul(c,ei)|0;var ez=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ea)|0)+Math.imul(f,ei)|0))<<13)|0;d=((r=r+Math.imul(f,ea)|0)+(n>>>13)|0)+(ez>>>26)|0,ez&=0x3ffffff,a=Math.imul(E,U),n=(n=Math.imul(E,q))+Math.imul(A,U)|0,r=Math.imul(A,q),a=a+Math.imul(w,$)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(C,$)|0,r=r+Math.imul(C,H)|0,a=a+Math.imul(S,G)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(M,G)|0,r=r+Math.imul(M,X)|0,a=a+Math.imul(x,W)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(z,W)|0,r=r+Math.imul(z,Y)|0,a=a+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(v,Q)|0,r=r+Math.imul(v,ee)|0,a=a+Math.imul(h,ei)|0,n=(n=n+Math.imul(h,ea)|0)+Math.imul(p,ei)|0,r=r+Math.imul(p,ea)|0,a=a+Math.imul(c,er)|0;var e_=(d+a|0)+((8191&(n=(n=n+Math.imul(c,eo)|0)+Math.imul(f,er)|0))<<13)|0;d=((r=r+Math.imul(f,eo)|0)+(n>>>13)|0)+(e_>>>26)|0,e_&=0x3ffffff,a=Math.imul(T,U),n=(n=Math.imul(T,q))+Math.imul(k,U)|0,r=Math.imul(k,q),a=a+Math.imul(E,$)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(A,$)|0,r=r+Math.imul(A,H)|0,a=a+Math.imul(w,G)|0,n=(n=n+Math.imul(w,X)|0)+Math.imul(C,G)|0,r=r+Math.imul(C,X)|0,a=a+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(M,W)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(z,Q)|0,r=r+Math.imul(z,ee)|0,a=a+Math.imul(g,ei)|0,n=(n=n+Math.imul(g,ea)|0)+Math.imul(v,ei)|0,r=r+Math.imul(v,ea)|0,a=a+Math.imul(h,er)|0,n=(n=n+Math.imul(h,eo)|0)+Math.imul(p,er)|0,r=r+Math.imul(p,eo)|0,a=a+Math.imul(c,eu)|0;var eS=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ed)|0)+Math.imul(f,eu)|0))<<13)|0;d=((r=r+Math.imul(f,ed)|0)+(n>>>13)|0)+(eS>>>26)|0,eS&=0x3ffffff,a=Math.imul(B,U),n=(n=Math.imul(B,q))+Math.imul(j,U)|0,r=Math.imul(j,q),a=a+Math.imul(T,$)|0,n=(n=n+Math.imul(T,H)|0)+Math.imul(k,$)|0,r=r+Math.imul(k,H)|0,a=a+Math.imul(E,G)|0,n=(n=n+Math.imul(E,X)|0)+Math.imul(A,G)|0,r=r+Math.imul(A,X)|0,a=a+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(C,W)|0,r=r+Math.imul(C,Y)|0,a=a+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(M,Q)|0,r=r+Math.imul(M,ee)|0,a=a+Math.imul(x,ei)|0,n=(n=n+Math.imul(x,ea)|0)+Math.imul(z,ei)|0,r=r+Math.imul(z,ea)|0,a=a+Math.imul(g,er)|0,n=(n=n+Math.imul(g,eo)|0)+Math.imul(v,er)|0,r=r+Math.imul(v,eo)|0,a=a+Math.imul(h,eu)|0,n=(n=n+Math.imul(h,ed)|0)+Math.imul(p,eu)|0,r=r+Math.imul(p,ed)|0,a=a+Math.imul(c,ec)|0;var eM=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ef)|0)+Math.imul(f,ec)|0))<<13)|0;d=((r=r+Math.imul(f,ef)|0)+(n>>>13)|0)+(eM>>>26)|0,eM&=0x3ffffff,a=Math.imul(V,U),n=(n=Math.imul(V,q))+Math.imul(N,U)|0,r=Math.imul(N,q),a=a+Math.imul(B,$)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(j,$)|0,r=r+Math.imul(j,H)|0,a=a+Math.imul(T,G)|0,n=(n=n+Math.imul(T,X)|0)+Math.imul(k,G)|0,r=r+Math.imul(k,X)|0,a=a+Math.imul(E,W)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(A,W)|0,r=r+Math.imul(A,Y)|0,a=a+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(C,Q)|0,r=r+Math.imul(C,ee)|0,a=a+Math.imul(S,ei)|0,n=(n=n+Math.imul(S,ea)|0)+Math.imul(M,ei)|0,r=r+Math.imul(M,ea)|0,a=a+Math.imul(x,er)|0,n=(n=n+Math.imul(x,eo)|0)+Math.imul(z,er)|0,r=r+Math.imul(z,eo)|0,a=a+Math.imul(g,eu)|0,n=(n=n+Math.imul(g,ed)|0)+Math.imul(v,eu)|0,r=r+Math.imul(v,ed)|0,a=a+Math.imul(h,ec)|0,n=(n=n+Math.imul(h,ef)|0)+Math.imul(p,ec)|0,r=r+Math.imul(p,ef)|0,a=a+Math.imul(c,eh)|0;var eI=(d+a|0)+((8191&(n=(n=n+Math.imul(c,ep)|0)+Math.imul(f,eh)|0))<<13)|0;d=((r=r+Math.imul(f,ep)|0)+(n>>>13)|0)+(eI>>>26)|0,eI&=0x3ffffff,a=Math.imul(V,$),n=(n=Math.imul(V,H))+Math.imul(N,$)|0,r=Math.imul(N,H),a=a+Math.imul(B,G)|0,n=(n=n+Math.imul(B,X)|0)+Math.imul(j,G)|0,r=r+Math.imul(j,X)|0,a=a+Math.imul(T,W)|0,n=(n=n+Math.imul(T,Y)|0)+Math.imul(k,W)|0,r=r+Math.imul(k,Y)|0,a=a+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(A,Q)|0,r=r+Math.imul(A,ee)|0,a=a+Math.imul(w,ei)|0,n=(n=n+Math.imul(w,ea)|0)+Math.imul(C,ei)|0,r=r+Math.imul(C,ea)|0,a=a+Math.imul(S,er)|0,n=(n=n+Math.imul(S,eo)|0)+Math.imul(M,er)|0,r=r+Math.imul(M,eo)|0,a=a+Math.imul(x,eu)|0,n=(n=n+Math.imul(x,ed)|0)+Math.imul(z,eu)|0,r=r+Math.imul(z,ed)|0,a=a+Math.imul(g,ec)|0,n=(n=n+Math.imul(g,ef)|0)+Math.imul(v,ec)|0,r=r+Math.imul(v,ef)|0,a=a+Math.imul(h,eh)|0;var ew=(d+a|0)+((8191&(n=(n=n+Math.imul(h,ep)|0)+Math.imul(p,eh)|0))<<13)|0;d=((r=r+Math.imul(p,ep)|0)+(n>>>13)|0)+(ew>>>26)|0,ew&=0x3ffffff,a=Math.imul(V,G),n=(n=Math.imul(V,X))+Math.imul(N,G)|0,r=Math.imul(N,X),a=a+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(j,W)|0,r=r+Math.imul(j,Y)|0,a=a+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(k,Q)|0,r=r+Math.imul(k,ee)|0,a=a+Math.imul(E,ei)|0,n=(n=n+Math.imul(E,ea)|0)+Math.imul(A,ei)|0,r=r+Math.imul(A,ea)|0,a=a+Math.imul(w,er)|0,n=(n=n+Math.imul(w,eo)|0)+Math.imul(C,er)|0,r=r+Math.imul(C,eo)|0,a=a+Math.imul(S,eu)|0,n=(n=n+Math.imul(S,ed)|0)+Math.imul(M,eu)|0,r=r+Math.imul(M,ed)|0,a=a+Math.imul(x,ec)|0,n=(n=n+Math.imul(x,ef)|0)+Math.imul(z,ec)|0,r=r+Math.imul(z,ef)|0,a=a+Math.imul(g,eh)|0;var eC=(d+a|0)+((8191&(n=(n=n+Math.imul(g,ep)|0)+Math.imul(v,eh)|0))<<13)|0;d=((r=r+Math.imul(v,ep)|0)+(n>>>13)|0)+(eC>>>26)|0,eC&=0x3ffffff,a=Math.imul(V,W),n=(n=Math.imul(V,Y))+Math.imul(N,W)|0,r=Math.imul(N,Y),a=a+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(j,Q)|0,r=r+Math.imul(j,ee)|0,a=a+Math.imul(T,ei)|0,n=(n=n+Math.imul(T,ea)|0)+Math.imul(k,ei)|0,r=r+Math.imul(k,ea)|0,a=a+Math.imul(E,er)|0,n=(n=n+Math.imul(E,eo)|0)+Math.imul(A,er)|0,r=r+Math.imul(A,eo)|0,a=a+Math.imul(w,eu)|0,n=(n=n+Math.imul(w,ed)|0)+Math.imul(C,eu)|0,r=r+Math.imul(C,ed)|0,a=a+Math.imul(S,ec)|0,n=(n=n+Math.imul(S,ef)|0)+Math.imul(M,ec)|0,r=r+Math.imul(M,ef)|0,a=a+Math.imul(x,eh)|0;var eR=(d+a|0)+((8191&(n=(n=n+Math.imul(x,ep)|0)+Math.imul(z,eh)|0))<<13)|0;d=((r=r+Math.imul(z,ep)|0)+(n>>>13)|0)+(eR>>>26)|0,eR&=0x3ffffff,a=Math.imul(V,Q),n=(n=Math.imul(V,ee))+Math.imul(N,Q)|0,r=Math.imul(N,ee),a=a+Math.imul(B,ei)|0,n=(n=n+Math.imul(B,ea)|0)+Math.imul(j,ei)|0,r=r+Math.imul(j,ea)|0,a=a+Math.imul(T,er)|0,n=(n=n+Math.imul(T,eo)|0)+Math.imul(k,er)|0,r=r+Math.imul(k,eo)|0,a=a+Math.imul(E,eu)|0,n=(n=n+Math.imul(E,ed)|0)+Math.imul(A,eu)|0,r=r+Math.imul(A,ed)|0,a=a+Math.imul(w,ec)|0,n=(n=n+Math.imul(w,ef)|0)+Math.imul(C,ec)|0,r=r+Math.imul(C,ef)|0,a=a+Math.imul(S,eh)|0;var eE=(d+a|0)+((8191&(n=(n=n+Math.imul(S,ep)|0)+Math.imul(M,eh)|0))<<13)|0;d=((r=r+Math.imul(M,ep)|0)+(n>>>13)|0)+(eE>>>26)|0,eE&=0x3ffffff,a=Math.imul(V,ei),n=(n=Math.imul(V,ea))+Math.imul(N,ei)|0,r=Math.imul(N,ea),a=a+Math.imul(B,er)|0,n=(n=n+Math.imul(B,eo)|0)+Math.imul(j,er)|0,r=r+Math.imul(j,eo)|0,a=a+Math.imul(T,eu)|0,n=(n=n+Math.imul(T,ed)|0)+Math.imul(k,eu)|0,r=r+Math.imul(k,ed)|0,a=a+Math.imul(E,ec)|0,n=(n=n+Math.imul(E,ef)|0)+Math.imul(A,ec)|0,r=r+Math.imul(A,ef)|0,a=a+Math.imul(w,eh)|0;var eA=(d+a|0)+((8191&(n=(n=n+Math.imul(w,ep)|0)+Math.imul(C,eh)|0))<<13)|0;d=((r=r+Math.imul(C,ep)|0)+(n>>>13)|0)+(eA>>>26)|0,eA&=0x3ffffff,a=Math.imul(V,er),n=(n=Math.imul(V,eo))+Math.imul(N,er)|0,r=Math.imul(N,eo),a=a+Math.imul(B,eu)|0,n=(n=n+Math.imul(B,ed)|0)+Math.imul(j,eu)|0,r=r+Math.imul(j,ed)|0,a=a+Math.imul(T,ec)|0,n=(n=n+Math.imul(T,ef)|0)+Math.imul(k,ec)|0,r=r+Math.imul(k,ef)|0,a=a+Math.imul(E,eh)|0;var eP=(d+a|0)+((8191&(n=(n=n+Math.imul(E,ep)|0)+Math.imul(A,eh)|0))<<13)|0;d=((r=r+Math.imul(A,ep)|0)+(n>>>13)|0)+(eP>>>26)|0,eP&=0x3ffffff,a=Math.imul(V,eu),n=(n=Math.imul(V,ed))+Math.imul(N,eu)|0,r=Math.imul(N,ed),a=a+Math.imul(B,ec)|0,n=(n=n+Math.imul(B,ef)|0)+Math.imul(j,ec)|0,r=r+Math.imul(j,ef)|0,a=a+Math.imul(T,eh)|0;var eT=(d+a|0)+((8191&(n=(n=n+Math.imul(T,ep)|0)+Math.imul(k,eh)|0))<<13)|0;d=((r=r+Math.imul(k,ep)|0)+(n>>>13)|0)+(eT>>>26)|0,eT&=0x3ffffff,a=Math.imul(V,ec),n=(n=Math.imul(V,ef))+Math.imul(N,ec)|0,r=Math.imul(N,ef),a=a+Math.imul(B,eh)|0;var ek=(d+a|0)+((8191&(n=(n=n+Math.imul(B,ep)|0)+Math.imul(j,eh)|0))<<13)|0;d=((r=r+Math.imul(j,ep)|0)+(n>>>13)|0)+(ek>>>26)|0,ek&=0x3ffffff,a=Math.imul(V,eh);var eD=(d+a|0)+((8191&(n=(n=Math.imul(V,ep))+Math.imul(N,eh)|0))<<13)|0;return d=((r=Math.imul(N,ep))+(n>>>13)|0)+(eD>>>26)|0,eD&=0x3ffffff,u[0]=eb,u[1]=eg,u[2]=ev,u[3]=ey,u[4]=ex,u[5]=ez,u[6]=e_,u[7]=eS,u[8]=eM,u[9]=eI,u[10]=ew,u[11]=eC,u[12]=eR,u[13]=eE,u[14]=eA,u[15]=eP,u[16]=eT,u[17]=ek,u[18]=eD,0!==d&&(u[19]=d,i.length++),i};function v(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var a=0,n=0,r=0;r<i.length-1;r++){var o=n;n=0;for(var s=0x3ffffff&a,u=Math.min(r,t.length-1),d=Math.max(0,r-e.length+1);d<=u;d++){var l=r-d,c=(0|e.words[l])*(0|t.words[d]),f=0x3ffffff&c;o=o+(c/0x4000000|0)|0,s=0x3ffffff&(f=f+s|0),n+=(o=o+(f>>>26)|0)>>>26,o&=0x3ffffff}i.words[r]=s,a=o,o=n}return 0!==a?i.words[r]=a:i.length--,i._strip()}function y(e,t,i){return v(e,t,i)}function x(e,t){this.x=e,this.y=t}Math.imul||(g=b),r.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):i<63?b(this,e,t):i<1024?v(this,e,t):y(this,e,t)},x.prototype.makeRBT=function(e){for(var t=Array(e),i=r.prototype._countBits(e)-1,a=0;a<e;a++)t[a]=this.revBin(a,i,e);return t},x.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var a=0,n=0;n<t;n++)a|=(1&e)<<t-n-1,e>>=1;return a},x.prototype.permute=function(e,t,i,a,n,r){for(var o=0;o<r;o++)a[o]=t[e[o]],n[o]=i[e[o]]},x.prototype.transform=function(e,t,i,a,n,r){this.permute(r,e,t,i,a,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),d=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var c=u,f=d,m=0;m<o;m++){var h=i[l+m],p=a[l+m],b=i[l+m+o],g=a[l+m+o],v=c*b-f*g;g=c*g+f*b,b=v,i[l+m]=h+b,a[l+m]=p+g,i[l+m+o]=h-b,a[l+m+o]=p-g,m!==s&&(v=u*c-d*f,f=u*f+d*c,c=v)}},x.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),a=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+a},x.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var a=0;a<i/2;a++){var n=e[a];e[a]=e[i-a-1],e[i-a-1]=n,n=t[a],t[a]=-t[i-a-1],t[i-a-1]=-n}},x.prototype.normalize13b=function(e,t){for(var i=0,a=0;a<t/2;a++){var n=8192*Math.round(e[2*a+1]/t)+Math.round(e[2*a]/t)+i;e[a]=0x3ffffff&n,i=n<0x4000000?0:n/0x4000000|0}return e},x.prototype.convert13b=function(e,t,i,n){for(var r=0,o=0;o<t;o++)r+=0|e[o],i[2*o]=8191&r,r>>>=13,i[2*o+1]=8191&r,r>>>=13;for(o=2*t;o<n;++o)i[o]=0;a(0===r),a((-8192&r)==0)},x.prototype.stub=function(e){for(var t=Array(e),i=0;i<e;i++)t[i]=0;return t},x.prototype.mulp=function(e,t,i){var a=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(a),r=this.stub(a),o=Array(a),s=Array(a),u=Array(a),d=Array(a),l=Array(a),c=Array(a),f=i.words;f.length=a,this.convert13b(e.words,e.length,o,a),this.convert13b(t.words,t.length,d,a),this.transform(o,r,s,u,a,n),this.transform(d,r,l,c,a,n);for(var m=0;m<a;m++){var h=s[m]*l[m]-u[m]*c[m];u[m]=s[m]*c[m]+u[m]*l[m],s[m]=h}return this.conjugate(s,u,a),this.transform(s,u,f,r,a,n),this.conjugate(f,r,a),this.normalize13b(f,a),i.negative=e.negative^t.negative,i.length=e.length+t.length,i._strip()},r.prototype.mul=function(e){var t=new r(null);return t.words=Array(this.length+e.length),this.mulTo(e,t)},r.prototype.mulf=function(e){var t=new r(null);return t.words=Array(this.length+e.length),y(this,e,t)},r.prototype.imul=function(e){return this.clone().mulTo(e,this)},r.prototype.imuln=function(e){var t=e<0;t&&(e=-e),a("number"==typeof e),a(e<0x4000000);for(var i=0,n=0;n<this.length;n++){var r=(0|this.words[n])*e,o=(0x3ffffff&r)+(0x3ffffff&i);i>>=26,i+=(r/0x4000000|0)+(o>>>26),this.words[n]=0x3ffffff&o}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():this},r.prototype.muln=function(e){return this.clone().imuln(e)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(e){var t=p(e);if(0===t.length)return new r(1);for(var i=this,a=0;a<t.length&&0===t[a];a++,i=i.sqr());if(++a<t.length)for(var n=i.sqr();a<t.length;a++,n=n.sqr())0!==t[a]&&(i=i.mul(n));return i},r.prototype.iushln=function(e){a("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,r=0x3ffffff>>>26-i<<26-i;if(0!==i){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&r,u=(0|this.words[t])-s<<i;this.words[t]=u|o,o=s>>>26-i}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},r.prototype.ishln=function(e){return a(0===this.negative),this.iushln(e)},r.prototype.iushrn=function(e,t,i){a("number"==typeof e&&e>=0);var n=t?(t-t%26)/26:0,r=e%26,o=Math.min((e-r)/26,this.length),s=0x3ffffff^0x3ffffff>>>r<<r,u=i;if(n-=o,n=Math.max(0,n),u){for(var d=0;d<o;d++)u.words[d]=this.words[d];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,d=0;d<this.length;d++)this.words[d]=this.words[d+o];else this.words[0]=0,this.length=1;var l=0;for(d=this.length-1;d>=0&&(0!==l||d>=n);d--){var c=0|this.words[d];this.words[d]=l<<26-r|c>>>r,l=c&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(e,t,i){return a(0===this.negative),this.iushrn(e,t,i)},r.prototype.shln=function(e){return this.clone().ishln(e)},r.prototype.ushln=function(e){return this.clone().iushln(e)},r.prototype.shrn=function(e){return this.clone().ishrn(e)},r.prototype.ushrn=function(e){return this.clone().iushrn(e)},r.prototype.testn=function(e){a("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i)&&!!(this.words[i]&n)},r.prototype.imaskn=function(e){a("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=0x3ffffff^0x3ffffff>>>t<<t;this.words[this.length-1]&=n}return this._strip()},r.prototype.maskn=function(e){return this.clone().imaskn(e)},r.prototype.iaddn=function(e){return(a("number"==typeof e),a(e<0x4000000),e<0)?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},r.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=0x4000000;t++)this.words[t]-=0x4000000,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},r.prototype.isubn=function(e){if(a("number"==typeof e),a(e<0x4000000),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=0x4000000,this.words[t+1]-=1;return this._strip()},r.prototype.addn=function(e){return this.clone().iaddn(e)},r.prototype.subn=function(e){return this.clone().isubn(e)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(e,t,i){var n,r,o=e.length+i;this._expand(o);var s=0;for(n=0;n<e.length;n++){r=(0|this.words[n+i])+s;var u=(0|e.words[n])*t;r-=0x3ffffff&u,s=(r>>26)-(u/0x4000000|0),this.words[n+i]=0x3ffffff&r}for(;n<this.length-i;n++)s=(r=(0|this.words[n+i])+s)>>26,this.words[n+i]=0x3ffffff&r;if(0===s)return this._strip();for(a(-1===s),s=0,n=0;n<this.length;n++)s=(r=-(0|this.words[n])+s)>>26,this.words[n]=0x3ffffff&r;return this.negative=1,this._strip()},r.prototype._wordDiv=function(e,t){var i,a=this.length-e.length,n=this.clone(),o=e,s=0|o.words[o.length-1];0!=(a=26-this._countBits(s))&&(o=o.ushln(a),n.iushln(a),s=0|o.words[o.length-1]);var u=n.length-o.length;if("mod"!==t){(i=new r(null)).length=u+1,i.words=Array(i.length);for(var d=0;d<i.length;d++)i.words[d]=0}var l=n.clone()._ishlnsubmul(o,1,u);0===l.negative&&(n=l,i&&(i.words[u]=1));for(var c=u-1;c>=0;c--){var f=(0|n.words[o.length+c])*0x4000000+(0|n.words[o.length+c-1]);for(f=Math.min(f/s|0,0x3ffffff),n._ishlnsubmul(o,f,c);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,c),n.isZero()||(n.negative^=1);i&&(i.words[c]=f)}return i&&i._strip(),n._strip(),"div"!==t&&0!==a&&n.iushrn(a),{div:i||null,mod:n}},r.prototype.divmod=function(e,t,i){var n,o,s;return(a(!e.isZero()),this.isZero())?{div:new r(0),mod:new r(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),i&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),i&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||0>this.cmp(e)?{div:new r(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new r(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new r(this.modrn(e.words[0]))}:this._wordDiv(e,t)},r.prototype.div=function(e){return this.divmod(e,"div",!1).div},r.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},r.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},r.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,a=e.ushrn(1),n=e.andln(1),r=i.cmp(a);return r<0||1===n&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},r.prototype.modrn=function(e){var t=e<0;t&&(e=-e),a(e<=0x3ffffff);for(var i=0x4000000%e,n=0,r=this.length-1;r>=0;r--)n=(i*n+(0|this.words[r]))%e;return t?-n:n},r.prototype.modn=function(e){return this.modrn(e)},r.prototype.idivn=function(e){var t=e<0;t&&(e=-e),a(e<=0x3ffffff);for(var i=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+0x4000000*i;this.words[n]=r/e|0,i=r%e}return this._strip(),t?this.ineg():this},r.prototype.divn=function(e){return this.clone().idivn(e)},r.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new r(1),o=new r(0),s=new r(0),u=new r(1),d=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++d;for(var l=i.clone(),c=t.clone();!t.isZero();){for(var f=0,m=1;(t.words[0]&m)==0&&f<26;++f,m<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var h=0,p=1;(i.words[0]&p)==0&&h<26;++h,p<<=1);if(h>0)for(i.iushrn(h);h-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(c)),s.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(s),o.isub(u)):(i.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:i.iushln(d)}},r.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t,i=this,n=e.clone();i=0!==i.negative?i.umod(e):i.clone();for(var o=new r(1),s=new r(0),u=n.clone();i.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,l=1;(i.words[0]&l)==0&&d<26;++d,l<<=1);if(d>0)for(i.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var c=0,f=1;(n.words[0]&f)==0&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(n)>=0?(i.isub(n),o.isub(s)):(n.isub(i),s.isub(o))}return 0>(t=0===i.cmpn(1)?o:s).cmpn(0)&&t.iadd(e),t},r.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var a=0;t.isEven()&&i.isEven();a++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var r=t;t=i,i=r}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(a)},r.prototype.invm=function(e){return this.egcd(e).a.umod(e)},r.prototype.isEven=function(){return(1&this.words[0])==0},r.prototype.isOdd=function(){return(1&this.words[0])==1},r.prototype.andln=function(e){return this.words[0]&e},r.prototype.bincn=function(e){a("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var r=n,o=i;0!==r&&o<this.length;o++){var s=0|this.words[o];s+=r,r=s>>>26,s&=0x3ffffff,this.words[o]=s}return 0!==r&&(this.words[o]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return -1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),a(e<=0x3ffffff,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},r.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return -1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},r.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return -1;for(var t=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],n=0|e.words[i];if(a!==n){a<n?t=-1:a>n&&(t=1);break}}return t},r.prototype.gtn=function(e){return 1===this.cmpn(e)},r.prototype.gt=function(e){return 1===this.cmp(e)},r.prototype.gten=function(e){return this.cmpn(e)>=0},r.prototype.gte=function(e){return this.cmp(e)>=0},r.prototype.ltn=function(e){return -1===this.cmpn(e)},r.prototype.lt=function(e){return -1===this.cmp(e)},r.prototype.lten=function(e){return 0>=this.cmpn(e)},r.prototype.lte=function(e){return 0>=this.cmp(e)},r.prototype.eqn=function(e){return 0===this.cmpn(e)},r.prototype.eq=function(e){return 0===this.cmp(e)},r.red=function(e){return new C(e)},r.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},r.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(e){return this.red=e,this},r.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},r.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},r.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},r.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},r.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},r.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},r.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},r.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},r.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var z={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new r(t,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=r._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function R(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new r(null);return e.words=Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,i=e;do this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength();while(t>this.n)var a=t<this.n?-1:i.ucmp(this.p);return 0===a?(i.words[0]=0,i.length=1):a>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},n(S,_),S.prototype.split=function(e,t){for(var i=4194303,a=Math.min(e.length,9),n=0;n<a;n++)t.words[n]=e.words[n];if(t.length=a,e.length<=9){e.words[0]=0,e.length=1;return}var r=e.words[9];for(n=10,t.words[t.length++]=r&i;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(o&i)<<4|r>>>22,r=o}r>>>=22,e.words[n-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var a=0|e.words[i];t+=977*a,e.words[i]=0x3ffffff&t,t=64*a+(t/0x4000000|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(M,_),n(I,_),n(w,_),w.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var a=(0|e.words[i])*19+t,n=0x3ffffff&a;a>>>=26,e.words[i]=n,t=a}return 0!==t&&(e.words[e.length++]=t),e},r._prime=function(e){var t;if(z[e])return z[e];
vendor: 7,000 bytes, line 1
1if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new I;else if("p25519"===e)t=new w;else throw Error("Unknown prime "+e);return z[e]=t,t},C.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){a((e.negative|t.negative)==0,"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},C.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return 0>i.cmpn(0)&&i.iadd(this.m),i._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return 0>i.cmpn(0)&&i.iadd(this.m),i},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2==1),3===t){var i=this.m.add(new r(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);a(!n.isZero());var s=new r(1).toRed(this),u=s.redNeg(),d=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new r(2*l*l).toRed(this);0!==this.pow(l,d).cmp(u);)l.redIAdd(u);for(var c=this.pow(l,n),f=this.pow(e,n.addn(1).iushrn(1)),m=this.pow(e,n),h=o;0!==m.cmp(s);){for(var p=m,b=0;0!==p.cmp(s);b++)p=p.redSqr();a(b<h);var g=this.pow(c,new r(1).iushln(h-b-1));f=f.redMul(g),c=g.redSqr(),m=m.redMul(c),h=b}return f},C.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},C.prototype.pow=function(e,t){if(t.isZero())return new r(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=4,a=Array(16);a[0]=new r(1).toRed(this),a[1]=e;for(var n=2;n<a.length;n++)a[n]=this.mul(a[n-1],e);var o=a[0],s=0,u=0,d=t.bitLength()%26;for(0===d&&(d=26),n=t.length-1;n>=0;n--){for(var l=t.words[n],c=d-1;c>=0;c--){var f=l>>c&1;if(o!==a[0]&&(o=this.sqr(o)),0===f&&0===s){u=0;continue}s<<=1,s|=f,(++u===i||0===n&&0===c)&&(o=this.mul(o,a[s]),u=0,s=0)}d=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},r.mont=function(e){return new R(e)},n(R,C),R.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},R.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},R.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),a=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(a).iushrn(this.shift),r=n;return n.cmp(this.m)>=0?r=n.isub(this.m):0>n.cmpn(0)&&(r=n.iadd(this.m)),r._forceRed(this)},R.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new r(0)._forceRed(this);var i=e.mul(t),a=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(a).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):0>n.cmpn(0)&&(o=n.iadd(this.m)),o._forceRed(this)},R.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=i.nmd(e),this)},3500:function(e,t,i){var a;function n(e){this.rand=e}if(e.exports=function(e){return a||(a=new n(null)),a.generate(e)},e.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(n.prototype._rand=function(){throw Error("Not implemented yet")});else try{var r=i(6113);if("function"!=typeof r.randomBytes)throw Error("Not supported");n.prototype._rand=function(e){return r.randomBytes(e)}}catch(e){}},1387:function(e,t,i){var a=i(6911).Buffer;function n(e){a.isBuffer(e)||(e=a.from(e));for(var t=e.length/4|0,i=Array(t),n=0;n<t;n++)i[n]=e.readUInt32BE(4*n);return i}function r(e){for(var t=0;t<e.length;e++)e[t]=0}function o(e,t,i,a,n){for(var r,o,s,u,d=i[0],l=i[1],c=i[2],f=i[3],m=e[0]^t[0],h=e[1]^t[1],p=e[2]^t[2],b=e[3]^t[3],g=4,v=1;v<n;v++)r=d[m>>>24]^l[h>>>16&255]^c[p>>>8&255]^f[255&b]^t[g++],o=d[h>>>24]^l[p>>>16&255]^c[b>>>8&255]^f[255&m]^t[g++],s=d[p>>>24]^l[b>>>16&255]^c[m>>>8&255]^f[255&h]^t[g++],u=d[b>>>24]^l[m>>>16&255]^c[h>>>8&255]^f[255&p]^t[g++],m=r,h=o,p=s,b=u;return r=(a[m>>>24]<<24|a[h>>>16&255]<<16|a[p>>>8&255]<<8|a[255&b])^t[g++],o=(a[h>>>24]<<24|a[p>>>16&255]<<16|a[b>>>8&255]<<8|a[255&m])^t[g++],s=(a[p>>>24]<<24|a[b>>>16&255]<<16|a[m>>>8&255]<<8|a[255&h])^t[g++],[r>>>=0,o>>>=0,s>>>=0,u=((a[b>>>24]<<24|a[m>>>16&255]<<16|a[h>>>8&255]<<8|a[255&p])^t[g++])>>>0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=Array(256),t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var i=[],a=[],n=[[],[],[],[]],r=[[],[],[],[]],o=0,s=0,u=0;u<256;++u){var d=s^s<<1^s<<2^s<<3^s<<4;d=d>>>8^255&d^99,i[o]=d,a[d]=o;var l=e[o],c=e[l],f=e[c],m=257*e[d]^0x1010100*d;n[0][o]=m<<24|m>>>8,n[1][o]=m<<16|m>>>16,n[2][o]=m<<8|m>>>24,n[3][o]=m,m=0x1010101*f^65537*c^257*l^0x1010100*o,r[0][d]=m<<24|m>>>8,r[1][d]=m<<16|m>>>16,r[2][d]=m<<8|m>>>24,r[3][d]=m,0===o?o=s=1:(o=l^e[e[e[f^l]]],s^=e[e[s]])}return{SBOX:i,INV_SBOX:a,SUB_MIX:n,INV_SUB_MIX:r}}();function d(e){this._key=n(e),this._reset()}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,a=(i+1)*4,n=[],r=0;r<t;r++)n[r]=e[r];for(r=t;r<a;r++){var o=n[r-1];r%t==0?(o=o<<8|o>>>24,o=(u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o])^s[r/t|0]<<24):t>6&&r%t==4&&(o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o]),n[r]=n[r-t]^o}for(var d=[],l=0;l<a;l++){var c=a-l,f=n[c-(l%4?0:4)];l<4||c<=4?d[l]=f:d[l]=u.INV_SUB_MIX[0][u.SBOX[f>>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=d},d.prototype.encryptBlockRaw=function(e){return o(e=n(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nR
1ounds)},d.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=a.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},d.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=o(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),r=a.allocUnsafe(16);return r.writeUInt32BE(i[0],0),r.writeUInt32BE(i[3],4),r.writeUInt32BE(i[2],8),r.writeUInt32BE(i[1],12),r},d.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},e.exports.AES=d},6624:function(e,t,i){var a=i(1387),n=i(6911).Buffer,r=i(1043),o=i(3782),s=i(7225),u=i(4734),d=i(598);function l(e,t){var i=0;e.length!==t.length&&i++;for(var a=Math.min(e.length,t.length),n=0;n<a;++n)i+=e[n]^t[n];return i}function c(e,t,i){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var a=new s(i),r=t.length,o=r%16;a.update(t),o&&(o=16-o,a.update(n.alloc(o,0))),a.update(n.alloc(8,0));var u=8*r,l=n.alloc(8);l.writeUIntBE(u,0,8),a.update(l),e._finID=a.state;var c=n.from(e._finID);return d(c),c}function f(e,t,i,o){r.call(this);var u=n.alloc(4,0);this._cipher=new a.AES(t);var d=this._cipher.encryptBlock(u);this._ghash=new s(d),i=c(this,i,d),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(f,r),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&l(e,this._authTag))throw Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(e){if(!this._decrypt)throw Error("Attempting to set auth tag in unsupported state");this._authTag=e},f.prototype.setAAD=function(e){if(this._called)throw Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=f},6594:function(e,t,i){var a=i(2),n=i(2598),r=i(5866);function o(){return Object.keys(r)}t.createCipher=t.Cipher=a.createCipher,t.createCipheriv=t.Cipheriv=a.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=o},2598:function(e,t,i){var a=i(6624),n=i(6911).Buffer,r=i(6370),o=i(126),s=i(1043),u=i(1387),d=i(8368);function l(e,t,i){s.call(this),this._cache=new c,this._last=void 0,this._cipher=new u.AES(t),this._prev=n.from(i),this._mode=e,this._autopadding=!0}function c(){this.cache=n.allocUnsafe(0)}function f(e){var t=e[15];if(t<1||t>16)throw Error("unable to decrypt data");for(var i=-1;++i<t;)if(e[i+(16-t)]!==t)throw Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function m(e,t,i){var s=r[e.toLowerCase()];if(!s)throw TypeError("invalid suite type");if("string"==typeof i&&(i=n.from(i)),"GCM"!==s.mode&&i.length!==s.iv)throw TypeError("invalid iv length "+i.length);if("string"==typeof t&&(t=n.from(t)),t.length!==s.key/8)throw TypeError("invalid key length "+t.length);return"stream"===s.type?new o(s.module,t,i,!0):"auth"===s.type?new a(s.module,t,i,!0):new l(s.module,t,i)}i(3782)(l,s),l.prototype._update=function(e){this._cache.add(e);for(var t,i,a=[];t=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,t),a.push(i);return n.concat(a)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return f(this._mode.decrypt(this,e));if(e)throw Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},c.prototype.add=function(e){this.cache=n.concat([this.cache,e])},c.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var i=r[e.toLowerCase()];if(!i)throw TypeError("invalid suite type");var a=d(t,!1,i.key,i.iv);return m(e,a.key,a.iv)},t.createDecipheriv=m},2:function(e,t,i){var a=i(6370),n=i(6624),r=i(6911).Buffer,o=i(126),s=i(1043),u=i(1387),d=i(8368);function l(e,t,i){s.call(this),this._cache=new f,this._cipher=new u.AES(t),this._prev=r.from(i),this._mode=e,this._autopadding=!0}i(3782)(l,s),l.prototype._update=function(e){this._cache.add(e);for(var t,i,a=[];t=this._cache.get();)i=this._mode.encrypt(this,t),a.push(i);return r.concat(a)};var c=r.alloc(16,16);function f(){this.cache=r.allocUnsafe(0)}function m(e,t,i){var s=a[e.toLowerCase()];if(!s)throw TypeError("invalid suite type");if("string"==typeof t&&(t=r.from(t)),t.length!==s.key/8)throw TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=r.from(i)),"GCM"!==s.mode&&i.length!==s.iv)throw TypeError("invalid iv length "+i.length);return"stream"===s.type?new o(s.module,t,i):"auth"===s.type?new n(s.module,t,i):new l(s.module,t,i)}function h(e,t){var i=a[e.toLowerCase()];if(!i)throw TypeError("invalid suite type");var n=d(t,!1,i.key,i.iv);return m(e,n.key,n.iv)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(c))throw this._cipher.scrub(),Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=r.concat([this.cache,e])},f.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},f.prototype.flush=function(){for(var e=16-this.cache.length,t=r.allocUnsafe(e),i=-1;++i<e;)t.writeUInt8(e,i);return r.concat([this.cache,t])},t.createCipheriv=m,t.createCipher=h},7225:function(e,t,i){var a=i(6911).Buffer,n=a.alloc(16,0);function r(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function o(e){var t=a.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=a.alloc(16,0),this.cache=a.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,i=r(this.h),a=[0,0,0,0],n=-1;++n<128;){for((this.state[~~(n/8)]&1<<7-n%8)!=0&&(a[0]^=i[0],a[1]^=i[1],a[2]^=i[2],a[3]^=i[3]),t=(1&i[3])!=0,e=3;e>0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,t&&(i[0]=-0x1f000000^i[0])}this.state=o(a)},s.prototype.update=function(e){var t;for(this.cache=a.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(a.concat([this.cache,n],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},598:function(e){e.exports=function(e){for(var t,i=e.length;i--;)if(255===(t=e.readUInt8(i)))e.writeUInt8(0,i);else{t++,e.writeUInt8(t,i);break}}},9825:function(e,t,i){var a=i(4734);t.encrypt=function(e,t){var i=a(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev},t.decrypt=function(e,t){var i=e._prev;return e._prev=t,a(e._cipher.decryptBlock(t),i)}},321:function(e,t,i){var a=i(6911).Buffer,n=i(4734);function r(e,t,i){var r=t.length,o=n(t,e._cache);return e._cache=e._cache.slice(r),e._prev=a.concat([e._prev,i?t:o]),o}t.encrypt=function(e,t,i){for(var n,o=a.allocUnsafe(0);t.length;)if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=a.allocUnsafe(0)),e._cache.length<=t.length)n=e._cache.length,o=a.concat([o,r(e,t.slice(0,n),i)]),t=t.slice(n);else{o=a.concat([o,r(e,t,i)]);break}return o}},3147:function(e,t,i){var a=i(6911).Buffer;function n(e,t,i){for(var a,n,o,s=-1,u=8,d=0;++s<u;)a=e._cipher.encryptBlock(e._prev),n=t&1<<7-s?128:0,d+=(128&(o=a[0]^n))>>s%8,e._prev=r(e._prev,i?n:o);return d}function r(e,t){var i=e.length,n=-1,r=a.allocUnsafe(e.length);for(e=a.concat([e,a.from([t])]);++n<i;)r[n]=e[n]<<1|e[n+1]>>7;return r}t.encrypt=function(e,t,i){for(var r=t.length,o=a.allocUnsafe(r),s=-1;++s<r;)o[s]=n(e,t[s],i);return o}},2430:function(e,t,i){var a=i(6911).Buffer;function n(e,t,i){var n=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=a.concat([e._prev.slice(1),a.from([i?t:n])]),n}t.encrypt=function(e,t,i){for(var r=t.length,o=a.allocUnsafe(r),s=-1;++s<r;)o[s]=n(e,t[s],i);return o}},3361:function(e,t,i){var a=i(4734),n=i(6911).Buffer,r=i(598);function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return r(e._prev),t}var s=16;t.encrypt=function(e,t){var i=Math.ceil(t.length/s),r=e._cache.length;e._cache=n.concat([e._cache,n.allocUnsafe(i*s)]);for(var u=0;u<i;u++){var d=o(e),l=r+u*s;
1e._cache.writeUInt32BE(d[0],l+0),e._cache.writeUInt32BE(d[1],l+4),e._cache.writeUInt32BE(d[2],l+8),e._cache.writeUInt32BE(d[3],l+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),a(t,c)}},1590:function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},6370:function(e,t,i){var a={ECB:i(1590),CBC:i(9825),CFB:i(321),CFB8:i(2430),CFB1:i(3147),OFB:i(3412),CTR:i(3361),GCM:i(3361)},n=i(5866);for(var r in n)n[r].module=a[n[r].mode];e.exports=n},3412:function(e,t,i){var n=i(4734);function r(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=a.Buffer.concat([e._cache,r(e)]);var i=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,i)}},126:function(e,t,i){var a=i(1387),n=i(6911).Buffer,r=i(1043);function o(e,t,i,o){r.call(this),this._cipher=new a.AES(t),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=o,this._mode=e}i(3782)(o,r),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},8996:function(e,t,i){var a=i(5238),n=i(6594),r=i(6370),o=i(6280),s=i(8368);function u(e,t){if(r[e=e.toLowerCase()])i=r[e].key,a=r[e].iv;else if(o[e])i=8*o[e].key,a=o[e].iv;else throw TypeError("invalid suite type");var i,a,n=s(t,!1,i,a);return l(e,n.key,n.iv)}function d(e,t,i){if(r[e=e.toLowerCase()])return n.createCipheriv(e,t,i);if(o[e])return new a({key:t,iv:i,mode:e});throw TypeError("invalid suite type")}function l(e,t,i){if(r[e=e.toLowerCase()])return n.createDecipheriv(e,t,i);if(o[e])return new a({key:t,iv:i,mode:e,decrypt:!0});throw TypeError("invalid suite type")}function c(){return Object.keys(o).concat(n.getCiphers())}t.createCipher=t.Cipher=function(e,t){if(r[e=e.toLowerCase()])i=r[e].key,a=r[e].iv;else if(o[e])i=8*o[e].key,a=o[e].iv;else throw TypeError("invalid suite type");var i,a,n=s(t,!1,i,a);return d(e,n.key,n.iv)},t.createCipheriv=t.Cipheriv=d,t.createDecipher=t.Decipher=u,t.createDecipheriv=t.Decipheriv=l,t.listCiphers=t.getCiphers=c},5238:function(e,t,i){var a=i(1043),n=i(9536),r=i(3782),o=i(6911).Buffer,s={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function u(e){a.call(this);var t,i=e.mode.toLowerCase(),n=s[i];t=e.decrypt?"decrypt":"encrypt";var r=e.key;o.isBuffer(r)||(r=o.from(r)),("des-ede"===i||"des-ede-cbc"===i)&&(r=o.concat([r,r.slice(0,8)]));var u=e.iv;o.isBuffer(u)||(u=o.from(u)),this._des=n.create({key:r,iv:u,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=u,r(u,a),u.prototype._update=function(e){return o.from(this._des.update(e))},u.prototype._final=function(){return o.from(this._des.final())}},6280:function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},7166:function(e,t,i){var n=i(711),r=i(7223);function o(e){var t=u(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}function s(e,t){var i=o(t),r=t.modulus.byteLength();n.mont(t.modulus);var s=new n(e).mul(i.blinder).umod(t.modulus),u=s.toRed(n.mont(t.prime1)),d=s.toRed(n.mont(t.prime2)),l=t.coefficient,c=t.prime1,f=t.prime2,m=u.redPow(t.exponent1),h=d.redPow(t.exponent2);m=m.fromRed(),h=h.fromRed();var p=m.isub(h).imul(l).umod(c);return p.imul(f),h.iadd(p),new a.Buffer(h.imul(i.unblinder).umod(t.modulus).toArray(!1,r))}function u(e){for(var t=e.modulus.byteLength(),i=new n(r(t));i.cmp(e.modulus)>=0||!i.umod(e.prime1)||!i.umod(e.prime2);)i=new n(r(t));return i}e.exports=s,s.getr=u},9276:function(e,t,i){e.exports=i(2908)},4078:function(e,t,i){var a=i(6911).Buffer,n=i(9739),r=i(3726),o=i(3782),s=i(9807),u=i(4013),d=i(2908);function l(e){r.Writable.call(this);var t=d[e];if(!t)throw Error("Unknown message digest");
vendor: 13,212 bytes, line 1
1this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function c(e){r.Writable.call(this);var t=d[e];if(!t)throw Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new l(e)}function m(e){return new c(e)}Object.keys(d).forEach(function(e){d[e].id=a.from(d[e].id,"hex"),d[e.toLowerCase()]=d[e]}),o(l,r.Writable),l.prototype._write=function(e,t,i){this._hash.update(e),i()},l.prototype.update=function(e,t){return"string"==typeof e&&(e=a.from(e,t)),this._hash.update(e),this},l.prototype.sign=function(e,t){this.end();var i=s(this._hash.digest(),e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},o(c,r.Writable),c.prototype._write=function(e,t,i){this._hash.update(e),i()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=a.from(e,t)),this._hash.update(e),this},c.prototype.verify=function(e,t,i){return"string"==typeof t&&(t=a.from(t,i)),this.end(),u(t,this._hash.digest(),e,this._signType,this._tag)},e.exports={Sign:f,Verify:m,createSign:f,createVerify:m}},9807:function(e,t,i){var a=i(6911).Buffer,n=i(4873),r=i(7166),o=i(949).ec,s=i(1670),u=i(9902),d=i(9267);function l(e,t){var i=d[t.curve.join(".")];if(!i)throw Error("unknown curve "+t.curve.join("."));var n=new o(i).keyFromPrivate(t.privateKey).sign(e);return a.from(n.toDER())}function c(e,t,i){for(var a,n=t.params.priv_key,r=t.params.p,o=t.params.q,u=t.params.g,d=new s(0),l=h(e,o).mod(o),c=!1,p=m(n,o,e,i);!1===c;)d=g(u,a=b(o,p,i),r,o),0===(c=a.invm(o).imul(l.add(n.mul(d))).mod(o)).cmpn(0)&&(c=!1,d=new s(0));return f(d,c)}function f(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var i=[48,e.length+t.length+4,2,e.length];return i=i.concat(e,[2,t.length],t),a.from(i)}function m(e,t,i,r){if((e=a.from(e.toArray())).length<t.byteLength()){var o=a.alloc(t.byteLength()-e.length);e=a.concat([o,e])}var s=i.length,u=p(i,t),d=a.alloc(s);d.fill(1);var l=a.alloc(s);return l=n(r,l).update(d).update(a.from([0])).update(e).update(u).digest(),d=n(r,l).update(d).digest(),l=n(r,l).update(d).update(a.from([1])).update(e).update(u).digest(),d=n(r,l).update(d).digest(),{k:l,v:d}}function h(e,t){var i=new s(e),a=(e.length<<3)-t.bitLength();return a>0&&i.ishrn(a),i}function p(e,t){e=(e=h(e,t)).mod(t);var i=a.from(e.toArray());if(i.length<t.byteLength()){var n=a.alloc(t.byteLength()-i.length);i=a.concat([n,i])}return i}function b(e,t,i){var r,o;do{for(r=a.alloc(0);8*r.length<e.bitLength();)t.v=n(i,t.k).update(t.v).digest(),r=a.concat([r,t.v]);o=h(r,e),t.k=n(i,t.k).update(t.v).update(a.from([0])).digest(),t.v=n(i,t.k).update(t.v).digest()}while(-1!==o.cmp(e))return o}function g(e,t,i,a){return e.toRed(s.mont(i)).redPow(t).fromRed().mod(a)}e.exports=function(e,t,i,n,o){var s=u(t);if(s.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw Error("wrong private key type");return l(e,s)}if("dsa"===s.type){if("dsa"!==n)throw Error("wrong private key type");return c(e,s,i)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw Error("wrong private key type");e=a.concat([o,e]);for(var d=s.modulus.byteLength(),f=[0,1];e.length+f.length+1<d;)f.push(255);f.push(0);for(var m=-1;++m<e.length;)f.push(e[m]);return r(f,s)},e.exports.getKey=m,e.exports.makeKey=b},4013:function(e,t,i){var a=i(6911).Buffer,n=i(1670),r=i(949).ec,o=i(9902),s=i(9267);function u(e,t,i){var a=s[i.data.algorithm.curve.join(".")];if(!a)throw Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new r(a),o=i.data.subjectPrivateKey.data;return n.verify(t,e,o)}function d(e,t,i){var a=i.data.p,r=i.data.q,s=i.data.g,u=i.data.pub_key,d=o.signature.decode(e,"der"),c=d.s,f=d.r;l(c,r),l(f,r);var m=n.mont(a),h=c.invm(r);return 0===s.toRed(m).redPow(new n(t).mul(h).mod(r)).fromRed().mul(u.toRed(m).redPow(f.mul(h).mod(r)).fromRed()).mod(a).mod(r).cmp(f)}function l(e,t){if(0>=e.cmpn(0)||e.cmp(t)>=t)throw Error("invalid sig")}e.exports=function(e,t,i,r,s){var l=o(i);if("ec"===l.type){if("ecdsa"!==r&&"ecdsa/rsa"!==r)throw Error("wrong public key type");return u(e,t,l)}if("dsa"===l.type){if("dsa"!==r)throw Error("wrong public key type");return d(e,t,l)}if("rsa"!==r&&"ecdsa/rsa"!==r)throw Error("wrong public key type");t=a.concat([s,t]);for(var c=l.modulus.byteLength(),f=[1],m=0;t.length+f.length+2<c;)f.push(255),m++;f.push(0);for(var h=-1;++h<t.length;)f.push(t[h]);f=a.from(f);var p=n.mont(l.modulus);e=(e=new n(e).toRed(p)).redPow(new n(l.publicExponent));var b=+(m<8);for(c=Math.min((e=a.from(e.fromRed().toArray())).length,f.length),e.length!==f.length&&(b=1),h=-1;++h<c;)b|=e[h]^f[h];return 0===b}},4734:function(e){e.exports=function(e,t){for(var i=Math.min(e.length,t.length),n=new a.Buffer(i),r=0;r<i;++r)n[r]=e[r]^t[r];return n}},1043:function(e,t,i){var a=i(6911).Buffer,n=i(2781).Transform,r=i(1576).StringDecoder;function o(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}i(3782)(o,n),o.prototype.update=function(e,t,i){"string"==typeof e&&(e=a.from(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,i){var a;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){a=e}finally{i(a)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||a.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new r(t),this._encoding=t),this._encoding!==t)throw Error("can't switch encodings");var a=this._decoder.write(e);return i&&(a+=this._decoder.end()),a},e.exports=o},9942:function(e,t,i){var n=i(949),r=i(711);e.exports=function(e){return new s(e)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function u(e,t,i){Array.isArray(e)||(e=e.toArray());var n=new a.Buffer(e);if(i&&n.length<i){var r=new a.Buffer(i-n.length);r.fill(0),n=a.Buffer.concat([r,n])}return t?n.toString(t):n}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,t,i){return t=t||"utf8",a.Buffer.isBuffer(e)||(e=new a.Buffer(e,t)),u(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},s.prototype.getPublicKey=function(e,t){var i=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(i[i.length-1]%2?i[0]=7:i[0]=6),u(i,e)},s.prototype.getPrivateKey=function(e){return u(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,t){return t=t||"utf8",a.Buffer.isBuffer(e)||(e=new a.Buffer(e,t)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,t){t=t||"utf8",a.Buffer.isBuffer(e)||(e=new a.Buffer(e,t));var i=new r(e);return i=i.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(i),this}},9739:function(e,t,i){"use strict";var a=i(3782),n=i(3533),r=i(3225),o=i(4371),s=i(1043);function u(e){s.call(this,"digest"),this._hash=e}a(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new n:"rmd160"===e||"ripemd160"===e?new r:new u(o(e))}},450:function(e,t,i){var a=i(3533);e.exports=function(e){return(new a).update(e).digest()}},4873:function(e,t,i){"use strict";var a=i(3782),n=i(8119),r=i(1043),o=i(6911).Buffer,s=i(450),u=i(3225),d=i(4371),l=o.alloc(128);function c(e,t){r.call(this,"digest"),"string"==typeof t&&(t=o.from(t));var i="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>i?t=("rmd160"===e?new u:d(e)).update(t).digest():t.length<i&&(t=o.concat([t,l],i));for(var a=this._ipad=o.allocUnsafe(i),n=this._opad=o.allocUnsafe(i),s=0;s<i;s++)a[s]=54^t[s],n[s]=92^t[s];this._hash="rmd160"===e?new u:d(e),this._hash.update(a)}a(c,r),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:d(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new c("rmd160",t):"md5"===e?new n(s,t):new c(e,t)}},8119:function(e,t,i){"use strict";var a=i(3782),n=i(6911).Buffer,r=i(1043),o=n.alloc(128),s=64;function u(e,t){r.call(this,"digest"),"string"==typeof t&&(t=n.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=n.concat([t,o],s));for(var i=this._ipad=n.allocUnsafe(s),a=this._opad=n.allocUnsafe(s),u=0;u<s;u++)i[u]=54^t[u],a[u]=92^t[u];this._hash=[i]}a(u,r),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},e.exports=u},9536:function(e,t,i){"use strict";t.utils=i(5334),t.Cipher=i(9876),t.DES=i(1016),t.CBC=i(8641),t.EDE=i(6159)},8641:function(e,t,i){"use strict";var a=i(3523),n=i(3782),r={};function o(e){a.equal(e.length,8,"Invalid IV length"),this.iv=Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}n(t,e);for(var i=Object.keys(r),a=0;a<i.length;a++){var o=i[a];t.prototype[o]=r[o]}return t.create=function(e){return new t(e)},t},r._cbcInit=function(){var e=new o(this.options.iv);this._cbcState=e},r._update=function(e,t,i,a){var n=this._cbcState,r=this.constructor.super_.prototype,o=n.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=e[t+s];r._update.call(this,o,0,i,a);for(var s=0;s<this.blockSize;s++)o[s]=i[a+s]}else{r._update.call(this,e,t,i,a);for(var s=0;s<this.blockSize;s++)i[a+s]^=o[s];for(var s=0;s<this.blockSize;s++)o[s]=e[t+s]}}},9876:function(e,t,i){"use strict";var a=i(3523);function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=Array(this.blockSize),this.bufferOff=0}e.exports=n,n.prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},n.prototype._buffer=function(e,t){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-t),a=0;a<i;a++)this.buffer[this.bufferOff+a]=e[t+a];return this.bufferOff+=i,i},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(e){var t=0,i=0,a=Array(((this.bufferOff+e.length)/this.blockSize|0)*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(a,i)));for(var n=e.length-(e.length-t)%this.blockSize;t<n;t+=this.blockSize)this._update(e,t,a,i),i+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return a},n.prototype._updateDecrypt=function(e){for(var t=0,i=0,a=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=Array(a*this.blockSize);a>0;a--)t+=this._buffer(e,t),i+=this._flushBuffer(n,i);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,i;return(e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t)?t.concat(i):i},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=Array(this.blockSize);return this._update(this.buffer,0,e,0),e},n.prototype._unpad=function(e){return e},n.prototype._finalDecrypt=function(){a.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},1016:function(e,t,i){"use strict";var a=i(3523),n=i(3782),r=i(5334),o=i(9876);function s(){this.tmp=[,,],this.keys=null}function u(e){o.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}n(u,o),e.exports=u,u.create=function(e){return new u(e)};var d=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=Array(32),a.equal(t.length,this.blockSize,"Invalid key length");var i=r.readUInt32BE(t,0),n=r.readUInt32BE(t,4);r.pc1(i,n,e.tmp,0),i=e.tmp[0],n=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var s=d[o>>>1];i=r.r28shl(i,s),n=r.r28shl(n,s),r.pc2(i,n,e.keys,o)}},u.prototype._update=function(e,t,i,a){var n=this._desState,o=r.readUInt32BE(e,t),s=r.readUInt32BE(e,t+4);r.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt
1(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],r.writeUInt32BE(i,o,a),r.writeUInt32BE(i,s,a+4)},u.prototype._pad=function(e,t){for(var i=e.length-t,a=t;a<e.length;a++)e[a]=i;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],i=e.length-t;i<e.length;i++)a.equal(e[i],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,i,a,n){for(var o=t,s=i,u=0;u<e.keys.length;u+=2){var d=e.keys[u],l=e.keys[u+1];r.expand(s,e.tmp,0),d^=e.tmp[0],l^=e.tmp[1];var c=r.substitute(d,l),f=r.permute(c),m=s;s=(o^f)>>>0,o=m}r.rip(s,o,a,n)},u.prototype._decrypt=function(e,t,i,a,n){for(var o=i,s=t,u=e.keys.length-2;u>=0;u-=2){var d=e.keys[u],l=e.keys[u+1];r.expand(o,e.tmp,0),d^=e.tmp[0],l^=e.tmp[1];var c=r.substitute(d,l),f=r.permute(c),m=o;o=(s^f)>>>0,s=m}r.rip(o,s,a,n)}},6159:function(e,t,i){"use strict";var a=i(3523),n=i(3782),r=i(9876),o=i(1016);function s(e,t){a.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),n=t.slice(8,16),r=t.slice(16,24);"encrypt"===e?this.ciphers=[o.create({type:"encrypt",key:i}),o.create({type:"decrypt",key:n}),o.create({type:"encrypt",key:r})]:this.ciphers=[o.create({type:"decrypt",key:r}),o.create({type:"encrypt",key:n}),o.create({type:"decrypt",key:i})]}function u(e){r.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}n(u,r),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,i,a){var n=this._edeState;n.ciphers[0]._update(e,t,i,a),n.ciphers[1]._update(i,a,i,a),n.ciphers[2]._update(i,a,i,a)},u.prototype._pad=o.prototype._pad,u.prototype._unpad=o.prototype._unpad},5334:function(e,t){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t},t.ip=function(e,t,i,a){for(var n=0,r=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+o&1;for(var s=0;s<=24;s+=8)n<<=1,n|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)r<<=1,r|=t>>>s+o&1;for(var s=1;s<=25;s+=8)r<<=1,r|=e>>>s+o&1}i[a+0]=n>>>0,i[a+1]=r>>>0},t.rip=function(e,t,i,a){for(var n=0,r=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)n<<=1,n|=t>>>s+o&1,n<<=1,n|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)r<<=1,r|=t>>>s+o&1,r<<=1,r|=e>>>s+o&1;i[a+0]=n>>>0,i[a+1]=r>>>0},t.pc1=function(e,t,i,a){for(var n=0,r=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+o&1;for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+o&1}for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)r<<=1,r|=t>>s+o&1;for(var s=0;s<=24;s+=8)r<<=1,r|=e>>s+o&1}for(var s=0;s<=24;s+=8)r<<=1,r|=e>>s+o&1;i[a+0]=n>>>0,i[a+1]=r>>>0},t.r28shl=function(e,t){return e<<t&0xfffffff|e>>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,a,n){for(var r=0,o=0,s=i.length>>>1,u=0;u<s;u++)r<<=1,r|=e>>>i[u]&1;for(var u=s;u<i.length;u++)o<<=1,o|=t>>>i[u]&1;a[n+0]=r>>>0,a[n+1]=o>>>0},t.expand=function(e,t,i){var a=0,n=0;a=(1&e)<<5|e>>>27;for(var r=23;r>=15;r-=4)a<<=6,a|=e>>>r&63;for(var r=11;r>=3;r-=4)n|=e>>>r&63,n<<=6;n|=(31&e)<<1|e>>>31,t[i+0]=a>>>0,t[i+1]=n>>>0};var a=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var i=0,n=0;n<4;n++){var r=e>>>18-6*n&63,o=a[64*n+r];i<<=4,i|=o}for(var n=0;n<4;n++){var r=t>>>18-6*n&63,o=a[256+64*n+r];i<<=4,i|=o}return i>>>0};var n=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,i=0;i<n.length;i++)t<<=1,t|=e>>>n[i]&1;return t>>>0},t.padSplit=function(e,t,i){for(var a=e.toString(2);a.length<t;
1)a="0"+a;for(var n=[],r=0;r<t;r+=i)n.push(a.slice(r,r+i));return n.join(" ")}},6587:function(e,t,i){var n=i(296),r=i(7992),o=i(373),s={binary:!0,hex:!0,base64:!0};function u(e,t,i,r){return a.Buffer.isBuffer(t)||void 0===s[t]?u(e,"binary",t,i):(t=t||"binary",r=r||"binary",i=i||new a.Buffer([2]),a.Buffer.isBuffer(i)||(i=new a.Buffer(i,r)),"number"==typeof e)?new o(n(e,i),i,!0):(a.Buffer.isBuffer(e)||(e=new a.Buffer(e,t)),new o(e,i,!0))}t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){return new o(new a.Buffer(r[e].prime,"hex"),new a.Buffer(r[e].gen,"hex"))},t.createDiffieHellman=t.DiffieHellman=u},373:function(e,t,i){var n=i(711),r=new(i(1354)),o=new n(24),s=new n(11),u=new n(10),d=new n(3),l=new n(7),c=i(296),f=i(7223);function m(e,t){return t=t||"utf8",a.Buffer.isBuffer(e)||(e=new a.Buffer(e,t)),this._pub=new n(e),this}function h(e,t){return t=t||"utf8",a.Buffer.isBuffer(e)||(e=new a.Buffer(e,t)),this._priv=new n(e),this}e.exports=g;var p={};function b(e,t){var i,a=t.toString("hex"),n=[a,e.toString(16)].join("_");if(n in p)return p[n];var f=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!r.test(e))return f+=1,"02"===a||"05"===a?f+=8:f+=4,p[n]=f,f;switch(!r.test(e.shrn(1))&&(f+=2),a){case"02":e.mod(o).cmp(s)&&(f+=8);break;case"05":(i=e.mod(u)).cmp(d)&&i.cmp(l)&&(f+=8);break;default:f+=4}return p[n]=f,f}function g(e,t,i){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=m,this.setPrivateKey=h):this._primeCode=8}function v(e,t){var i=new a.Buffer(e.toArray());return t?i.toString(t):i}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=b(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var t=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new a.Buffer(t.toArray()),r=this.getPrime();if(i.length<r.length){var o=new a.Buffer(r.length-i.length);o.fill(0),i=a.Buffer.concat([o,i])}return i},g.prototype.getPublicKey=function(e){return v(this._pub,e)},g.prototype.getPrivateKey=function(e){return v(this._priv,e)},g.prototype.getPrime=function(e){return v(this.__prime,e)},g.prototype.getGenerator=function(e){return v(this._gen,e)},g.prototype.setGenerator=function(e,t){return t=t||"utf8",a.Buffer.isBuffer(e)||(e=new a.Buffer(e,t)),this.__gen=e,this._gen=new n(e),this}},296:function(e,t,i){var a=i(7223);e.exports=v,v.simpleSieve=b,v.fermatTest=g;var n=i(711),r=new n(24),o=new(i(1354)),s=new n(1),u=new n(2),d=new n(5);new n(16),new n(8);var l=new n(10),c=new n(3);new n(7);var f=new n(11),m=new n(4);new n(12);var h=null;function p(){if(null!==h)return h;var e=1048576,t=[];t[0]=2;for(var i=1,a=3;a<e;a+=2){for(var n=Math.ceil(Math.sqrt(a)),r=0;r<i&&t[r]<=n&&a%t[r]!=0;r++);i!==r&&t[r]<=n||(t[i++]=a)}return h=t,t}function b(e){for(var t=p(),i=0;i<t.length;i++)if(0===e.modn(t[i]))if(0!==e.cmpn(t[i]))return!1;else break;return!0}function g(e){var t=n.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function v(e,t){var i,h;if(e<16)if(2===t||5===t)return new n([140,123]);else return new n([140,39]);for(t=new n(t);;){for(i=new n(a(Math.ceil(e/8)));i.bitLength()>e;)i.ishrn(1);if(i.isEven()&&i.iadd(s),i.testn(1)||i.iadd(u),t.cmp(u)){if(!t.cmp(d))for(;i.mod(l).cmp(c);)i.iadd(m)}else for(;i.mod(r).cmp(f);)i.iadd(m);if(b(h=i.shrn(1))&&b(i)&&g(h)&&g(i)&&o.test(h)&&o.test(i))return i}}},949:function(e,t,i){"use strict";var a=t;a.version=i(2531).i8,a.utils=i(4401),a.rand=i(3500),a.curve=i(9359),a.curves=i(6226),a.ec=i(4088),a.eddsa=i(8511)},2727:function(e,t,i){"use strict";var a=i(711),n=i(4401),r=n.getNAF,o=n.getJSF,s=n.assert;function u(e,t){this.type=e,this.p=new a(t.p,16),this.red=t.prime?a.red(t.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=t.n&&new a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}
vendor: 5,176 bytes, line 1
1function d(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw Error("Not implemented")},u.prototype.validate=function(){throw Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var i=e._getDoubles(),a=r(t,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;for(var o=[],u=0;u<a.length;u+=i.step){for(var d=0,t=u+i.step-1;t>=u;t--)d=(d<<1)+a[t];o.push(d)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),f=n;f>0;f--){for(var u=0;u<o.length;u++){var d=o[u];d===f?c=c.mixedAdd(i.points[u]):d===-f&&(c=c.mixedAdd(i.points[u].neg()))}l=l.add(c)}return l.toP()},u.prototype._wnafMul=function(e,t){var i=4,a=e._getNAFPoints(i);i=a.wnd;for(var n=a.points,o=r(t,i,this._bitLength),u=this.jpoint(null,null,null),d=o.length-1;d>=0;d--){for(var t=0;d>=0&&0===o[d];d--)t++;if(d>=0&&t++,u=u.dblp(t),d<0)break;var l=o[d];s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(n[l-1>>1]):u.mixedAdd(n[-l-1>>1].neg()):l>0?u.add(n[l-1>>1]):u.add(n[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,i,a,n){for(var s=this._wnafT1,u=this._wnafT2,d=this._wnafT3,l=0,c=0;c<a;c++){var f=t[c],m=f._getNAFPoints(e);s[c]=m.wnd,u[c]=m.points}for(var c=a-1;c>=1;c-=2){var h=c-1,p=c;if(1!==s[h]||1!==s[p]){d[h]=r(i[h],s[h],this._bitLength),d[p]=r(i[p],s[p],this._bitLength),l=Math.max(d[h].length,l),l=Math.max(d[p].length,l);continue}var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=o(i[h],i[p]);l=Math.max(v[0].length,l),d[h]=Array(l),d[p]=Array(l);for(var y=0;y<l;y++){var x=0|v[0][y],z=0|v[1][y];d[h][y]=g[(x+1)*3+(z+1)],d[p][y]=0,u[h]=b}}for(var _=this.jpoint(null,null,null),S=this._wnafT4,c=l;c>=0;c--){for(var M=0;c>=0;){for(var I=!0,y=0;y<a;y++)S[y]=0|d[y][c],0!==S[y]&&(I=!1);if(!I)break;M++,c--}if(c>=0&&M++,_=_.dblp(M),c<0)break;for(var y=0;y<a;y++){var f,w=S[y];0!==w&&(w>0?f=u[y][w-1>>1]:w<0&&(f=u[y][-w-1>>1].neg()),_="affine"===f.type?_.mixedAdd(f):_.add(f))}}for(var c=0;c<a;c++)u[c]=null;return n?_:_.toP()},u.BasePoint=d,d.prototype.eq=function(){throw Error("Not implemented")},d.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=n.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw Error("Unknown point format")},d.prototype.encodeCompressed=function(e){return this.encode(e,!0)},d.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},d.prototype.encode=function(e,t){return n.encode(this._encode(t),e)},d.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},d.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},d.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],a=this,n=0;n<t;n+=e){for(var r=0;r<e;r++)a=a.dbl();i.push(a)}return{step:e,points:i}},d.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,a=1===i?null:this.dbl(),n=1;n<i;n++)t[n]=t[n-1].add(a);return{wnd:e,points:t}},d.prototype._getBeta=function(){return null},d.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t}},2705:function(e,t,i){"use strict";var a=i(4401),n=i(711),r=i(3782),o=i(2727),s=a.assert;function u(e){this.twisted=(0|e.a)!=1,this.mOneA=this.twisted&&(0|e.a)==-1,this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=(0|e.c)==1}function d(e,t,i,a,r){o.BasePoint.call(this,e,"projective"),null===t&&null===i&&null===a?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(t,16),this.y=new n(i,16),this.z=a?new n(a,16):this.curve.one,this.t=r&&new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}
vendor: 6,345 bytes, line 1
1r(u,o),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,i,a){return this.point(e,t,i,a)},u.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),a=this.c2.redSub(this.a.redMul(i)),r=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=a.redMul(r.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),a=i.redSub(this.c2),r=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=a.redMul(r.redInvm());if(0===o.cmp(this.zero))if(!t)return this.point(this.zero,e);else throw Error("invalid point");var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),i=e.y.redSqr(),a=t.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(i)));return 0===a.cmp(n)},r(d,o.BasePoint),u.prototype.pointFromJSON=function(e){return d.fromJSON(this,e)},u.prototype.point=function(e,t,i,a){return new d(this,e,t,i,a)},d.fromJSON=function(e,t){return new d(e,t[0],t[1],t[2])},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},d.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var a=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),r=a.redAdd(t),o=r.redSub(i),s=a.redSub(t),u=n.redMul(o),d=r.redMul(s),l=n.redMul(s),c=o.redMul(r);return this.curve.point(u,d,c,l)},d.prototype._projDbl=function(){var e,t,i,a=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),r=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(n),s=o.redAdd(r);if(this.zOne)e=a.redSub(n).redSub(r).redMul(s.redSub(this.curve.two)),t=s.redMul(o.redSub(r)),i=s.redSqr().redSub(s).redSub(s);else{var u=this.z.redSqr(),d=s.redSub(u).redISub(u);e=a.redSub(n).redISub(r).redMul(d),t=s.redMul(o.redSub(r)),i=s.redMul(d)}}else{var o=n.redAdd(r),u=this.curve._mulC(this.z).redSqr(),d=o.redSub(u).redSub(u);e=this.curve._mulC(a.redISub(o)).redMul(d),t=this.curve._mulC(o).redMul(n.redISub(r)),i=o.redMul(d)}return this.curve.point(e,t,i)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),a=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),r=i.redSub(t),o=n.redSub(a),s=n.redAdd(a),u=i.redAdd(t),d=r.redMul(o),l=s.redMul(u),c=r.redMul(u),f=o.redMul(s);return this.curve.point(d,l,f,c)},d.prototype._projAdd=function(e){var t,i,a=this.z.redMul(e.z),n=a.redSqr(),r=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(r).redMul(o),u=n.redSub(s),d=n.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(r).redISub(o),c=a.redMul(u).redMul(l);return this.curve.twisted?(t=a.redMul(d).redMul(o.redSub(this.curve._mulA(r))),i=u.redMul(d)):(t=a.redMul(d).redMul(o.redSub(r)),i=this.curve._mulC(u).redMul(d)),this.curve.point(c,t,i)},d.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},d.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},d.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),a=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(a),0===this.x.cmp(t))return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},9359:function(e,t,i){"use strict";var a=t;a.base=i(2727),a.short=i(4720),a.mont=i(6653),a.edwards=i(2705)},6653:function(e,t,i){"use strict";var a=i(711),n=i(3782),r=i(2727),o=i(4401);function s(e){r.call(this,"mont",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.i4=new a(4).toRed(this.red).redInvm(),this.two=new a(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,i){r.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new a(t,16),this.z=new a(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(s,r),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),a=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===a.redSqrt().redSqr().cmp(a)},n(u,r.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>
1":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),a=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,n)},u.prototype.add=function(){throw Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),a=this.x.redSub(this.z),n=e.x.redAdd(e.z),r=e.x.redSub(e.z).redMul(i),o=n.redMul(a),s=t.z.redMul(r.redAdd(o).redSqr()),u=t.x.redMul(r.redISub(o).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(e){for(var t=e.clone(),i=this,a=this.curve.point(null,null),n=this,r=[];0!==t.cmpn(0);t.iushrn(1))r.push(t.andln(1));for(var o=r.length-1;o>=0;o--)0===r[o]?(i=i.diffAdd(a,n),a=a.dbl()):(a=i.diffAdd(a,n),i=i.dbl());return a},u.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},4720:function(e,t,i){"use strict";var a=i(4401),n=i(711),r=i(3782),o=i(2727),s=a.assert;function u(e){o.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function d(e,t,i,a){o.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(i,16),a&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,i,a){o.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(i,16),this.z=new n(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}r(u,o),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var t,i,a,r=this._getEndoRoots(this.p);t=(t=0>r[0].cmp(r[1])?r[0]:r[1]).toRed(this.red)}if(e.lambda)i=new n(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?i=o[0]:(i=o[1],s(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return a=e.basis?e.basis.map(function(e){return{a:new n(e.a,16),b:new n(e.b,16)}}):this._getEndoBasis(i),{beta:t,lambda:i,basis:a}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),i=new n(2).toRed(t).redInvm(),a=i.redNeg(),r=new n(3).toRed(t).redNeg().redSqrt().redMul(i);return[a.redAdd(r).fromRed(),a.redSub(r).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,i,a,r,o,s,u,d,l,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,m=this.n.clone(),h=new n(1),p=new n(0),b=new n(0),g=new n(1),v=0;0!==f.cmpn(0);){var y=m.div(f);d=m.sub(y.mul(f)),l=b.sub(y.mul(h));var x=g.sub(y.mul(p));if(!a&&0>d.cmp(c))t=u.neg(),i=h,a=d.neg(),r=l;else if(a&&2==++v)break;u=d,m=f,f=d,b=h,h=l,g=p,p=x}o=d.neg(),s=l;var z=a.sqr().add(r.sqr());return o.sqr().add(s.sqr()).cmp(z)>=0&&(o=t,s=i),a.negative&&(a=a.neg(),r=r.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:a,b:r},{a:o,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],a=t[1],n=a.b.mul(e).divRound(this.n),r=i.b.neg().mul(e).divRound(this.n),o=n.mul(i.a),s=r.mul(a.a),u=n.mul(i.b),d=r.mul(a.b);return{k1:e.sub(o).sub(s),k2:u.add(d).neg()}},u.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=i.redSqrt();if(0!==a.redSqr().redSub(i).cmp(this.zero))throw Error("invalid point");var r=a.fromRed().isOdd();return(t&&!r||!t&&r)&&(a=a.redNeg()),this.point(e,a)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,a=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,i){for(var a=this._endoWnafT1,n=this._endoWnafT2,r=0;r<e.length;r++){var o=this._endoSplit(t[r]),s=e[r],u=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),u=u.neg(!0)),a[2*r]=s,a[2*r+1]=u,n[2*r]=o.k1,n[2*r+1]=o.k2}for(var d=this._wnafMulAdd(1,a,n,2*r,i),l=0;l<2*r;l++)a[l]=null,n[l]=null;return d},r(d,o.BasePoint),u.prototype.point=function(e,t,i){return new d(this,e,t,i)},u.prototype.pointFromJSON=function(e,t){return d.fromJSON(this,e,t)},d.prototype._getBeta=function(){if(this.curve.endo){var e=this.prec
vendor: 5,390 bytes, line 1
1omputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,a=function(e){return i.point(e.x.redMul(i.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(a)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(a)}}}return t}},d.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},d.fromJSON=function(e,t,i){"string"==typeof t&&(t=JSON.parse(t));var a=e.point(t[0],t[1],i);if(!t[2])return a;function n(t){return e.point(t[0],t[1],i)}var r=t[2];return a.precomputed={beta:null,doubles:r.doubles&&{step:r.doubles.step,points:[a].concat(r.doubles.points.map(n))},naf:r.naf&&{wnd:r.naf.wnd,points:[a].concat(r.naf.points.map(n))}},a},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e)||0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var i=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)},d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,i=this.x.redSqr(),a=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(a),r=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,o)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(e){return(e=new n(e,16),this.isInfinity())?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},d.prototype.mulAdd=function(e,t,i){var a=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(a,n):this.curve._wnafMulAdd(1,a,n,2)},d.prototype.jmulAdd=function(e,t,i){var a=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(a,n,!0):this.curve._wnafMulAdd(1,a,n,2,!0)},d.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,a=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(a)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(a)}}}return t},d.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},r(l,o.BasePoint),u.prototype.jpoint=function(e,t,i){return new l(this,e,t,i)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),a=this.y.redMul(t).redMul(e);return this.curve.point(i,a)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),a=this.x.redMul(t),n=e.x.redMul(i),r=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),s=a.redSub(n),u=r.redSub(o);if(0===s.cmpn(0))if(0!==u.cmpn(0))return this.curve.jpoint(null,null,null);else return this.dbl();var d=s.redSqr(),l=d.redMul(s),c=a.redMul(d),f=u.redSqr().redIAdd(l).redISub(c).redISub(c),m=u.redMul(c.redISub(f)).redISub(r.redMul(l)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,m,h)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,a=e.x.redMul(t),n=this.y,r=e.y.redMul(t).redMul(this.z),o=i.redSub(a),s=n.redSub(r);if(0===o.cmpn(0))if(0!==s.cmpn(0))return this.curve.jpoint(null,null,null);else return this.dbl();var u=o.redSqr(),d=u.redMul(o),l=i.redMul(u),c=s.redSqr().redIAdd(d).redISub(l).redISub(l),f=s.redMul(l.redISub(c)).redISub(n.redMul(d)),m=this.z.redMul(o);return this.curve.jpoint(c,f,m)},l.prototype.dblp=function(e){if(0===e||this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,i=0;i<e;i++)t=t.dbl();return t}for(var a=this.curve.a,n=this.curve.tinv,r=this.x,o=this.y,s=this.z,u=s.redSqr().redSqr(),d=o.redAdd(o),i=0;i<e;i++){var l=r.redSqr(),c=d.redSqr(),f=c.redSqr(),m=l.redAdd(l).redIAdd(l).redIAdd(a.redMul(u)),h=r.redMul(c),p=m.redSqr().redISub(h.redAdd(h)),b=h.redISub(p),g=m.redMul(b);g=g.redIAdd(g).redISub(f);var v=d.redMul(s);i+1<e&&(u=u.redMul(f)),r=p,s=v,d=g}return this.curve.jpoint(r,d.redMul(n),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){if(this.zOne){var e,t,i,a=this.x.redSqr(),n=this.y.redSqr(),r
vendor: 8,207 bytes, line 1
1=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(a).redISub(r);o=o.redIAdd(o);var s=a.redAdd(a).redIAdd(a),u=s.redSqr().redISub(o).redISub(o),d=r.redIAdd(r);d=(d=d.redIAdd(d)).redIAdd(d),e=u,t=s.redMul(o.redISub(u)).redISub(d),i=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),c=this.y.redSqr(),f=c.redSqr(),m=this.x.redAdd(c).redSqr().redISub(l).redISub(f);m=m.redIAdd(m);var h=l.redAdd(l).redIAdd(l),p=h.redSqr(),b=f.redIAdd(f);b=(b=b.redIAdd(b)).redIAdd(b),e=p.redISub(m).redISub(m),t=h.redMul(m.redISub(e)).redISub(b),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(e,t,i)},l.prototype._threeDbl=function(){if(this.zOne){var e,t,i,a=this.x.redSqr(),n=this.y.redSqr(),r=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(a).redISub(r);o=o.redIAdd(o);var s=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a),u=s.redSqr().redISub(o).redISub(o);e=u;var d=r.redIAdd(r);d=(d=d.redIAdd(d)).redIAdd(d),t=s.redMul(o.redISub(u)).redISub(d),i=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),c=this.y.redSqr(),f=this.x.redMul(c),m=this.x.redSub(l).redMul(this.x.redAdd(l));m=m.redAdd(m).redIAdd(m);var h=f.redIAdd(f),p=(h=h.redIAdd(h)).redAdd(h);e=m.redSqr().redISub(p),i=this.y.redAdd(this.z).redSqr().redISub(c).redISub(l);var b=c.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),t=m.redMul(h.redISub(e)).redISub(b)}return this.curve.jpoint(e,t,i)},l.prototype._dbl=function(){var e=this.curve.a,t=this.x,i=this.y,a=this.z,n=a.redSqr().redSqr(),r=t.redSqr(),o=i.redSqr(),s=r.redAdd(r).redIAdd(r).redIAdd(e.redMul(n)),u=t.redAdd(t),d=(u=u.redIAdd(u)).redMul(o),l=s.redSqr().redISub(d.redAdd(d)),c=d.redISub(l),f=o.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var m=s.redMul(c).redISub(f),h=i.redAdd(i).redMul(a);return this.curve.jpoint(l,m,h)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr(),a=t.redSqr(),n=e.redAdd(e).redIAdd(e),r=n.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(a),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(r)).redSqr(),u=a.redIAdd(a);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var d=n.redIAdd(o).redSqr().redISub(r).redISub(s).redISub(u),l=t.redMul(d);l=(l=l.redIAdd(l)).redIAdd(l);var c=this.x.redMul(s).redISub(l);c=(c=c.redIAdd(c)).redIAdd(c);var f=this.y.redMul(d.redMul(u.redISub(d)).redISub(o.redMul(s)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var m=this.z.redAdd(o).redSqr().redISub(i).redISub(s);return this.curve.jpoint(c,f,m)},l.prototype.mul=function(e,t){return e=new n(e,t),this.curve._wnafMul(this,e)},l.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),i=e.z.redSqr();if(0!==this.x.redMul(i).redISub(e.x.redMul(t)).cmpn(0))return!1;var a=t.redMul(this.z),n=i.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(a)).cmpn(0)},l.prototype.eqXToP=function(e){var t=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(i))return!0;for(var a=e.clone(),n=this.curve.redN.redMul(t);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6226:function(e,t,i){"use strict";var a,n=t,r=i(7028),o=i(9359),s=i(4401).assert;function u(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function d(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var i=new u(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=u,d("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),d("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),d("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),d("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),d("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),d("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),d("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{a=i(9702)}catch(e){a=void 0}d("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"}
1,{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",a]})},4088:function(e,t,i){"use strict";var a=i(711),n=i(4910),r=i(4401),o=i(6226),s=i(3500),u=r.assert,d=i(4724),l=i(7526);function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(u(o.hasOwnProperty(e),"Unknown curve "+e),e=o[e]),e instanceof o.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=c,c.prototype.keyPair=function(e){return new d(this,e)},c.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),r=this.n.sub(new a(2));;){var o=new a(t.generate(i));if(!(o.cmp(r)>0))return o.iaddn(1),this.keyFromPrivate(o)}},c.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return(i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0)?e.sub(this.n):e},c.prototype.sign=function(e,t,i,r){"object"==typeof i&&(r=i,i=null),r||(r={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new a(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),d=new n({hash:this.hash,entropy:s,nonce:u,pers:r.pers,persEnc:r.persEnc||"utf8"}),c=this.n.sub(new a(1)),f=0;;f++){var m=r.k?r.k(f):new a(d.generate(this.n.byteLength()));if(0>=(m=this._truncateToN(m,!0)).cmpn(1)||m.cmp(c)>=0)continue;var h=this.g.mul(m);if(!h.isInfinity()){var p=h.getX(),b=p.umod(this.n);if(0!==b.cmpn(0)){var g=m.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var v=!!h.getY().isOdd()|2*(0!==p.cmp(b));return r.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),v^=1),new l({r:b,s:g,recoveryParam:v})}}}}},c.prototype.verify=function(e,t,i,n){e=this._truncateToN(new a(e,16)),i=this.keyFromPublic(i,n);var r=(t=new l(t,"hex")).r,o=t.s;if(0>r.cmpn(1)||r.cmp(this.n)>=0||0>o.cmpn(1)||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),u=s.mul(e).umod(this.n),d=s.mul(r).umod(this.n);if(!this.curve._maxwellTrick){var c=this.g.mulAdd(u,i.getPublic(),d);return!c.isInfinity()&&0===c.getX().umod(this.n).cmp(r)}var c=this.g.jmulAdd(u,i.getPublic(),d);return!c.isInfinity()&&c.eqXToP(r)},c.prototype.recoverPubKey=function(e,t,i,n){u((3&i)===i,"The recovery param is more than two bits"),t=new l(t,n);var r=this.n,o=new a(e),s=t.r,d=t.s,c=1&i,f=i>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var m=t.r.invm(r),h=r.sub(o).mul(m).umod(r),p=d.mul(m).umod(r);return this.g.mulAdd(h,s,p)},c.prototype.getKeyRecoveryParam=function(e,t,i,a){if(null!==(t=new l(t,a)).recoveryParam)return t.recoveryParam;for(var n,r=0;r<4;r++){try{n=this.recoverPubKey(e,t,r)}catch(e){continue}if(n.eq(i))return r}throw Error("Unable to find valid recovery factor")}},4724:function(e,t,i){"use strict";var a=i(711),n=i(4401).assert;function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=r,r.fromPublic=function(e,t,i){return t instanceof r?t:new r(e,{pub:t,pubEnc:i})},r.fromPrivate=function(e,t,i){return t instanceof r?t:new r(e,{priv:t,privEnc:i})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return("string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t)?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new a(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){if(e.x||e.y){"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&n(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},7526:function(e,t,i){"use strict";var a=i(711),n=i(4401),r=n.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(r(e.r&&e.s,"Signature without r or s"),this.r=new a(e.r,16),this.s=new a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var i=e[t.place++];if(!(128&i))return i;var a=15&i;if(0===a||a>4)return!1;for(var n=0,r=0,o=t.place;r<a;r++,o++)n<<=8,n|=e[o],n>>>=0;return!(n<=127)&&(t.place=o,n)}function d(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t<i;)t++;return 0===t?e:e.slice(t)}function l(e,t){if(t<128)return void e.push(t);var i=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}e.exports=o,o.prototype._importDER=function(e,t){e=n.toArray(e,t);var i=new s;if(48!==e[i.place++])return!1;var r=u(e,i);if(!1===r||r+i.place!==e.length||2!==e[i.place++])return!1;var o=u(e,i);if(!1===o)return!1;var d=e.slice(i.place,o+i.place);if(i.place+=o,2!==e[i.place++])return!1;var l=u(e,i);if(!1===l||e.length!==l+i.place)return!1;var c=e.slice(i.place,l+i.place);if(0===d[0])if(!(128&d[1]))return!1;else d=d.slice(1);if(0===c[0])if(!(128&c[1]))return!1;else c=c.slice(1);return this.r=new a(d),this.s=new a(c),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=d(t),i=d(i);!i[0]&&!(128&i[1]);)i=i.slice(1);var a=[2];l(a,t.length),(a=a.concat(t)).push(2),l(a,i.length);var r=a.concat(i),o=[48];return l(o,r.length),o=o.concat(r),n.encode(o,e)}},8511:function(e,t,i){"use strict";var a=i(7028),n=i(6226),r=i(4401),o=r.assert,s=r.parseBytes,u=i(9917),d=i(9314);function l(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);var e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=a.sha512}e.exports=l,l.prototype.sign=function(e,t){e=s(e);var i=this.keyFromSecret(t),a=this.hashInt(i.messagePrefix(),e),n=this.g.mul(a),r=this.encodePoint(n),o=this.hashInt(r,i.pubBytes(),e).mul(i.priv()),u=a.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:u,Rencoded:r})},l.prototype.verify=function(e,t,i){e=s(e),t=this.makeSignature(t);var a=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),a.pubBytes(),e),r=this.g.mul(t.S());return t.R().add(a.pub().mul(n)).eq(r)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return r.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof d?e:ne
1w d(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=128*!!e.getX().isOdd(),t},l.prototype.decodePoint=function(e){var t=(e=r.parseBytes(e)).length-1,i=e.slice(0,t).concat(-129&e[t]),a=(128&e[t])!=0,n=r.intFromLE(i);return this.curve.pointFromY(n,a)},l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(e){return r.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}},9917:function(e,t,i){"use strict";var a=i(4401),n=a.assert,r=a.parseBytes,o=a.cachedProperty;function s(e,t){this.eddsa=e,this._secret=r(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=r(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,a=t.slice(0,e.encodingLength);return a[0]&=248,a[i]&=127,a[i]|=64,a}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),a.encode(this.secret(),e)},s.prototype.getPublic=function(e){return a.encode(this.pubBytes(),e)},e.exports=s},9314:function(e,t,i){"use strict";var a=i(711),n=i(4401),r=n.assert,o=n.cachedProperty,s=n.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),r(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof a&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(u,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(u,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(u,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(u,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},9702:function(e){e
vendor: 18,403 bytes, line 1
1.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0
vendor: 7,734 bytes, line 1
1a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},
14401:function(e,t,i){"use strict";var a=t,n=i(711),r=i(3523),o=i(6545);function s(e){return"string"==typeof e?a.toArray(e,"hex"):e}a.assert=r,a.toArray=o.toArray,a.zero2=o.zero2,a.toHex=o.toHex,a.encode=o.encode,a.getNAF=function(e,t,i){var a=Array(Math.max(e.bitLength(),i)+1);a.fill(0);for(var n=1<<t+1,r=e.clone(),o=0;o<a.length;o++){var s,u=r.andln(n-1);r.isOdd()?(s=u>(n>>1)-1?(n>>1)-u:u,r.isubn(s)):s=0,a[o]=s,r.iushrn(1)}return a},a.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var a=0,n=0;e.cmpn(-a)>0||t.cmpn(-n)>0;){var r,o,s=e.andln(3)+a&3,u=t.andln(3)+n&3;if(3===s&&(s=-1),3===u&&(u=-1),(1&s)==0)r=0;else{var d=e.andln(7)+a&7;r=(3===d||5===d)&&2===u?-s:s}if(i[0].push(r),(1&u)==0)o=0;else{var d=t.andln(7)+n&7;o=(3===d||5===d)&&2===s?-u:u}i[1].push(o),2*a===r+1&&(a=1-a),2*n===o+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return i},a.cachedProperty=function(e,t,i){var a="_"+t;e.prototype[t]=function(){return void 0!==this[a]?this[a]:this[a]=i.call(this)}},a.parseBytes=s,a.intFromLE=function(e){return new n(e,"hex","le")}},8368:function(e,t,i){var a=i(6911).Buffer,n=i(3533);e.exports=function(e,t,i,r){if(a.isBuffer(e)||(e=a.from(e,"binary")),t&&(a.isBuffer(t)||(t=a.from(t,"binary")),8!==t.length))throw RangeError("salt should be Buffer with 8 byte length");for(var o=i/8,s=a.alloc(o),u=a.alloc(r||0),d=a.alloc(0);o>0||r>0;){var l=new n;l.update(d),l.update(e),t&&l.update(t),d=l.digest();var c=0;if(o>0){var f=s.length-o;c=Math.min(o,d.length),d.copy(s,f,0,c),o-=c}if(c<d.length&&r>0){var m=u.length-r,h=Math.min(r,d.length-c);d.copy(u,m,c,c+h),r-=h}}return d.fill(0),{key:s,iv:u}}},9029:function(e,t,i){"use strict";var a=i(6911).Buffer,n=i(3726).Transform;function r(e,t){if(!a.isBuffer(e)&&"string"!=typeof e)throw TypeError(t+" must be a string or a buffer")}function o(e){n.call(this),this._block=a.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}i(3782)(o,n),o.prototype._transform=function(e,t,i){var a=null;try{this.update(e,t)}catch(e){a=e}i(a)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(r(e,"Data"),this._finalized)throw Error("Digest already called");a.isBuffer(e)||(e=a.from(e,t));for(var i=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)i[this._blockOffset++]=e[n++];for(var s=0,u=8*e.length;u>0;++s)this._length[s]+=u,(u=this._length[s]/0x100000000|0)>0&&(this._length[s]-=0x100000000*u);return this},o.prototype._update=function(){throw Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return t},o.prototype._digest=function(){throw Error("_digest is not implemented")},e.exports=o},7028:function(e,t,i){var a=t;a.utils=i(263),a.common=i(1330),a.sha=i(301),a.ripemd=i(3079),a.hmac=i(3092),a.sha1=a.sha.sha1,a.sha256=a.sha.sha256,a.sha224=a.sha.sha224,a.sha384=a.sha.sha384,a.sha512=a.sha.sha512,a.ripemd160=a.ripemd.ripemd160},1330:function(e,t,i){"use strict";var a=i(263),n=i(3523);function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}
vendor: 5,881 bytes, line 1
1t.BlockHash=r,r.prototype.update=function(e,t){if(e=a.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=a.join32(e,0,e.length-i,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},r.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},r.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,a=Array(i+this.padLength);a[0]=128;for(var n=1;n<i;n++)a[n]=0;if(e<<=3,"big"===this.endian){for(var r=8;r<this.padLength;r++)a[n++]=0;a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=e>>>24&255,a[n++]=e>>>16&255,a[n++]=e>>>8&255,a[n++]=255&e}else for(r=8,a[n++]=255&e,a[n++]=e>>>8&255,a[n++]=e>>>16&255,a[n++]=e>>>24&255,a[n++]=0,a[n++]=0,a[n++]=0,a[n++]=0;r<this.padLength;r++)a[n++]=0;return a}},3092:function(e,t,i){"use strict";var a=i(263),n=i(3523);function r(e,t,i){if(!(this instanceof r))return new r(e,t,i);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(a.toArray(t,i))}e.exports=r,r.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(t=0,this.inner=(new this.Hash).update(e);t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},r.prototype.update=function(e,t){return this.inner.update(e,t),this},r.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},3079:function(e,t,i){"use strict";var a=i(263),n=i(1330),r=a.rotl32,o=a.sum32,s=a.sum32_3,u=a.sum32_4,d=n.BlockHash;function l(){if(!(this instanceof l))return new l;d.call(this),this.h=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.endian="little"}function c(e,t,i,a){return e<=15?t^i^a:e<=31?t&i|~t&a:e<=47?(t|~i)^a:e<=63?t&a|i&~a:t^(i|~a)}function f(e){return e<=15?0:e<=31?0x5a827999:e<=47?0x6ed9eba1:e<=63?0x8f1bbcdc:0xa953fd4e}function m(e){return e<=15?0x50a28be6:e<=31?0x5c4dd124:e<=47?0x6d703ef3:0x7a6d76e9*!!(e<=63)}a.inherits(l,d),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var i=this.h[0],a=this.h[1],n=this.h[2],d=this.h[3],l=this.h[4],v=i,y=a,x=n,z=d,_=l,S=0;S<80;S++){var M=o(r(u(i,c(S,a,n,d),e[h[S]+t],f(S)),b[S]),l);i=l,l=d,d=r(n,10),n=a,a=M,M=o(r(u(v,c(79-S,y,x,z),e[p[S]+t],m(S)),g[S]),_),v=_,_=z,z=r(x,10),x=y,y=M}M=s(this.h[1],n,z),this.h[1]=s(this.h[2],d,_),this.h[2]=s(this.h[3],l,v),this.h[3]=s(this.h[4],i,y),this.h[4]=s(this.h[0],a,x),this.h[0]=M},l.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h,"little"):a.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],b=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},301:function(e,t,i){"use strict";t.sha1=i(2742),t.sha224=i(7105),t.sha256=i(1525),t.sha384=i(9948),t.sha512=i(1319)},2742:function(e,t,i){"use strict";var a=i(263),n=i(1330),r=i(2975),o=a.rotl32,s=a.sum32,u=a.sum32_5,d=r.ft_1,l=n.BlockHash,c=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],this.W=Array(80)}a.inherits(f,l),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var i=this.W,a=0;a<16;a++)i[a]=e[t+a];for(;a<i.length;a++)i[a]=o(i[a-3]^i[a-8]^i[a-14]^i[a-16],1);var n=this.h[0],r=this.h[1],l=this.h[2],f=this.h[3],m=this.h[4];for(a=0;a<i.length;a++){var h=~~(a/20),p=u(o(n,5),d(h,r,l,f),m,i[a],c[h]);m=f,f=l,l=o(r,30),r=n,n=p}this.h[0]=s(this.h[0],n),this.h[1]=s(this.h[1],r),this.h[2]=s(this.h[2],l),this.h[3]=s(this.h[3],f),this.h[4]=s(this.h[4],m)},f.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},7105:function(e,t,i){"use strict";var a=i(263),n=i(1525);function r(){if(!(this instanceof r))return new r;n.call(this),this.h=[0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]}a.inherits(r,n),e.exports=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h.slice(0,7),"big"):a.split32(this.h.slice(0,7),"big")}},1525:function(e,t,i){"use strict";var a=i(263),n=i(1330),r=i(2975),o=i(3523),s=a.sum32,u=a.sum32_4,d=a.sum32_5,l=r.ch32,c=r.maj32,f=r.s0_256,m=r.s1_256,h=r.g0_256,p=r.g1_256,b=n.BlockHash,g=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc
vendor: 8,770 bytes, line 1
176c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2];function v(){if(!(this instanceof v))return new v;b.call(this),this.h=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],this.k=g,this.W=Array(64)}a.inherits(v,b),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var i=this.W,a=0;a<16;a++)i[a]=e[t+a];for(;a<i.length;a++)i[a]=u(p(i[a-2]),i[a-7],h(i[a-15]),i[a-16]);var n=this.h[0],r=this.h[1],b=this.h[2],g=this.h[3],v=this.h[4],y=this.h[5],x=this.h[6],z=this.h[7];for(o(this.k.length===i.length),a=0;a<i.length;a++){var _=d(z,m(v),l(v,y,x),this.k[a],i[a]),S=s(f(n),c(n,r,b));z=x,x=y,y=v,v=s(g,_),g=b,b=r,r=n,n=s(_,S)}this.h[0]=s(this.h[0],n),this.h[1]=s(this.h[1],r),this.h[2]=s(this.h[2],b),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],y),this.h[6]=s(this.h[6],x),this.h[7]=s(this.h[7],z)},v.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},9948:function(e,t,i){"use strict";var a=i(263),n=i(1319);function r(){if(!(this instanceof r))return new r;n.call(this),this.h=[0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]}a.inherits(r,n),e.exports=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h.slice(0,12),"big"):a.split32(this.h.slice(0,12),"big")}},1319:function(e,t,i){"use strict";var a=i(263),n=i(1330),r=i(3523),o=a.rotr64_hi,s=a.rotr64_lo,u=a.shr64_hi,d=a.shr64_lo,l=a.sum64,c=a.sum64_hi,f=a.sum64_lo,m=a.sum64_4_hi,h=a.sum64_4_lo,p=a.sum64_5_hi,b=a.sum64_5_lo,g=n.BlockHash,v=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179],this.k=v,this.W=Array(160)}function x(e,t,i,a,n){var r=e&i^~e&n;return r<0&&(r+=0x100000000),r}function z(e,t,i,a,n,r){var o=t&a^~t&r;return o<0&&(o+=0x100000000),o}function _(e,t,i,a,n){var r=e&i^e&n^i&n;return r<0&&(r+=0x100000000),r}function S(e,t,i,a,n,r){var o=t&a^t&r^a&r;return o<0&&(o+=0x100000000),o}function M(e,t){var i=o(e,t,28)^o(t,e,2)^o(t,e,7);return i<0&&(i+=0x100000000),i}function I(e,t){var i=s(e,t,28)^s(t,e,2)^s(t,e,7);return i<0&&(i+=0x100000000),i}function w(e,t){var i=o(e,t,14)^o(e,t,18)^o(t,e,9);return i<0&&(i+=0x100000000),i}function C(e,t){var i=s(e,t,14)^s(e,t,18)^s(t,e,9);return i<0&&(i+=0x100000000),i}function R(e,t){var i=o(e,t,1)^o(e,t,8)^u(e,t,7);return i<0&&(i+=0x100000000),i}function E(e,t){var i=s(e,t,1)^s(e,t,8)^d(e,t,7);return i<0&&(i+=0x100000000),i}function A(e,t){var i=o(e,t,19)^o(t,e,29)^u(e,t,6);return i<0&&(i+=0x100000000),i}function P(e,t){var i=s(e,t,19)^s(t,e,29)^d(e,t,6);return i<0&&(i+=0x100000000),i}a.inherits(y,g),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var i=this.W,a=0;a<32;a++)i[a]=e[t+a];for(;a<i.length;a+=2){var n=A(i[a-4],i[a-3]),r=P(i[a-4],i[a-3]),o=i[a-14],s=i[a-13],u=R(i[a-30],i[a-29]),d=E(i[a-30],i[a-29]),l=i[a-32],c=i[a-31];i[a]=m(n,r,o,s,u,d,l,c),i[a+1]=h(n,r,o,s,u,d,l,c)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var i=this.W,a=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],u=this.h[4],d=this.h[5],m=this.h[6],h=this.h[7],g=this.h[8],v=this.h[9],y=this.h[10],R=this.h[11],E=this.h[12],A=this.h[13],P=this.h[14],T=this.h[15];r(this.k.length===i.length);for(var k=0;k<i.length;k+=2){var D=P,B=T,j=w(g,v),O=C(g,v),V=x(g,v,y,R,E,A),N=z(g,v,y,R,E,A),F=this.k[k],U=this.k[k+1],q=i[k],L=i[k+1],$=p(D,B,j,O,V,N,F,U,q,L),H=b(D,B,j,O,V,N,F,U,q,L);D=M(a,n),B=I(a,n);var K=c(D,B,j=_(a,n,o,s,u,d),O=S(a,n,o,s,u,d)),G=f(D,B,j,O);P=E,T=A,E=y,A=R,y=g,R=v,g=c(m,h,$,H),v=f(h,h,$,H),m=u,h=d,u=o,d=s,o=a,s=n,a=c($,H,K,G),n=f($,H,K,G)}l(this.h,0,a,n),l(this.h,2,o,s),l(this.h,4,u,d),l(this.h,6,m,h),l(this.h,8,g,v),l(this.h,10,y,R),l(this.h,12,E,A),l(this.h,14,P,T)},y.prototype._digest=function(e){return"hex"===e?a.toHex32(this.h,"big"):a.split32(this.h,"big")}},2975:function(e,t,i){"use strict";var a=i(263).rotr32;function n(e,t,i){return e&t^~e&i}function r(e,t,i){return e&t^e&i^t&i}function o(e,t,i){return e^t^i}t.ft_1=function(e,t,i,a){return 0===e?n(t,i,a):1===e||3===e?o(t,i,a):2===e?r(t,i,a):void 0},t.ch32=n,t.maj32=r,t.p32=o,t.s0_256=function(e){return a(e,2)^a(e,13)^a(e,22)},t.s1_256=function(e){return a(e,6)^a(e,11)^a(e,25)},t.g0_256=function(e){return a(e,7)^a(e,18)^e>>>3},t.g1_256=function(e){return a(e,17)^a(e,19)^e>>>10}},263:function(e,t,i){"use strict";var a=i(3523);function n(e,t){return(64512&e.charCodeAt(t))==55296&&!(t<0)&&!(t+1>=e.length)&&(64512&e.charCodeAt(t+1))==56320}function r(e){return(e>>>24|e>>>8&65280|e<<8&0xff0000|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){if(7===e.length)return"0"+e;if(6===e.length)return"00"+e;if(5===e.length)return"000"+e;if(4===e.length)return"0000"+e;if(3===e.length)return"00000"+e;else if(2===e.length)return"000000"+e;else if(1===e.length)return"0000000"+e;else return e}t.inherits=i(3782),t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)i.push(parseInt(e[r]+e[r+1],16))}else for(var a=0,r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?i[a++]=o:(o<2048?i[a++]=o>>6|192:(n(e,r)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++r)),i[a++]=o>>18|240,i[a++]=o>>12&63|128):i[a++]=o>>12|224,i[a++]=o>>6&63|128),i[a++]=63&o|128)}else for(r=0;r<e.length;r++)i[r]=0|e[r];return i},t.toHex=function(e){for(var t="",i=0;i<e.length;i++)t+=o(e[i].toString(16));return t},t.htonl=r,t.toHex32=function(e,t){for(var i="",a=0;a<e.length;a++){var n=e[a];"little"===t&&(n=r(n)),i+=s(n.toString(16))}return i},t.zero2=o,t.zero8=s,t.join32=function(e,t,i,n){var r,o=i-t;a(o%4==0);for(var s=Array(o/4),u=0,d=t;u<s.length;u++,d+=4)r="big"===n?e[d]<<24|e[d+1]<<16|e[d+2]<<8|e[d+3]:e[d+3]<<24|e[d+2]<<16|e[d+1]<<8|e[d],s[u]=r>>>0;return s},t.split32=function(e,t){for(var i=Array(4*e.length),a=0,n=0;a<e.length;a++,n+=4){var r=e[a];"big"===t?(i[n]=r>>>24,i[n+1]=r>>>16&255,i[n+2]=r>>>8&255,i[n+3]=255&r):(i[n+3]=r>>>24,i[n+2]=r>>>16&255,i[n+1]=r>>>8&255,i[n]=255&r)}return i},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,i){return e+t+i>>>0},t.sum32_4=function(e,t,i,a){return e+t+i+a>>>0},t.sum32_5=function(e,t,i,a,n){return e+t+i+a+n>>>0},t.sum64=function(e,t,i,a){var n=e[t],r=a+e[t+1]>>>0,o=+(r<a)+i+n;e[t]=o>>>
10,e[t+1]=r},t.sum64_hi=function(e,t,i,a){return+(t+a>>>0<t)+e+i>>>0},t.sum64_lo=function(e,t,i,a){return t+a>>>0},t.sum64_4_hi=function(e,t,i,a,n,r,o,s){var u,d=t;return e+i+n+o+(u=0+ +((d=d+a>>>0)<t)+ +((d=d+r>>>0)<r)+ +((d=d+s>>>0)<s))>>>0},t.sum64_4_lo=function(e,t,i,a,n,r,o,s){return t+a+r+s>>>0},t.sum64_5_hi=function(e,t,i,a,n,r,o,s,u,d){var l,c=t;return e+i+n+o+u+(l=0+ +((c=c+a>>>0)<t)+ +((c=c+r>>>0)<r)+ +((c=c+s>>>0)<s)+ +((c=c+d>>>0)<d))>>>0},t.sum64_5_lo=function(e,t,i,a,n,r,o,s,u,d){return t+a+r+s+d>>>0},t.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},t.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},t.shr64_hi=function(e,t,i){return e>>>i},t.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0}},4910:function(e,t,i){"use strict";var a=i(7028),n=i(6545),r=i(3523);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),i=n.toArray(e.nonce,e.nonceEnc||"hex"),a=n.toArray(e.pers,e.persEnc||"hex");r(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,a)}e.exports=o,o.prototype._init=function(e,t,i){var a=e.concat(t).concat(i);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(a),this._reseed=1,this.reseedInterval=0x1000000000000},o.prototype._hmac=function(){return new a.hmac(this.hash,this.K)},o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(e,t,i,a){"string"!=typeof t&&(a=i,i=t,t=null),e=n.toArray(e,t),i=n.toArray(i,a),r(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},o.prototype.generate=function(e,t,i,a){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(a=i,i=t,t=null),i&&(i=n.toArray(i,a||"hex"),this._update(i));for(var r=[];r.length<e;)this.V=this._hmac().update(this.V).digest(),r=r.concat(this.V);var o=r.slice(0,e);return this._update(i),this._reseed++,n.encode(o,t)}},3782:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},3533:function(e,t,i){"use strict";var a=i(3782),n=i(9029),r=i(6911).Buffer,o=Array(16);function s(){n.call(this,64),this._a=0x67452301,this._b=0xefcdab89,this._c=0x98badcfe,this._d=0x10325476}function u(e,t){return e<<t|e>>>32-t}function d(e,t,i,a,n,r,o){return u(e+(t&i|~t&a)+n+r|0,o)+t|0}function l(e,t,i,a,n,r,o){return u(e+(t&a|i&~a)+n+r|0,o)+t|0}function c(e,t,i,a,n,r,o){return u(e+(t^i^a)+n+r|0,o)+t|0}function f(e,t,i,a,n,r,o){return u(e+(i^(t|~a))+n+r|0,o)+t|0}a(s,n),s.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,a=this._b,n=this._c,r=this._d;i=d(i,a,n,r,e[0],0xd76aa478,7),r=d(r,i,a,n,e[1],0xe8c7b756,12),n=d(n,r,i,a,e[2],0x242070db,17),a=d(a,n,r,i,e[3],0xc1bdceee,22),i=d(i,a,n,r,e[4],0xf57c0faf,7),r=d(r,i,a,n,e[5],0x4787c62a,12),n=d(n,r,i,a,e[6],0xa8304613,17),a=d(a,n,r,i,e[7],0xfd469501,22),i=d(i,a,n,r,e[8],0x698098d8,7),r=d(r,i,a,n,e[9],0x8b44f7af,12),n=d(n,r,i,a,e[10
1],0xffff5bb1,17),a=d(a,n,r,i,e[11],0x895cd7be,22),i=d(i,a,n,r,e[12],0x6b901122,7),r=d(r,i,a,n,e[13],0xfd987193,12),n=d(n,r,i,a,e[14],0xa679438e,17),a=d(a,n,r,i,e[15],0x49b40821,22),i=l(i,a,n,r,e[1],0xf61e2562,5),r=l(r,i,a,n,e[6],0xc040b340,9),n=l(n,r,i,a,e[11],0x265e5a51,14),a=l(a,n,r,i,e[0],0xe9b6c7aa,20),i=l(i,a,n,r,e[5],0xd62f105d,5),r=l(r,i,a,n,e[10],0x2441453,9),n=l(n,r,i,a,e[15],0xd8a1e681,14),a=l(a,n,r,i,e[4],0xe7d3fbc8,20),i=l(i,a,n,r,e[9],0x21e1cde6,5),r=l(r,i,a,n,e[14],0xc33707d6,9),n=l(n,r,i,a,e[3],0xf4d50d87,14),a=l(a,n,r,i,e[8],0x455a14ed,20),i=l(i,a,n,r,e[13],0xa9e3e905,5),r=l(r,i,a,n,e[2],0xfcefa3f8,9),n=l(n,r,i,a,e[7],0x676f02d9,14),a=l(a,n,r,i,e[12],0x8d2a4c8a,20),i=c(i,a,n,r,e[5],0xfffa3942,4),r=c(r,i,a,n,e[8],0x8771f681,11),n=c(n,r,i,a,e[11],0x6d9d6122,16),a=c(a,n,r,i,e[14],0xfde5380c,23),i=c(i,a,n,r,e[1],0xa4beea44,4),r=c(r,i,a,n,e[4],0x4bdecfa9,11),n=c(n,r,i,a,e[7],0xf6bb4b60,16),a=c(a,n,r,i,e[10],0xbebfbc70,23),i=c(i,a,n,r,e[13],0x289b7ec6,4),r=c(r,i,a,n,e[0],0xeaa127fa,11),n=c(n,r,i,a,e[3],0xd4ef3085,16),a=c(a,n,r,i,e[6],0x4881d05,23),i=c(i,a,n,r,e[9],0xd9d4d039,4),r=c(r,i,a,n,e[12],0xe6db99e5,11),n=c(n,r,i,a,e[15],0x1fa27cf8,16),a=c(a,n,r,i,e[2],0xc4ac5665,23),i=f(i,a,n,r,e[0],0xf4292244,6),r=f(r,i,a,n,e[7],0x432aff97,10),n=f(n,r,i,a,e[14],0xab9423a7,15),a=f(a,n,r,i,e[5],0xfc93a039,21),i=f(i,a,n,r,e[12],0x655b59c3,6),r=f(r,i,a,n,e[3],0x8f0ccc92,10),n=f(n,r,i,a,e[10
1],0xffeff47d,15),a=f(a,n,r,i,e[1],0x85845dd1,21),i=f(i,a,n,r,e[8],0x6fa87e4f,6),r=f(r,i,a,n,e[15],0xfe2ce6e0,10),n=f(n,r,i,a,e[6],0xa3014314,15),a=f(a,n,r,i,e[13],0x4e0811a1,21),i=f(i,a,n,r,e[4],0xf7537e82,6),r=f(r,i,a,n,e[11],0xbd3af235,10),n=f(n,r,i,a,e[2],0x2ad7d2bb,15),a=f(a,n,r,i,e[9],0xeb86d391,21),this._a=this._a+i|0,this._b=this._b+a|0,this._c=this._c+n|0,this._d=this._d+r|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},1354:function(e,t,i){var a=i(711),n=i(3500);function r(e){this.rand=e||new n.Rand}e.exports=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(e){var t=Math.ceil(e.bitLength()/8);do var i=new a(this.rand.generate(t));while(i.cmp(e)>=0)return i},r.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i))},r.prototype.test=function(e,t,i){var n=e.bitLength(),r=a.mont(e),o=new a(1).toRed(r);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var d=e.shrn(u),l=s.toRed(r),c=!0;t>0;t--){var f=this._randrange(new a(2),s);i&&i(f);var m=f.toRed(r).redPow(d);if(0!==m.cmp(o)&&0!==m.cmp(l)){for(var h=1;h<u;h++){if(0===(m=m.redSqr()).cmp(o))return!1;if(0===m.cmp(l))break}if(h===u)return!1}}return c},r.prototype.getDivisor=function(e,t){var i=e.bitLength(),n=a.mont(e),r=new a(1).toRed(n);t||(t=Math.max(1,i/48|0));for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var u=e.shrn(s),d=o.toRed(n);t>0;t--){var l=this._randrange(new a(2),o),c=e.gcd(l);if(0!==c.cmpn(1))return c;var f=l.toRed(n).redPow(u);if(0!==f.cmp(r)&&0!==f.cmp(d)){for(var m=1;m<s;m++){if(0===(f=f.redSqr()).cmp(r))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(d))break}if(m===s)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},3523:function(e){function t(e,t){if(!e)throw Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,i){if(e!=t)throw Error(i||"Assertion failed: "+e+" != "+t)}},6545:function(e,t){"use strict";var i=t;function a(e){return 1===e.length?"0"+e:e}function n(e){for(var t="",i=0;i<e.length;i++)t+=a(e[i].toString(16));return t}i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"!=typeof e){for(var a=0;a<e.length;a++)i[a]=0|e[a];return i}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(var a=0;a<e.length;a+=2)i.push(parseInt(e[a]+e[a+1],16))}else for(var a=0;a<e.length;a++){var n=e.charCodeAt(a),r=n>>8,o=255&n;r?i.push(r,o):i.push(o)}return i},i.zero2=a,i.toHex=n,i.encode=function(e,t){return"hex"===t?n(e):e}},8687:function(e,t,i){"use strict";var a=i(7160);t.certificate=i(8782),t.RSAPrivateKey=a.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),t.RSAPublicKey=a.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}),t.PublicKey=a.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(n),this.key("subjectPublicKey").bitstr())});var n=a.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())});t.PrivateKey=a.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(n),this.key("subjectPrivateKey").octstr())}),t.EncryptedPrivateKey=a.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}),t.DSAPrivateKey=a.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}),t.DSAparam=a.define("DSAparam",function(){this.int()}),t.ECPrivateKey=a.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(r),this.key("publicKey").optional().explicit(1).bitstr())});var r=a.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});t.signature=a.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},8782:function(e,t,i){"use strict";var a=i(7160),n=a.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),r=a.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=a.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),s=a.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),u=a.define("RelativeDistinguishedName",function(){this.setof(r)}),d=a.define("RDNSequence",function(){this.seqof(u)}),l=a.define("Name",function(){this.choice({rdnSequence:this.use(d)})}),c=a.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),f=a.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),m=a.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(l),this.key("validity").use(c),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())});
1e.exports=a.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())})},6501:function(e,t,i){var a=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,o=i(8368),s=i(6594),u=i(6911).Buffer;e.exports=function(e,t){var i,d=e.toString(),l=d.match(a);if(l){var c="aes"+l[1],f=u.from(l[2],"hex"),m=u.from(l[3].replace(/[\r\n]/g,""),"base64"),h=o(t,f.slice(0,8),parseInt(l[1],10)).key,p=[],b=s.createDecipheriv(c,h,f);p.push(b.update(m)),p.push(b.final()),i=u.concat(p)}else i=new u(d.match(r)[2].replace(/[\r\n]/g,""),"base64");return{tag:d.match(n)[1],data:i}}},9902:function(e,t,i){var a=i(8687),n=i(2510),r=i(6501),o=i(6594),s=i(4978),u=i(6911).Buffer;function d(e){"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var t,i,n,o=r(e,t),s=o.tag,d=o.data;switch(s){case"CERTIFICATE":n=a.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(!n&&(n=a.PublicKey.decode(d,"der")),i=n.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(n.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return n.subjectPrivateKey=n.subjectPublicKey,{type:"ec",data:n};case"1.2.840.10040.4.1":return n.algorithm.params.pub_key=a.DSAparam.decode(n.subjectPublicKey.data,"der"),{type:"dsa",data:n.algorithm.params};default:throw Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":d=l(d=a.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(i=(n=a.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(n.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:n.algorithm.curve,privateKey:a.ECPrivateKey.decode(n.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return n.algorithm.params.priv_key=a.DSAparam.decode(n.subjectPrivateKey,"der"),{type:"dsa",params:n.algorithm.params};default:throw Error("unknown key id "+i)}case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=a.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw Error("unknown key type "+s)}}function l(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,a=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),r=n[e.algorithm.decrypt.cipher.algo.join(".")],d=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,c=parseInt(r.split("-")[1],10)/8,f=s.pbkdf2Sync(t,i,a,c,"sha1"),m=o.createDecipheriv(r,f,d),h=[];return h.push(m.update(l)),h.push(m.final()),u.concat(h)}e.exports=d,d.signature=a.signature},4978:function(e,t,i){var a=i(6113),n=i(5349),r=i(7007),o=i(5407);function s(e,t,i,s,u,d){if(n(i,s),e=o(e,r,"Password"),t=o(t,r,"Salt"),"function"==typeof u&&(d=u,u="sha1"),"function"!=typeof d)throw Error("No callback provided to pbkdf2");return a.pbkdf2(e,t,i,s,u,d)}function u(e,t,i,s,u){return n(i,s),e=o(e,r,"Password"),t=o(t,r,"Salt"),u=u||"sha1",a.pbkdf2Sync(e,t,i,s,u)}a.pbkdf2Sync&&-1!==a.pbkdf2Sync.toString().indexOf("keylen, digest")?(t.pbkdf2Sync=u,t.pbkdf2=s):(t.pbkdf2Sync=i(2127),t.pbkdf2=i(9601))},9601:function(t,i,a){var r,o=a(6911).Buffer,s=a(5349),u=a(7007),d=a(2127),l=a(5407),c=e.g.crypto&&e.g.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function h(t){if(e.g.process&&!e.g.process.browser||!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==m[t])return m[t];var i=p(r=r||o.alloc(8),r,10,128,t).then(function(){return!0}).catch(function(){return!1});return m[t]=i,i}function p(e,t,i,a,n){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:n}},e,a<<3)}).then(function(e){return o.from(e)})}function b(e,t){e.then(function(e){n.default.nextTick(function(){t(null,e)})},function(e){n.default.nextTick(function(){t(e)})})}t.exports=function(t,i,a,r,o,c){"function"==typeof o&&(c=o,o=void 0);var m=f[(o=o||"sha1").toLowerCase()];if(!m||"function"!=typeof e.g.Promise)return n.default.nextTick(function(){var e;try{e=d(t,i,a,r,o)}catch(e){return c(e)}c(null,e)});if(s(a,r),t=l(t,u,"Password"),i=l(i,u,"Salt"),"function"!=typeof c)throw Error("No callback provided to pbkdf2");b(h(m).then(function(e){return e?p(t,i,a,r,m):d(t,i,a,r,o)}),c)}},7007:function(e){e.exports="utf-8"},5349:function(e){var t=0x3fffffff;e.exports=function(e,i){if("number"!=typeof e)throw TypeError("Iterations not a number");if(e<0)throw TypeError("Bad iterations");
1if("number"!=typeof i)throw TypeError("Key length not a number");if(i<0||i>t||i!=i)throw TypeError("Bad key length")}},2127:function(e,t,i){var a={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20},n=i(4873),r=i(6911).Buffer,o=i(5349),s=i(7007),u=i(5407);e.exports=function(e,t,i,d,l){o(i,d),e=u(e,s,"Password"),t=u(t,s,"Salt"),l=l||"sha1";var c=r.allocUnsafe(d),f=r.allocUnsafe(t.length+4);t.copy(f,0,0,t.length);for(var m=0,h=a[l],p=Math.ceil(d/h),b=1;b<=p;b++){f.writeUInt32BE(b,t.length);for(var g=n(l,e).update(f).digest(),v=g,y=1;y<i;y++){v=n(l,e).update(v).digest();for(var x=0;x<h;x++)g[x]^=v[x]}g.copy(c,m),m+=h}return c}},5407:function(e,t,i){var a=i(6911).Buffer;e.exports=function(e,t,i){if(a.isBuffer(e))return e;if("string"==typeof e)return a.from(e,t);if(ArrayBuffer.isView(e))return a.from(e.buffer);throw TypeError(i+" must be a string, a Buffer, a typed array or a DataView")}},9783:function(e,t,i){t.publicEncrypt=i(3995),t.privateDecrypt=i(4366),t.privateEncrypt=function(e,i){return t.publicEncrypt(e,i,!0)},t.publicDecrypt=function(e,i){return t.privateDecrypt(e,i,!0)}},5520:function(e,t,i){var a=i(9739),n=i(6911).Buffer;function r(e){var t=n.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var i,o=n.alloc(0),s=0;o.length<t;)i=r(s++),o=n.concat([o,a("sha1").update(e).update(i).digest()]);return o.slice(0,t)}},4366:function(e,t,i){var a=i(9902),n=i(5520),r=i(6386),o=i(711),s=i(7166),u=i(9739),d=i(1607),l=i(6911).Buffer;function c(e,t){var i=e.modulus.byteLength(),a=u("sha1").update(l.alloc(0)).digest(),o=a.length;if(0!==t[0])throw Error("decryption error");var s=t.slice(1,o+1),d=t.slice(o+1),c=r(s,n(d,o)),f=r(d,n(c,i-o-1));if(m(a,f.slice(0,o)))throw Error("decryption error");for(var h=o;0===f[h];)h++;if(1!==f[h++])throw Error("decryption error");return f.slice(h)}function f(e,t,i){for(var a=t.slice(0,2),n=2,r=0;0!==t[n++];)if(n>=t.length){r++;break}var o=t.slice(2,n-1);if(("0002"!==a.toString("hex")&&!i||"0001"!==a.toString("hex")&&i)&&r++,o.length<8&&r++,r)throw Error("decryption error");return t.slice(n)}function m(e,t){e=l.from(e),t=l.from(t);var i=0,a=e.length;e.length!==t.length&&(i++,a=Math.min(e.length,t.length));for(var n=-1;++n<a;)i+=e[n]^t[n];return i}e.exports=function(e,t,i){var n,r=e.padding?e.padding:i?1:4,u=a(e),m=u.modulus.byteLength();if(t.length>m||new o(t).cmp(u.modulus)>=0)throw Error("decryption error");n=i?d(new o(t),u):s(t,u);var h=l.alloc(m-n.length);if(n=l.concat([h,n],m),4===r)return c(u,n);if(1===r)return f(u,n,i);if(3===r)return n;throw Error("unknown padding")}},3995:function(e,t,i){var a=i(9902),n=i(7223),r=i(9739),o=i(5520),s=i(6386),u=i(711),d=i(1607),l=i(7166),c=i(6911).Buffer;function f(e,t){var i=e.modulus.byteLength(),a=t.length,d=r("sha1").update(c.alloc(0)).digest(),l=d.length,f=2*l;if(a>i-f-2)throw Error("message too long");var m=c.alloc(i-a-f-2),h=i-l-1,p=n(l),b=s(c.concat([d,m,c.alloc(1,1),t],h),o(p,h)),g=s(p,o(b,l));return new u(c.concat([c.alloc(1),g,b],i))}function m(e,t,i){var a,n=t.length,r=e.modulus.byteLength();if(n>r-11)throw Error("message too long");return a=i?c.alloc(r-n-3,255):h(r-n-3),new u(c.concat([c.from([0,i?1:2]),a,c.alloc(1),t],r))}function h(e){for(var t,i=c.allocUnsafe(e),a=0,r=n(2*e),o=0;a<e;)o===r.length&&(r=n(2*e),o=0),(t=r[o++])&&(i[a++]=t);return i}e.exports=function(e,t,i){var n,r=e.padding?e.padding:i?1:4,o=a(e);if(4===r)n=f(o,t);else if(1===r)n=m(o,t,i);else if(3===r){if((n=new u(t)).cmp(o.modulus)>=0)throw Error("data too long for modulus")}else throw Error("unknown padding");return i?l(n,o):d(n,o)}},1607:function(e,t,i){var a=i(711),n=i(6911).Buffer;e.exports=function(e,t){return n.from(e.toRed(a.mont(t.modulus)).redPow(new a(t.publicExponent)).fromRed().toArray())}},6386:function(e){e.exports=function(e,t){for(var i=e.length,a=-1;++a<i;)e[a]^=t[a];return e}},7223:function(t,i,a){"use strict";var r=65536,o=0xffffffff;function s(){throw Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var u=a(6911).Buffer,d=e.g.crypto||e.g.msCrypto;function l(e,t){if(e>o)throw RangeError("requested too many random bytes");var i=u.allocUnsafe(e);if(e>0)if(e>r)for(var a=0;a<e;a+=r)d.getRandomValues(i.slice(a,a+r));else d.getRandomValues(i);return"function"==typeof t?n.default.nextTick(function(){t(null,i)}):i}d&&d.getRandomValues?t.exports=l:t.exports=s},6445:function(t,i,a){"use strict";function r(){throw Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=a(6911);a(7223);var s=o.Buffer,u=o.kMaxLength,d=e.g.crypto||e.g.msCrypto,l=0xffffffff;function c(e,t){if("number"!=typeof e||e!=e)throw TypeError("offset must be a number");if(e>l||e<0)throw TypeError("offset must be a uint32");if(e>u||e>t)throw RangeError("offset out of range")}function f(e,t,i){if("number"!=typeof e||e!=e)throw TypeError("size must be a number");if(e>l||e<0)throw TypeError("size must be a uint32");if(e+t>i||e>u)throw RangeError("buffer too small")}
1function m(t,i,a,n){if(!s.isBuffer(t)&&!(t instanceof e.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof i)n=i,i=0,a=t.length;else if("function"==typeof a)n=a,a=t.length-i;else if("function"!=typeof n)throw TypeError('"cb" argument must be a function');return c(i,t.length),f(a,i,t.length),h(t,i,a,n)}function h(e,t,i,a){var r=new Uint8Array(e.buffer,t,i);return(d.getRandomValues(r),a)?void n.default.nextTick(function(){a(null,e)}):e}function p(t,i,a){if(void 0===i&&(i=0),!s.isBuffer(t)&&!(t instanceof e.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');return c(i,t.length),void 0===a&&(a=t.length-i),f(a,i,t.length),h(t,i,a)}d&&d.getRandomValues?(i.randomFill=m,i.randomFillSync=p):(i.randomFill=r,i.randomFillSync=r)},4646:function(e){"use strict";let t={};function i(e,i,a){function n(e,t,a){return"string"==typeof i?i:i(e,t,a)}a||(a=Error);class r extends a{constructor(e,t,i){super(n(e,t,i))}}r.prototype.name=a.name,r.prototype.code=e,t[e]=r}function a(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let i=e.length;return(e=e.map(e=>String(e)),i>2)?`one of ${t} ${e.slice(0,i-1).join(", ")}, or `+e[i-1]:2===i?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}function n(e,t,i){return e.substr(!i||i<0?0:+i,t.length)===t}function r(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}function o(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i)}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,i){let s,u;if("string"==typeof t&&n(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",r(e," argument"))u=`The ${e} ${s} ${a(t,"type")}`;else{let i=o(e,".")?"property":"argument";u=`The "${e}" ${i} ${s} ${a(t,"type")}`}return u+`. Received type ${typeof i}`},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},2403:function(e,t,i){"use strict";var a=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};e.exports=l;var r=i(1709),o=i(7337);i(3782)(l,r);for(var s=a(o.prototype),u=0;u<s.length;u++){var d=s[u];l.prototype[d]||(l.prototype[d]=o.prototype[d])}function l(e){if(!(this instanceof l))return new l(e);r.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||n.default.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},7889:function(e,t,i){"use strict";e.exports=n;var a=i(1170);function n(e){if(!(this instanceof n))return new n(e);a.call(this,e)}i(3782)(n,a),n.prototype._transform=function(e,t,i){i(null,e)}},1709:function(t,i,a){"use strict";
vendor: 7,255 bytes, line 1
1t.exports=E,E.ReadableState=R,a(2361).EventEmitter;var r,o,s,u,d,l=function(e,t){return e.listeners(t).length},c=a(4678),f=a(4300).Buffer,m=e.g.Uint8Array||function(){};function h(e){return f.from(e)}function p(e){return f.isBuffer(e)||e instanceof m}var b=a(3837);o=b&&b.debuglog?b.debuglog("stream"):function(){};var g=a(4379),v=a(7025),y=a(6776).getHighWaterMark,x=a(4646).q,z=x.ERR_INVALID_ARG_TYPE,_=x.ERR_STREAM_PUSH_AFTER_EOF,S=x.ERR_METHOD_NOT_IMPLEMENTED,M=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;a(3782)(E,c);var I=v.errorOrDestroy,w=["error","close","destroy","pause","resume"];function C(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}function R(e,t,i){r=r||a(2403),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=a(3704).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function E(e){if(r=r||a(2403),!(this instanceof E))return new E(e);var t=this instanceof r;this._readableState=new R(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function A(e,t,i,a,n){o("readableAddChunk",t);var r,s=e._readableState;if(null===t)s.reading=!1,j(e,s);else if(n||(r=T(s,t)),r)I(e,r);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=h(t)),a)s.endEmitted?I(e,new M):P(e,s,t,!0);else if(s.ended)I(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?P(e,s,t,!1):N(e,s)):P(e,s,t,!1)}else a||(s.reading=!1,N(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function P(e,t,i,a){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",i)):(t.length+=t.objectMode?1:i.length,a?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&O(e)),N(e,t)}function T(e,t){var i;return p(t)||"string"==typeof t||void 0===t||e.objectMode||(i=new z("chunk",["string","Buffer","Uint8Array"],t)),i}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=v.destroy,E.prototype._undestroy=v.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var i,a=this._readableState;return a.objectMode?i=!0:"string"==typeof e&&((t=t||a.defaultEncoding)!==a.encoding&&(e=f.from(e,t),t=""),i=!0),A(this,e,t,!1,i)},E.prototype.unshift=function(e){return A(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){s||(s=a(3704).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,n="";null!==i;)n+=t.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var k=0x40000000;function D(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function B(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;return(e>t.highWaterMark&&(t.highWaterMark=D(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function j(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,V(e)))}}function O(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,n.default.nextTick(V,e))}function V(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,K(e)}function N(e,t){t.readingMore||(t.readingMore=!0,n.default.nextTick(F,e,t))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var i=t.length;if(o("maybeReadMore read 0"),e.read(0),i===t.length)break}t.readingMore=!1}function U(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&l(e,"data")&&(t.flowing=!0,K(e))}}function q(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){o("readable nexttick read 0"),e.read(0)}function $(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.default.nextTick(H,e,t))}function H(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),K(e),t.flowing&&!t.reading&&e.read(0)}function K(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function G(e,t){var i;return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i)}function X(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.default.nextTick(Z,t,e))}function Z(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy()}}function W(e,t){for(var i=0,a=e.length;i<a;i++)if(e[i]===t)return i;return -1}E.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t,i=this._readableState,a=e;if(0!==e&&(i.emittedReadable=!1),0===e&&i.needReadable&&((0!==i.highWaterMark?i.length>=i.highWaterMark:i.length>0)||i.ended))return o("read: emitReadable",i.length,i.ended),0===i.length&&i.ended?X(this):O(this),null;if(0===(e=B(e,i))&&i.ended)return 0===i.length&&X(this),null;var n=i.needReadable;return o("need readable",n),(0===i.length||i.length-e<i.highWaterMark)&&o("length less than watermark",n=!0),i.ended||i.reading?o("reading or ended",n=!1):n&&(o("do read"),i.reading=!0,i.sync=!0,0===i.length&&(i.needReadable=!0),this._read(i.highWaterMark),i.sync=!1,i.reading||(e=B(a,i))),null===(t=e>0?G(e,i):null)?(i.needReadable=i.length<=i.highWaterMark,e=0):(i.length-=e,i.awaitDrain=0),0===i.length&&(i.ended||(i.needReadable=!0),a!==e&&i.ended&&X(this)),null!==t&&this.emit
1("data",t),t},E.prototype._read=function(e){I(this,new S("_read()"))},E.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,o("pipe count=%d opts=%j",a.pipesCount,t);var r=t&&!1===t.end||e===n.default.stdout||e===n.default.stderr?g:u;function s(e,t){o("onunpipe"),e===i&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function u(){o("onend"),e.end()}a.endEmitted?n.default.nextTick(r):i.once("end",r),e.on("unpipe",s);var d=U(i);e.on("drain",d);var c=!1;function f(){o("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",s),i.removeListener("end",u),i.removeListener("end",g),i.removeListener("data",m),c=!0,a.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&d()}function m(t){o("ondata");var n=e.write(t);o("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==W(a.pipes,e))&&!c&&(o("false write response, pause",a.awaitDrain),a.awaitDrain++),i.pause())}function h(t){o("onerror",t),g(),e.removeListener("error",h),0===l(e,"error")&&I(e,t)}function p(){e.removeListener("finish",b),g()}function b(){o("onfinish"),e.removeListener("close",p),g()}function g(){o("unpipe"),i.unpipe(e)}return i.on("data",m),C(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",i),a.flowing||(o("pipe resume"),i.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var a=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r<n;r++)a[r].emit("unpipe",this,{hasUnpiped:!1});return this}var o=W(t.pipes,e);return -1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this},E.prototype.on=function(e,t){var i=c.prototype.on.call(this,e,t),a=this._readableState;return"data"===e?(a.readableListening=this.listenerCount("readable")>0,!1!==a.flowing&&this.resume()):"readable"!==e||a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,o("on readable",a.length,a.reading),a.length?O(this):a.reading||n.default.nextTick(L,this)),i},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var i=c.prototype.removeListener.call(this,e,t);return"readable"===e&&n.default.nextTick(q,this),i},E.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&n.default.nextTick(q,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,$(this,e)),e.paused=!1,this},E.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,i=this._readableState,a=!1;for(var n in e.on("end",function(){if(o("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(n){o("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n||(i.objectMode||n&&n.length)&&(t.push(n)||(a=!0,e.pause()))}),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var r=0;r<w.length;r++)e.on(w[r],this.emit.bind(this,w[r]));return this._read=function(t){o("wrapped _read",t),a&&(a=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=a(6871)),u(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=G,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===d&&(d=a(9727)),d(E,e,t)})},1170:function(e,t,i){"use strict";e.exports=l;
vendor: 9,857 bytes, line 1
1var a=i(4646).q,n=a.ERR_METHOD_NOT_IMPLEMENTED,r=a.ERR_MULTIPLE_CALLBACK,o=a.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=a.ERR_TRANSFORM_WITH_LENGTH_0,u=i(2403);function d(e,t){var i=this._transformState;i.transforming=!1;var a=i.writecb;if(null===a)return this.emit("error",new r);i.writechunk=null,i.writecb=null,null!=t&&this.push(t),a(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush(function(t,i){f(e,t,i)})}function f(e,t,i){if(t)return e.emit("error",t);if(null!=i&&e.push(i),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}i(3782)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,i){i(new n("_transform()"))},l.prototype._write=function(e,t,i){var a=this._transformState;if(a.writecb=i,a.writechunk=e,a.writeencoding=t,!a.transforming){var n=this._readableState;(a.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},7337:function(t,i,a){"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){H(t,e)}}t.exports=R,R.WritableState=C;var o,s,u={deprecate:a(6769)},d=a(4678),l=a(4300).Buffer,c=e.g.Uint8Array||function(){};function f(e){return l.from(e)}function m(e){return l.isBuffer(e)||e instanceof c}var h=a(7025),p=a(6776).getHighWaterMark,b=a(4646).q,g=b.ERR_INVALID_ARG_TYPE,v=b.ERR_METHOD_NOT_IMPLEMENTED,y=b.ERR_MULTIPLE_CALLBACK,x=b.ERR_STREAM_CANNOT_PIPE,z=b.ERR_STREAM_DESTROYED,_=b.ERR_STREAM_NULL_VALUES,S=b.ERR_STREAM_WRITE_AFTER_END,M=b.ERR_UNKNOWN_ENCODING,I=h.errorOrDestroy;function w(){}function C(e,t,i){o=o||a(2403),e=e||{},"boolean"!=typeof i&&(i=t instanceof o),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){j(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function R(e){var t=this instanceof(o=o||a(2403));if(!t&&!s.call(R,this))return new R(e);this._writableState=new C(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function E(e,t){var i=new S;I(e,i),n.default.nextTick(t,i)}function A(e,t,i,a){var r;return null===i?r=new _:"string"==typeof i||t.objectMode||(r=new g("chunk",["string","Buffer"],i)),!r||(I(e,r),n.default.nextTick(a,r),!1)}function P(e,t,i){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,i)),t}function T(e,t,i,a,n,r){if(!i){var o=P(t,a,n);a!==o&&(i=!0,n="buffer",a=o)}var s=t.objectMode?1:a.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:a,encoding:n,isBuf:i,callback:r,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,s,a,n,r);return u}function k(e,t,i,a,n,r,o){t.writelen=a,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new z("write")):i?e._writev(n,t.onwrite):e._write(n,r,t.onwrite),t.sync=!1}function D(e,t,i,a,r){--t.pendingcb,i?(n.default.nextTick(r,a),n.default.nextTick(L,e,t),e._writableState.errorEmitted=!0,I(e,a)):(r(a),e._writableState.errorEmitted=!0,I(e,a),L(e,t))}function B(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function j(e,t){var i=e._writableState,a=i.sync,r=i.writecb;if("function"!=typeof r)throw new y;if(B(i),t)D(e,i,a,t,r);else{var o=F(i)||e.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||N(e,i),a?n.default.nextTick(O,e,i,o,r):O(e,i,o,r)}}function O(e,t,i,a){i||V(e,t),t.pendingcb--,a(),L(e,t)}function V(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function N(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var a=Array(t.bufferedRequestCount),n=t.corkedRequestsFree;n.entry=i;for(var o=0,s=!0;i;)a[o]=i,i.isBuf||(s=!1),i=i.next,o+=1;a.allBuffers=s,k(e,t,!0,t.length,a,"",n.finish),t.pendingcb++,t.lastBufferedRequest=null,n.next?(t.corkedRequestsFree=n.next,n.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,d=i.encoding,l=i.callback,c=t.objectMode?1:u.length;if(k(e,t,!1,c,u,d,l),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function F(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function U(e,t){e._final(function(i){t.pendingcb--,i&&I(e,i),t.prefinished=!0,e.emit("prefinish"),L(e,t)})}function q(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.default.nextTick(U,e,t)))}function L(e,t){var i=F(t);if(i&&(q(e,t),0===t.pendingcb)&&(t.finished=!0,e.emit("finish"),t.autoDestroy)){var a=e._readableState;(!a||a.autoDestroy&&a.endEmitted)&&e.destroy()}return i}function $(e,t,i){t.ending=!0,L(e,t),i&&(t.finished?n.default.nextTick(i):e.once("finish",i)),t.ended=!0,e.writable=!1}function H(e,t,i){var a=e.entry;for(e.entry=null;a;){var n=a.callback;t.pendingcb--,n(i),a=a.next}t.corkedRequestsFree.next=e}a(3782)(R,d),C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(C.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===R&&e&&e._writableState instanceof C}})):s=function(e){return e instanceof this},R.prototype.pipe=function(){I(this,new x)},R.prototype.write=function(e,t,i){var a=this._writableState,n=!1,r=!a.objectMode&&m(e);return r&&!l.isBuffer(e)&&(e=f(e)),"function"==typeof t&&(i=t,t=null),r?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof i&&(i=w),a.ending?E(this,i):(r||A(this,a,e,i))&&(a.pendingcb++,n=T(this,a,r,e,t,i)),n},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||N(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new M(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,i){i(new v("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,i){var a=this._writableState;return"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||$(this,a,i),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=h.destroy,R.prototype._undestroy=h.undestroy,R.prototype._destroy=function(e,t){t(e)}},6871:function(e,t,i){"use strict";function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var r,o=i(9698),s=Symbol("lastResolve"),u=Symbol("lastReject"),d=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),m=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var i=e[m].read();null!==i&&(e[c]=null,e[s]=null,e[u]=null,t(h(i,!1)))}}function b(e){n.default.nextTick(p,e)}function g(e,t){return function(i,a){e.then(function(){t[l]?i(h(void 0,!0)):t[f](i,a)},a)}}var v=Object.getPrototypeOf(function(){}
1),y=Object.setPrototypeOf((a(r={get stream(){return this[m]},next:function(){var e,t=this,i=this[d];if(null!==i)return Promise.reject(i);if(this[l])return Promise.resolve(h(void 0,!0));if(this[m].destroyed)return new Promise(function(e,i){n.default.nextTick(function(){t[d]?i(t[d]):e(h(void 0,!0))})});var a=this[c];if(a)e=new Promise(g(a,this));else{var r=this[m].read();if(null!==r)return Promise.resolve(h(r,!1));e=new Promise(this[f])}return this[c]=e,e}},Symbol.asyncIterator,function(){return this}),a(r,"return",function(){var e=this;return new Promise(function(t,i){e[m].destroy(null,function(e){e?i(e):t(h(void 0,!0))})})}),r),v);e.exports=function(e){var t,i=Object.create(y,(a(t={},m,{value:e,writable:!0}),a(t,s,{value:null,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,d,{value:null,writable:!0}),a(t,l,{value:e._readableState.endEmitted,writable:!0}),a(t,f,{value:function(e,t){var a=i[m].read();a?(i[c]=null,i[s]=null,i[u]=null,e(h(a,!1))):(i[s]=e,i[u]=t)},writable:!0}),t));return i[c]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[u];null!==t&&(i[c]=null,i[s]=null,i[u]=null,t(e)),i[d]=e;return}var a=i[s];null!==a&&(i[c]=null,i[s]=null,i[u]=null,a(h(void 0,!0))),i[l]=!0}),e.on("readable",b.bind(null,i)),i}},4379:function(e,t,i){"use strict";function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,a)}return i}function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?a(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function s(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function u(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),e}var d=i(4300).Buffer,l=i(3837).inspect,c=l&&l.custom||"inspect";function f(e,t,i){d.prototype.copy.call(e,t,i)}e.exports=function(){function e(){o(this,e),this.head=null,this.tail=null,this.length=0}return u(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i}},{key:"concat",value:function(e){if(0===this.length)return d.alloc(0);for(var t=d.allocUnsafe(e>>>0),i=this.head,a=0;i;)f(i.data,t,a),a+=i.data.length,i=i.next;return t}},{key:"consume",value:function(e,t){var i;return e<this.head.data.length?(i=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):i=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,i=1,a=t.data;for(e-=a.length;t=t.next;){var n=t.data,r=e>n.length?n.length:e;if(r===n.length?a+=n:a+=n.slice(0,e),0==(e-=r)){r===n.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(r));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(e){var t=d.allocUnsafe(e),i=this.head,a=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var n=i.data,r=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,r),0==(e-=r)){r===n.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(r));break}++a}return this.length-=a,t}},{key:c,value:function(e,t){return l(this,n({},t,{depth:0,customInspect:!1}))}}]),e}()},7025:function(e){"use strict";function t(e,t){a(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,r){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.default.nextTick(a,this,e)):n.default.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!r&&e?o._writableState?o._writableState.errorEmitted?n.default.nextTick(i,o):(o._writableState.errorEmitted=!0,n.default.nextTick(t,o,e)):n.default.nextTick(t,o,e):r?(n.default.nextTick(i,o),r(e)):n.default.nextTick(i,o)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var i=e._readableState,a=e._writableState;i&&i.autoDestroy||a&&a.autoDestroy?e.destroy(t):e.emit("error",t)}}},9698:function(e,t,i){"use strict";var a=i(4646).q.ERR_STREAM_PREMATURE_CLOSE;function n(e){var t=!1;return function(){if(!t){t=!0;for(var i=arguments.length,a=Array(i),n=0;n<i;n++)a[n]=arguments[n];e.apply(this,a)}}}function r(){}function o(e){return e.setHeader&&"function"==typeof e.abort}function s(e,t,i){if("function"==typeof t)return s(e,null,t);t||(t={}),i=n(i||r);var u=t.readable||!1!==t.readable&&e.readable,d=t.writable||!1!==t.writable&&e.writable,l=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){d=!1,c=!0,u||i.call(e)},m=e._readableState&&e._readableState.endEmitted,h=function(){u=!1,m=!0,d||i.call(e)},p=function(t){i.call(e,t)},b=function(){var t;return u&&!m?(e._readableState&&e._readableState.ended||(t=new a),i.call(e,t)):d&&!c?(e._writableState&&e._writableState.ended||(t=new a),i.call(e,t)):void 0},g=function(){e.req.on("finish",f)};return o(e)?(e.on("complete",f),e.on("abort",b),e.req?g():e.on("request",g)):d&&!e._writableState&&(e.on("end",l),e.on("close",l)),e.on("end",h),e.on("finish",f),!1!==t.error&&e.on("error",p),e.on("close",b),function(){e.removeListener("complete",f),e.removeListener("abort",b),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",f),e.removeListener("end",h),e.removeListener("error",p),e.removeListener("close",b)}}
1e.exports=s},9727:function(e,t,i){"use strict";function a(e,t,i,a,n,r,o){try{var s=e[r](o),u=s.value}catch(e){i(e);return}s.done?t(u):Promise.resolve(u).then(a,n)}function n(e){return function(){var t=this,i=arguments;return new Promise(function(n,r){var o=e.apply(t,i);function s(e){a(o,n,r,s,u,"next",e)}function u(e){a(o,n,r,s,u,"throw",e)}s(void 0)})}}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,a)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){s(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var u=i(4646).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,i){if(t&&"function"==typeof t.next)a=t;else if(t&&t[Symbol.asyncIterator])a=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])a=t[Symbol.iterator]();else throw new u("iterable",["Iterable"],t);var a,r=new e(o({objectMode:!0},i)),s=!1;function d(){return l.apply(this,arguments)}function l(){return(l=n(function*(){try{var e=yield a.next(),t=e.value;e.done?r.push(null):r.push((yield t))?d():s=!1}catch(e){r.destroy(e)}})).apply(this,arguments)}return r._read=function(){s||(s=!0,d())},r}},8442:function(e,t,i){"use strict";function a(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var n,r=i(4646).q,o=r.ERR_MISSING_ARGS,s=r.ERR_STREAM_DESTROYED;function u(e){if(e)throw e}function d(e){return e.setHeader&&"function"==typeof e.abort}function l(e,t,r,o){o=a(o);var u=!1;e.on("close",function(){u=!0}),void 0===n&&(n=i(9698)),n(e,{readable:t,writable:r},function(e){if(e)return o(e);u=!0,o()});var l=!1;return function(t){if(!u&&!l){if(l=!0,d(e))return e.abort();if("function"==typeof e.destroy)return e.destroy();o(t||new s("pipe"))}}}function c(e){e()}function f(e,t){return e.pipe(t)}function m(e){return e.length&&"function"==typeof e[e.length-1]?e.pop():u}e.exports=function(){for(var e,t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];var n=m(i);if(Array.isArray(i[0])&&(i=i[0]),i.length<2)throw new o("streams");var r=i.map(function(t,a){var o=a<i.length-1;return l(t,o,a>0,function(t){e||(e=t),t&&r.forEach(c),o||(r.forEach(c),n(e))})});return i.reduce(f)}},6776:function(e,t,i){"use strict";var a=i(4646).q.ERR_INVALID_OPT_VALUE;function n(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null}e.exports={getHighWaterMark:function(e,t,i,r){var o=n(t,r,i);if(null!=o){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new a(r?i:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},4678:function(e,t,i){e.exports=i(2781)},3726:function(e,t,i){var a=i(2781);"disable"===n.default.env.READABLE_STREAM&&a?(e.exports=a.Readable,Object.assign(e.exports,a),e.exports.Stream=a):((t=e.exp
vendor: 8,927 bytes, line 1
1orts=i(1709)).Stream=a||t,t.Readable=t,t.Writable=i(7337),t.Duplex=i(2403),t.Transform=i(1170),t.PassThrough=i(7889),t.finished=i(9698),t.pipeline=i(8442))},3225:function(e,t,i){"use strict";var a=i(4300).Buffer,n=i(3782),r=i(9029),o=Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xa953fd4e],f=[0x50a28be6,0x5c4dd124,0x6d703ef3,0x7a6d76e9,0];function m(){r.call(this,64),this._a=0x67452301,this._b=0xefcdab89,this._c=0x98badcfe,this._d=0x10325476,this._e=0xc3d2e1f0}function h(e,t){return e<<t|e>>>32-t}function p(e,t,i,a,n,r,o,s){return h(e+(t^i^a)+r+o|0,s)+n|0}function b(e,t,i,a,n,r,o,s){return h(e+(t&i|~t&a)+r+o|0,s)+n|0}function g(e,t,i,a,n,r,o,s){return h(e+((t|~i)^a)+r+o|0,s)+n|0}function v(e,t,i,a,n,r,o,s){return h(e+(t&a|i&~a)+r+o|0,s)+n|0}function y(e,t,i,a,n,r,o,s){return h(e+(t^(i|~a))+r+o|0,s)+n|0}n(m,r),m.prototype._update=function(){for(var e,t,i=o,a=0;a<16;++a)i[a]=this._block.readInt32LE(4*a);for(var n=0|this._a,r=0|this._b,m=0|this._c,x=0|this._d,z=0|this._e,_=0|this._a,S=0|this._b,M=0|this._c,I=0|this._d,w=0|this._e,C=0;C<80;C+=1)C<16?(e=p(n,r,m,x,z,i[s[C]],c[0],d[C]),t=y(_,S,M,I,w,i[u[C]],f[0],l[C])):C<32?(e=b(n,r,m,x,z,i[s[C]],c[1],d[C]),t=v(_,S,M,I,w,i[u[C]],f[1],l[C])):C<48?(e=g(n,r,m,x,z,i[s[C]],c[2],d[C]),t=g(_,S,M,I,w,i[u[C]],f[2],l[C])):C<64?(e=v(n,r,m,x,z,i[s[C]],c[3],d[C]),t=b(_,S,M,I,w,i[u[C]],f[3],l[C])):(e=y(n,r,m,x,z,i[s[C]],c[4],d[C]),t=p(_,S,M,I,w,i[u[C]],f[4],l[C])),n=z,z=x,x=h(m,10),m=r,r=e,_=w,w=I,I=h(M,10),M=S,S=t;var R=this._b+m+I|0;this._b=this._c+x+w|0,this._c=this._d+z+_|0,this._d=this._e+n+S|0,this._e=this._a+r+M|0,this._a=R},m.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=a.alloc?a.alloc(20):new a(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=m},5055:function(e,t,i){var a=i(4300),n=a.Buffer;function r(e,t){for(var i in e)t[i]=e[i]}function o(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a:(r(a,t),t.Buffer=o),o.prototype=Object.create(n.prototype),r(n,o),o.from=function(e,t,i){if("number"==typeof e)throw TypeError("Argument must not be a number");return n(e,t,i)},o.alloc=function(e,t,i){if("number"!=typeof e)throw TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof i?a.fill(t,i):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return a.SlowBuffer(e)}},6911:function(e,t,i){var a=i(4300),n=a.Buffer;function r(e,t){for(var i in e)t[i]=e[i]}function o(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a:(r(a,t),t.Buffer=o),o.prototype=Object.create(n.prototype),r(n,o),o.from=function(e,t,i){if("number"==typeof e)throw TypeError("Argument must not be a number");return n(e,t,i)},o.alloc=function(e,t,i){if("number"!=typeof e)throw TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof i?a.fill(t,i):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return a.SlowBuffer(e)}},2858:function(e,t,i){var a=i(6911).Buffer;function n(e,t){this._block=a.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=a.from(e,t));for(var i=this._block,n=this._blockSize,r=e.length,o=this._len,s=0;s<r;){for(var u=o%n,d=Math.min(r-s,n-u),l=0;l<d;l++)i[u+l]=e[s+l];o+=d,s+=d,o%n==0&&this._update(i)}return this._len+=r,this},n.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=0xffffffff)this._block.writeUInt32BE(i,this._blockSize-4);else{var a=i>>>0,n=(i-a)/0x100000000;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var r=this._hash();return e?r.toString(e):r},n.prototype._update=function(){throw Error("_update must be implemented by subclass")},e.exports=n},4371:function(e,t,i){var a=e.exports=function(e){var t=a[e=e.toLowerCase()];if(!t)throw Error(e+" is not supported (we accept pull requests)");return new t};a.sha=i(4018),a.sha1=i(4179),a.sha224=i(532),a.sha256=i(1843),a.sha384=i(7455),a.sha512=i(9934)},4018:function(e,t,i){var a=i(3782),n=i(2858),r=i(6911).Buffer,o=[0x5a827999,0x6ed9eba1,-0x70e44324,-0x359d3e2a],s=Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function d(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function c(e,t,i,a){return 0===e?t&i|~t&a:2===e?t&i|t&a|i&a:t^i^a}a(u,n),u.prototype.init=function(){return this._a=0x67452301,this._b=0xefcdab89,this._c=0x98badcfe,this._d=0x10325476,this._e=0xc3d2e1f0,this},u.prototype._update=function(e){for(var t=this._w,i=0|this._a,a=0|this._b,n=0|this._c,r=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=t[u-3]^t[u-8]^t[u-14]^t[u-16];for(var f=0;f<80;++f){var m=~~(f/20),h=d(i)+c(m,a,n,r)+s+t[f]+o[m]|0;s=r,r=n,n=l(a),a=i,i=h}this._a=i+this._a|0,this._b=a+this._b|0,this._c=n+this._c|0,this._d=r+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},4179:function(e,t,i){var a=i(3782),n=i(2858),r=i(6911).Buffer,o=[0x5a827999,0x6ed9eba1,-0x70e44324,-0x359d3e2a],s=Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function d(e){return e<<1|e>>>31}function l(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function f(e,t,i,a){return 0===e?t&i|~t&a:2===e?t&i|t&a|i&a:t^i^a}a(u,n),u.prototype.init=function(){return this._a=0x67452301,this._b=0xefcdab89,this._c=0x98badcfe,this._d=0x10325476,this._e=0xc3d2e1f0,this},u.prototype._update=function(e){for(var t=this._w,i=0|this._a,a=0|this._b,n=0|this._c,r=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=d(t[u-3]^t[u-8]^t[u-14]^t[u-16]);for(var m=0;m<80;++m){var h=~~(m/20),p=l(i)+f(h,a,n,r)+s+t[m]+o[h]|0;s=r,r=n,n=c(a),a=i,i=p}this._a=i+this._a|0,this._b=a+this._b|0,this._c=n+this._c|0,this._d=r+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},532:function(e,t,i){var a=i(3782),n=i(1843),r=i(2858),o=i(6911).Buffer,s=Array(64);function u(){this.init(),this._w=s,r.call(this,64,56)}a(u,n),u.prototype.init=function(){return this._a=0xc1059ed8,this._b=0x367cd507,this._c=0x3070dd17,this._d=0xf70e5939,this._e=0xffc00b31,this._f=0x68581511,this._g=0x64f98fa7,this._h=0xbefa4fa4,this},u.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},1843:function(e,t,i){var a=i(3782),n=i(2858),r=i(6911).Buffer,o=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc
vendor: 4,767 bytes, line 1
176c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],s=Array(64);function u(){this.init(),this._w=s,n.call(this,64,56)}function d(e,t,i){return i^e&(t^i)}function l(e,t,i){return e&t|i&(e|t)}function c(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function m(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function h(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}a(u,n),u.prototype.init=function(){return this._a=0x6a09e667,this._b=0xbb67ae85,this._c=0x3c6ef372,this._d=0xa54ff53a,this._e=0x510e527f,this._f=0x9b05688c,this._g=0x1f83d9ab,this._h=0x5be0cd19,this},u.prototype._update=function(e){for(var t=this._w,i=0|this._a,a=0|this._b,n=0|this._c,r=0|this._d,s=0|this._e,u=0|this._f,p=0|this._g,b=0|this._h,g=0;g<16;++g)t[g]=e.readInt32BE(4*g);for(;g<64;++g)t[g]=h(t[g-2])+t[g-7]+m(t[g-15])+t[g-16]|0;for(var v=0;v<64;++v){var y=b+f(s)+d(s,u,p)+o[v]+t[v]|0,x=c(i)+l(i,a,n)|0;b=p,p=u,u=s,s=r+y|0,r=n,n=a,a=i,i=y+x|0}this._a=i+this._a|0,this._b=a+this._b|0,this._c=n+this._c|0,this._d=r+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=p+this._g|0,this._h=b+this._h|0},u.prototype._hash=function(){var e=r.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},7455:function(e,t,i){var a=i(3782),n=i(9934),r=i(2858),o=i(6911).Buffer,s=Array(160);function u(){this.init(),this._w=s,r.call(this,128,112)}a(u,n),u.prototype.init=function(){return this._ah=0xcbbb9d5d,this._bh=0x629a292a,this._ch=0x9159015a,this._dh=0x152fecd8,this._eh=0x67332667,this._fh=0x8eb44a87,this._gh=0xdb0c2e0d,this._hh=0x47b5481d,this._al=0xc1059ed8,this._bl=0x367cd507,this._cl=0x3070dd17,this._dl=0xf70e5939,this._el=0xffc00b31,this._fl=0x68581511,this._gl=0x64f98fa7,this._hl=0xbefa4fa4,this},u.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,i,a){e.writeInt32BE(t,a),e.writeInt32BE(i,a+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},9934:function(e,t,i){var a=i(3782),n=i(2858),r=i(6911).Buffer,o=[0x428a2f98,0xd728ae22,0x71374491,0x23ef65cd,0xb5c0fbcf,0xec4d3b2f,0xe9b5dba5,0x8189dbbc,0x3956c25b,0xf348b538,0x59f111f1,0xb605d019,0x923f82a4,0xaf194f9b,0xab1c5ed5,0xda6d8118,0xd807aa98,0xa3030242,0x12835b01,0x45706fbe,0x243185be,0x4ee4b28c,0x550c7dc3,0xd5ffb4e2,0x72be5d74,0xf27b896f,0x80deb1fe,0x3b1696b1,0x9bdc06a7,0x25c71235,0xc19bf174,0xcf692694,0xe49b69c1,0x9ef14ad2,0xefbe4786,0x384f25e3,0xfc19dc6,0x8b8cd5b5,0x240ca1cc,0x77ac9c65,0x2de92c6f,0x592b0275,0x4a7484aa,0x6ea6e483,0x5cb0a9dc,0xbd41fbd4,0x76f988da,0x831153b5,0x983e5152,0xee66dfab,0xa831c66d,0x2db43210,0xb00327c8,0x98fb213f,0xbf597fc7,0xbeef0ee4,0xc6e00bf3,0x3da88fc2,0xd5a79147,0x930aa725,0x6ca6351,0xe003826f,0x14292967,0xa0e6e70,0x27b70a85,0x46d22ffc,0x2e1b2138,0x5c26c926,0x4d2c6dfc,0x5ac42aed,0x53380d13,0x9d95b3df,0x650a7354,0x8baf63de,0x766a0abb,0x3c77b2a8,0x81c2c92e,0x47edaee6,0x92722c85,0x1482353b,0xa2bfe8a1,0x4cf10364,0xa81a664b,0xbc423001,0xc24b8b70,0xd0f89791,0xc76c51a3,0x654be30,0xd192e819,0xd6ef5218,0xd6990624,0x5565a910,0xf40e3585,0x5771202a,0x106aa070,0x32bbd1b8,0x19a4c116,0xb8d2d0c8,0x1e376c08,0x5141ab53,0x2748774c,0xdf8eeb99,0x34b0bcb5,0xe19b48a8,0x391c0cb3,0xc5c95a63,0x4ed8aa4a,0xe3418acb,0x5b9cca4f,0x7763e373,0x682e6ff3,0xd6b2b8a3,0x748f82ee,0x5defb2fc,0x78a5636f,0x43172f60,0x84c87814,0xa1f0ab72,0x8cc70208,0x1a6439ec,0x90befffa,0x23631e28,0xa4506ceb,0xde82bde9,0xbef9a3f7,0xb2c67915,0xc67178f2,0xe372532b,0xca273ece,0xea26619c,0xd186b8c7,0x21c0c207,0xeada7dd6,0xcde0eb1e,0xf57d4f7f,0xee6ed178,0x6f067aa,0x72176fba,0xa637dc5,0xa2c898a6,0x113f9804,0xbef90dae,0x1b710b35,0x131c471b,0x28db77f5,0x23047d84,0x32caab7b,0x40c72493,0x3c9ebe0a,0x15c9bebc,0x431d67c4,0x9c100d4c,0x4cc5d4be,0xcb3e42b6,0x597f299c,0xfc657e2a,0x5fcb6fab,0x3ad6faec,0x6c44198c,0x4a475817],s=Array(160);function u(){this.init(),this._w=s,n.call(this,128,112)}function d(e,t,i){return i^e&(t^i)}function l(e,t,i){return e&t|i&(e|t)}function c(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function m(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return+(e>>>0<t>>>0)}
1a(u,n),u.prototype.init=function(){return this._ah=0x6a09e667,this._bh=0xbb67ae85,this._ch=0x3c6ef372,this._dh=0xa54ff53a,this._eh=0x510e527f,this._fh=0x9b05688c,this._gh=0x1f83d9ab,this._hh=0x5be0cd19,this._al=0xf3bcc908,this._bl=0x84caa73b,this._cl=0xfe94f82b,this._dl=0x5f1d36f1,this._el=0xade682d1,this._fl=0x2b3e6c1f,this._gl=0xfb41bd6b,this._hl=0x137e2179,this},u.prototype._update=function(e){for(var t=this._w,i=0|this._ah,a=0|this._bh,n=0|this._ch,r=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,y=0|this._hh,x=0|this._al,z=0|this._bl,_=0|this._cl,S=0|this._dl,M=0|this._el,I=0|this._fl,w=0|this._gl,C=0|this._hl,R=0;R<32;R+=2)t[R]=e.readInt32BE(4*R),t[R+1]=e.readInt32BE(4*R+4);for(;R<160;R+=2){var E=t[R-30],A=t[R-30+1],P=m(E,A),T=h(A,E),k=p(E=t[R-4],A=t[R-4+1]),D=b(A,E),B=t[R-14],j=t[R-14+1],O=t[R-32],V=t[R-32+1],N=T+j|0,F=P+B+g(N,T)|0;F=(F=F+k+g(N=N+D|0,D)|0)+O+g(N=N+V|0,V)|0,t[R]=F,t[R+1]=N}for(var U=0;U<160;U+=2){F=t[U],N=t[U+1];var q=l(i,a,n),L=l(x,z,_),$=c(i,x),H=c(x,i),K=f(s,M),G=f(M,s),X=o[U],Z=o[U+1],W=d(s,u,v),Y=d(M,I,w),J=C+G|0,Q=y+K+g(J,C)|0;Q=(Q=(Q=Q+W+g(J=J+Y|0,Y)|0)+X+g(J=J+Z|0,Z)|0)+F+g(J=J+N|0,N)|0;var ee=H+L|0,et=$+q+g(ee,H)|0;y=v,C=w,v=u,w=I,u=s,I=M,s=r+Q+g(M=S+J|0,S)|0,r=n,S=_,n=a,_=z,a=i,z=x,i=Q+et+g(x=J+ee|0,J)|0}this._al=this._al+x|0,this._bl=this._bl+z|0,this._cl=this._cl+_|0,this._dl=this._dl+S|0,this._el=this._el+M|0,this._fl=this._fl+I|0,this._gl=this._gl+w|0,this._hl=this._hl+C|0,this._ah=this._ah+i+g(this._al,x)|0,this._bh=this._bh+a+g(this._bl,z)|0,this._ch=this._ch+n+g(this._cl,_)|0,this._dh=this._dh+r+g(this._dl,S)|0,this._eh=this._eh+s+g(this._el,M)|0,this._fh=this._fh+u+g(this._fl,I)|0,this._gh=this._gh+v+g(this._gl,w)|0,this._hh=this._hh+y+g(this._hl,C)|0},u.prototype._hash=function(){var e=r.allocUnsafe(64);function t(t,i,a){e.writeInt32BE(t,a),e.writeInt32BE(i,a+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},3704:function(e,t,i){"use strict";var a=i(5055).Buffer,n=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=r(e);if("string"!=typeof t&&(a.isEncoding===n||!n(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=h,this.end=p,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=b,this.end=g,t=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function u(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function d(e,t,i){var a=t.length-1;if(a<i)return 0;var n=u(t[a]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--a<i||-2===n?0:(n=u(t[a]))>=0?(n>0&&(e.lastNeed=n-2),n):--a<i||-2===n?0:(n=u(t[a]))>=0?(n>0&&(2===n?n=0:e.lastNeed=n-3),n):0}function l(e,t,i){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function c(e){var t=this.lastTotal-this.lastNeed,i=l(this,e,t);return void 0!==i?i:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function f(e,t){var i=d(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var a=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",t,a)}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var a=i.charCodeAt(i.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function b(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-i))}function g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,i;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""},s.prototype.end=m,s.prototype.text=f,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},6769:function(t){function i(t){try{if(!e.g.localStorage)return!1}catch(e){return!1}var i=e.g.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function e(e,t){if(i("noDeprecation"))return e;var a=!1;return function(){if(!a){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),a=!0}return e.apply(this,arguments)}}},4300:function(t){"use strict";
1t.exports=e.r(259390)},6113:function(t){"use strict";t.exports=e.r(254497)},2361:function(t){"use strict";t.exports=e.r(679877)},2781:function(t){"use strict";t.exports=e.r(731493)},1576:function(t){"use strict";t.exports=e.r(826733)},3837:function(t){"use strict";t.exports=e.r(994170)},6144:function(t){"use strict";t.exports=e.r(651040)},5866:function(e){"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},2908:function(e){"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},9267:function(e){"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},7992:function(e){"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd4
107b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},2531:function(e){"use strict";e.exports={i8:"6.5.3"}},2510:function(e){"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}},n=!0;try{i[e].call(a.exports,a,a.exports,o),n=!1}finally{n&&delete r[e]}return a.loaded=!0,a.exports}!function(){o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),o.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_react-_e42671282c17525e509920a1c7285b47/node_modules/next/dist/compiled/crypto-browserify/";var s={};!function(){"use strict";var e=s;e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=o(7223),e.createHash=e.Hash=o(9739),e.createHmac=e.Hmac=o(4873);var t=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Object.keys(o(9276)));e.getHashes=function(){return t};var i=o(4978);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync;var a=o(8996);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var n=o(6587);e.DiffieHellmanGroup=n.DiffieHellmanGroup,e.createDiffieHellmanGroup=n.createDiffieHellmanGroup,e.getDiffieHellman=n.getDiffieHellman,e.createDiffieHellman=n.createDiffieHellman,e.DiffieHellman=n.DiffieHellman;var r=o(4078);e.createSign=r.createSign,e.Sign=r.Sign,e.createVerify=r.createVerify,e.Verify=r.Verify,e.createECDH=o(9942);var u=o(9783);e.publicEncrypt=u.publicEncrypt,e.privateEncrypt=u.privateEncrypt,e.publicDecrypt=u.publicDecrypt,e.privateDecrypt=u.privateDecrypt;var d=o(6445);e.randomFill=d.randomFill,e.randomFillSync=d.randomFillSync,e.createCredentials=function(){throw Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/crypto-browserify/crypto-browserify")},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}(),t.exports=s}()},630001,83081,267613,453462,196217,286205,784799,704978,249707,718935,997816,602915,977361,280547,508929,212498,549368,689356,10313,618447,873602,889026,162187,e=>{"use strict";var t=e.i(625468),i=e.i(207653),a=e.i(402587),n=t;let r=i.z.object({video:i.z.string().trim().min(1),prompt:i.z.string().max(a.DEFAULT_PROMPT_MAX_CHARACTERS).default("").catch(""),totalPixel:i.z.number().min(480).max(1080).default(720),bufferFrames:i.z.number().min(1).max(24).default(16).catch(16),mode:i.z.enum(["fun","aio"]).default("fun").catch("fun")}),o=i.z.object({url:i.z.string(),thumbnailUrl:i.z.string().optional()}),s=(0,n.defineCapability)({id:"openart-extend-video:extendVideo",name:"OpenArt Extend Video",inputSchema:r,outputSc
1hema:o,getBusinessDetails:e=>{let t=0,i=100+(t=1080===e.totalPixel?30:10*(720===e.totalPixel));return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["openartExtendVideo",0,s],83081);let u=(0,t.defineModel)({id:"openart-extend-video:extendVideo",name:"OpenArt Extend Video",description:"AI-powered extend video generation from existing video",metadata:{creator:"OpenArt"},capabilities:{extend:s}});e.s(["openartExtendVideoModel",0,u],630001);var d=t,l=i,c=t;let f=l.z.object({imageUrl:l.z.string().min(1),strength:l.z.enum(["moderate","strong"]).default("moderate").catch("moderate"),prompt:l.z.string().default("").catch(""),negativePrompt:l.z.string().default("").catch(""),freckle:l.z.boolean().default(!1).catch(!1),wrinkle:l.z.boolean().default(!1).catch(!1)}),m=l.z.object({url:l.z.string(),thumbnailUrl:l.z.string()}),h=(0,c.defineCapability)({id:"openart-face-realism:faceRealism",name:"OpenArt Face Realism",inputSchema:f,outputSchema:m,getBusinessDetails:()=>({unitCredits:35,quantity:1,totalCredits:35})}),p=(0,d.defineModel)({id:"openart-face-realism",name:"OpenArt Face Realism",description:"Enhance skin realism for portrait images",metadata:{creator:"OpenArt"},capabilities:{faceRealism:h}});e.s(["openartFaceRealismModel",0,p],267613);var b=t,g=i,v=a,y=t;let x=g.z.object({mode:g.z.literal("creative_upscale"),image:g.z.object({type:g.z.literal("image"),url:g.z.string(),id:g.z.string(),label:g.z.string()}),creativity:g.z.number().min(0).max(1).default(.65).catch(.65),prompt:g.z.string().max(v.DEFAULT_PROMPT_MAX_CHARACTERS).default("")}),z=g.z.object({url:g.z.string(),thumbnailUrl:g.z.string()}),_=(0,y.defineCapability)({id:"image-upscale:creative-upscale",name:"Creative Upscale",inputSchema:x,outputSchema:z,getBusinessDetails:()=>({unitCredits:25,quantity:1,totalCredits:25})});e.s(["openartCreativeUpscale",0,_],453462);var S=i,M=t;let I=S.z.object({mode:S.z.literal("non_creative_upscale"),image:S.z.object({type:S.z.literal("image"),url:S.z.string(),id:S.z.string(),label:S.z.string()}),appVersion:S.z.enum(["V1","V2"]),creativity:S.z.number().min(0).max(1).default(.4).catch(.4)}),w=S.z.object({url:S.z.string(),thumbnailUrl:S.z.string()}),C=(0,M.defineCapability)({id:"image-upscale:non-creative-upscale",name:"Non Creative Upscale",inputSchema:I,outputSchema:w,getBusinessDetails:()=>({unitCredits:25,quantity:1,totalCredits:25})});e.s(["openartNonCreativeUpscale",0,C],196217);var R=i,E=t;let A=R.z.object({mode:R.z.literal("refined_upscale"),image:R.z.object({type:R.z.literal("image"),url:R.z.string(),id:R.z.string(),label:R.z.string()}),creativity:R.z.number().min(0).max(1).default(.4).catch(.4)}),P=R.z.object({url:R.z.string(),thumbnailUrl:R.z.string()}),T=(0,E.defineCapability)({id:"image-upscale:refined-upscale",name:"Refined Upscale",inputSchema:A,outputSchema:P,getBusinessDetails:()=>({unitCredits:25,quantity:1,totalCredits:25})});e.s(["openartRefinedUpscale",0,T],286205);let k=(0,b.defineModel)({id:"image-upscale",name:"OpenArt Image Upscale",description:"AI-powered image upscale from image",metadata:{creator:"OpenArt"},capabilities:{"image-upscale:non-creative-upscale":C,"image-upscale:refined-upscale":T,"image-upscale:creative-upscale":_}});e.s(["openartImageUpscaleModel",0,k],784799);var D=t,B=i,j=a,O=t;let V=B.z.object({image:B.z.string().trim().min(1),audio:B.z.string().trim().min(1),offset:B.z.number().min(0).default(0).catch(0),duration:B.z.number().min(1).max(60),prompt:B.z.string().max(j.DEFAULT_PROMPT_MAX_CHARACTERS).default("").catch(""),negativePrompt:B.z.string().max(500).default("").catch("")}),N=B.z.object({url:B.z.string(),thumbnailUrl:B.z.string().optional()}),F=(0,O.defineCapability)({id:"openart-lipsync:lipSync",name:"OpenArt Lip Sync",inputSchema:V,outputSchema:N,getBusinessDetails:e=>{if(!e.image||!e.audio||!e.duration)throw Error("Required fields missing");return{unitCredits:15*Math.ceil(e.duration),quantity:1,totalCredits:15*Math.ceil(e.duration)}}});e.s(["openartLipSync",0,F],704978);let U=(0,D.defineModel)({id:"openart-lipsync",name:"OpenArt Lip Sync",description:"AI-powered lip sync video generation from image and audio",metadata:{creator:"OpenArt"},capabilities:{lipSync:F}});e.s(["openartLipsyncModel",0,U],249707);var q=t,L=e.i(459249);e.i(254497);var $=i;let H="music-visualizer-render/v2",K="music-visualizer-renderer/7",G=$.z.string().url().refine(e=>e.startsWith("https://")),X=G.refine(e=>new URL(e).pathname.toLowerCase().endsWith(".ivf")),Z=$.z.string().regex(/^[a-z][a-z0-9_]{0,31}$/),W=$.z.object({preset_source:$.z.string().min(1).refine(e=>65536>=L.Buffer.byteLength(e,"utf8"),"preset_source exceeds 64 KiB"),suppress_default_wave:$.z.boolean().default(!0)}).strict(),Y=$.z.object({schema_version:$.z.literal(H),idempotency_key:$.z.string().min(1).max(256),validation_mode:$.z.enum(["full","canary"]).default("full"),audio:$.z.object({url:G,start_ms:$.z.number().int().min(0),duration_ms:$.z.number().int().positive().max(9e5)}).strict(),images:$.z.array($.z.object({url:G,sampler:Z}).strict()).min(1).max(9),direction:$.z.string().min(1).max(8e3),milk_config:W,output:$.z.object({width:$.z.number().int().min(320).max(3840).refine(e=>e%2==0),height:$.z.number().int().min(240).max(2160).refine(e=>e%2==0),fps:$.z.union([$.z.literal(24),$.z.literal(30),$.z.literal(60)]),video_bitrate_bps:$.z.number().int().min(5e5).max(5e7)}).strict(),seed:$.z.number().int().min(0).max(0x80000000-1)}).strict().superRefine((e,t)=>
1{let i=Math.ceil(e.audio.duration_ms*e.output.fps/1e3);i>27e3&&t.addIssue({code:"custom",message:"render exceeds 27000 frames"}),"canary"===e.validation_mode&&e.audio.duration_ms>3e3&&t.addIssue({code:"custom",message:"canary render exceeds 3,000 ms"}),"canary"===e.validation_mode&&i>90&&t.addIssue({code:"custom",message:"canary render exceeds 90 frames"})}),J=$.z.object({audio_streams:$.z.literal(0),bytes:$.z.number().int().positive().optional(),duration_seconds:$.z.number().positive(),frame_count:$.z.number().int().positive(),frame_rate:$.z.string().min(1),height:$.z.number().int().positive(),strict_decode_passed:$.z.literal(!0),video_codec:$.z.literal("vp8"),video_streams:$.z.literal(1),width:$.z.number().int().positive()}).strict(),Q=$.z.object({compile_attempts:$.z.number().int().min(0),config_fingerprint:$.z.string().regex(/^[a-f0-9]{64}$/),dependency_versions:$.z.record($.z.string(),$.z.string()),diagnostics:$.z.record($.z.string(),$.z.unknown()),executed_milk_config:W,media:J,output_url:X,renderer_version:$.z.literal(K),request_fingerprint:$.z.string().regex(/^[a-f0-9]{64}$/),timings:$.z.record($.z.string(),$.z.number())}).strict();$.z.object({job_id:$.z.string().regex(/^[a-f0-9]{64}$/),status:$.z.enum(["queued","running","succeeded","failed"]),status_url:$.z.string().min(1)}).strict(),$.z.object({attempt:$.z.number().int().min(0),created_at:$.z.string().min(1),error:$.z.string().optional(),job_id:$.z.string().regex(/^[a-f0-9]{64}$/),lease_expires_at:$.z.string().min(1).optional(),output_url:G.optional(),request_fingerprint:$.z.string().regex(/^[a-f0-9]{64}$/),result:Q.optional(),schema_version:$.z.literal(H),status:$.z.enum(["queued","running","succeeded","failed"]),updated_at:$.z.string().min(1)}).strict();let ee=e=>Array.isArray(e)?e.map(ee):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>[e,ee(t)])):e;var et=i,ei=t;let ea=[{width:1280,height:720,fps:30,unitCredits:10},{width:720,height:1280,fps:30,unitCredits:10},{width:1920,height:1080,fps:30,unitCredits:20},{width:1080,height:1920,fps:30,unitCredits:20}];function en(e){return ea.find(t=>t.width===e.width&&t.height===e.height&&t.fps===e.fps)}function er(e){return void 0!==en(e)}let eo=Y.superRefine((e,t)=>{"full"!==e.validation_mode&&t.addIssue({code:et.z.ZodIssueCode.custom,message:"Music visualizer paid renders require full validation.",path:["validation_mode"]}),er(e.output)||t.addIssue({code:et.z.ZodIssueCode.custom,message:"Unsupported music visualizer production output profile.",path:["output"]})}),es=et.z.object({renderRequest:eo,storyId:et.z.string().min(1),sceneId:et.z.string().min(1),shotId:et.z.string().min(1),clipId:et.z.string().min(1),rendererVersion:et.z.literal(K),inputSignature:et.z.string().min(1)}),eu=et.z.string().url().refine(e=>e.startsWith("https://")&&new URL(e).pathname.toLowerCase().endsWith(".mp4")),ed=et.z.object({url:eu,thumbnailUrl:et.z.string().url().optional(),rendererRequestFingerprint:et.z.string().regex(/^[a-f0-9]{64}$/),rendererConfigurationFingerprint:et.z.string().regex(/^[a-f0-9]{64}$/),executedMilkConfig:W,rendererMedia:Q.shape.media}).strict();function el(e){let t=e.renderRequest.audio.duration_ms,{width:i,height:a,fps:n}=e.renderRequest.output,r=en(e.renderRequest.output);if(!r)throw Error("Unsupported music visualizer production output profile.");let o=Math.ceil(t/1e3),s=r.unitCredits;return{unitCredits:s,quantity:o,totalCredits:s*o,metadata:{storyId:e.storyId,sceneId:e.sceneId,shotId:e.shotId,clipId:e.clipId,durationMs:t,width:i,height:a,fps:n,rendererVersion:e.rendererVersion,inputSignature:e.inputSignature}}}let ec=(0,ei.defineCapability)({id:"music-visualizer:render-video",name:"Music Visualizer Render Video",inputSchema:es,outputSc
1hema:ed,getBusinessDetails:el}),ef=(0,q.defineModel)({id:"music-visualizer",name:"Music Visualizer",metadata:{creator:"OpenArt"},capabilities:{"render-video":ec}});e.s(["musicVisualizerModel",0,ef],718935);var em=t,eh=i,ep=a,eb=t;let eg=10,ev=eh.z.object({image:eh.z.string().min(1),prompt:eh.z.string().max(ep.DEFAULT_PROMPT_MAX_CHARACTERS,"Prompt must be 3000 characters or fewer.").default(""),imageCount:eh.z.number().int().min(1).max(8).default(4).catch(4),left:eh.z.number().int().min(0),top:eh.z.number().int().min(0),right:eh.z.number().int().min(0),bottom:eh.z.number().int().min(0),sourceWidth:eh.z.number().int().positive(),sourceHeight:eh.z.number().int().positive(),targetWidth:eh.z.number().int().positive(),targetHeight:eh.z.number().int().positive(),targetRatio:eh.z.string().min(1),expandSizePercent:eh.z.number().min(100).max(300)}),ey=eh.z.object({url:eh.z.string(),thumbnailUrl:eh.z.string()}),ex=(0,eb.defineCapability)({id:"openart-outpaint:outpaint",name:"OpenArt Outpaint",inputSchema:ev,outputSchema:ey,getBusinessDetails:e=>({unitCredits:eg,quantity:e.imageCount,totalCredits:eg*e.imageCount})});e.s(["openartOutpaint",0,ex],997816);let ez=(0,em.defineModel)({id:"openart-outpaint",name:"OpenArt Outpaint",description:"Extend an image beyond its original frame",metadata:{creator:"OpenArt"},capabilities:{outpaint:ex}});e.s(["openartOutpaintModel",0,ez],602915);var e_=t,eS=i,eM=e.i(200744),eI=t,ew=i;
1let eC=ew.z.enum(["1:1","3:4","5:8","9:16","9:21","4:3","3:2","16:9","21:9"]).default("4:3"),eR=ew.z.object({url:ew.z.string(),thumbnailUrl:ew.z.string().optional(),width:ew.z.number().optional(),height:ew.z.number().optional()});e.s(["photorealisticAspectRatioSchema",0,eC,"photorealisticImageSchema",0,eR],977361);let eE=eS.z.object({prompt:eS.z.string().default("").catch(""),references:eS.z.array(eM.referenceSchema).min(1).max(10).refine(e=>e.some(e=>"image"===e.type||"character"===e.type),"At least one image or character reference is required"),strength:eS.z.number().min(0).max(1).default(1).catch(1),imageCount:eS.z.number().int().min(1).max(8).default(2)}),eA=eS.z.object({images:eS.z.array(eR)}),eP=(0,eI.defineCapability)({id:"openart-photorealistic:image2image",name:"OpenArt Photorealistic Image to Image",inputSchema:eE,outputSchema:eA,getBusinessDetails:e=>{let t=15,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["openartPhotorealisticImage2Image",0,eP],280547);var eT=i,ek=t;let eD=eT.z.object({prompt:eT.z.string().default("").catch(""),imageCount:eT.z.number().int().min(1).max(8).default(2),aspectRatio:eC}),eB=eT.z.object({images:eT.z.array(eR)}),ej=(0,ek.defineCapability)({id:"openart-photorealistic:text2image",name:"OpenArt Photorealistic Text to Image",inputSchema:eD,outputSchema:eB,getBusinessDetails:e=>{let t=15,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["openartPhotorealisticText2Image",0,ej],508929);let eO=(0,e_.defineModel)({id:"openart-photorealistic",name:"OpenArt Photorealistic",description:"Generate lifelike, high-quality images with OpenArt's photorealistic model.",metadata:{creator:"OpenArt"},capabilities:{text2image:ej,image2image:eP}});e.s(["openartPhotorealisticModel",0,eO],212498);var eV=t,eN=i,eF=t,eU=i;let eq=30,eL=eU.z.object({image:eU.z.string().min(1),video:eU.z.string().min(1),prompt:eU.z.string(),totalPixel:eU.z.number().min(720).max(1080).default(720).catch(720),duration:eU.z.number().min(1).max(eq).default(1)});e.s(["REPLACE_CHARACTER_MAX_DURATION_S",0,eq,"baseReplaceCharacterInputSchema",0,eL],549368);let e$=eL,eH=eN.z.object({video_url:eN.z.string(),thumbnailUrl:eN.z.string().optional()}),eK=(0,eF.defineCapability)({id:"openart-replace-character:body",name:"OpenArt Replace Character Body",inputSchema:e$,outputSchema:eH,getBusinessDetails:e=>{if(!e.video||!e.image||!e.duration)throw Error("Required fields missing");let t=0,i=25+(t=1080===e.totalPixel?15:5);return{unitCredits:Math.ceil(e.duration)*i,quantity:1,totalCredits:Math.ceil(e.duration)*i}}});e.s(["openartReplaceCharacterBody",0,eK],689356);var eG=i,eX=t;let eZ=eL,eW=eG.z.object({video_url:eG.z.string(),thumbnailUrl:eG.z.string().optional()}),eY=(0,eX.defineCapability)({id:"openart-replace-character:face",name:"OpenArt Replace Character Face",inputSchema:eZ,outputSchema:eW,getBusinessDetails:e=>{if(!e.video||!e.image||!e.duration)throw Error("Required fields missing");let t=0,i=25+(t=1080===e.totalPixel?20:5);return{unitCredits:Math.ceil(e.duration)*i,quantity:1,totalCredits:Math.ceil(e.duration)*i}}});e.s(["openartReplaceCharacterFace",0,eY],10313);var eJ=i,eQ=t;let e0=eL.extend({mask:eJ.z.string().min(1)}),e1=eJ.z.object({video_url:eJ.z.string(),thumbnailUrl:eJ.z.string().optional()}),e2=(0,eQ.defineCapability)({id:"openart-replace-character:mask",name:"OpenArt Replace Character Mask",inputSchema:e0,outputSchema:e1,getBusinessDetails:e=>{if(!e.video||!e.image||!e.mask||!e.duration)throw Error("Required fields missing");let t=0,i=25+(t=1080===e.totalPixel?15:5);return{unitCredits:Math.ceil(e.duration)*i,quantity:1,totalCredits:Math.ceil(e.duration)*i}}});e.s(["openartReplaceCharacterMask",0,e2],618447);let e3=(0,eV.defineModel)({id:"openart-replace-character",name:"OpenArt Replace Character",description:"Replace character in a video with a new character",metadata:{creator:"OpenArt"},capabilities:{replaceCharacterBody:eK,replaceCharacterFace:eY,replaceCharacterMask:e2}});e.s(["openartReplaceCharacterModel",0,e3],873602);var e4=t,e6=i,e5=t;let e8=30,e9=e6.z.object({video:e6.z.string(),prompt:e6.z.string(),totalPixel:e6.z.number().min(480).max(1080).default(480).catch(480),cfgStrength:e6.z.number().min(1.2).max(2).default(1.2).
1catch(1.2),duration:e6.z.number().min(1).max(e8).default(1)}),e7=e6.z.object({video_url:e6.z.string(),thumbnailUrl:e6.z.string().optional()}),te=(0,e5.defineCapability)({id:"openart-restyle:wan2-1",name:"OpenArt Restyle Wan2.1",inputSchema:e9,outputSchema:e7,getBusinessDetails:e=>{if(!e.video||!e.duration)throw Error("Required fields missing");let t=0;switch(e.totalPixel){case 480:default:t=0;break;case 720:t=10;break;case 1080:t=25}let i=25+t;return{unitCredits:Math.ceil(e.duration)*i,quantity:1,totalCredits:Math.ceil(e.duration)*i}}});e.s(["RESTYLE_MAX_DURATION_S",0,e8,"openartRestyleWan21",0,te],889026);let tt=(0,e4.defineModel)({id:"openart-restyle:wan2-1",name:"OpenArt Restyle Wan2.1",description:"AI-powered restyle video generation from video and prompt",metadata:{creator:"OpenArt"},capabilities:{restyle:te}});e.s(["openartRestyleWan21Model",0,tt],162187)},8070,416893,e=>{"use strict";var t=e.i(207653),i=e.i(625468);let a=60,n=t.z.object({video:t.z.string(),prompt:t.z.string(),duration:t.z.number().min(1).max(a).default(5).catch(5),keepOriginalSound:t.z.boolean().default(!1),needThumbnail:t.z.boolean().default(!0)}),r=t.z.object({url:t.z.string(),thumbnailUrl:t.z.string().optional()}),o=(0,i.defineCapability)({id:"mirelo:generate-sfx",name:"Mirelo Sound Effect",inputSchema:n,outputSchema:r,getBusinessDetails:e=>{let t=5*Math.ceil(e.duration);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["MIRELO_MAX_DURATION_S",0,a,"openartGenerateSfxMirelo",0,o],8070);var s=t,u=i;let d=30,l=s.z.object({video:s.z.string(),prompt:s.z.string(),duration:s.z.number().min(1).max(d).default(5).catch(5),keepOriginalSound:s.z.boolean().default(!1),needThumbnail:s.z.boolean().default(!0)}),c=s.z.object({url:s.z.string(),thumbnailUrl:s.z.string().optional()}),f=(0,u.defineCapability)({id:"mmaudio:generate-sfx",name:"MMAudio Sound Effect",inputSchema:l,outputSchema:c,getBusinessDetails:e=>({unitCredits:10,quantity:1,totalCredits:10})});e.s(["MMAUDIO_MAX_DURATION_S",0,d,"openartGenerateSfxMmaudio",0,f],416893)},706357,192398,754507,456060,70310,772518,951713,161197,920634,923586,248030,308249,850273,3593,278171,555200,982247,899962,636443,210470,369052,30487,739415,904683,81462,501318,427711,698646,567805,949131,149757,817234,5207,648592,469794,167617,397830,539177,596221,212247,986726,222255,308803,833401,891834,441389,163619,587335,e=>{"use strict";e.i(34279);var t=e.i(820458);e.i(201719);var i=e.i(271036);e.i(134288);var a=e.i(544471),n=e.i(138084);e.i(817638);var r=e.i(129022),o=e.i(51297),s=e.i(846941),u=e.i(303467),d=e.i(132200),l=e.i(997945),c=e.i(446986),f=e.i(43308),m=e.i(352818),h=e.i(274592),p=e.i(122680),b=e.i(162094),g=e.i(636008),v=e.i(261907),y=e.i(628329),x=e.i(145076),z=e.i(507231),_=e.i(87900),S=e.i(504099),M=e.i(187964);e.i(162932);var I=e.i(986355);e.i(33192);var w=e.i(393571);e.i(743847);var C=e.i(263200);e.i(202355);var R=e.i(787023);e.i(827949);var E=e.i(624359);e.i(560222);var A=e.i(163265);e.i(748929);var P=e.i(458092);e.i(678797);var T=e.i(300255);e.i(45785);var k=e.i(820638),D=e.i(88708),B=e.i(955760),j=e.i(261788),O=e.i(64455),V=e.i(326567),N=e.i(450988),F=e.i(421300),U=e.i(566487),q=e.i(492599),L=e.i(604953),$=e.i(509315),H=e.i(21520),K=e.i(23535),G=e.i(512336);e.i(728828);var X=e.i(661962);e.i(279859);var Z=e.i(621707);e.i(39825);var W=e.i(704805);e.i(670326);var Y=e.i(388582);e.i(311847);var J=e.i(848518),Q=e.i(823056),ee=e.i(81433),et=e.i(441486),ei=e.i(852155),ea=e.i(927280),en=e.i(62624),er=e.i(851048),eo=e.i(133557),es=e.i(466390),eu=e.i(834651),ed=e.i(587920),el=e.i(905113),ec=e.i(691188),ef=e.i(509045),em=e.i(386777),eh=e.i(360253),ep=e.i(351027),eb=e.i(560394),eg=e.i(562607),ev=e.i(968411),ey=e.i(919746),ex=e.i(518870),ez=e.i(615090),e_=e.i(99290),eS=e.i(430920),eM=e.i(770568),eI=e.i(539240),ew=e.i(205751),eC=e.i(443184),eR=e.i(206778),eE=e.i(519674),eA=e.i(641877),eP=e.i(315846),eT=e.i(480786),ek=e.i(181763),eD=e.i(70374),eB=e.i(849776),ej=e.i(895963);e.i(3338);var eO=e.i(344740);e.i(45689);var eV=e.i(266473);e.i(940477);var eN=e.i(860080),eF=e.i(920111),eU=e.i(759307);e.i(393912);var eq=e.i(498485),eL=e.i(473072),e$=e.i(96623),eH=e.i(450274),eK=e.i(630001),eG=e.i(267613),eX=e.i(784799),eZ=e.i(249707),eW=e.i(718935),eY=e.i(602915),eJ=e.i(212498),eQ=e.i(873602),e0=e.i(162187),e1=e.i(625468),e2=e.i(8070),e3=e.i(416893);let e4=(0,e1.defineModel)({id:"mirelo",name:"Mirelo",description:"AI-powered sound effect generation from video and prompt",metadata:{creator:"Mirelo"},capabilities:{generateSfx:e2.openartGenerateSfxMirelo}}),e6=(0,e1.defineModel)({id:"mmaudio",name:"MMAudio",description:"AI-powered sound effect generation from video and prompt",metadata:{creator:"MMAudio"},capabilities:{generateSfx:e3.openartGenerateSfxMmaudio}});var e5=e1,e8=e.i(207653),e9=e1;let e7=e8.z.object({happy:e8.z.number().min(0).max(1).default(0),angry:e8.z.number().min(0).max(1).default(0),sad:e8.z.number().min(0).max(1).default(0),fear:e8.z.number().min(0).max(1).default(0),hate:e8.z.number().min(0).max(1).default(0),low:e8.z.number().min(0).max(1).default(0),surprise:e8.z.number().min(0).max(1).default(0),neutral:e8.z.number().min(0).max(1).default(0)}),te=e8.z.object({prompt:e8.z.string().min(1,"Text is required"),referenceAudio:e8.z.string().url("Reference audio URL is required"),emotionControl:e7.optional()}),tt=e8.z.object({url:e8.z.string()}),ti=(0,e9.defineCapability)({id:"voice-clone-indextts2:voice-clone",name:"OpenArt Voice Clone",inputSchema:te,outputSc
1hema:tt,getBusinessDetails:e=>{let t=80*Math.ceil(e.prompt.length/2500);return{unitCredits:t,quantity:1,totalCredits:t}}});e.s(["openartVoiceCloneIndextts2",0,ti],192398);let ta=(0,e5.defineModel)({id:"voice-clone-indextts2",name:"OpenArt Voice Clone",capabilities:{voiceClone:ti}});var tn=e1,tr=e8,to=e1;let ts=tr.z.object({type:tr.z.literal("image"),id:tr.z.string(),url:tr.z.string(),label:tr.z.string(),metadata:tr.z.custom().optional()}),tu=tr.z.object({prompt:tr.z.string().min(1,"Prompt is required for image-to-video"),videoCount:tr.z.number().int().min(1).max(8).default(1),startFrame:ts,endFrame:ts.nullable().optional(),duration:tr.z.union([tr.z.literal(5),tr.z.literal(8)]).default(5).catch(5),resolution:tr.z.enum(["360p","720p","1080p"]).default("360p").catch("360p"),motion_mode:tr.z.enum(["normal","fast"]).default("normal").catch("normal")}).refine(e=>8!==e.duration||"1080p"!==e.resolution,{message:"8s duration only supports 360p or 720p",path:["resolution"]}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),td=tr.z.object({url:tr.z.string(),thumbnailUrl:tr.z.string().optional(),duration:tr.z.number()}),tl={"360p":{5:150,8:300},"720p":{5:150,8:300},"1080p":{5:300,8:600}},tc=(0,to.defineCapability)({id:"pixelverse5:image2video",name:"PixVerse 5 Image to Video",inputSchema:tu,outputSchema:td,getBusinessDetails:e=>{let t=tl[e.resolution]?.[e.duration]??150;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["pixelverse5Image2Video",0,tc],754507);var tf=e8,tm=e1;let th=tf.z.object({prompt:tf.z.string().min(1),videoCount:tf.z.number().int().min(1).max(8).default(1),duration:tf.z.union([tf.z.literal(5),tf.z.literal(8)]).default(5).catch(5),aspectRatio:tf.z.enum(["16:9","9:16"]).default("16:9").catch("16:9"),resolution:tf.z.enum(["360p","720p","1080p"]).default("360p").catch("360p"),autoEnhancePrompt:tf.z.boolean().optional()}),tp=tf.z.object({url:tf.z.string(),thumbnailUrl:tf.z.string().optional(),duration:tf.z.number()}),tb={"360p":{5:150,8:300},"720p":{5:150,8:300},"1080p":{5:300,8:600}},tg=(0,tm.defineCapability)({id:"pixelverse5:text2video",name:"PixVerse 5 Text to Video",inputSchema:th,outputSchema:tp,getBusinessDetails:e=>{let t=tb[e.resolution]?.[e.duration]??150;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["pixelverse5Text2Video",0,tg],456060);let tv=(0,tn.defineModel)({id:"pixelverse5",name:"PixVerse 5",description:"PixVerse 5 image-to-video and text-to-video generation",metadata:{creator:"PixVerse"},capabilities:{text2video:tg,image2video:tc}});var ty=e1,tx=e8,tz=e1,t_=e.i(332097);let tS={maxFileSizeBytes:0x1400000,maxDimensionPx:1e4,allowedFormats:["jpeg","jpg","png","webp"]};e.s(["PIXVERSE_IMAGE_CONSTRAINTS",0,tS],70310);let tM=["360p","540p","720p","1080p"],tI=["16:9","4:3","1:1","3:4","9:16","2:3","3:2","21:9"],tw=1,tC=15,tR=5e3,tE={"360p":{on:10,off:8},"540p":{on:14,off:10},"720p":{on:18,off:14},"1080p":{on:35,off:30}},tA={"360p":{on:12,off:10},"540p":{on:14,off:12},"720p":{on:18,off:15},"1080p":{on:35,off:30}},tP=tx.z.enum(tM).default("540p").catch("540p"),tT=tx.z.number().int().min(tw).max(tC).default(5).catch(5),tk=tx.z.object({type:tx.z.literal("image"),id:tx.z.string(),url:tx.z.string(),label:tx.z.string(),refName:tx.z.string().max(30).optional()}),tD=tx.z.object({type:tx.z.literal("image"),id:tx.z.string(),url:tx.z.string(),label:tx.z.string(),metadata:tx.z.custom().optional()}).superRefine((e,t)=>{if(!e.metadata)return;let i=(0,t_.validateReferenceImageMetadata)(e.metadata,tS);i&&t.addIssue({code:tx.z.ZodIssueCode.custom,message:i.message})}),tB=tx.z.object({prompt:tx.z.string().min(1).max(tR),videoCount:tx.z.number().int().min(1).max(8).default(1),duration:tT,resolution:tP,aspectRatio:tx.z.enum(tI).default("16:9").catch("16:9"),generateAudio:tx.z.boolean().default(!1),references:tx.z.array(tk).max(7).default([]),autoEnhancePrompt:tx.z.boolean().optional()}),tj=tx.z.object({prompt:tx.z.string().min(1,"Prompt is required for image-to-video").max(tR),videoCount:tx.z.number().int().min(1).max(8).default(1),startFrame:tD,endFrame:tD.nullable().optional(),duration:tT,resolution:tP,generateAudio:tx.z.boolean().default(!1)}).refine(e=>(e.startFrame?.url?.trim()??"")!=="",{message:"Start frame image is required",path:["startFrame"]}),tO=tx.z.object({url:tx.z.string(),thumbnailUrl:tx.z.string().optional(),duration:tx.z.number()});function tV(e,t){let i=e[t.resolution][t.generateAudio?"on":"off"]*t.duration,a=t.videoCount??1;return{unitCredits:i,quantity:a,totalCredits:i*a}}function tN(e){return(0,tz.defineCapability)({id:e.id,name:e.name,inputSchema:tB,outputSc
1hema:tO,getBusinessDetails:t=>tV(e.rate,t)})}function tF(e){return(0,tz.defineCapability)({id:e.id,name:e.name,inputSchema:tj,outputSchema:tO,getBusinessDetails:t=>tV(e.rate,t)})}e.s(["PIXVERSE_C1_RATE",0,tA,"PIXVERSE_PROMPT_MAX_CHARACTERS",0,tR,"PIXVERSE_V6_RATE",0,tE,"definePixverseImage2Video",()=>tF,"definePixverseText2Video",()=>tN],772518);let tU=tF({id:"pixverseC1:image2video",name:"PixVerse C1 Image to Video",rate:tA});e.s(["pixverseC1Image2Video",0,tU],951713);let tq=tN({id:"pixverseC1:text2video",name:"PixVerse C1 Text to Video",rate:tA});e.s(["pixverseC1Text2Video",0,tq],161197);let tL=(0,ty.defineModel)({id:"pixverseC1",name:"PixVerse C1",description:"PixVerse C1 image-to-video and text-to-video generation",metadata:{creator:"PixVerse"},capabilities:{text2video:tq,image2video:tU}});var t$=e1;let tH=tF({id:"pixverseV6:image2video",name:"PixVerse V6 Image to Video",rate:tE});e.s(["pixverseV6Image2Video",0,tH],920634);let tK=tN({id:"pixverseV6:text2video",name:"PixVerse V6 Text to Video",rate:tE});e.s(["pixverseV6Text2Video",0,tK],923586);let tG=(0,t$.defineModel)({id:"pixverseV6",name:"PixVerse V6",description:"PixVerse V6 image-to-video and text-to-video generation",metadata:{creator:"PixVerse"},capabilities:{text2video:tK,image2video:tH}});var tX=e1,tZ=e8,tW=e.i(200744),tY=e1,tJ=t_;let tQ={maxFileSizeBytes:0xa00000,maxTotalFileSizeBytes:0x4000000,maxReferenceImages:10};e.s(["RECRAFT_V4_STYLE_REFERENCE_CONSTRAINTS",0,tQ],248030);var t0=e8;let t1=["1:1","2:1","1:2","3:2","2:3","4:3","3:4","5:4","4:5","6:10","14:10","10:14","16:9","9:16"],t2=["raster","vector"],t3=t0.z.enum(t2),t4=t0.z.object({images:t0.z.array(t0.z.object({url:t0.z.string(),thumbnailUrl:t0.z.string().optional(),width:t0.z.number().optional(),height:t0.z.number().optional()})).min(1)});e.s(["RECRAFT_ASPECT_RATIOS",0,t1,"recraftFormatSchema",0,t3,"recraftImageOutputSchema",0,t4],308249);let t6=tZ.z.array(tW.referenceSchema).min(1).max(10).superRefine((e,t)=>{let i=[];e.forEach((e,a)=>{if("image"!==e.type&&"character"!==e.type||!e.metadata)return;i.push(e.metadata);let n=(0,tJ.validateReferenceImageMetadata)(e.metadata,tQ);n&&t.addIssue({code:tZ.z.ZodIssueCode.custom,message:n.message,path:[a]})});let a=(0,tJ.validateReferenceImageSetMetadata)(i,tQ);a&&t.addIssue({code:tZ.z.ZodIssueCode.custom,message:a.message})}),t5=3,t8={raster:20,vector:30},t9=tZ.z.object({prompt:tZ.z.string().trim().min(1).max(1e4),imageCount:tZ.z.number().int().min(1).max(8).default(1),aspectRatio:tZ.z.enum(t1).default("1:1"),format:t3.default("raster"),references:t6,autoEnhancePrompt:tZ.z.boolean().optional()}),t7=(0,tY.defineCapability)({id:"recraft-v4:image2image",name:"Recraft V4 Image to Image",inputSchema:t9,outputSchema:t4,getBusinessDetails:e=>{let t=t8[e.format]+t5,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["recraftV4Image2Image",0,t7],850273);var ie=e8,it=e1;let ii=ie.z.object({prompt:ie.z.string().trim().min(1).max(1e4),imageCount:ie.z.number().int().min(1).max(8).default(1),aspectRatio:ie.z.enum(t1).default("1:1"),format:t3.default("raster"),autoEnhancePrompt:ie.z.boolean().optional()}),ia={raster:20,vector:40},ir=(0,it.defineCapability)({id:"recraft-v4:text2image",name:"Recraft V4 Text to Image",inputSchema:ii,outputSchema:t4,getBusinessDetails:e=>{let t=ia[e.format]??20,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["recraftV4Text2Image",0,ir],3593);let io=(0,tX.defineModel)({id:"recraft-v4",name:"Recraft V4",description:"Recraft V4 raster text-to-image generation",metadata:{creator:"Recraft"},capabilities:{text2image:ir,image2image:t7}});e.s(["recraftV4Model",0,io],278171);var is=e1,iu=e8,id=tW,il=e1,ic=t_;let im={maxFileSizeBytes:0xa00000,maxTotalPixels:16e6,maxDimensionPx:4096,maxReferenceImages:1};e.s(["RECRAFT_V4_1_IMAGE_CONSTRAINTS",0,im],555200);var ih=e8,ip=e1;let ib=ih.z.object({prompt:ih.z.string().trim().min(1).max(1e4),imageCount:ih.z.number().int().min(1).max(8).default(1),aspectRatio:ih.z.enum(t1).default("1:1"),format:t3.default("raster"),autoEnhancePrompt:ih.z.boolean().optional()}),ig={raster:20,vector:45},iv=(0,ip.defineCapability)({id:"recraft-v4-1:text2image",name:"Recraft V4.1 Text to Image",inputSchema:ib,outputSc
1hema:t4,getBusinessDetails:e=>{let t=ig[e.format],i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["RECRAFT_V4_1_CREDITS_BY_FORMAT",0,ig,"recraftV41Text2Image",0,iv],982247);let iy=iu.z.object({prompt:iu.z.string().trim().min(1).max(1e4),imageCount:iu.z.number().int().min(1).max(8).default(1),references:iu.z.array(id.referenceSchema).min(1).max(1),strength:iu.z.number().min(0).max(1).default(.5),format:t3.default("raster"),autoEnhancePrompt:iu.z.boolean().optional()}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type&&"character"!==e.type||!e.metadata)return;let a=(0,ic.validateReferenceImageMetadata)(e.metadata,im);a&&t.addIssue({code:iu.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),ix=(0,il.defineCapability)({id:"recraft-v4-1:image2image",name:"Recraft V4.1 Image to Image",inputSchema:iy,outputSchema:t4,getBusinessDetails:e=>{let t=ig[e.format],i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["recraftV41Image2Image",0,ix],899962);let iz=(0,is.defineModel)({id:"recraft-v4-1",name:"Recraft V4.1",description:"Recraft V4.1 text-to-image and image-to-image generation, raster or SVG",metadata:{creator:"Recraft"},capabilities:{text2image:iv,image2image:ix}});e.s(["recraftV41Model",0,iz],636443);var i_=e1,iS=e8,iM=tW,iI=e1,iw=t_,iC=e8,iR=e1;let iE=iC.z.object({prompt:iC.z.string().trim().min(1).max(1e4),imageCount:iC.z.number().int().min(1).max(8).default(1),aspectRatio:iC.z.enum(t1).default("1:1"),format:t3.default("raster"),autoEnhancePrompt:iC.z.boolean().optional()}),iA={raster:120,vector:170},iP=(0,iR.defineCapability)({id:"recraft-v4-1-pro:text2image",name:"Recraft V4.1 Pro Text to Image",inputSchema:iE,outputSchema:t4,getBusinessDetails:e=>{let t=iA[e.format],i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["RECRAFT_V4_1_PRO_CREDITS_BY_FORMAT",0,iA,"recraftV41ProText2Image",0,iP],210470);let iT=iS.z.object({prompt:iS.z.string().trim().min(1).max(1e4),imageCount:iS.z.number().int().min(1).max(8).default(1),references:iS.z.array(iM.referenceSchema).min(1).max(1),strength:iS.z.number().min(0).max(1).default(.5),format:t3.default("raster"),autoEnhancePrompt:iS.z.boolean().optional()}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type&&"character"!==e.type||!e.metadata)return;let a=(0,iw.validateReferenceImageMetadata)(e.metadata,im);a&&t.addIssue({code:iS.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),ik=(0,iI.defineCapability)({id:"recraft-v4-1-pro:image2image",name:"Recraft V4.1 Pro Image to Image",inputSchema:iT,outputSchema:t4,getBusinessDetails:e=>{let t=iA[e.format],i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["recraftV41ProImage2Image",0,ik],369052);let iD=(0,i_.defineModel)({id:"recraft-v4-1-pro",name:"Recraft V4.1 Pro",description:"Recraft V4.1 Pro text-to-image and image-to-image generation, raster or SVG",metadata:{creator:"Recraft"},capabilities:{text2image:iP,image2image:ik}});e.s(["recraftV41ProModel",0,iD],30487);var iB=e1,ij=e8,iO=tW,iV=e1,iN=t_;let iF=ij.z.array(iO.referenceSchema).min(1).max(10).superRefine((e,t)=>{let i=[];e.forEach((e,a)=>{if("image"!==e.type&&"character"!==e.type||!e.metadata)return;i.push(e.metadata);let n=(0,iN.validateReferenceImageMetadata)(e.metadata,tQ);n&&t.addIssue({code:ij.z.ZodIssueCode.custom,message:n.message,path:[a]})});let a=(0,iN.validateReferenceImageSetMetadata)(i,tQ);a&&t.addIssue({code:ij.z.ZodIssueCode.custom,message:a.message})}),iU=3,iq={raster:55,vector:70},iL=ij.z.object({prompt:ij.z.string().trim().min(1).max(1e4),imageCount:ij.z.number().int().min(1).max(8).default(1),aspectRatio:ij.z.enum(t1).default("1:1"),format:t3.default("raster"),references:iF,autoEnhancePrompt:ij.z.boolean().optional()}),i$=(0,iV.defineCapability)({id:"recraft-v4-pro:image2image",name:"Recraft V4 Pro Image to Image",inputSchema:iL,outputSchema:t4,getBusinessDetails:e=>{let t=iq[e.format]+iU,i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["recraftV4ProImage2Image",0,i$],739415);var iH=e8,iK=e1;let iG=iH.z.object({prompt:iH.z.string().trim().min(1).max(1e4),imageCount:iH.z.number().int().min(1).max(8).default(1),aspectRatio:iH.z.enum
1(t1).default("1:1"),format:t3.default("raster"),autoEnhancePrompt:iH.z.boolean().optional()}),iX={raster:110,vector:130},iZ=(0,iK.defineCapability)({id:"recraft-v4-pro:text2image",name:"Recraft V4 Pro Text to Image",inputSchema:iG,outputSchema:t4,getBusinessDetails:e=>{let t=iX[e.format],i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["recraftV4ProText2Image",0,iZ],904683);let iW=(0,iB.defineModel)({id:"recraft-v4-pro",name:"Recraft V4 Pro",description:"Recraft V4 Pro raster text-to-image generation",metadata:{creator:"Recraft"},capabilities:{text2image:iZ,image2image:i$}});e.s(["recraftV4ProModel",0,iW],81462);var iY=e1,iJ=e8,iQ=tW,i0=e1,i1=t_;let i2={maxFileSizeBytes:0x2800000,minDimensionPx:100,maxDimensionPx:8192};e.s(["REVE_21_IMAGE_CONSTRAINTS",0,i2],501318);var i3=e8;let i4=["4:1","3:1","21:9","2:1","17:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","1:2","1:3","1:4","auto"],i6=i3.z.object({images:i3.z.array(i3.z.object({url:i3.z.string(),thumbnailUrl:i3.z.string().optional(),width:i3.z.number().optional(),height:i3.z.number().optional()})).min(1)});e.s(["REVE_ASPECT_RATIOS",0,i4,"reveImageOutputSchema",0,i6],427711);var i5=e8,i8=e1;let i9=i5.z.object({prompt:i5.z.string().trim().min(1).max(3800),imageCount:i5.z.number().int().min(1).max(8).default(1),aspectRatio:i5.z.enum(i4).default("4:3"),autoEnhancePrompt:i5.z.boolean().optional()}),i7=130,ae=(0,i8.defineCapability)({id:"reve-2.1:text2image",name:"Reve 2.1 Text to Image",inputSchema:i9,outputSchema:i6,getBusinessDetails:e=>({unitCredits:i7,quantity:e.imageCount,totalCredits:i7*e.imageCount})});e.s(["REVE_2_1_UNIT_CREDITS",0,i7,"reve21Text2Image",0,ae],698646);let at=iJ.z.object({prompt:iJ.z.string().trim().min(1).max(3800),imageCount:iJ.z.number().int().min(1).max(8).default(1),aspectRatio:iJ.z.enum(i4).default("4:3"),references:iJ.z.array(iQ.referenceSchema).min(1).max(8),autoEnhancePrompt:iJ.z.boolean().optional()}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type||!e.metadata)return;let a=(0,i1.validateReferenceImageMetadata)(e.metadata,i2);a&&t.addIssue({code:iJ.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),ai=(0,i0.defineCapability)({id:"reve-2.1:image2image",name:"Reve 2.1 Image to Image",inputSchema:at,outputSchema:i6,getBusinessDetails:e=>({unitCredits:i7,quantity:e.imageCount,totalCredits:i7*e.imageCount})});e.s(["reve21Image2Image",0,ai],567805);let aa=(0,iY.defineModel)({id:"reve-2.1",name:"Reve 2.1",description:"Reve 2.1 high-resolution text-to-image generation",metadata:{creator:"Reve",tier:"latest",aliases:["Reve","Reve 2"]},capabilities:{text2image:ae,image2image:ai}});e.s(["reve21Model",0,aa],949131);var an=e1,ar=e8,ao=e1,as=e8;let au=as.z.object({source:as.z.literal("uri"),uri:as.z.string().min(1)}),ad=as.z.object({type:as.z.literal("text"),text_prompt:as.z.string().optional(),disable_recaption:as.z.boolean().optional()}),al=as.z.object({type:as.z.literal("image"),image_prompt:au,text_prompt:as.z.string().optional(),is_pano:as.z.boolean().optional(),disable_recaption:as.z.boolean().optional()}),ac=as.z.object({type:as.z.literal("image"),image_prompt:au,text_prompt:as.z.string().optional(),is_pano:as.z.literal(!0),disable_recaption:as.z.boolean().optional()}),af=as.z.object({type:as.z.literal("video"),video_prompt:au,text_prompt:as.z.string().optional(),disable_recaption:as.z.boolean().optional()}),am=as.z.object({azimuth:as.z.number().nullable(),content:au}),ah=as.z.object({type:as.z.literal("multi-image"),multi_image_prompt:as.z.array(am).min(2).max(8),reconstruct_images:as.z.boolean().optional(),text_prompt:as.z.string().optional(),disable_recaption:as.z.boolean().optional()}),ap={display_name:as.z.string().optional(),seed:as.z.number().int().min(0).optional(),tags:as.z.array(as.z.string()).optional()},ab=as.z.object({operation_id:as.z.string(),world_id:as.z.string(),display_name:as.z.string(),world_marble_url:as.z.string(),assets:as.z.object({caption:as.z.string().optional(),thumbnail_url:as.z.string().optional(),splats:as.z.object({spz_urls:as.z.object({"100k":as.z.string().optional(),"500k":as.z.string().optional(),full_res:as.z.string().optional()}).optional()}).optional(),mesh:as.z.object({collider_mesh_url:as.z.string().optional()}).optional(),imagery:as.z.object({pano_url:as.z.string().optional()}).optional()}).optional()}),ag=ar.z.object({world_prompt:ar.z.union([al,ah]),...ap}),av=(0,ao.defineCapability)({id:"marble-0-1-mini:image2world",name:"Marble 0.1-mini Image to World",inputSchema:ag,outputSc
1hema:ab,getBusinessDetails:()=>({unitCredits:230,quantity:1,totalCredits:230})});var ay=e1;let ax=e8.z.object({world_prompt:ac,...ap}),az=(0,ay.defineCapability)({id:"marble-0-1-mini:pano2world",name:"Marble 0.1-mini Pano to World",inputSchema:ax,outputSchema:ab,getBusinessDetails:()=>({unitCredits:150,quantity:1,totalCredits:150})});var a_=e1;let aS=e8.z.object({world_prompt:ad,...ap}),aM=(0,a_.defineCapability)({id:"marble-0-1-mini:text2world",name:"Marble 0.1-mini Text to World",inputSchema:aS,outputSchema:ab,getBusinessDetails:()=>({unitCredits:230,quantity:1,totalCredits:230})});var aI=e1;let aw=e8.z.object({world_prompt:af,...ap}),aC=(0,aI.defineCapability)({id:"marble-0-1-mini:video2world",name:"Marble 0.1-mini Video to World",inputSchema:aw,outputSchema:ab,getBusinessDetails:()=>({unitCredits:250,quantity:1,totalCredits:250})}),aR=(0,an.defineModel)({id:"marble-0-1-mini",name:"Marble 0.1-mini",description:"World Labs fast draft 3D world generation (30–45s). Supports text, image, video, and panoramic image inputs.",metadata:{creator:"World Labs"},capabilities:{text2world:aM,image2world:av,video2world:aC,pano2world:az}});var aE=e1,aA=e8,aP=e1;let aT=aA.z.object({world_prompt:aA.z.union([al,ah]),...ap}),ak=(0,aP.defineCapability)({id:"marble-0-1-plus:image2world",name:"Marble 0.1-plus Image to World",inputSchema:aT,outputSchema:ab,getBusinessDetails:()=>({unitCredits:1580,quantity:1,totalCredits:1580})});var aD=e1;let aB=e8.z.object({world_prompt:ac,...ap}),aj=(0,aD.defineCapability)({id:"marble-0-1-plus:pano2world",name:"Marble 0.1-plus Pano to World",inputSchema:aB,outputSc
1hema:ab,getBusinessDetails:()=>({unitCredits:1500,quantity:1,totalCredits:1500})});var aO=e1;let aV=e8.z.object({world_prompt:ad,...ap}),aN=(0,aO.defineCapability)({id:"marble-0-1-plus:text2world",name:"Marble 0.1-plus Text to World",inputSchema:aV,outputSchema:ab,getBusinessDetails:()=>({unitCredits:1580,quantity:1,totalCredits:1580})});var aF=e1;let aU=e8.z.object({world_prompt:af,...ap}),aq=(0,aF.defineCapability)({id:"marble-0-1-plus:video2world",name:"Marble 0.1-plus Video to World",inputSchema:aU,outputSchema:ab,getBusinessDetails:()=>({unitCredits:1600,quantity:1,totalCredits:1600})}),aL=(0,aE.defineModel)({id:"marble-0-1-plus",name:"Marble 0.1-plus",description:"World Labs high-quality 3D world generation (~5 min). Supports text, image, video, and panoramic image inputs.",metadata:{creator:"World Labs"},capabilities:{text2world:aN,image2world:ak,video2world:aq,pano2world:aj}});var a$=e1,aH=e8,aK=tW,aG=e1,aX=t_;let aZ={maxFileSizeBytes:0x1900000,minDimensionPx:100};e.s(["GROK_IMAGINE_IMAGE_CONSTRAINTS",0,aZ],149757);let aW=["1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2","19.5:9","9:19.5","20:9","9:20","auto"],aY=["1K","2K"],aJ=["16:9","4:3","3:2","1:1","2:3","3:4","9:16"],aQ=["480p","720p"];e.s(["GROK_IMAGE_ASPECT_RATIOS",0,aW,"GROK_IMAGE_RESOLUTIONS",0,aY,"GROK_VIDEO_ASPECT_RATIOS",0,aJ,"GROK_VIDEO_RESOLUTIONS",0,aQ],817234);let a0=aH.z.enum(aW).default("auto").catch("auto"),a1=aH.z.enum(aY).default("1K").catch("1K"),a2=aH.z.object({prompt:aH.z.string().trim().min(1),imageCount:aH.z.number().int().min(1).max(8).default(1),references:aH.z.array(aK.imageReferenceSchema).min(1).max(5),aspectRatio:a0,resolution:a1,autoEnhancePrompt:aH.z.boolean().optional()}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type||!e.metadata)return;let a=(0,aX.validateReferenceImageMetadata)(e.metadata,aZ);a&&t.addIssue({code:aH.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),a3=aH.z.object({images:aH.z.array(aH.z.object({url:aH.z.string(),thumbnailUrl:aH.z.string().optional()}))}),a4=10,a6=(0,aG.defineCapability)({id:"grok-imagine:image2image",name:"Grok Imagine Image to Image",inputSchema:a2,outputSchema:a3,getBusinessDetails:e=>{let t=e.imageCount;return{unitCredits:a4,quantity:t,totalCredits:a4*t}}});e.s(["xaiGrokImagineImage2Image",0,a6],5207);var a5=e8,a8=e1,a9=t_;let a7=a5.z.object({type:a5.z.literal("image"),id:a5.z.string(),url:a5.z.string(),label:a5.z.string(),metadata:a5.z.custom().optional()}),ne=a5.z.object({prompt:a5.z.string().min(1),videoCount:a5.z.number().int().min(1).max(8).default(1),startFrame:a7,duration:a5.z.number().int().min(1).max(15).default(5).catch(5),aspectRatio:a5.z.enum(["auto","16:9","4:3","3:2","1:1","2:3","3:4","9:16"]).default("auto").catch("auto"),resolution:a5.z.enum(["480p","720p"]).default("720p").catch("720p")}).superRefine((e,t)=>{let i=e.startFrame?.metadata;if(!i)return;let a=(0,a9.validateReferenceImageMetadata)(i,aZ);a&&t.addIssue({code:a5.z.ZodIssueCode.custom,message:a.message,path:["startFrame","metadata"]})}),nt=a5.z.object({url:a5.z.string(),thumbnailUrl:a5.z.string().optional(),duration:a5.z.number()}),ni={"480p":30,"720p":40},na=(0,a8.defineCapability)({id:"grok-imagine:image2video",name:"Grok Imagine Image to Video",inputSchema:ne,outputSchema:nt,getBusinessDetails:e=>{let t=(ni[e.resolution]??30)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["xaiGrokImagineImage2Video",0,na],648592);var nn=e8,nr=tW,no=e1,ns=e.i(944029);let nu=3,nd=8,nl=nr.videoReferenceSchema.extend({metadata:nn.z.custom(e=>"object"==typeof e&&null!==e).superRefine((e,t)=>{if(!e||null==e.duration)return void t.addIssue({code:"custom",message:"Video metadata with duration is required",path:["duration"]});let i=e.duration;i<nu?t.addIssue({code:"custom",message:`Video too short. Minimum: ${nu}s, your video: ${(0,ns.formatDuration)(i)}s.`,path:["duration"]}):Math.round(i)>nd&&t.addIssue({code:"custom",message:`Video too long. Maximum: ${nd}s, your video: ${(0,ns.formatDuration)(i)}s.`,path:["duration"]})})}),nc=2e3,nf=nn.z.object({prompt:nn.z.string().trim().min(1,"Prompt is required").max(nc,`Prompt must be ${nc} characters or fewer`),videoReference:nl}),nm=nn.z.object({url:nn.z.string(),thumbnailUrl:nn.z.string().optional()}),nh=45,np=(0,no.defineCapability)({id:"grok-imagine:modify-video",name:"Grok Imagine Edit Video",inputSchema:nf,outputSc
1hema:nm,getBusinessDetails:e=>{let t=e?.videoReference?.metadata?.duration;if(!t||t<=0)return{unitCredits:0,quantity:1,totalCredits:0};let i=nh*Math.min(Math.ceil(t),nd);return{unitCredits:i,quantity:1,totalCredits:i}}});e.s(["xaiGrokImagineModifyVideo",0,np],469794);var nb=e8,ng=e1;let nv=nb.z.enum(aW).default("1:1").catch("1:1"),ny=nb.z.enum(aY).default("1K").catch("1K"),nx=nb.z.object({prompt:nb.z.string().trim().min(1),imageCount:nb.z.number().int().min(1).max(8).default(2),aspectRatio:nv,resolution:ny,autoEnhancePrompt:nb.z.boolean().optional()}),nz=nb.z.object({images:nb.z.array(nb.z.object({url:nb.z.string(),thumbnailUrl:nb.z.string().optional()}))}),n_=10,nS=(0,ng.defineCapability)({id:"grok-imagine:text2image",name:"Grok Imagine Text to Image",inputSchema:nx,outputSchema:nz,getBusinessDetails:e=>{let t=e.imageCount;return{unitCredits:n_,quantity:t,totalCredits:n_*t}}});e.s(["xaiGrokImagineText2Image",0,nS],167617);var nM=e8,nI=e1;let nw=nM.z.enum(aJ).default("16:9").catch("16:9"),nC=nM.z.enum(aQ).default("720p").catch("720p"),nR=nM.z.object({prompt:nM.z.string().min(1),videoCount:nM.z.number().int().min(1).max(8).default(1),duration:nM.z.number().int().min(1).max(15).default(5).catch(5),aspectRatio:nw,resolution:nC,autoEnhancePrompt:nM.z.boolean().optional()}),nE=nM.z.object({url:nM.z.string(),thumbnailUrl:nM.z.string().optional(),duration:nM.z.number()}),nA={"480p":30,"720p":40},nP=(0,nI.defineCapability)({id:"grok-imagine:text2video",name:"Grok Imagine Text to Video",inputSchema:nR,outputSchema:nE,getBusinessDetails:e=>{let t=(nA[e.resolution]??30)*e.duration;return{unitCredits:t,quantity:e.videoCount??1,totalCredits:t*(e.videoCount??1)}}});e.s(["xaiGrokImagineText2Video",0,nP],397830);let nT=(0,a$.defineModel)({id:"grok-imagine",name:"Grok Imagine",capabilities:{text2image:nS,image2image:a6,text2video:nP,image2video:na,"modify-video":np}});e.s(["xaiGrokImagineModel",0,nT],539177);var nk=e1,nD=e8,nB=e1,nj=t_;let nO=["16:9","4:3","3:2","1:1","2:3","3:4","9:16"],nV=["16:9","9:16"],nN=["480p","720p","1080p"],nF=["480p","720p"],nU=1,nq=15,nL=5,n$={"480p":45,"720p":80,"1080p":180},nH=5,nK=["480p","720p"],nG=7,nX=7;e.s(["GROK_15_CREDITS_PER_REFERENCE_IMAGE",0,nX,"GROK_15_CREDITS_PER_SECOND",0,n$,"GROK_15_DEFAULT_DURATION_S",0,nL,"GROK_15_MAX_DURATION_S",0,nq,"GROK_15_MAX_REFERENCE_IMAGES",0,nG,"GROK_15_MIN_DURATION_S",0,nU,"GROK_15_REFERENCE_ASPECT_RATIOS",0,nV,"GROK_15_REFERENCE_RESOLUTIONS",0,nF,"GROK_15_START_FRAME_CREDITS",0,nH,"GROK_15_START_FRAME_SURCHARGE_RESOLUTIONS",0,nK,"GROK_15_VIDEO_ASPECT_RATIOS",0,nO,"GROK_15_VIDEO_RESOLUTIONS",0,nN],596221);let nZ=nD.z.object({type:nD.z.literal("image"),id:nD.z.string(),url:nD.z.string(),label:nD.z.string(),metadata:nD.z.custom().optional()}),nW=nD.z.object({prompt:nD.z.string().min(1),videoCount:nD.z.number().int().min(1).max(8).default(1),startFrame:nZ,duration:nD.z.number().int().min(nU).max(nq).default(nL).catch(nL),aspectRatio:nD.z.enum(["auto","16:9","4:3","3:2","1:1","2:3","3:4","9:16"]).default("auto").catch("auto"),resolution:nD.z.enum(nN).default("720p").catch("720p")}).superRefine((e,t)=>{let i=e.startFrame?.metadata;if(!i)return;let a=(0,nj.validateReferenceImageMetadata)(i,aZ);a&&t.addIssue({code:nD.z.ZodIssueCode.custom,message:a.message,path:["startFrame","metadata"]})}),nY=nD.z.object({url:nD.z.string(),thumbnailUrl:nD.z.string().optional(),duration:nD.z.number()}),nJ=(0,nB.defineCapability)({id:"grok-imagine-1-5:image2video",name:"Grok Imagine 1.5 Image to Video",inputSchema:nW,outputSchema:nY,getBusinessDetails:e=>{let t=n$[e.resolution]??n$["720p"],i=nK.includes(e.resolution)?nH:0,a=e.videoCount??1,n=t*e.duration+i;return{unitCredits:n,quantity:a,totalCredits:n*a}}});e.s(["xaiGrokImagine15Image2Video",0,nJ],212247);var nQ=e8,n0=tW,n1=e1;let n2=nQ.z.union([n0.imageReferenceSchema,n0.characterReferenceSchema,n0.elementReferenceSchema]),n3=nQ.z.object({prompt:nQ.z.string().min(1),videoCount:nQ.z.number().int().min(1).max(8).default(1),duration:nQ.z.number().int().min(nU).max(nq).default(nL).catch(nL),aspectRatio:nQ.z.enum(nV).default("16:9").catch("16:9"),resolution:nQ.z.enum
1(nF).default("720p").catch("720p"),visualReferences:nQ.z.array(n2).min(1).max(nG,`Maximum ${nG} reference images allowed`)}),n4=nQ.z.object({url:nQ.z.string(),thumbnailUrl:nQ.z.string().optional(),duration:nQ.z.number()}),n6=(0,n1.defineCapability)({id:"grok-imagine-1-5:reference2video",name:"Grok Imagine 1.5 Reference to Video",inputSchema:n3,outputSchema:n4,getBusinessDetails:e=>{let t=e.videoCount??1,i=(n$[e.resolution]??n$["720p"])*e.duration+nX*e.visualReferences.length;return{unitCredits:i,quantity:t,totalCredits:i*t}}});e.s(["xaiGrokImagine15Reference2Video",0,n6],986726);var n5=e8,n8=e1;let n9=n5.z.object({prompt:n5.z.string().min(1),videoCount:n5.z.number().int().min(1).max(8).default(1),duration:n5.z.number().int().min(nU).max(nq).default(nL).catch(nL),aspectRatio:n5.z.enum(nO).default("16:9").catch("16:9"),resolution:n5.z.enum(nN).default("720p").catch("720p"),autoEnhancePrompt:n5.z.boolean().optional()}),n7=n5.z.object({url:n5.z.string(),thumbnailUrl:n5.z.string().optional(),duration:n5.z.number()}),re=(0,n8.defineCapability)({id:"grok-imagine-1-5:text2video",name:"Grok Imagine 1.5 Text to Video",inputSchema:n9,outputSchema:n7,getBusinessDetails:e=>{let t=n$[e.resolution]??n$["720p"],i=e.videoCount??1,a=t*e.duration;return{unitCredits:a,quantity:i,totalCredits:a*i}}});e.s(["xaiGrokImagine15Text2Video",0,re],222255);let rt=(0,nk.defineModel)({id:"grok-imagine-1-5",name:"Grok Imagine 1.5",capabilities:{image2video:nJ,text2video:re,reference2video:n6}});e.s(["xaiGrokImagine15Model",0,rt],308803);var ri=e1,ra=e8,rn=tW,rr=e1,ro=t_;let rs=["1:1","16:9","9:16","4:3","3:4","3:2","2:3","2:1","1:2","19.5:9","9:19.5","20:9","9:20","auto"],ru=["1K","2K"],rd=["low","medium"],rl="low",rc="1K",rf=3,rm={low:{"1K":26,"2K":40},medium:{"1K":40,"2K":52}},rh=7,rp=(e,t,i=0)=>rm[e][t]+rh*i;e.s(["GROK_IMAGE_2_ASPECT_RATIOS",0,rs,"GROK_IMAGE_2_DEFAULT_QUALITY",0,rl,"GROK_IMAGE_2_DEFAULT_RESOLUTION",0,rc,"GROK_IMAGE_2_MAX_REFERENCE_IMAGES",0,rf,"GROK_IMAGE_2_QUALITIES",0,rd,"GROK_IMAGE_2_RESOLUTIONS",0,ru,"grokImage2UnitCredits",0,rp],833401);var rb=e8;let rg=rb.z.preprocess(e=>"string"==typeof e?e.toUpperCase():e,rb.z.enum(ru).default(rc).catch(rc));e.s(["grokImage2ResolutionSchema",0,rg],891834);let rv=ra.z.object({prompt:ra.z.string().trim().min(1),imageCount:ra.z.number().int().min(1).max(8).default(1),references:ra.z.array(ra.z.union([rn.imageReferenceSchema,rn.characterReferenceSchema])).min(1).max(rf,`Maximum ${rf} reference images allowed`),aspectRatio:ra.z.enum(rs).default("auto").catch("auto"),resolution:rg,quality:ra.z.enum(rd).default(rl).catch(rl)}).superRefine((e,t)=>{e.references.forEach((e,i)=>{if("image"!==e.type||!e.metadata)return;let a=(0,ro.validateReferenceImageMetadata)(e.metadata,aZ);a&&t.addIssue({code:ra.z.ZodIssueCode.custom,message:a.message,path:["references",i]})})}),ry=ra.z.object({images:ra.z.array(ra.z.object({url:ra.z.string(),thumbnailUrl:ra.z.string().optional()}))}),rx=(0,rr.defineCapability)({id:"grok-imagine-image-2:image2image",name:"Grok Imagine Image 2.0 Image to Image",inputSchema:rv,outputSchema:ry,getBusinessDetails:e=>{let t=rp(e.quality,e.resolution,e.references.length),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["xaiGrokImage2Image2Image",0,rx],441389);var rz=e8,r_=e1;let rS=rz.z.object({prompt:rz.z.string().trim().min(1),imageCount:rz.z.number().int().min(1).max(8).default(2),aspectRatio:rz.z.enum(rs).default("1:1").catch("1:1"),resolution:rg,quality:rz.z.enum(rd).default(rl).catch(rl),autoEnhancePrompt:rz.z.boolean().optional()}),rM=rz.z.object({images:rz.z.array(rz.z.object({url:rz.z.string(),thumbnailUrl:rz.z.string().optional()}))}),rI=(0,r_.defineCapability)({id:"grok-imagine-image-2:text2image",name:"Grok Imagine Image 2.0 Text to Image",inputSchema:rS,outputSchema:rM,getBusinessDetails:e=>{let t=rp(e.quality,e.resolution),i=e.imageCount;return{unitCredits:t,quantity:i,totalCredits:t*i}}});e.s(["xaiGrokImage2Text2Image",0,rI],163619);let rw=(0,ri.defineModel)({id:"grok-imagine-image-2",name:"Grok Imagine Image 2.0",metadata:{creator:"xAI",tier:"latest",aliases:["Grok Imagine 2","Grok Imagine 2.0","grok-imagine-image-2.0","Grok Image 2"]},capabilities:{text2image:rI,image2image:rx}});e.s(["xaiGrokImage2Model",0,rw],587335);let rC=[o.mockModel,eg.nanoBanana2LiteModel,ep.nanoBananaModel,eb.nanoBanana2Model,ev.nanoBananaProModel,es.seedvrModel,Q.dynavisionXlModel,eu.waiAniNsfwPonyxlModel,ee.flux2LoraGalleryRealismModel,et.fluxKontextDevModel,ed.zImageModel,en.juggernautFluxProModel,er.juggernautXlModel,eo.openartSdxlModel,ex.hedraCharacterModel,eI.kling21Model,ew.kling21MasterModel,eC.kling25Model,eR.kling26Model,b.wan22Model,g.wan25Model,v.wan26Model,y.wan27Model,_.wan30Model,S.wan30PrimeModel,eF.gptImage15Model,eU.gptImage2Model,eq.gptImage25FlareModel,eL.gptImage25SunburstModel,e$.whisper1Model,tv,tG,tL,ej.hailuo02Model,eB.hailuo23Model,eD.minimaxH3Model,ei.falH3MaxModel,ea.falH3MaxTurboModel,s.happyhorseModel,u.happyhorse11Model,ez.kling3Model,eO.minimaxMinimaxSpee
1ch28HdModel,eM.klingO1Model,e_.klingAvatarModel,eS.klingLipsyncV1Model,G.creatifyAuroraModel,eZ.openartLipsyncModel,eK.openartExtendVideoModel,eG.openartFaceRealismModel,eJ.openartPhotorealisticModel,eQ.openartReplaceCharacterModel,eX.openartImageUpscaleModel,eY.openartOutpaintModel,e0.openartRestyleWan21Model,eW.musicVisualizerModel,e4,e6,d.qwenImage2Model,l.qwenImage2ProModel,c.qwenImage3Model,f.qwenImage3ProModel,m.qwenImageEditModel,h.qwenImageMaxModel,p.qwenImagePlusModel,D.bytePlusDreamActorM2Model,B.bytePlusOmniHuman1_5Model,eH.openartCameraAngleControlModel,X.elevenlabElevenEnglishStsV2Model,Z.elevenlabElevenMultilingualV2Model,J.elevenlabElevenV3Model,W.elevenScribeV1Model,Y.elevenlabTextToSoundV2Model,O.bytePlusSeedance1Model,V.bytePlusSeedance15Model,N.bytePlusSeedance2Model,U.bytePlusSeedance2FastModel,q.bytePlusSeedance2MiniModel,F.bytePlusSeedance25Model,j.bytePlusSeedAudio1Model,L.bytePlusSeedream4Model,$.bytePlusSeedream45Model,H.bytePlusSeedream5LiteModel,K.bytePlusSeedream5ProModel,I.flux11ProModel,w.flux1DevModel,C.flux2FlexModel,R.flux2Klein9bModel,E.flux2MaxModel,A.flux2ProModel,P.flux3VideoModel,em.lyria3ClipPreviewModel,eh.lyria3ProPreviewModel,k.fluxKontextProModel,T.fluxKontextMaxModel,ta,el.fishS21ProModel,ey.veo31Model,ef.geminiOmniFlashModel,ec.geminiOmni11FlashModel,eE.ltx2Model,eA.ltx23Model,eP.ltx25Model,nT,rt,rw,eV.minimaxMinimaxSpeech28TurboModel,eN.minimaxVoiceDesignModel,eT.midjourneyV7Model,ek.midjourneyV81Model,t.falStressTestModel,n.openartLoadtestSleepModel,i.googleGemini31ProPreviewModel,a.klingV3Model,r.viggleViggleV4Model,aL,aR,io,iW,iz,iD,aa,x.wan27ImageModel,z.wan27ImageProModel,M.switchxV1Model],rR=(e=>{let t={};for(let i of e){if(t[i.id])throw Error(`Duplicate model ID: "${i.id}"`);t[i.id]=i}return t})(rC),rE=e=>rR[e],rA=()=>Object.values(rR).map(e=>({id:e.id,name:e.name})),rP=(()=>{let e={};for(let t of rC)for(let i of Object.values(t.capabilities)){if(e[i.id])throw Error(`Duplicate capability ID: "${i.id}"`);e[i.id]=i}return e})(),rT=e=>rP[e];e.s(["getCapability",0,rT,"getModel",0,rE,"listModels",0,rA,"modelRegistry",0,rR],706357)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.