@modelcontextprotocol/server-sheet-music 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -0
- package/dist/index.js +30583 -0
- package/dist/mcp-app.html +259 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.js +59236 -0
- package/package.json +52 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<meta name="color-scheme" content="light dark">
|
|
7
|
+
<title>Sheet Music Viewer</title>
|
|
8
|
+
<script type="module" crossorigin>var Ab=Object.defineProperty;var Pb=(e,r,n)=>r in e?Ab(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var at=(e,r,n)=>Pb(e,typeof r!="symbol"?r+"":r,n);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))i(t);new MutationObserver(t=>{for(const a of t)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(t){const a={};return t.integrity&&(a.integrity=t.integrity),t.referrerPolicy&&(a.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?a.credentials="include":t.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(t){if(t.ep)return;t.ep=!0;const a=n(t);fetch(t.href,a)}})();function X(e,r,n){function i(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),r(s,l);const d=o.prototype,p=Object.keys(d);for(let m=0;m<p.length;m++){const f=p[m];f in s||(s[f]=d[f].bind(s))}}const t=(n==null?void 0:n.Parent)??Object;class a extends t{}Object.defineProperty(a,"name",{value:e});function o(s){var l;const d=n!=null&&n.Parent?new a:this;i(d,s),(l=d._zod).deferred??(l.deferred=[]);for(const p of d._zod.deferred)p();return d}return Object.defineProperty(o,"init",{value:i}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>{var l,d;return n!=null&&n.Parent&&s instanceof n.Parent?!0:(d=(l=s==null?void 0:s._zod)==null?void 0:l.traits)==null?void 0:d.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}class mr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ph extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}const mh={};function jt(e){return mh}function vh(e){const r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function Zs(e,r){return typeof r=="bigint"?r.toString():r}function Gn(e){return{get value(){{const r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Vs(e){return e==null}function Xs(e){const r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Ob(e,r){const n=(e.toString().split(".")[1]||"").length,i=r.toString();let t=(i.split(".")[1]||"").length;if(t===0&&/\d?e-\d?/.test(i)){const l=i.match(/\d?e-(\d?)/);l!=null&&l[1]&&(t=Number.parseInt(l[1]))}const a=n>t?n:t,o=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(r.toFixed(a).replace(".",""));return o%s/10**a}const Du=Symbol("evaluating");function Ne(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==Du)return i===void 0&&(i=Du,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function or(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Gt(...e){const r={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function Ru(e){return JSON.stringify(e)}function Mb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const gh="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Db=Gn(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const r=Function;return new r(""),!0}catch{return!1}});function gr(e){if(Dr(e)===!1)return!1;const r=e.constructor;if(r===void 0||typeof r!="function")return!0;const n=r.prototype;return!(Dr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function bh(e){return gr(e)?{...e}:Array.isArray(e)?[...e]:e}const Rb=new Set(["string","number","symbol"]);function br(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jt(e,r,n){const i=new e._zod.constr(r??e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function le(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Lb(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}const Ub={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Zb(e,r){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const a=Gt(e._zod.def,{get shape(){const o={};for(const s in r){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=n.shape[s])}return or(this,"shape",o),o},checks:[]});return Jt(e,a)}function jb(e,r){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const a=Gt(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const s in r){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&delete o[s]}return or(this,"shape",o),o},checks:[]});return Jt(e,a)}function Bb(e,r){if(!gr(r))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const a=e._zod.def.shape;for(const o in r)if(Object.getOwnPropertyDescriptor(a,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const t=Gt(e._zod.def,{get shape(){const a={...e._zod.def.shape,...r};return or(this,"shape",a),a}});return Jt(e,t)}function qb(e,r){if(!gr(r))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Gt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...r};return or(this,"shape",i),i}});return Jt(e,n)}function Fb(e,r){const n=Gt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...r._zod.def.shape};return or(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return Jt(e,n)}function Hb(e,r,n){const t=r._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Gt(r._zod.def,{get shape(){const s=r._zod.def.shape,l={...s};if(n)for(const d in n){if(!(d in s))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(l[d]=e?new e({type:"optional",innerType:s[d]}):s[d])}else for(const d in s)l[d]=e?new e({type:"optional",innerType:s[d]}):s[d];return or(this,"shape",l),l},checks:[]});return Jt(r,o)}function Gb(e,r,n){const i=Gt(r._zod.def,{get shape(){const t=r._zod.def.shape,a={...t};if(n)for(const o in n){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(a[o]=new e({type:"nonoptional",innerType:t[o]}))}else for(const o in t)a[o]=new e({type:"nonoptional",innerType:t[o]});return or(this,"shape",a),a}});return Jt(r,i)}function hr(e,r=0){var n;if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function pr(e,r){return r.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function kn(e){return typeof e=="string"?e:e==null?void 0:e.message}function Bt(e,r,n){var t,a,o,s,l,d;const i={...e,path:e.path??[]};if(!e.message){const p=kn((o=(a=(t=e.inst)==null?void 0:t._zod.def)==null?void 0:a.error)==null?void 0:o.call(a,e))??kn((s=r==null?void 0:r.error)==null?void 0:s.call(r,e))??kn((l=n.customError)==null?void 0:l.call(n,e))??kn((d=n.localeError)==null?void 0:d.call(n,e))??"Invalid input";i.message=p}return delete i.inst,delete i.continue,r!=null&&r.reportInput||delete i.input,i}function Ks(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Rr(...e){const[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:{...r}}const yh=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Zs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_h=X("$ZodError",yh),wh=X("$ZodError",yh,{Parent:Error});function Jb(e,r=n=>n.message){const n={},i=[];for(const t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function Wb(e,r=n=>n.message){const n={_errors:[]},i=t=>{for(const a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>i({issues:o}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else{let o=n,s=0;for(;s<a.path.length;){const l=a.path[s];s===a.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(r(a))):o[l]=o[l]||{_errors:[]},o=o[l],s++}}};return i(e),n}const Qs=e=>(r,n,i,t)=>{const a=i?Object.assign(i,{async:!1}):{async:!1},o=r._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new mr;if(o.issues.length){const s=new((t==null?void 0:t.Err)??e)(o.issues.map(l=>Bt(l,a,jt())));throw gh(s,t==null?void 0:t.callee),s}return o.value},e0=e=>async(r,n,i,t)=>{const a=i?Object.assign(i,{async:!0}):{async:!0};let o=r._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){const s=new((t==null?void 0:t.Err)??e)(o.issues.map(l=>Bt(l,a,jt())));throw gh(s,t==null?void 0:t.callee),s}return o.value},Jn=e=>(r,n,i)=>{const t=i?{...i,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},t);if(a instanceof Promise)throw new mr;return a.issues.length?{success:!1,error:new(e??_h)(a.issues.map(o=>Bt(o,t,jt())))}:{success:!0,data:a.value}},kh=Jn(wh),Wn=e=>async(r,n,i)=>{const t=i?Object.assign(i,{async:!0}):{async:!0};let a=r._zod.run({value:n,issues:[]},t);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(o=>Bt(o,t,jt())))}:{success:!0,data:a.value}},Yb=Wn(wh),Vb=e=>(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Qs(e)(r,n,t)},Xb=e=>(r,n,i)=>Qs(e)(r,n,i),Kb=e=>async(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return e0(e)(r,n,t)},Qb=e=>async(r,n,i)=>e0(e)(r,n,i),e3=e=>(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Jn(e)(r,n,t)},t3=e=>(r,n,i)=>Jn(e)(r,n,i),r3=e=>async(r,n,i)=>{const t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Wn(e)(r,n,t)},n3=e=>async(r,n,i)=>Wn(e)(r,n,i),i3=/^[cC][^\s-]{8,}$/,a3=/^[0-9a-z]+$/,o3=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,s3=/^[0-9a-vA-V]{20}$/,c3=/^[A-Za-z0-9]{27}$/,u3=/^[a-zA-Z0-9_-]{21}$/,l3=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,f3=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Lu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,d3=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,h3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function p3(){return new RegExp(h3,"u")}const m3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,v3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,g3=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,b3=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,y3=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$h=/^[A-Za-z0-9_-]*$/,_3=/^\+[1-9]\d{6,14}$/,xh="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",w3=new RegExp(`^${xh}$`);function Sh(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function k3(e){return new RegExp(`^${Sh(e)}$`)}function $3(e){const r=Sh({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${r}(?:${n.join("|")})`;return new RegExp(`^${xh}T(?:${i})$`)}const x3=e=>{const r=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},S3=/^-?\d+$/,Ih=/^-?\d+(?:\.\d+)?$/,I3=/^(?:true|false)$/i,T3=/^null$/i,C3=/^[^A-Z]*$/,z3=/^[^a-z]*$/,ht=X("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),Th={number:"number",bigint:"bigint",object:"date"},Ch=X("$ZodCheckLessThan",(e,r)=>{ht.init(e,r);const n=Th[typeof r.value];e._zod.onattach.push(i=>{const t=i._zod.bag,a=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<a&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),zh=X("$ZodCheckGreaterThan",(e,r)=>{ht.init(e,r);const n=Th[typeof r.value];e._zod.onattach.push(i=>{const t=i._zod.bag,a=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>a&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),E3=X("$ZodCheckMultipleOf",(e,r)=>{ht.init(e,r),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Ob(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),N3=X("$ZodCheckNumberFormat",(e,r)=>{var o;ht.init(e,r),r.format=r.format||"float64";const n=(o=r.format)==null?void 0:o.includes("int"),i=n?"int":"number",[t,a]=Ub[r.format];e._zod.onattach.push(s=>{const l=s._zod.bag;l.format=r.format,l.minimum=t,l.maximum=a,n&&(l.pattern=S3)}),e._zod.check=s=>{const l=s.value;if(n){if(!Number.isInteger(l)){s.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?s.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort}):s.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort});return}}l<t&&s.issues.push({origin:"number",input:l,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),l>a&&s.issues.push({origin:"number",input:l,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!r.abort})}}),A3=X("$ZodCheckMaxLength",(e,r)=>{var n;ht.init(e,r),(n=e._zod.def).when??(n.when=i=>{const t=i.value;return!Vs(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{const t=i.value;if(t.length<=r.maximum)return;const o=Ks(t);i.issues.push({origin:o,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),P3=X("$ZodCheckMinLength",(e,r)=>{var n;ht.init(e,r),(n=e._zod.def).when??(n.when=i=>{const t=i.value;return!Vs(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{const t=i.value;if(t.length>=r.minimum)return;const o=Ks(t);i.issues.push({origin:o,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),O3=X("$ZodCheckLengthEquals",(e,r)=>{var n;ht.init(e,r),(n=e._zod.def).when??(n.when=i=>{const t=i.value;return!Vs(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{const t=i._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=i=>{const t=i.value,a=t.length;if(a===r.length)return;const o=Ks(t),s=a>r.length;i.issues.push({origin:o,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),Yn=X("$ZodCheckStringFormat",(e,r)=>{var n,i;ht.init(e,r),e._zod.onattach.push(t=>{const a=t._zod.bag;a.format=r.format,r.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(r.pattern))}),r.pattern?(n=e._zod).check??(n.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(i=e._zod).check??(i.check=()=>{})}),M3=X("$ZodCheckRegex",(e,r)=>{Yn.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),D3=X("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=C3),Yn.init(e,r)}),R3=X("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=z3),Yn.init(e,r)}),L3=X("$ZodCheckIncludes",(e,r)=>{ht.init(e,r);const n=br(r.includes),i=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=i,e._zod.onattach.push(t=>{const a=t._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),U3=X("$ZodCheckStartsWith",(e,r)=>{ht.init(e,r);const n=new RegExp(`^${br(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{const t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(r.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:i.value,inst:e,continue:!r.abort})}}),Z3=X("$ZodCheckEndsWith",(e,r)=>{ht.init(e,r);const n=new RegExp(`.*${br(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{const t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(r.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:i.value,inst:e,continue:!r.abort})}}),j3=X("$ZodCheckOverwrite",(e,r)=>{ht.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});class B3{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const i=r.split(`
|
|
9
|
+
`).filter(o=>o),t=Math.min(...i.map(o=>o.length-o.trimStart().length)),a=i.map(o=>o.slice(t)).map(o=>" ".repeat(this.indent*2)+o);for(const o of a)this.content.push(o)}compile(){const r=Function,n=this==null?void 0:this.args,t=[...((this==null?void 0:this.content)??[""]).map(a=>` ${a}`)];return new r(...n,t.join(`
|
|
10
|
+
`))}}const q3={major:4,minor:3,patch:5},Ze=X("$ZodType",(e,r)=>{var t;var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=q3;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const a of i)for(const o of a._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),(t=e._zod.deferred)==null||t.push(()=>{e._zod.run=e._zod.parse});else{const a=(s,l,d)=>{let p=hr(s),m;for(const f of l){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(p)continue;const u=s.issues.length,h=f._zod.check(s);if(h instanceof Promise&&(d==null?void 0:d.async)===!1)throw new mr;if(m||h instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await h,s.issues.length!==u&&(p||(p=hr(s,u)))});else{if(s.issues.length===u)continue;p||(p=hr(s,u))}}return m?m.then(()=>s):s},o=(s,l,d)=>{if(hr(s))return s.aborted=!0,s;const p=a(l,i,d);if(p instanceof Promise){if(d.async===!1)throw new mr;return p.then(m=>e._zod.parse(m,d))}return e._zod.parse(p,d)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){const p=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(m=>o(m,s,l)):o(p,s,l)}const d=e._zod.parse(s,l);if(d instanceof Promise){if(l.async===!1)throw new mr;return d.then(p=>a(p,i,l))}return a(d,i,l)}}Ne(e,"~standard",()=>({validate:a=>{var o;try{const s=kh(e,a);return s.success?{value:s.data}:{issues:(o=s.error)==null?void 0:o.issues}}catch{return Yb(e,a).then(l=>{var d;return l.success?{value:l.data}:{issues:(d=l.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),t0=X("$ZodString",(e,r)=>{var n;Ze.init(e,r),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??x3(e._zod.bag),e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),je=X("$ZodStringFormat",(e,r)=>{Yn.init(e,r),t0.init(e,r)}),F3=X("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=f3),je.init(e,r)}),H3=X("$ZodUUID",(e,r)=>{if(r.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(i===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=Lu(i))}else r.pattern??(r.pattern=Lu());je.init(e,r)}),G3=X("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=d3),je.init(e,r)}),J3=X("$ZodURL",(e,r)=>{je.init(e,r),e._zod.check=n=>{try{const i=n.value.trim(),t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),W3=X("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=p3()),je.init(e,r)}),Y3=X("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=u3),je.init(e,r)}),V3=X("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=i3),je.init(e,r)}),X3=X("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=a3),je.init(e,r)}),K3=X("$ZodULID",(e,r)=>{r.pattern??(r.pattern=o3),je.init(e,r)}),Q3=X("$ZodXID",(e,r)=>{r.pattern??(r.pattern=s3),je.init(e,r)}),e6=X("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=c3),je.init(e,r)}),t6=X("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=$3(r)),je.init(e,r)}),r6=X("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=w3),je.init(e,r)}),n6=X("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=k3(r)),je.init(e,r)}),i6=X("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=l3),je.init(e,r)}),a6=X("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=m3),je.init(e,r),e._zod.bag.format="ipv4"}),o6=X("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=v3),je.init(e,r),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!r.abort})}}}),s6=X("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=g3),je.init(e,r)}),c6=X("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=b3),je.init(e,r),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[t,a]=i;if(!a)throw new Error;const o=Number(a);if(`${o}`!==a)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!r.abort})}}});function Eh(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const u6=X("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=y3),je.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Eh(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!r.abort})}});function l6(e){if(!$h.test(e))return!1;const r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return Eh(n)}const f6=X("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=$h),je.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{l6(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!r.abort})}}),d6=X("$ZodE164",(e,r)=>{r.pattern??(r.pattern=_3),je.init(e,r)});function h6(e,r=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch{return!1}}const p6=X("$ZodJWT",(e,r)=>{je.init(e,r),e._zod.check=n=>{h6(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),Nh=X("$ZodNumber",(e,r)=>{Ze.init(e,r),e._zod.pattern=e._zod.bag.pattern??Ih,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=Number(n.value)}catch{}const t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;const a=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...a?{received:a}:{}}),n}}),m6=X("$ZodNumberFormat",(e,r)=>{N3.init(e,r),Nh.init(e,r)}),v6=X("$ZodBoolean",(e,r)=>{Ze.init(e,r),e._zod.pattern=I3,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch{}const t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),g6=X("$ZodNull",(e,r)=>{Ze.init(e,r),e._zod.pattern=T3,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{const t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),b6=X("$ZodUnknown",(e,r)=>{Ze.init(e,r),e._zod.parse=n=>n}),y6=X("$ZodNever",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Uu(e,r,n){e.issues.length&&r.issues.push(...pr(n,e.issues)),r.value[n]=e.value}const _6=X("$ZodArray",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{const t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);const a=[];for(let o=0;o<t.length;o++){const s=t[o],l=r.element._zod.run({value:s,issues:[]},i);l instanceof Promise?a.push(l.then(d=>Uu(d,n,o))):Uu(l,n,o)}return a.length?Promise.all(a).then(()=>n):n}});function An(e,r,n,i,t){if(e.issues.length){if(t&&!(n in i))return;r.issues.push(...pr(n,e.issues))}e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function Ah(e){var i,t,a,o;const r=Object.keys(e.shape);for(const s of r)if(!((o=(a=(t=(i=e.shape)==null?void 0:i[s])==null?void 0:t._zod)==null?void 0:a.traits)!=null&&o.has("$ZodType")))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);const n=Lb(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)}}function Ph(e,r,n,i,t,a){const o=[],s=t.keySet,l=t.catchall._zod,d=l.def.type,p=l.optout==="optional";for(const m in r){if(s.has(m))continue;if(d==="never"){o.push(m);continue}const f=l.run({value:r[m],issues:[]},i);f instanceof Promise?e.push(f.then(u=>An(u,n,m,r,p))):An(f,n,m,r,p)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:r,inst:a}),e.length?Promise.all(e).then(()=>n):n}const w6=X("$ZodObject",(e,r)=>{Ze.init(e,r);const n=Object.getOwnPropertyDescriptor(r,"shape");if(!(n!=null&&n.get)){const s=r.shape;Object.defineProperty(r,"shape",{get:()=>{const l={...s};return Object.defineProperty(r,"shape",{value:l}),l}})}const i=Gn(()=>Ah(r));Ne(e._zod,"propValues",()=>{const s=r.shape,l={};for(const d in s){const p=s[d]._zod;if(p.values){l[d]??(l[d]=new Set);for(const m of p.values)l[d].add(m)}}return l});const t=Dr,a=r.catchall;let o;e._zod.parse=(s,l)=>{o??(o=i.value);const d=s.value;if(!t(d))return s.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),s;s.value={};const p=[],m=o.shape;for(const f of o.keys){const u=m[f],h=u._zod.optout==="optional",c=u._zod.run({value:d[f],issues:[]},l);c instanceof Promise?p.push(c.then(v=>An(v,s,f,d,h))):An(c,s,f,d,h)}return a?Ph(p,d,s,l,i.value,e):p.length?Promise.all(p).then(()=>s):s}}),k6=X("$ZodObjectJIT",(e,r)=>{w6.init(e,r);const n=e._zod.parse,i=Gn(()=>Ah(r)),t=f=>{var w;const u=new B3(["shape","payload","ctx"]),h=i.value,c=k=>{const $=Ru(k);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};u.write("const input = payload.value;");const v=Object.create(null);let b=0;for(const k of h.keys)v[k]=`key_${b++}`;u.write("const newResult = {};");for(const k of h.keys){const $=v[k],O=Ru(k),P=f[k],y=((w=P==null?void 0:P._zod)==null?void 0:w.optout)==="optional";u.write(`const ${$} = ${c(k)};`),y?u.write(`
|
|
11
|
+
if (${$}.issues.length) {
|
|
12
|
+
if (${O} in input) {
|
|
13
|
+
payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
14
|
+
...iss,
|
|
15
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
16
|
+
})));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (${$}.value === undefined) {
|
|
21
|
+
if (${O} in input) {
|
|
22
|
+
newResult[${O}] = undefined;
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
newResult[${O}] = ${$}.value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
`):u.write(`
|
|
29
|
+
if (${$}.issues.length) {
|
|
30
|
+
payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
31
|
+
...iss,
|
|
32
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
33
|
+
})));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (${$}.value === undefined) {
|
|
37
|
+
if (${O} in input) {
|
|
38
|
+
newResult[${O}] = undefined;
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
newResult[${O}] = ${$}.value;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
`)}u.write("payload.value = newResult;"),u.write("return payload;");const g=u.compile();return(k,$)=>g(f,k,$)};let a;const o=Dr,s=!mh.jitless,d=s&&Db.value,p=r.catchall;let m;e._zod.parse=(f,u)=>{m??(m=i.value);const h=f.value;return o(h)?s&&d&&(u==null?void 0:u.async)===!1&&u.jitless!==!0?(a||(a=t(r.shape)),f=a(f,u),p?Ph([],h,f,u,m,e):f):n(f,u):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f)}});function Zu(e,r,n,i){for(const a of e)if(a.issues.length===0)return r.value=a.value,r;const t=e.filter(a=>!hr(a));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(a=>a.issues.map(o=>Bt(o,i,jt())))}),r)}const Oh=X("$ZodUnion",(e,r)=>{Ze.init(e,r),Ne(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),Ne(e._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){const t=r.options.map(a=>a._zod.pattern);return new RegExp(`^(${t.map(a=>Xs(a.source)).join("|")})$`)}});const n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,a)=>{if(n)return i(t,a);let o=!1;const s=[];for(const l of r.options){const d=l._zod.run({value:t.value,issues:[]},a);if(d instanceof Promise)s.push(d),o=!0;else{if(d.issues.length===0)return d;s.push(d)}}return o?Promise.all(s).then(l=>Zu(l,t,e,a)):Zu(s,t,e,a)}}),$6=X("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,Oh.init(e,r);const n=e._zod.parse;Ne(e._zod,"propValues",()=>{const t={};for(const a of r.options){const o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(const[s,l]of Object.entries(o)){t[s]||(t[s]=new Set);for(const d of l)t[s].add(d)}}return t});const i=Gn(()=>{var o;const t=r.options,a=new Map;for(const s of t){const l=(o=s._zod.propValues)==null?void 0:o[r.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(s)}"`);for(const d of l){if(a.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);a.set(d,s)}}return a});e._zod.parse=(t,a)=>{const o=t.value;if(!Dr(o))return t.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),t;const s=i.value.get(o==null?void 0:o[r.discriminator]);return s?s._zod.run(t,a):r.unionFallback?n(t,a):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:o,path:[r.discriminator],inst:e}),t)}}),x6=X("$ZodIntersection",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{const t=n.value,a=r.left._zod.run({value:t,issues:[]},i),o=r.right._zod.run({value:t,issues:[]},i);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([l,d])=>ju(n,l,d)):ju(n,a,o)}});function js(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(gr(e)&&gr(r)){const n=Object.keys(r),i=Object.keys(e).filter(a=>n.indexOf(a)!==-1),t={...e,...r};for(const a of i){const o=js(e[a],r[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};t[a]=o.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const t=e[i],a=r[i],o=js(t,a);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ju(e,r,n){const i=new Map;let t;for(const s of r.issues)if(s.code==="unrecognized_keys"){t??(t=s);for(const l of s.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(s);for(const s of n.issues)if(s.code==="unrecognized_keys")for(const l of s.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(s);const a=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&t&&e.issues.push({...t,keys:a}),hr(e))return e;const o=js(r.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const S6=X("$ZodRecord",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{const t=n.value;if(!gr(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;const a=[],o=r.keyType._zod.values;if(o){n.value={};const s=new Set;for(const d of o)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){s.add(typeof d=="number"?d.toString():d);const p=r.valueType._zod.run({value:t[d],issues:[]},i);p instanceof Promise?a.push(p.then(m=>{m.issues.length&&n.issues.push(...pr(d,m.issues)),n.value[d]=m.value})):(p.issues.length&&n.issues.push(...pr(d,p.issues)),n.value[d]=p.value)}let l;for(const d in t)s.has(d)||(l=l??[],l.push(d));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{n.value={};for(const s of Reflect.ownKeys(t)){if(s==="__proto__")continue;let l=r.keyType._zod.run({value:s,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Ih.test(s)&&l.issues.length&&l.issues.some(m=>m.code==="invalid_type"&&m.expected==="number")){const m=r.keyType._zod.run({value:Number(s),issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(l=m)}if(l.issues.length){r.mode==="loose"?n.value[s]=t[s]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>Bt(m,i,jt())),input:s,path:[s],inst:e});continue}const p=r.valueType._zod.run({value:t[s],issues:[]},i);p instanceof Promise?a.push(p.then(m=>{m.issues.length&&n.issues.push(...pr(s,m.issues)),n.value[l.value]=m.value})):(p.issues.length&&n.issues.push(...pr(s,p.issues)),n.value[l.value]=p.value)}}return a.length?Promise.all(a).then(()=>n):n}}),I6=X("$ZodEnum",(e,r)=>{Ze.init(e,r);const n=vh(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(t=>Rb.has(typeof t)).map(t=>typeof t=="string"?br(t):t.toString()).join("|")})$`),e._zod.parse=(t,a)=>{const o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),T6=X("$ZodLiteral",(e,r)=>{if(Ze.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(r.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.values.map(i=>typeof i=="string"?br(i):i?br(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,t)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r.values,input:a,inst:e}),i}}),C6=X("$ZodTransform",(e,r)=>{Ze.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ph(e.constructor.name);const t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(o=>(n.value=o,n));if(t instanceof Promise)throw new mr;return n.value=t,n}});function Bu(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const Mh=X("$ZodOptional",(e,r)=>{Ze.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{const n=r.innerType._zod.pattern;return n?new RegExp(`^(${Xs(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>Bu(a,n.value)):Bu(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),z6=X("$ZodExactOptional",(e,r)=>{Mh.init(e,r),Ne(e._zod,"values",()=>r.innerType._zod.values),Ne(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(n,i)=>r.innerType._zod.run(n,i)}),E6=X("$ZodNullable",(e,r)=>{Ze.init(e,r),Ne(e._zod,"optin",()=>r.innerType._zod.optin),Ne(e._zod,"optout",()=>r.innerType._zod.optout),Ne(e._zod,"pattern",()=>{const n=r.innerType._zod.pattern;return n?new RegExp(`^(${Xs(n.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),N6=X("$ZodDefault",(e,r)=>{Ze.init(e,r),e._zod.optin="optional",Ne(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>qu(a,r)):qu(t,r)}});function qu(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const A6=X("$ZodPrefault",(e,r)=>{Ze.init(e,r),e._zod.optin="optional",Ne(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),P6=X("$ZodNonOptional",(e,r)=>{Ze.init(e,r),Ne(e._zod,"values",()=>{const n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>Fu(a,e)):Fu(t,e)}});function Fu(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const O6=X("$ZodCatch",(e,r)=>{Ze.init(e,r),Ne(e._zod,"optin",()=>r.innerType._zod.optin),Ne(e._zod,"optout",()=>r.innerType._zod.optout),Ne(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>(n.value=a.value,a.issues.length&&(n.value=r.catchValue({...n,error:{issues:a.issues.map(o=>Bt(o,i,jt()))},input:n.value}),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue({...n,error:{issues:t.issues.map(a=>Bt(a,i,jt()))},input:n.value}),n.issues=[]),n)}}),M6=X("$ZodPipe",(e,r)=>{Ze.init(e,r),Ne(e._zod,"values",()=>r.in._zod.values),Ne(e._zod,"optin",()=>r.in._zod.optin),Ne(e._zod,"optout",()=>r.out._zod.optout),Ne(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const a=r.out._zod.run(n,i);return a instanceof Promise?a.then(o=>$n(o,r.in,i)):$n(a,r.in,i)}const t=r.in._zod.run(n,i);return t instanceof Promise?t.then(a=>$n(a,r.out,i)):$n(t,r.out,i)}});function $n(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}const D6=X("$ZodReadonly",(e,r)=>{Ze.init(e,r),Ne(e._zod,"propValues",()=>r.innerType._zod.propValues),Ne(e._zod,"values",()=>r.innerType._zod.values),Ne(e._zod,"optin",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optin}),Ne(e._zod,"optout",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optout}),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);const t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(Hu):Hu(t)}});function Hu(e){return e.value=Object.freeze(e.value),e}const R6=X("$ZodCustom",(e,r)=>{ht.init(e,r),Ze.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(a=>Gu(a,n,i,e));Gu(t,n,i,e)}});function Gu(e,r,n,i){if(!e){const t={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),r.issues.push(Rr(t))}}var Ju;class L6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){const i=n[0];return this._map.set(r,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){const n=r._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const t={...i,...this._map.get(r)};return Object.keys(t).length?t:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function U6(){return new L6}(Ju=globalThis).__zod_globalRegistry??(Ju.__zod_globalRegistry=U6());const Or=globalThis.__zod_globalRegistry;function Z6(e,r){return new e({type:"string",...le(r)})}function j6(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...le(r)})}function Wu(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...le(r)})}function B6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...le(r)})}function q6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...le(r)})}function F6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...le(r)})}function H6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...le(r)})}function G6(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...le(r)})}function J6(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...le(r)})}function W6(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...le(r)})}function Y6(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...le(r)})}function V6(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...le(r)})}function X6(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...le(r)})}function K6(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...le(r)})}function Q6(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...le(r)})}function e4(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...le(r)})}function t4(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...le(r)})}function r4(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...le(r)})}function n4(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...le(r)})}function i4(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...le(r)})}function a4(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...le(r)})}function o4(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...le(r)})}function s4(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...le(r)})}function c4(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...le(r)})}function u4(e,r){return new e({type:"string",format:"date",check:"string_format",...le(r)})}function l4(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...le(r)})}function f4(e,r){return new e({type:"string",format:"duration",check:"string_format",...le(r)})}function d4(e,r){return new e({type:"number",checks:[],...le(r)})}function h4(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...le(r)})}function p4(e,r){return new e({type:"boolean",...le(r)})}function m4(e,r){return new e({type:"null",...le(r)})}function v4(e){return new e({type:"unknown"})}function g4(e,r){return new e({type:"never",...le(r)})}function Yu(e,r){return new Ch({check:"less_than",...le(r),value:e,inclusive:!1})}function Wi(e,r){return new Ch({check:"less_than",...le(r),value:e,inclusive:!0})}function Vu(e,r){return new zh({check:"greater_than",...le(r),value:e,inclusive:!1})}function Yi(e,r){return new zh({check:"greater_than",...le(r),value:e,inclusive:!0})}function Xu(e,r){return new E3({check:"multiple_of",...le(r),value:e})}function Dh(e,r){return new A3({check:"max_length",...le(r),maximum:e})}function Pn(e,r){return new P3({check:"min_length",...le(r),minimum:e})}function Rh(e,r){return new O3({check:"length_equals",...le(r),length:e})}function b4(e,r){return new M3({check:"string_format",format:"regex",...le(r),pattern:e})}function y4(e){return new D3({check:"string_format",format:"lowercase",...le(e)})}function _4(e){return new R3({check:"string_format",format:"uppercase",...le(e)})}function w4(e,r){return new L3({check:"string_format",format:"includes",...le(r),includes:e})}function k4(e,r){return new U3({check:"string_format",format:"starts_with",...le(r),prefix:e})}function $4(e,r){return new Z3({check:"string_format",format:"ends_with",...le(r),suffix:e})}function Tr(e){return new j3({check:"overwrite",tx:e})}function x4(e){return Tr(r=>r.normalize(e))}function S4(){return Tr(e=>e.trim())}function I4(){return Tr(e=>e.toLowerCase())}function T4(){return Tr(e=>e.toUpperCase())}function C4(){return Tr(e=>Mb(e))}function z4(e,r,n){return new e({type:"array",element:r,...le(n)})}function E4(e,r,n){const i=le(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:r,...i})}function N4(e,r,n){return new e({type:"custom",check:"custom",fn:r,...le(n)})}function A4(e){const r=P4(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Rr(i,n.value,r._zod.def));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=r),t.continue??(t.continue=!r._zod.def.abort),n.issues.push(Rr(t))}},e(n.value,n)));return r}function P4(e,r){const n=new ht({check:"custom",...le(r)});return n._zod.check=e,n}function Lh(e){let r=(e==null?void 0:e.target)??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Or,target:r,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Xe(e,r,n={path:[],schemaPath:[]}){var p,m;var i;const t=e._zod.def,a=r.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(e,o);const s=(m=(p=e._zod).toJSONSchema)==null?void 0:m.call(p);if(s)o.schema=s;else{const f={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,o.schema,f);else{const h=o.schema,c=r.processors[t.type];if(!c)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);c(e,r,h,f)}const u=e._zod.parent;u&&(o.ref||(o.ref=u),Xe(u,r,f),r.seen.get(u).isParent=!0)}const l=r.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),r.io==="input"&&ut(e)&&(delete o.schema.examples,delete o.schema.default),r.io==="input"&&o.schema._prefault&&((i=o.schema).default??(i.default=o.schema._prefault)),delete o.schema._prefault,r.seen.get(e).schema}function Uh(e,r){var o,s,l,d;const n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const p of e.seen.entries()){const m=(o=e.metadataRegistry.get(p[0]))==null?void 0:o.id;if(m){const f=i.get(m);if(f&&f!==p[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(m,p[0])}}const t=p=>{var c;const m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(c=e.external.registry.get(p[0]))==null?void 0:c.id,b=e.external.uri??(w=>w);if(v)return{ref:b(v)};const g=p[1].defId??p[1].schema.id??`schema${e.counter++}`;return p[1].defId=g,{defId:g,ref:`${b("__shared")}#/${m}/${g}`}}if(p[1]===n)return{ref:"#"};const u=`#/${m}/`,h=p[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:u+h}},a=p=>{if(p[1].schema.$ref)return;const m=p[1],{ref:f,defId:u}=t(p);m.def={...m.schema},u&&(m.defId=u);const h=m.schema;for(const c in h)delete h[c];h.$ref=f};if(e.cycles==="throw")for(const p of e.seen.entries()){const m=p[1];if(m.cycle)throw new Error(`Cycle detected: #/${(s=m.cycle)==null?void 0:s.join("/")}/<root>
|
|
45
|
+
|
|
46
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const p of e.seen.entries()){const m=p[1];if(r===p[0]){a(p);continue}if(e.external){const u=(l=e.external.registry.get(p[0]))==null?void 0:l.id;if(r!==p[0]&&u){a(p);continue}}if((d=e.metadataRegistry.get(p[0]))==null?void 0:d.id){a(p);continue}if(m.cycle){a(p);continue}if(m.count>1&&e.reused==="ref"){a(p);continue}}}function Zh(e,r){var o,s,l;const n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=d=>{const p=e.seen.get(d);if(p.ref===null)return;const m=p.def??p.schema,f={...m},u=p.ref;if(p.ref=null,u){i(u);const c=e.seen.get(u),v=c.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(v)):Object.assign(m,v),Object.assign(m,f),d._zod.parent===u)for(const g in m)g==="$ref"||g==="allOf"||g in f||delete m[g];if(v.$ref)for(const g in m)g==="$ref"||g==="allOf"||g in c.def&&JSON.stringify(m[g])===JSON.stringify(c.def[g])&&delete m[g]}const h=d._zod.parent;if(h&&h!==u){i(h);const c=e.seen.get(h);if(c!=null&&c.schema.$ref&&(m.$ref=c.schema.$ref,c.def))for(const v in m)v==="$ref"||v==="allOf"||v in c.def&&JSON.stringify(m[v])===JSON.stringify(c.def[v])&&delete m[v]}e.override({zodSchema:d,jsonSchema:m,path:p.path??[]})};for(const d of[...e.seen.entries()].reverse())i(d[0]);const t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,(o=e.external)!=null&&o.uri){const d=(s=e.external.registry.get(r))==null?void 0:s.id;if(!d)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(d)}Object.assign(t,n.def??n.schema);const a=((l=e.external)==null?void 0:l.defs)??{};for(const d of e.seen.entries()){const p=d[1];p.def&&p.defId&&(a[p.defId]=p.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{const d=JSON.parse(JSON.stringify(t));return Object.defineProperty(d,"~standard",{value:{...r["~standard"],jsonSchema:{input:On(r,"input",e.processors),output:On(r,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function ut(e,r){const n=r??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return ut(i.element,n);if(i.type==="set")return ut(i.valueType,n);if(i.type==="lazy")return ut(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return ut(i.innerType,n);if(i.type==="intersection")return ut(i.left,n)||ut(i.right,n);if(i.type==="record"||i.type==="map")return ut(i.keyType,n)||ut(i.valueType,n);if(i.type==="pipe")return ut(i.in,n)||ut(i.out,n);if(i.type==="object"){for(const t in i.shape)if(ut(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(const t of i.options)if(ut(t,n))return!0;return!1}if(i.type==="tuple"){for(const t of i.items)if(ut(t,n))return!0;return!!(i.rest&&ut(i.rest,n))}return!1}const O4=(e,r={})=>n=>{const i=Lh({...n,processors:r});return Xe(e,i),Uh(i,e),Zh(i,e)},On=(e,r,n={})=>i=>{const{libraryOptions:t,target:a}=i??{},o=Lh({...t??{},target:a,io:r,processors:n});return Xe(e,o),Uh(o,e),Zh(o,e)},M4={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},D4=(e,r,n,i)=>{const t=n;t.type="string";const{minimum:a,maximum:o,format:s,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof a=="number"&&(t.minLength=a),typeof o=="number"&&(t.maxLength=o),s&&(t.format=M4[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),d&&(t.contentEncoding=d),l&&l.size>0){const p=[...l];p.length===1?t.pattern=p[0].source:p.length>1&&(t.allOf=[...p.map(m=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},R4=(e,r,n,i)=>{const t=n,{minimum:a,maximum:o,format:s,multipleOf:l,exclusiveMaximum:d,exclusiveMinimum:p}=e._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number",typeof p=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.minimum=p,t.exclusiveMinimum=!0):t.exclusiveMinimum=p),typeof a=="number"&&(t.minimum=a,typeof p=="number"&&r.target!=="draft-04"&&(p>=a?delete t.minimum:delete t.exclusiveMinimum)),typeof d=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.maximum=d,t.exclusiveMaximum=!0):t.exclusiveMaximum=d),typeof o=="number"&&(t.maximum=o,typeof d=="number"&&r.target!=="draft-04"&&(d<=o?delete t.maximum:delete t.exclusiveMaximum)),typeof l=="number"&&(t.multipleOf=l)},L4=(e,r,n,i)=>{n.type="boolean"},U4=(e,r,n,i)=>{r.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Z4=(e,r,n,i)=>{n.not={}},j4=(e,r,n,i)=>{},B4=(e,r,n,i)=>{const t=e._zod.def,a=vh(t.entries);a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),n.enum=a},q4=(e,r,n,i)=>{const t=e._zod.def,a=[];for(const o of t.values)if(o===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){const o=a[0];n.type=o===null?"null":typeof o,r.target==="draft-04"||r.target==="openapi-3.0"?n.enum=[o]:n.const=o}else a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),a.every(o=>typeof o=="boolean")&&(n.type="boolean"),a.every(o=>o===null)&&(n.type="null"),n.enum=a},F4=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},H4=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},G4=(e,r,n,i)=>{const t=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o=="number"&&(t.minItems=o),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=Xe(a.element,r,{...i,path:[...i.path,"items"]})},J4=(e,r,n,i)=>{var d;const t=n,a=e._zod.def;t.type="object",t.properties={};const o=a.shape;for(const p in o)t.properties[p]=Xe(o[p],r,{...i,path:[...i.path,"properties",p]});const s=new Set(Object.keys(o)),l=new Set([...s].filter(p=>{const m=a.shape[p]._zod;return r.io==="input"?m.optin===void 0:m.optout===void 0}));l.size>0&&(t.required=Array.from(l)),((d=a.catchall)==null?void 0:d._zod.def.type)==="never"?t.additionalProperties=!1:a.catchall?a.catchall&&(t.additionalProperties=Xe(a.catchall,r,{...i,path:[...i.path,"additionalProperties"]})):r.io==="output"&&(t.additionalProperties=!1)},W4=(e,r,n,i)=>{const t=e._zod.def,a=t.inclusive===!1,o=t.options.map((s,l)=>Xe(s,r,{...i,path:[...i.path,a?"oneOf":"anyOf",l]}));a?n.oneOf=o:n.anyOf=o},Y4=(e,r,n,i)=>{const t=e._zod.def,a=Xe(t.left,r,{...i,path:[...i.path,"allOf",0]}),o=Xe(t.right,r,{...i,path:[...i.path,"allOf",1]}),s=d=>"allOf"in d&&Object.keys(d).length===1,l=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=l},V4=(e,r,n,i)=>{const t=n,a=e._zod.def;t.type="object";const o=a.keyType,s=o._zod.bag,l=s==null?void 0:s.patterns;if(a.mode==="loose"&&l&&l.size>0){const p=Xe(a.valueType,r,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(const m of l)t.patternProperties[m.source]=p}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(t.propertyNames=Xe(a.keyType,r,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=Xe(a.valueType,r,{...i,path:[...i.path,"additionalProperties"]});const d=o._zod.values;if(d){const p=[...d].filter(m=>typeof m=="string"||typeof m=="number");p.length>0&&(t.required=p)}},X4=(e,r,n,i)=>{const t=e._zod.def,a=Xe(t.innerType,r,i),o=r.seen.get(e);r.target==="openapi-3.0"?(o.ref=t.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},K4=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType},Q4=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},ey=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType,r.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},ty=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType;let o;try{o=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},ry=(e,r,n,i)=>{const t=e._zod.def,a=r.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;Xe(a,r,i);const o=r.seen.get(e);o.ref=a},ny=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType,n.readOnly=!0},jh=(e,r,n,i)=>{const t=e._zod.def;Xe(t.innerType,r,i);const a=r.seen.get(e);a.ref=t.innerType};function r0(e){return!!e._zod}function Bh(e,r){return r0(e)?kh(e,r):e.safeParse(r)}function iy(e){var n,i;if(!e)return;let r;if(r0(e)?r=(i=(n=e._zod)==null?void 0:n.def)==null?void 0:i.shape:r=e.shape,!!r){if(typeof r=="function")try{return r()}catch{return}return r}}function ay(e){var t;if(r0(e)){const o=(t=e._zod)==null?void 0:t.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const i=e.value;if(i!==void 0)return i}const oy=X("ZodISODateTime",(e,r)=>{t6.init(e,r),Je.init(e,r)});function qh(e){return c4(oy,e)}const sy=X("ZodISODate",(e,r)=>{r6.init(e,r),Je.init(e,r)});function cy(e){return u4(sy,e)}const uy=X("ZodISOTime",(e,r)=>{n6.init(e,r),Je.init(e,r)});function ly(e){return l4(uy,e)}const fy=X("ZodISODuration",(e,r)=>{i6.init(e,r),Je.init(e,r)});function dy(e){return f4(fy,e)}const hy=(e,r)=>{_h.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Wb(e,n)},flatten:{value:n=>Jb(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Zs,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Zs,2)}},isEmpty:{get(){return e.issues.length===0}}})},$t=X("ZodError",hy,{Parent:Error}),py=Qs($t),my=e0($t),vy=Jn($t),gy=Wn($t),by=Vb($t),yy=Xb($t),_y=Kb($t),wy=Qb($t),ky=e3($t),$y=t3($t),xy=r3($t),Sy=n3($t),Be=X("ZodType",(e,r)=>(Ze.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:On(e,"input"),output:On(e,"output")}}),e.toJSONSchema=O4(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>e.clone(Gt(r,{checks:[...r.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Jt(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>py(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>vy(e,n,i),e.parseAsync=async(n,i)=>my(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>gy(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>by(e,n,i),e.decode=(n,i)=>yy(e,n,i),e.encodeAsync=async(n,i)=>_y(e,n,i),e.decodeAsync=async(n,i)=>wy(e,n,i),e.safeEncode=(n,i)=>ky(e,n,i),e.safeDecode=(n,i)=>$y(e,n,i),e.safeEncodeAsync=async(n,i)=>xy(e,n,i),e.safeDecodeAsync=async(n,i)=>Sy(e,n,i),e.refine=(n,i)=>e.check(v5(n,i)),e.superRefine=n=>e.check(g5(n)),e.overwrite=n=>e.check(Tr(n)),e.optional=()=>Ve(e),e.exactOptional=()=>n5(e),e.nullable=()=>el(e),e.nullish=()=>Ve(el(e)),e.nonoptional=n=>u5(e,n),e.array=()=>ze(e),e.or=n=>Ue([e,n]),e.and=n=>n0(e,n),e.transform=n=>qs(e,Vh(n)),e.default=n=>o5(e,n),e.prefault=n=>c5(e,n),e.catch=n=>f5(e,n),e.pipe=n=>qs(e,n),e.readonly=()=>p5(e),e.describe=n=>{const i=e.clone();return Or.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=Or.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Or.get(e);const i=e.clone();return Or.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Fh=X("_ZodString",(e,r)=>{t0.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(i,t,a)=>D4(e,i,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(b4(...i)),e.includes=(...i)=>e.check(w4(...i)),e.startsWith=(...i)=>e.check(k4(...i)),e.endsWith=(...i)=>e.check($4(...i)),e.min=(...i)=>e.check(Pn(...i)),e.max=(...i)=>e.check(Dh(...i)),e.length=(...i)=>e.check(Rh(...i)),e.nonempty=(...i)=>e.check(Pn(1,...i)),e.lowercase=i=>e.check(y4(i)),e.uppercase=i=>e.check(_4(i)),e.trim=()=>e.check(S4()),e.normalize=(...i)=>e.check(x4(...i)),e.toLowerCase=()=>e.check(I4()),e.toUpperCase=()=>e.check(T4()),e.slugify=()=>e.check(C4())}),Iy=X("ZodString",(e,r)=>{t0.init(e,r),Fh.init(e,r),e.email=n=>e.check(j6(Ty,n)),e.url=n=>e.check(G6(Cy,n)),e.jwt=n=>e.check(s4(qy,n)),e.emoji=n=>e.check(J6(zy,n)),e.guid=n=>e.check(Wu(Ku,n)),e.uuid=n=>e.check(B6(xn,n)),e.uuidv4=n=>e.check(q6(xn,n)),e.uuidv6=n=>e.check(F6(xn,n)),e.uuidv7=n=>e.check(H6(xn,n)),e.nanoid=n=>e.check(W6(Ey,n)),e.guid=n=>e.check(Wu(Ku,n)),e.cuid=n=>e.check(Y6(Ny,n)),e.cuid2=n=>e.check(V6(Ay,n)),e.ulid=n=>e.check(X6(Py,n)),e.base64=n=>e.check(i4(Zy,n)),e.base64url=n=>e.check(a4(jy,n)),e.xid=n=>e.check(K6(Oy,n)),e.ksuid=n=>e.check(Q6(My,n)),e.ipv4=n=>e.check(e4(Dy,n)),e.ipv6=n=>e.check(t4(Ry,n)),e.cidrv4=n=>e.check(r4(Ly,n)),e.cidrv6=n=>e.check(n4(Uy,n)),e.e164=n=>e.check(o4(By,n)),e.datetime=n=>e.check(qh(n)),e.date=n=>e.check(cy(n)),e.time=n=>e.check(ly(n)),e.duration=n=>e.check(dy(n))});function J(e){return Z6(Iy,e)}const Je=X("ZodStringFormat",(e,r)=>{je.init(e,r),Fh.init(e,r)}),Ty=X("ZodEmail",(e,r)=>{G3.init(e,r),Je.init(e,r)}),Ku=X("ZodGUID",(e,r)=>{F3.init(e,r),Je.init(e,r)}),xn=X("ZodUUID",(e,r)=>{H3.init(e,r),Je.init(e,r)}),Cy=X("ZodURL",(e,r)=>{J3.init(e,r),Je.init(e,r)}),zy=X("ZodEmoji",(e,r)=>{W3.init(e,r),Je.init(e,r)}),Ey=X("ZodNanoID",(e,r)=>{Y3.init(e,r),Je.init(e,r)}),Ny=X("ZodCUID",(e,r)=>{V3.init(e,r),Je.init(e,r)}),Ay=X("ZodCUID2",(e,r)=>{X3.init(e,r),Je.init(e,r)}),Py=X("ZodULID",(e,r)=>{K3.init(e,r),Je.init(e,r)}),Oy=X("ZodXID",(e,r)=>{Q3.init(e,r),Je.init(e,r)}),My=X("ZodKSUID",(e,r)=>{e6.init(e,r),Je.init(e,r)}),Dy=X("ZodIPv4",(e,r)=>{a6.init(e,r),Je.init(e,r)}),Ry=X("ZodIPv6",(e,r)=>{o6.init(e,r),Je.init(e,r)}),Ly=X("ZodCIDRv4",(e,r)=>{s6.init(e,r),Je.init(e,r)}),Uy=X("ZodCIDRv6",(e,r)=>{c6.init(e,r),Je.init(e,r)}),Zy=X("ZodBase64",(e,r)=>{u6.init(e,r),Je.init(e,r)}),jy=X("ZodBase64URL",(e,r)=>{f6.init(e,r),Je.init(e,r)}),By=X("ZodE164",(e,r)=>{d6.init(e,r),Je.init(e,r)}),qy=X("ZodJWT",(e,r)=>{p6.init(e,r),Je.init(e,r)}),Hh=X("ZodNumber",(e,r)=>{Nh.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(i,t,a)=>R4(e,i,t),e.gt=(i,t)=>e.check(Vu(i,t)),e.gte=(i,t)=>e.check(Yi(i,t)),e.min=(i,t)=>e.check(Yi(i,t)),e.lt=(i,t)=>e.check(Yu(i,t)),e.lte=(i,t)=>e.check(Wi(i,t)),e.max=(i,t)=>e.check(Wi(i,t)),e.int=i=>e.check(Qu(i)),e.safe=i=>e.check(Qu(i)),e.positive=i=>e.check(Vu(0,i)),e.nonnegative=i=>e.check(Yi(0,i)),e.negative=i=>e.check(Yu(0,i)),e.nonpositive=i=>e.check(Wi(0,i)),e.multipleOf=(i,t)=>e.check(Xu(i,t)),e.step=(i,t)=>e.check(Xu(i,t)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Pe(e){return d4(Hh,e)}const Fy=X("ZodNumberFormat",(e,r)=>{m6.init(e,r),Hh.init(e,r)});function Qu(e){return h4(Fy,e)}const Hy=X("ZodBoolean",(e,r)=>{v6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>L4(e,n,i)});function Qe(e){return p4(Hy,e)}const Gy=X("ZodNull",(e,r)=>{g6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>U4(e,n,i)});function Gh(e){return m4(Gy,e)}const Jy=X("ZodUnknown",(e,r)=>{b6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>j4()});function He(){return v4(Jy)}const Wy=X("ZodNever",(e,r)=>{y6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Z4(e,n,i)});function Yy(e){return g4(Wy,e)}const Vy=X("ZodArray",(e,r)=>{_6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>G4(e,n,i,t),e.element=r.element,e.min=(n,i)=>e.check(Pn(n,i)),e.nonempty=n=>e.check(Pn(1,n)),e.max=(n,i)=>e.check(Dh(n,i)),e.length=(n,i)=>e.check(Rh(n,i)),e.unwrap=()=>e.element});function ze(e,r){return z4(Vy,e,r)}const Jh=X("ZodObject",(e,r)=>{k6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>J4(e,n,i,t),Ne(e,"shape",()=>r.shape),e.keyof=()=>vt(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:He()}),e.loose=()=>e.clone({...e._zod.def,catchall:He()}),e.strict=()=>e.clone({...e._zod.def,catchall:Yy()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Bb(e,n),e.safeExtend=n=>qb(e,n),e.merge=n=>Fb(e,n),e.pick=n=>Zb(e,n),e.omit=n=>jb(e,n),e.partial=(...n)=>Hb(Xh,e,n[0]),e.required=(...n)=>Gb(Kh,e,n[0])});function se(e,r){const n={type:"object",shape:e??{},...le(r)};return new Jh(n)}function dt(e,r){return new Jh({type:"object",shape:e,catchall:He(),...le(r)})}const Wh=X("ZodUnion",(e,r)=>{Oh.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>W4(e,n,i,t),e.options=r.options});function Ue(e,r){return new Wh({type:"union",options:e,...le(r)})}const Xy=X("ZodDiscriminatedUnion",(e,r)=>{Wh.init(e,r),$6.init(e,r)});function Yh(e,r,n){return new Xy({type:"union",options:r,discriminator:e,...le(n)})}const Ky=X("ZodIntersection",(e,r)=>{x6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Y4(e,n,i,t)});function n0(e,r){return new Ky({type:"intersection",left:e,right:r})}const Qy=X("ZodRecord",(e,r)=>{S6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>V4(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType});function Ge(e,r,n){return new Qy({type:"record",keyType:e,valueType:r,...le(n)})}const Bs=X("ZodEnum",(e,r)=>{I6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(i,t,a)=>B4(e,i,t),e.enum=r.entries,e.options=Object.values(r.entries);const n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{const a={};for(const o of i)if(n.has(o))a[o]=r.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Bs({...r,checks:[],...le(t),entries:a})},e.exclude=(i,t)=>{const a={...r.entries};for(const o of i)if(n.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new Bs({...r,checks:[],...le(t),entries:a})}});function vt(e,r){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Bs({type:"enum",entries:n,...le(r)})}const e5=X("ZodLiteral",(e,r)=>{T6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>q4(e,n,i),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function de(e,r){return new e5({type:"literal",values:Array.isArray(e)?e:[e],...le(r)})}const t5=X("ZodTransform",(e,r)=>{C6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>H4(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ph(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Rr(a,n.value,r));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(Rr(o))}};const t=r.transform(n.value,n);return t instanceof Promise?t.then(a=>(n.value=a,n)):(n.value=t,n)}});function Vh(e){return new t5({type:"transform",transform:e})}const Xh=X("ZodOptional",(e,r)=>{Mh.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>jh(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Ve(e){return new Xh({type:"optional",innerType:e})}const r5=X("ZodExactOptional",(e,r)=>{z6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>jh(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function n5(e){return new r5({type:"optional",innerType:e})}const i5=X("ZodNullable",(e,r)=>{E6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>X4(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function el(e){return new i5({type:"nullable",innerType:e})}const a5=X("ZodDefault",(e,r)=>{N6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Q4(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function o5(e,r){return new a5({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():bh(r)}})}const s5=X("ZodPrefault",(e,r)=>{A6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ey(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function c5(e,r){return new s5({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():bh(r)}})}const Kh=X("ZodNonOptional",(e,r)=>{P6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>K4(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function u5(e,r){return new Kh({type:"nonoptional",innerType:e,...le(r)})}const l5=X("ZodCatch",(e,r)=>{O6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ty(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function f5(e,r){return new l5({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const d5=X("ZodPipe",(e,r)=>{M6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ry(e,n,i,t),e.in=r.in,e.out=r.out});function qs(e,r){return new d5({type:"pipe",in:e,out:r})}const h5=X("ZodReadonly",(e,r)=>{D6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ny(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function p5(e){return new h5({type:"readonly",innerType:e})}const Qh=X("ZodCustom",(e,r)=>{R6.init(e,r),Be.init(e,r),e._zod.processJSONSchema=(n,i,t)=>F4(e,n)});function m5(e,r){return E4(Qh,e??(()=>!0),r)}function v5(e,r={}){return N4(Qh,e,r)}function g5(e){return A4(e)}function e1(e,r){return qs(Vh(e),r)}const er="io.modelcontextprotocol/related-task",Vn="2.0",et=m5(e=>e!==null&&(typeof e=="object"||typeof e=="function")),t1=Ue([J(),Pe().int()]),r1=J();dt({ttl:Ue([Pe(),Gh()]).optional(),pollInterval:Pe().optional()});const b5=se({ttl:Pe().optional()}),y5=se({taskId:J()}),i0=dt({progressToken:t1.optional(),[er]:y5.optional()}),gt=se({_meta:i0.optional()}),qr=gt.extend({task:b5.optional()}),_5=e=>qr.safeParse(e).success,tt=se({method:J(),params:gt.loose().optional()}),xt=se({_meta:i0.optional()}),St=se({method:J(),params:xt.loose().optional()}),rt=dt({_meta:i0.optional()}),Fr=Ue([J(),Pe().int()]),n1=se({jsonrpc:de(Vn),id:Fr,...tt.shape}).strict(),tl=e=>n1.safeParse(e).success,i1=se({jsonrpc:de(Vn),...St.shape}).strict(),w5=e=>i1.safeParse(e).success,a0=se({jsonrpc:de(Vn),id:Fr,result:rt}).strict(),Sn=e=>a0.safeParse(e).success;var Ae;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ae||(Ae={}));const o0=se({jsonrpc:de(Vn),id:Fr.optional(),error:se({code:Pe().int(),message:J(),data:He().optional()})}).strict(),k5=e=>o0.safeParse(e).success,$5=Ue([n1,i1,a0,o0]);Ue([a0,o0]);const s0=rt.strict(),x5=xt.extend({requestId:Fr.optional(),reason:J().optional()}),c0=St.extend({method:de("notifications/cancelled"),params:x5}),S5=se({src:J(),mimeType:J().optional(),sizes:ze(J()).optional(),theme:vt(["light","dark"]).optional()}),Hr=se({icons:ze(S5).optional()}),yr=se({name:J(),title:J().optional()}),Xn=yr.extend({...yr.shape,...Hr.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),I5=n0(se({applyDefaults:Qe().optional()}),Ge(J(),He())),T5=e1(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,n0(se({form:I5.optional(),url:et.optional()}),Ge(J(),He()).optional())),C5=dt({list:et.optional(),cancel:et.optional(),requests:dt({sampling:dt({createMessage:et.optional()}).optional(),elicitation:dt({create:et.optional()}).optional()}).optional()}),z5=dt({list:et.optional(),cancel:et.optional(),requests:dt({tools:dt({call:et.optional()}).optional()}).optional()}),E5=se({experimental:Ge(J(),et).optional(),sampling:se({context:et.optional(),tools:et.optional()}).optional(),elicitation:T5.optional(),roots:se({listChanged:Qe().optional()}).optional(),tasks:C5.optional()}),N5=gt.extend({protocolVersion:J(),capabilities:E5,clientInfo:Xn}),A5=tt.extend({method:de("initialize"),params:N5}),P5=se({experimental:Ge(J(),et).optional(),logging:et.optional(),completions:et.optional(),prompts:se({listChanged:Qe().optional()}).optional(),resources:se({subscribe:Qe().optional(),listChanged:Qe().optional()}).optional(),tools:se({listChanged:Qe().optional()}).optional(),tasks:z5.optional()}),O5=rt.extend({protocolVersion:J(),capabilities:P5,serverInfo:Xn,instructions:J().optional()}),M5=St.extend({method:de("notifications/initialized"),params:xt.optional()}),Kn=tt.extend({method:de("ping"),params:gt.optional()}),D5=se({progress:Pe(),total:Ve(Pe()),message:Ve(J())}),R5=se({...xt.shape,...D5.shape,progressToken:t1}),u0=St.extend({method:de("notifications/progress"),params:R5}),L5=gt.extend({cursor:r1.optional()}),Gr=tt.extend({params:L5.optional()}),Jr=rt.extend({nextCursor:r1.optional()}),U5=vt(["working","input_required","completed","failed","cancelled"]),Wr=se({taskId:J(),status:U5,ttl:Ue([Pe(),Gh()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:Ve(Pe()),statusMessage:Ve(J())}),l0=rt.extend({task:Wr}),Z5=xt.merge(Wr),Mn=St.extend({method:de("notifications/tasks/status"),params:Z5}),f0=tt.extend({method:de("tasks/get"),params:gt.extend({taskId:J()})}),d0=rt.merge(Wr),h0=tt.extend({method:de("tasks/result"),params:gt.extend({taskId:J()})});rt.loose();const p0=Gr.extend({method:de("tasks/list")}),m0=Jr.extend({tasks:ze(Wr)}),v0=tt.extend({method:de("tasks/cancel"),params:gt.extend({taskId:J()})}),j5=rt.merge(Wr),a1=se({uri:J(),mimeType:Ve(J()),_meta:Ge(J(),He()).optional()}),o1=a1.extend({text:J()}),g0=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),s1=a1.extend({blob:g0}),Yr=vt(["user","assistant"]),Cr=se({audience:ze(Yr).optional(),priority:Pe().min(0).max(1).optional(),lastModified:qh({offset:!0}).optional()}),c1=se({...yr.shape,...Hr.shape,uri:J(),description:Ve(J()),mimeType:Ve(J()),annotations:Cr.optional(),_meta:Ve(dt({}))}),B5=se({...yr.shape,...Hr.shape,uriTemplate:J(),description:Ve(J()),mimeType:Ve(J()),annotations:Cr.optional(),_meta:Ve(dt({}))}),q5=Gr.extend({method:de("resources/list")}),F5=Jr.extend({resources:ze(c1)}),H5=Gr.extend({method:de("resources/templates/list")}),G5=Jr.extend({resourceTemplates:ze(B5)}),b0=gt.extend({uri:J()}),J5=b0,W5=tt.extend({method:de("resources/read"),params:J5}),Y5=rt.extend({contents:ze(Ue([o1,s1]))}),V5=St.extend({method:de("notifications/resources/list_changed"),params:xt.optional()}),X5=b0,K5=tt.extend({method:de("resources/subscribe"),params:X5}),Q5=b0,e_=tt.extend({method:de("resources/unsubscribe"),params:Q5}),t_=xt.extend({uri:J()}),r_=St.extend({method:de("notifications/resources/updated"),params:t_}),n_=se({name:J(),description:Ve(J()),required:Ve(Qe())}),i_=se({...yr.shape,...Hr.shape,description:Ve(J()),arguments:Ve(ze(n_)),_meta:Ve(dt({}))}),a_=Gr.extend({method:de("prompts/list")}),o_=Jr.extend({prompts:ze(i_)}),s_=gt.extend({name:J(),arguments:Ge(J(),J()).optional()}),c_=tt.extend({method:de("prompts/get"),params:s_}),y0=se({type:de("text"),text:J(),annotations:Cr.optional(),_meta:Ge(J(),He()).optional()}),_0=se({type:de("image"),data:g0,mimeType:J(),annotations:Cr.optional(),_meta:Ge(J(),He()).optional()}),w0=se({type:de("audio"),data:g0,mimeType:J(),annotations:Cr.optional(),_meta:Ge(J(),He()).optional()}),u_=se({type:de("tool_use"),name:J(),id:J(),input:Ge(J(),He()),_meta:Ge(J(),He()).optional()}),l_=se({type:de("resource"),resource:Ue([o1,s1]),annotations:Cr.optional(),_meta:Ge(J(),He()).optional()}),f_=c1.extend({type:de("resource_link")}),Vr=Ue([y0,_0,w0,f_,l_]),d_=se({role:Yr,content:Vr}),h_=rt.extend({description:J().optional(),messages:ze(d_)}),p_=St.extend({method:de("notifications/prompts/list_changed"),params:xt.optional()}),m_=se({title:J().optional(),readOnlyHint:Qe().optional(),destructiveHint:Qe().optional(),idempotentHint:Qe().optional(),openWorldHint:Qe().optional()}),v_=se({taskSupport:vt(["required","optional","forbidden"]).optional()}),k0=se({...yr.shape,...Hr.shape,description:J().optional(),inputSchema:se({type:de("object"),properties:Ge(J(),et).optional(),required:ze(J()).optional()}).catchall(He()),outputSchema:se({type:de("object"),properties:Ge(J(),et).optional(),required:ze(J()).optional()}).catchall(He()).optional(),annotations:m_.optional(),execution:v_.optional(),_meta:Ge(J(),He()).optional()}),u1=Gr.extend({method:de("tools/list")}),g_=Jr.extend({tools:ze(k0)}),Qn=rt.extend({content:ze(Vr).default([]),structuredContent:Ge(J(),He()).optional(),isError:Qe().optional()});Qn.or(rt.extend({toolResult:He()}));const b_=qr.extend({name:J(),arguments:Ge(J(),He()).optional()}),l1=tt.extend({method:de("tools/call"),params:b_}),y_=St.extend({method:de("notifications/tools/list_changed"),params:xt.optional()});se({autoRefresh:Qe().default(!0),debounceMs:Pe().int().nonnegative().default(300)});const f1=vt(["debug","info","notice","warning","error","critical","alert","emergency"]),__=gt.extend({level:f1}),w_=tt.extend({method:de("logging/setLevel"),params:__}),k_=xt.extend({level:f1,logger:J().optional(),data:He()}),$_=St.extend({method:de("notifications/message"),params:k_}),x_=se({name:J().optional()}),S_=se({hints:ze(x_).optional(),costPriority:Pe().min(0).max(1).optional(),speedPriority:Pe().min(0).max(1).optional(),intelligencePriority:Pe().min(0).max(1).optional()}),I_=se({mode:vt(["auto","required","none"]).optional()}),T_=se({type:de("tool_result"),toolUseId:J().describe("The unique identifier for the corresponding tool call."),content:ze(Vr).default([]),structuredContent:se({}).loose().optional(),isError:Qe().optional(),_meta:Ge(J(),He()).optional()}),C_=Yh("type",[y0,_0,w0]),Dn=Yh("type",[y0,_0,w0,u_,T_]),z_=se({role:Yr,content:Ue([Dn,ze(Dn)]),_meta:Ge(J(),He()).optional()}),E_=qr.extend({messages:ze(z_),modelPreferences:S_.optional(),systemPrompt:J().optional(),includeContext:vt(["none","thisServer","allServers"]).optional(),temperature:Pe().optional(),maxTokens:Pe().int(),stopSequences:ze(J()).optional(),metadata:et.optional(),tools:ze(k0).optional(),toolChoice:I_.optional()}),N_=tt.extend({method:de("sampling/createMessage"),params:E_}),A_=rt.extend({model:J(),stopReason:Ve(vt(["endTurn","stopSequence","maxTokens"]).or(J())),role:Yr,content:C_}),P_=rt.extend({model:J(),stopReason:Ve(vt(["endTurn","stopSequence","maxTokens","toolUse"]).or(J())),role:Yr,content:Ue([Dn,ze(Dn)])}),O_=se({type:de("boolean"),title:J().optional(),description:J().optional(),default:Qe().optional()}),M_=se({type:de("string"),title:J().optional(),description:J().optional(),minLength:Pe().optional(),maxLength:Pe().optional(),format:vt(["email","uri","date","date-time"]).optional(),default:J().optional()}),D_=se({type:vt(["number","integer"]),title:J().optional(),description:J().optional(),minimum:Pe().optional(),maximum:Pe().optional(),default:Pe().optional()}),R_=se({type:de("string"),title:J().optional(),description:J().optional(),enum:ze(J()),default:J().optional()}),L_=se({type:de("string"),title:J().optional(),description:J().optional(),oneOf:ze(se({const:J(),title:J()})),default:J().optional()}),U_=se({type:de("string"),title:J().optional(),description:J().optional(),enum:ze(J()),enumNames:ze(J()).optional(),default:J().optional()}),Z_=Ue([R_,L_]),j_=se({type:de("array"),title:J().optional(),description:J().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:se({type:de("string"),enum:ze(J())}),default:ze(J()).optional()}),B_=se({type:de("array"),title:J().optional(),description:J().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:se({anyOf:ze(se({const:J(),title:J()}))}),default:ze(J()).optional()}),q_=Ue([j_,B_]),F_=Ue([U_,Z_,q_]),H_=Ue([F_,O_,M_,D_]),G_=qr.extend({mode:de("form").optional(),message:J(),requestedSchema:se({type:de("object"),properties:Ge(J(),H_),required:ze(J()).optional()})}),J_=qr.extend({mode:de("url"),message:J(),elicitationId:J(),url:J().url()}),W_=Ue([G_,J_]),Y_=tt.extend({method:de("elicitation/create"),params:W_}),V_=xt.extend({elicitationId:J()}),X_=St.extend({method:de("notifications/elicitation/complete"),params:V_}),K_=rt.extend({action:vt(["accept","decline","cancel"]),content:e1(e=>e===null?void 0:e,Ge(J(),Ue([J(),Pe(),Qe(),ze(J())])).optional())}),Q_=se({type:de("ref/resource"),uri:J()}),e9=se({type:de("ref/prompt"),name:J()}),t9=gt.extend({ref:Ue([e9,Q_]),argument:se({name:J(),value:J()}),context:se({arguments:Ge(J(),J()).optional()}).optional()}),r9=tt.extend({method:de("completion/complete"),params:t9}),n9=rt.extend({completion:dt({values:ze(J()).max(100),total:Ve(Pe().int()),hasMore:Ve(Qe())})}),i9=se({uri:J().startsWith("file://"),name:J().optional(),_meta:Ge(J(),He()).optional()}),a9=tt.extend({method:de("roots/list"),params:gt.optional()}),o9=rt.extend({roots:ze(i9)}),s9=St.extend({method:de("notifications/roots/list_changed"),params:xt.optional()});Ue([Kn,A5,r9,w_,c_,a_,q5,H5,W5,K5,e_,l1,u1,f0,h0,p0,v0]);Ue([c0,u0,M5,s9,Mn]);Ue([s0,A_,P_,K_,o9,d0,m0,l0]);Ue([Kn,N_,Y_,a9,f0,h0,p0,v0]);Ue([c0,u0,$_,r_,V5,y_,p_,Mn,X_]);Ue([s0,O5,n9,h_,o_,F5,G5,Y5,Qn,g_,d0,m0,l0]);class Ee extends Error{constructor(r,n,i){super(`MCP error ${r}: ${n}`),this.code=r,this.data=i,this.name="McpError"}static fromError(r,n,i){if(r===Ae.UrlElicitationRequired&&i){const t=i;if(t.elicitations)return new c9(t.elicitations,n)}return new Ee(r,n,i)}}class c9 extends Ee{constructor(r,n=`URL elicitation${r.length>1?"s":""} required`){super(Ae.UrlElicitationRequired,n,{elicitations:r})}get elicitations(){var r;return((r=this.data)==null?void 0:r.elicitations)??[]}}function Kt(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function rl(e){const r=iy(e),n=r==null?void 0:r.method;if(!n)throw new Error("Schema is missing a method literal");const i=ay(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function nl(e,r){const n=Bh(e,r);if(!n.success)throw n.error;return n.data}const u9=6e4;class l9{constructor(r){this._options=r,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(c0,n=>{this._oncancel(n)}),this.setNotificationHandler(u0,n=>{this._onprogress(n)}),this.setRequestHandler(Kn,n=>({})),this._taskStore=r==null?void 0:r.taskStore,this._taskMessageQueue=r==null?void 0:r.taskMessageQueue,this._taskStore&&(this.setRequestHandler(f0,async(n,i)=>{const t=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!t)throw new Ee(Ae.InvalidParams,"Failed to retrieve task: Task not found");return{...t}}),this.setRequestHandler(h0,async(n,i)=>{const t=async()=>{var s;const a=n.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(a,i.sessionId);){if(l.type==="response"||l.type==="error"){const d=l.message,p=d.id,m=this._requestResolvers.get(p);if(m)if(this._requestResolvers.delete(p),l.type==="response")m(d);else{const f=d,u=new Ee(f.error.code,f.error.message,f.error.data);m(u)}else{const f=l.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${p}`))}continue}await((s=this._transport)==null?void 0:s.send(l.message,{relatedRequestId:i.requestId}))}}const o=await this._taskStore.getTask(a,i.sessionId);if(!o)throw new Ee(Ae.InvalidParams,`Task not found: ${a}`);if(!Kt(o.status))return await this._waitForTaskUpdate(a,i.signal),await t();if(Kt(o.status)){const l=await this._taskStore.getTaskResult(a,i.sessionId);return this._clearTaskQueue(a),{...l,_meta:{...l._meta,[er]:{taskId:a}}}}return await t()};return await t()}),this.setRequestHandler(p0,async(n,i)=>{var t;try{const{tasks:a,nextCursor:o}=await this._taskStore.listTasks((t=n.params)==null?void 0:t.cursor,i.sessionId);return{tasks:a,nextCursor:o,_meta:{}}}catch(a){throw new Ee(Ae.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(v0,async(n,i)=>{try{const t=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!t)throw new Ee(Ae.InvalidParams,`Task not found: ${n.params.taskId}`);if(Kt(t.status))throw new Ee(Ae.InvalidParams,`Cannot cancel task in terminal status: ${t.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(n.params.taskId);const a=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!a)throw new Ee(Ae.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...a}}catch(t){throw t instanceof Ee?t:new Ee(Ae.InvalidRequest,`Failed to cancel task: ${t instanceof Error?t.message:String(t)}`)}}))}async _oncancel(r){if(!r.params.requestId)return;const n=this._requestHandlerAbortControllers.get(r.params.requestId);n==null||n.abort(r.params.reason)}_setupTimeout(r,n,i,t,a=!1){this._timeoutInfo.set(r,{timeoutId:setTimeout(t,n),startTime:Date.now(),timeout:n,maxTotalTimeout:i,resetTimeoutOnProgress:a,onTimeout:t})}_resetTimeout(r){const n=this._timeoutInfo.get(r);if(!n)return!1;const i=Date.now()-n.startTime;if(n.maxTotalTimeout&&i>=n.maxTotalTimeout)throw this._timeoutInfo.delete(r),Ee.fromError(Ae.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:i});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(r){const n=this._timeoutInfo.get(r);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(r))}async connect(r){var a,o,s;this._transport=r;const n=(a=this.transport)==null?void 0:a.onclose;this._transport.onclose=()=>{n==null||n(),this._onclose()};const i=(o=this.transport)==null?void 0:o.onerror;this._transport.onerror=l=>{i==null||i(l),this._onerror(l)};const t=(s=this._transport)==null?void 0:s.onmessage;this._transport.onmessage=(l,d)=>{t==null||t(l,d),Sn(l)||k5(l)?this._onresponse(l):tl(l)?this._onrequest(l,d):w5(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var i;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const n=Ee.fromError(Ae.ConnectionClosed,"Connection closed");this._transport=void 0,(i=this.onclose)==null||i.call(this);for(const t of r.values())t(n)}_onerror(r){var n;(n=this.onerror)==null||n.call(this,r)}_onnotification(r){const n=this._notificationHandlers.get(r.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(r)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(r,n){var p,m,f,u;const i=this._requestHandlers.get(r.method)??this.fallbackRequestHandler,t=this._transport,a=(f=(m=(p=r.params)==null?void 0:p._meta)==null?void 0:m[er])==null?void 0:f.taskId;if(i===void 0){const h={jsonrpc:"2.0",id:r.id,error:{code:Ae.MethodNotFound,message:"Method not found"}};a&&this._taskMessageQueue?this._enqueueTaskMessage(a,{type:"error",message:h,timestamp:Date.now()},t==null?void 0:t.sessionId).catch(c=>this._onerror(new Error(`Failed to enqueue error response: ${c}`))):t==null||t.send(h).catch(c=>this._onerror(new Error(`Failed to send an error response: ${c}`)));return}const o=new AbortController;this._requestHandlerAbortControllers.set(r.id,o);const s=_5(r.params)?r.params.task:void 0,l=this._taskStore?this.requestTaskStore(r,t==null?void 0:t.sessionId):void 0,d={signal:o.signal,sessionId:t==null?void 0:t.sessionId,_meta:(u=r.params)==null?void 0:u._meta,sendNotification:async h=>{const c={relatedRequestId:r.id};a&&(c.relatedTask={taskId:a}),await this.notification(h,c)},sendRequest:async(h,c,v)=>{var w;const b={...v,relatedRequestId:r.id};a&&!b.relatedTask&&(b.relatedTask={taskId:a});const g=((w=b.relatedTask)==null?void 0:w.taskId)??a;return g&&l&&await l.updateTaskStatus(g,"input_required"),await this.request(h,c,b)},authInfo:n==null?void 0:n.authInfo,requestId:r.id,requestInfo:n==null?void 0:n.requestInfo,taskId:a,taskStore:l,taskRequestedTtl:s==null?void 0:s.ttl,closeSSEStream:n==null?void 0:n.closeSSEStream,closeStandaloneSSEStream:n==null?void 0:n.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(r.method)}).then(()=>i(r,d)).then(async h=>{if(o.signal.aborted)return;const c={result:h,jsonrpc:"2.0",id:r.id};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"response",message:c,timestamp:Date.now()},t==null?void 0:t.sessionId):await(t==null?void 0:t.send(c))},async h=>{if(o.signal.aborted)return;const c={jsonrpc:"2.0",id:r.id,error:{code:Number.isSafeInteger(h.code)?h.code:Ae.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"error",message:c,timestamp:Date.now()},t==null?void 0:t.sessionId):await(t==null?void 0:t.send(c))}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(r.id)})}_onprogress(r){const{progressToken:n,...i}=r.params,t=Number(n),a=this._progressHandlers.get(t);if(!a){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(r)}`));return}const o=this._responseHandlers.get(t),s=this._timeoutInfo.get(t);if(s&&o&&s.resetTimeoutOnProgress)try{this._resetTimeout(t)}catch(l){this._responseHandlers.delete(t),this._progressHandlers.delete(t),this._cleanupTimeout(t),o(l);return}a(i)}_onresponse(r){const n=Number(r.id),i=this._requestResolvers.get(n);if(i){if(this._requestResolvers.delete(n),Sn(r))i(r);else{const o=new Ee(r.error.code,r.error.message,r.error.data);i(o)}return}const t=this._responseHandlers.get(n);if(t===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(r)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let a=!1;if(Sn(r)&&r.result&&typeof r.result=="object"){const o=r.result;if(o.task&&typeof o.task=="object"){const s=o.task;typeof s.taskId=="string"&&(a=!0,this._taskProgressTokens.set(s.taskId,n))}}if(a||this._progressHandlers.delete(n),Sn(r))t(r);else{const o=Ee.fromError(r.error.code,r.error.message,r.error.data);t(o)}}get transport(){return this._transport}async close(){var r;await((r=this._transport)==null?void 0:r.close())}async*requestStream(r,n,i){var o,s;const{task:t}=i??{};if(!t){try{yield{type:"result",result:await this.request(r,n,i)}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Ae.InternalError,String(l))}}return}let a;try{const l=await this.request(r,l0,i);if(l.task)a=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new Ee(Ae.InternalError,"Task creation did not return a task");for(;;){const d=await this.getTask({taskId:a},i);if(yield{type:"taskStatus",task:d},Kt(d.status)){d.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:a},n,i)}:d.status==="failed"?yield{type:"error",error:new Ee(Ae.InternalError,`Task ${a} failed`)}:d.status==="cancelled"&&(yield{type:"error",error:new Ee(Ae.InternalError,`Task ${a} was cancelled`)});return}if(d.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:a},n,i)};return}const p=d.pollInterval??((o=this._options)==null?void 0:o.defaultTaskPollInterval)??1e3;await new Promise(m=>setTimeout(m,p)),(s=i==null?void 0:i.signal)==null||s.throwIfAborted()}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Ae.InternalError,String(l))}}}request(r,n,i){const{relatedRequestId:t,resumptionToken:a,onresumptiontoken:o,task:s,relatedTask:l}=i??{};return new Promise((d,p)=>{var g,w,k,$,O;const m=P=>{p(P)};if(!this._transport){m(new Error("Not connected"));return}if(((g=this._options)==null?void 0:g.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(r.method),s&&this.assertTaskCapability(r.method)}catch(P){m(P);return}(w=i==null?void 0:i.signal)==null||w.throwIfAborted();const f=this._requestMessageId++,u={...r,jsonrpc:"2.0",id:f};i!=null&&i.onprogress&&(this._progressHandlers.set(f,i.onprogress),u.params={...r.params,_meta:{...((k=r.params)==null?void 0:k._meta)||{},progressToken:f}}),s&&(u.params={...u.params,task:s}),l&&(u.params={...u.params,_meta:{...(($=u.params)==null?void 0:$._meta)||{},[er]:l}});const h=P=>{var C;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(C=this._transport)==null||C.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(P)}},{relatedRequestId:t,resumptionToken:a,onresumptiontoken:o}).catch(E=>this._onerror(new Error(`Failed to send cancellation: ${E}`)));const y=P instanceof Ee?P:new Ee(Ae.RequestTimeout,String(P));p(y)};this._responseHandlers.set(f,P=>{var y;if(!((y=i==null?void 0:i.signal)!=null&&y.aborted)){if(P instanceof Error)return p(P);try{const C=Bh(n,P.result);C.success?d(C.data):p(C.error)}catch(C){p(C)}}}),(O=i==null?void 0:i.signal)==null||O.addEventListener("abort",()=>{var P;h((P=i==null?void 0:i.signal)==null?void 0:P.reason)});const c=(i==null?void 0:i.timeout)??u9,v=()=>h(Ee.fromError(Ae.RequestTimeout,"Request timed out",{timeout:c}));this._setupTimeout(f,c,i==null?void 0:i.maxTotalTimeout,v,(i==null?void 0:i.resetTimeoutOnProgress)??!1);const b=l==null?void 0:l.taskId;if(b){const P=y=>{const C=this._responseHandlers.get(f);C?C(y):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,P),this._enqueueTaskMessage(b,{type:"request",message:u,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(f),p(y)})}else this._transport.send(u,{relatedRequestId:t,resumptionToken:a,onresumptiontoken:o}).catch(P=>{this._cleanupTimeout(f),p(P)})})}async getTask(r,n){return this.request({method:"tasks/get",params:r},d0,n)}async getTaskResult(r,n,i){return this.request({method:"tasks/result",params:r},n,i)}async listTasks(r,n){return this.request({method:"tasks/list",params:r},m0,n)}async cancelTask(r,n){return this.request({method:"tasks/cancel",params:r},j5,n)}async notification(r,n){var s,l,d,p;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(r.method);const i=(s=n==null?void 0:n.relatedTask)==null?void 0:s.taskId;if(i){const m={...r,jsonrpc:"2.0",params:{...r.params,_meta:{...((l=r.params)==null?void 0:l._meta)||{},[er]:n.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:m,timestamp:Date.now()});return}if((((d=this._options)==null?void 0:d.debouncedNotificationMethods)??[]).includes(r.method)&&!r.params&&!(n!=null&&n.relatedRequestId)&&!(n!=null&&n.relatedTask)){if(this._pendingDebouncedNotifications.has(r.method))return;this._pendingDebouncedNotifications.add(r.method),Promise.resolve().then(()=>{var f,u;if(this._pendingDebouncedNotifications.delete(r.method),!this._transport)return;let m={...r,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(m={...m,params:{...m.params,_meta:{...((f=m.params)==null?void 0:f._meta)||{},[er]:n.relatedTask}}}),(u=this._transport)==null||u.send(m,n).catch(h=>this._onerror(h))});return}let o={...r,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(o={...o,params:{...o.params,_meta:{...((p=o.params)==null?void 0:p._meta)||{},[er]:n.relatedTask}}}),await this._transport.send(o,n)}setRequestHandler(r,n){const i=rl(r);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(t,a)=>{const o=nl(r,t);return Promise.resolve(n(o,a))})}removeRequestHandler(r){this._requestHandlers.delete(r)}assertCanSetRequestHandler(r){if(this._requestHandlers.has(r))throw new Error(`A request handler for ${r} already exists, which would be overridden`)}setNotificationHandler(r,n){const i=rl(r);this._notificationHandlers.set(i,t=>{const a=nl(r,t);return Promise.resolve(n(a))})}removeNotificationHandler(r){this._notificationHandlers.delete(r)}_cleanupTaskProgressHandler(r){const n=this._taskProgressTokens.get(r);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(r))}async _enqueueTaskMessage(r,n,i){var a;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const t=(a=this._options)==null?void 0:a.maxTaskQueueSize;await this._taskMessageQueue.enqueue(r,n,i,t)}async _clearTaskQueue(r,n){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(r,n);for(const t of i)if(t.type==="request"&&tl(t.message)){const a=t.message.id,o=this._requestResolvers.get(a);o?(o(new Ee(Ae.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(a)):this._onerror(new Error(`Resolver missing for request ${a} during task ${r} cleanup`))}}}async _waitForTaskUpdate(r,n){var t,a;let i=((t=this._options)==null?void 0:t.defaultTaskPollInterval)??1e3;try{const o=await((a=this._taskStore)==null?void 0:a.getTask(r));o!=null&&o.pollInterval&&(i=o.pollInterval)}catch{}return new Promise((o,s)=>{if(n.aborted){s(new Ee(Ae.InvalidRequest,"Request cancelled"));return}const l=setTimeout(o,i);n.addEventListener("abort",()=>{clearTimeout(l),s(new Ee(Ae.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(r,n){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async t=>{if(!r)throw new Error("No request provided");return await i.createTask(t,r.id,{method:r.method,params:r.params},n)},getTask:async t=>{const a=await i.getTask(t,n);if(!a)throw new Ee(Ae.InvalidParams,"Failed to retrieve task: Task not found");return a},storeTaskResult:async(t,a,o)=>{await i.storeTaskResult(t,a,o,n);const s=await i.getTask(t,n);if(s){const l=Mn.parse({method:"notifications/tasks/status",params:s});await this.notification(l),Kt(s.status)&&this._cleanupTaskProgressHandler(t)}},getTaskResult:t=>i.getTaskResult(t,n),updateTaskStatus:async(t,a,o)=>{const s=await i.getTask(t,n);if(!s)throw new Ee(Ae.InvalidParams,`Task "${t}" not found - it may have been cleaned up`);if(Kt(s.status))throw new Ee(Ae.InvalidParams,`Cannot update task "${t}" from terminal status "${s.status}" to "${a}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(t,a,o,n);const l=await i.getTask(t,n);if(l){const d=Mn.parse({method:"notifications/tasks/status",params:l});await this.notification(d),Kt(l.status)&&this._cleanupTaskProgressHandler(t)}},listTasks:t=>i.listTasks(t,n)}}}var f9=Object.defineProperty,Ot=(e,r)=>{for(var n in r)f9(e,n,{get:r[n],enumerable:!0,configurable:!0,set:i=>r[n]=()=>i})};class d9{constructor(r=window.parent,n){at(this,"eventTarget");at(this,"eventSource");at(this,"messageListener");at(this,"onclose");at(this,"onerror");at(this,"onmessage");at(this,"sessionId");at(this,"setProtocolVersion");this.eventTarget=r,this.eventSource=n,this.messageListener=i=>{var a,o;if(n&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let t=$5.safeParse(i.data);t.success?(console.debug("Parsed message",t.data),(a=this.onmessage)==null||a.call(this,t.data)):(console.error("Failed to parse message",t.error.message,i),(o=this.onerror)==null||o.call(this,Error("Invalid JSON-RPC message received: "+t.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,n){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){var r;window.removeEventListener("message",this.messageListener),(r=this.onclose)==null||r.call(this)}}var h9="2025-11-21",j={};Ot(j,{xor:()=>C2,xid:()=>Xg,void:()=>k2,uuidv7:()=>qg,uuidv6:()=>Bg,uuidv4:()=>jg,uuid:()=>Zg,util:()=>Te,url:()=>Fg,uppercase:()=>ci,unknown:()=>ar,union:()=>Li,undefined:()=>_2,ulid:()=>Vg,uint64:()=>b2,uint32:()=>m2,tuple:()=>Fc,trim:()=>pi,treeifyError:()=>I1,transform:()=>Zi,toUpperCase:()=>vi,toLowerCase:()=>mi,toJSONSchema:()=>bg,templateLiteral:()=>j2,symbol:()=>y2,superRefine:()=>gu,success:()=>L2,stringbool:()=>W2,stringFormat:()=>c2,string:()=>qn,strictObject:()=>I2,startsWith:()=>li,slugify:()=>gi,size:()=>sn,setErrorMap:()=>Ok,set:()=>P2,safeParseAsync:()=>zg,safeParse:()=>Cg,safeEncodeAsync:()=>Dg,safeEncode:()=>Og,safeDecodeAsync:()=>Rg,safeDecode:()=>Mg,registry:()=>W0,regexes:()=>cr,regex:()=>oi,refine:()=>vu,record:()=>Hc,readonly:()=>lu,property:()=>yc,promise:()=>B2,prettifyError:()=>C1,preprocess:()=>V2,prefault:()=>nu,positive:()=>mc,pipe:()=>Br,partialRecord:()=>E2,parseAsync:()=>Tg,parse:()=>Ig,overwrite:()=>Dt,optional:()=>Zr,object:()=>S2,number:()=>Cc,nullish:()=>R2,nullable:()=>jr,null:()=>Pc,normalize:()=>hi,nonpositive:()=>gc,nonoptional:()=>iu,nonnegative:()=>bc,never:()=>Di,negative:()=>vc,nativeEnum:()=>O2,nanoid:()=>Jg,nan:()=>U2,multipleOf:()=>kr,minSize:()=>Ht,minLength:()=>ir,mime:()=>di,meta:()=>G2,maxSize:()=>zr,maxLength:()=>cn,map:()=>A2,mac:()=>e2,lte:()=>wt,lt:()=>qt,lowercase:()=>si,looseRecord:()=>N2,looseObject:()=>T2,locales:()=>J0,literal:()=>M2,length:()=>un,lazy:()=>hu,ksuid:()=>Kg,keyof:()=>x2,jwt:()=>s2,json:()=>Y2,iso:()=>kc,ipv6:()=>t2,ipv4:()=>Qg,intersection:()=>Bc,int64:()=>g2,int32:()=>p2,int:()=>Fn,instanceof:()=>J2,includes:()=>ui,httpUrl:()=>Hg,hostname:()=>u2,hex:()=>l2,hash:()=>f2,guid:()=>Ug,gte:()=>ft,gt:()=>Ft,globalRegistry:()=>_t,getErrorMap:()=>Mk,function:()=>Hn,fromJSONSchema:()=>Uk,formatError:()=>T0,float64:()=>h2,float32:()=>d2,flattenError:()=>I0,file:()=>D2,exactOptional:()=>Kc,enum:()=>Ui,endsWith:()=>fi,encodeAsync:()=>Ag,encode:()=>Eg,emoji:()=>Gg,email:()=>Lg,e164:()=>o2,discriminatedUnion:()=>z2,describe:()=>H2,decodeAsync:()=>Pg,decode:()=>Ng,date:()=>$2,custom:()=>F2,cuid2:()=>Yg,cuid:()=>Wg,core:()=>d1,config:()=>st,coerce:()=>K2,codec:()=>Z2,clone:()=>It,cidrv6:()=>n2,cidrv4:()=>r2,check:()=>q2,catch:()=>su,boolean:()=>zc,bigint:()=>v2,base64url:()=>a2,base64:()=>i2,array:()=>vn,any:()=>w2,_function:()=>Hn,_default:()=>tu,_ZodString:()=>bi,ZodXor:()=>Uc,ZodXID:()=>Si,ZodVoid:()=>Rc,ZodUnknown:()=>Mc,ZodUnion:()=>bn,ZodUndefined:()=>Nc,ZodUUID:()=>zt,ZodURL:()=>dn,ZodULID:()=>xi,ZodType:()=>ke,ZodTuple:()=>qc,ZodTransform:()=>Vc,ZodTemplateLiteral:()=>fu,ZodSymbol:()=>Ec,ZodSuccess:()=>au,ZodStringFormat:()=>Re,ZodString:()=>fn,ZodSet:()=>Jc,ZodRecord:()=>yn,ZodRealError:()=>yt,ZodReadonly:()=>uu,ZodPromise:()=>pu,ZodPrefault:()=>ru,ZodPipe:()=>qi,ZodOptional:()=>ji,ZodObject:()=>gn,ZodNumberFormat:()=>ur,ZodNumber:()=>hn,ZodNullable:()=>Qc,ZodNull:()=>Ac,ZodNonOptional:()=>Bi,ZodNever:()=>Dc,ZodNanoID:()=>wi,ZodNaN:()=>cu,ZodMap:()=>Gc,ZodMAC:()=>Tc,ZodLiteral:()=>Wc,ZodLazy:()=>du,ZodKSUID:()=>Ii,ZodJWT:()=>Oi,ZodIssueCode:()=>Pk,ZodIntersection:()=>jc,ZodISOTime:()=>Sc,ZodISODuration:()=>Ic,ZodISODateTime:()=>$c,ZodISODate:()=>xc,ZodIPv6:()=>Ci,ZodIPv4:()=>Ti,ZodGUID:()=>Ur,ZodFunction:()=>mu,ZodFirstPartyTypeKind:()=>Ys,ZodFile:()=>Yc,ZodExactOptional:()=>Xc,ZodError:()=>Ak,ZodEnum:()=>Ir,ZodEmoji:()=>_i,ZodEmail:()=>yi,ZodE164:()=>Pi,ZodDiscriminatedUnion:()=>Zc,ZodDefault:()=>eu,ZodDate:()=>Ri,ZodCustomStringFormat:()=>Er,ZodCustom:()=>_n,ZodCodec:()=>Fi,ZodCatch:()=>ou,ZodCUID2:()=>$i,ZodCUID:()=>ki,ZodCIDRv6:()=>Ei,ZodCIDRv4:()=>zi,ZodBoolean:()=>pn,ZodBigIntFormat:()=>Mi,ZodBigInt:()=>mn,ZodBase64URL:()=>Ai,ZodBase64:()=>Ni,ZodArray:()=>Lc,ZodAny:()=>Oc,TimePrecision:()=>Xm,NEVER:()=>h1,$output:()=>Hm,$input:()=>Gm,$brand:()=>p1});var d1={};Ot(d1,{version:()=>Cp,util:()=>Te,treeifyError:()=>I1,toJSONSchema:()=>bg,toDotPath:()=>T1,safeParseAsync:()=>E1,safeParse:()=>z1,safeEncodeAsync:()=>G9,safeEncode:()=>F9,safeDecodeAsync:()=>J9,safeDecode:()=>H9,registry:()=>W0,regexes:()=>cr,process:()=>Oe,prettifyError:()=>C1,parseAsync:()=>Gs,parse:()=>Hs,meta:()=>Av,locales:()=>J0,isValidJWT:()=>Qp,isValidBase64URL:()=>Vp,isValidBase64:()=>Z0,initializeContext:()=>$r,globalRegistry:()=>_t,globalConfig:()=>Rn,formatError:()=>T0,flattenError:()=>I0,finalize:()=>Sr,extractDefs:()=>xr,encodeAsync:()=>B9,encode:()=>Z9,describe:()=>Nv,decodeAsync:()=>q9,decode:()=>j9,createToJSONSchemaMethod:()=>Ov,createStandardJSONSchemaMethod:()=>Lr,config:()=>st,clone:()=>It,_xor:()=>sk,_xid:()=>ac,_void:()=>wv,_uuidv7:()=>Q0,_uuidv6:()=>K0,_uuidv4:()=>X0,_uuid:()=>V0,_url:()=>ai,_uppercase:()=>ci,_unknown:()=>yv,_union:()=>ok,_undefined:()=>vv,_ulid:()=>ic,_uint64:()=>pv,_uint32:()=>cv,_tuple:()=>lk,_trim:()=>pi,_transform:()=>gk,_toUpperCase:()=>vi,_toLowerCase:()=>mi,_templateLiteral:()=>Ik,_symbol:()=>mv,_superRefine:()=>zv,_success:()=>kk,_stringbool:()=>Pv,_stringFormat:()=>ln,_string:()=>Wm,_startsWith:()=>li,_slugify:()=>gi,_size:()=>sn,_set:()=>hk,_safeParseAsync:()=>tn,_safeParse:()=>en,_safeEncodeAsync:()=>O0,_safeEncode:()=>A0,_safeDecodeAsync:()=>M0,_safeDecode:()=>P0,_regex:()=>oi,_refine:()=>Cv,_record:()=>fk,_readonly:()=>Sk,_property:()=>yc,_promise:()=>Ck,_positive:()=>mc,_pipe:()=>xk,_parseAsync:()=>Qr,_parse:()=>Kr,_overwrite:()=>Dt,_optional:()=>bk,_number:()=>rv,_nullable:()=>yk,_null:()=>gv,_normalize:()=>hi,_nonpositive:()=>gc,_nonoptional:()=>wk,_nonnegative:()=>bc,_never:()=>_v,_negative:()=>vc,_nativeEnum:()=>mk,_nanoid:()=>tc,_nan:()=>xv,_multipleOf:()=>kr,_minSize:()=>Ht,_minLength:()=>ir,_min:()=>ft,_mime:()=>di,_maxSize:()=>zr,_maxLength:()=>cn,_max:()=>wt,_map:()=>dk,_mac:()=>Vm,_lte:()=>wt,_lt:()=>qt,_lowercase:()=>si,_literal:()=>vk,_length:()=>un,_lazy:()=>Tk,_ksuid:()=>oc,_jwt:()=>pc,_isoTime:()=>ev,_isoDuration:()=>tv,_isoDateTime:()=>Km,_isoDate:()=>Qm,_ipv6:()=>cc,_ipv4:()=>sc,_intersection:()=>uk,_int64:()=>hv,_int32:()=>sv,_int:()=>iv,_includes:()=>ui,_guid:()=>Bn,_gte:()=>ft,_gt:()=>Ft,_float64:()=>ov,_float32:()=>av,_file:()=>Iv,_enum:()=>pk,_endsWith:()=>fi,_encodeAsync:()=>E0,_encode:()=>C0,_emoji:()=>ec,_email:()=>Y0,_e164:()=>hc,_discriminatedUnion:()=>ck,_default:()=>_k,_decodeAsync:()=>N0,_decode:()=>z0,_date:()=>kv,_custom:()=>Tv,_cuid2:()=>nc,_cuid:()=>rc,_coercedString:()=>Ym,_coercedNumber:()=>nv,_coercedDate:()=>$v,_coercedBoolean:()=>lv,_coercedBigint:()=>dv,_cidrv6:()=>lc,_cidrv4:()=>uc,_check:()=>Ev,_catch:()=>$k,_boolean:()=>uv,_bigint:()=>fv,_base64url:()=>dc,_base64:()=>fc,_array:()=>Sv,_any:()=>bv,TimePrecision:()=>Xm,NEVER:()=>h1,JSONSchemaGenerator:()=>Ek,JSONSchema:()=>Nk,Doc:()=>Tp,$output:()=>Hm,$input:()=>Gm,$constructor:()=>F,$brand:()=>p1,$ZodXor:()=>gm,$ZodXID:()=>Lp,$ZodVoid:()=>lm,$ZodUnknown:()=>cm,$ZodUnion:()=>ii,$ZodUndefined:()=>am,$ZodUUID:()=>Ep,$ZodURL:()=>Ap,$ZodULID:()=>Rp,$ZodType:()=>ye,$ZodTuple:()=>F0,$ZodTransform:()=>Im,$ZodTemplateLiteral:()=>Rm,$ZodSymbol:()=>im,$ZodSuccess:()=>Am,$ZodStringFormat:()=>De,$ZodString:()=>on,$ZodSet:()=>km,$ZodRegistry:()=>Jm,$ZodRecord:()=>_m,$ZodRealError:()=>bt,$ZodReadonly:()=>Dm,$ZodPromise:()=>Um,$ZodPrefault:()=>Em,$ZodPipe:()=>Mm,$ZodOptional:()=>H0,$ZodObjectJIT:()=>vm,$ZodObject:()=>mm,$ZodNumberFormat:()=>rm,$ZodNumber:()=>j0,$ZodNullable:()=>Cm,$ZodNull:()=>om,$ZodNonOptional:()=>Nm,$ZodNever:()=>um,$ZodNanoID:()=>Op,$ZodNaN:()=>Om,$ZodMap:()=>wm,$ZodMAC:()=>Gp,$ZodLiteral:()=>xm,$ZodLazy:()=>Zm,$ZodKSUID:()=>Up,$ZodJWT:()=>em,$ZodIntersection:()=>ym,$ZodISOTime:()=>Bp,$ZodISODuration:()=>qp,$ZodISODateTime:()=>Zp,$ZodISODate:()=>jp,$ZodIPv6:()=>Hp,$ZodIPv4:()=>Fp,$ZodGUID:()=>zp,$ZodFunction:()=>Lm,$ZodFile:()=>Sm,$ZodExactOptional:()=>Tm,$ZodError:()=>S0,$ZodEnum:()=>$m,$ZodEncodeError:()=>ei,$ZodEmoji:()=>Pp,$ZodEmail:()=>Np,$ZodE164:()=>Kp,$ZodDiscriminatedUnion:()=>bm,$ZodDefault:()=>zm,$ZodDate:()=>fm,$ZodCustomStringFormat:()=>tm,$ZodCustom:()=>jm,$ZodCodec:()=>G0,$ZodCheckUpperCase:()=>_p,$ZodCheckStringFormat:()=>an,$ZodCheckStartsWith:()=>kp,$ZodCheckSizeEquals:()=>pp,$ZodCheckRegex:()=>bp,$ZodCheckProperty:()=>xp,$ZodCheckOverwrite:()=>Ip,$ZodCheckNumberFormat:()=>lp,$ZodCheckMultipleOf:()=>up,$ZodCheckMinSize:()=>hp,$ZodCheckMinLength:()=>vp,$ZodCheckMimeType:()=>Sp,$ZodCheckMaxSize:()=>dp,$ZodCheckMaxLength:()=>mp,$ZodCheckLowerCase:()=>yp,$ZodCheckLessThan:()=>L0,$ZodCheckLengthEquals:()=>gp,$ZodCheckIncludes:()=>wp,$ZodCheckGreaterThan:()=>U0,$ZodCheckEndsWith:()=>$p,$ZodCheckBigIntFormat:()=>fp,$ZodCheck:()=>qe,$ZodCatch:()=>Pm,$ZodCUID2:()=>Dp,$ZodCUID:()=>Mp,$ZodCIDRv6:()=>Wp,$ZodCIDRv4:()=>Jp,$ZodBoolean:()=>B0,$ZodBigIntFormat:()=>nm,$ZodBigInt:()=>q0,$ZodBase64URL:()=>Xp,$ZodBase64:()=>Yp,$ZodAsyncError:()=>rr,$ZodArray:()=>dm,$ZodAny:()=>sm});var h1=Object.freeze({status:"aborted"});function F(e,r,n){function i(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),r(s,l);let d=o.prototype,p=Object.keys(d);for(let m=0;m<p.length;m++){let f=p[m];f in s||(s[f]=d[f].bind(s))}}let t=(n==null?void 0:n.Parent)??Object;class a extends t{}Object.defineProperty(a,"name",{value:e});function o(s){var l;let d=n!=null&&n.Parent?new a:this;i(d,s),(l=d._zod).deferred??(l.deferred=[]);for(let p of d._zod.deferred)p();return d}return Object.defineProperty(o,"init",{value:i}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>{var l,d;return n!=null&&n.Parent&&s instanceof n.Parent?!0:(d=(l=s==null?void 0:s._zod)==null?void 0:l.traits)==null?void 0:d.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}var p1=Symbol("zod_brand");class rr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ei extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}var Rn={};function st(e){return e&&Object.assign(Rn,e),Rn}var Te={};Ot(Te,{unwrapMessage:()=>Mr,uint8ArrayToHex:()=>L9,uint8ArrayToBase64url:()=>D9,uint8ArrayToBase64:()=>x1,stringifyPrimitive:()=>ve,slugify:()=>v1,shallowClone:()=>b1,safeExtend:()=>E9,required:()=>P9,randomString:()=>$9,propertyKeyTypes:()=>Un,promiseAllObject:()=>k9,primitiveTypes:()=>y1,prefixIssues:()=>Tt,pick:()=>T9,partial:()=>A9,parsedType:()=>ge,optionalKeys:()=>_1,omit:()=>C9,objectClone:()=>y9,numKeys:()=>x9,nullish:()=>sr,normalizeParams:()=>re,mergeDefs:()=>Mt,merge:()=>N9,jsonStringifyReplacer:()=>Ln,joinValues:()=>te,issue:()=>Zn,isPlainObject:()=>nr,isObject:()=>_r,hexToUint8Array:()=>R9,getSizableOrigin:()=>ri,getParsedType:()=>S9,getLengthableOrigin:()=>ni,getEnumValues:()=>$0,getElementAtPath:()=>w9,floatSafeRemainder:()=>m1,finalizeIssue:()=>kt,extend:()=>z9,escapeRegex:()=>Pt,esc:()=>Fs,defineLazy:()=>$e,createTransparentProxy:()=>I9,cloneDef:()=>_9,clone:()=>It,cleanRegex:()=>ti,cleanEnum:()=>O9,captureStackTrace:()=>x0,cached:()=>Xr,base64urlToUint8Array:()=>M9,base64ToUint8Array:()=>$1,assignProp:()=>Wt,assertNotEqual:()=>m9,assertNever:()=>g9,assertIs:()=>v9,assertEqual:()=>p9,assert:()=>b9,allowsEval:()=>g1,aborted:()=>tr,NUMBER_FORMAT_RANGES:()=>w1,Class:()=>U9,BIGINT_FORMAT_RANGES:()=>k1});function p9(e){return e}function m9(e){return e}function v9(e){}function g9(e){throw Error("Unexpected value in exhaustive check")}function b9(e){}function $0(e){let r=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>r.indexOf(+n)===-1).map(([n,i])=>i)}function te(e,r="|"){return e.map(n=>ve(n)).join(r)}function Ln(e,r){return typeof r=="bigint"?r.toString():r}function Xr(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function sr(e){return e==null}function ti(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function m1(e,r){let n=(e.toString().split(".")[1]||"").length,i=r.toString(),t=(i.split(".")[1]||"").length;if(t===0&&/\d?e-\d?/.test(i)){let l=i.match(/\d?e-(\d?)/);l!=null&&l[1]&&(t=Number.parseInt(l[1]))}let a=n>t?n:t,o=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(r.toFixed(a).replace(".",""));return o%s/10**a}var il=Symbol("evaluating");function $e(e,r,n){let i;Object.defineProperty(e,r,{get(){if(i!==il)return i===void 0&&(i=il,i=n()),i},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function y9(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Wt(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mt(...e){let r={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(r,i)}return Object.defineProperties({},r)}function _9(e){return Mt(e._zod.def)}function w9(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function k9(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let a=0;a<r.length;a++)t[r[a]]=i[a];return t})}function $9(e=10){let r="";for(let n=0;n<e;n++)r+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return r}function Fs(e){return JSON.stringify(e)}function v1(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var x0="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _r(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var g1=Xr(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{return new Function(""),!0}catch{return!1}});function nr(e){if(_r(e)===!1)return!1;let r=e.constructor;if(r===void 0||typeof r!="function")return!0;let n=r.prototype;return!(_r(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function b1(e){return nr(e)?{...e}:Array.isArray(e)?[...e]:e}function x9(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var S9=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw Error(`Unknown data type: ${r}`)}},Un=new Set(["string","number","symbol"]),y1=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Pt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function It(e,r,n){let i=new e._zod.constr(r??e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function re(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function I9(e){let r;return new Proxy({},{get(n,i,t){return r??(r=e()),Reflect.get(r,i,t)},set(n,i,t,a){return r??(r=e()),Reflect.set(r,i,t,a)},has(n,i){return r??(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r??(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r??(r=e()),Reflect.defineProperty(r,i,t)}})}function ve(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function _1(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var w1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},k1={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function T9(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let t=Mt(e._zod.def,{get shape(){let a={};for(let o in r){if(!(o in n.shape))throw Error(`Unrecognized key: "${o}"`);r[o]&&(a[o]=n.shape[o])}return Wt(this,"shape",a),a},checks:[]});return It(e,t)}function C9(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let t=Mt(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let o in r){if(!(o in n.shape))throw Error(`Unrecognized key: "${o}"`);r[o]&&delete a[o]}return Wt(this,"shape",a),a},checks:[]});return It(e,t)}function z9(e,r){if(!nr(r))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let t=e._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(t,a)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Mt(e._zod.def,{get shape(){let t={...e._zod.def.shape,...r};return Wt(this,"shape",t),t}});return It(e,i)}function E9(e,r){if(!nr(r))throw Error("Invalid input to safeExtend: expected a plain object");let n=Mt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...r};return Wt(this,"shape",i),i}});return It(e,n)}function N9(e,r){let n=Mt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...r._zod.def.shape};return Wt(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:[]});return It(e,n)}function A9(e,r,n){let i=r._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let t=Mt(r._zod.def,{get shape(){let a=r._zod.def.shape,o={...a};if(n)for(let s in n){if(!(s in a))throw Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=e?new e({type:"optional",innerType:a[s]}):a[s])}else for(let s in a)o[s]=e?new e({type:"optional",innerType:a[s]}):a[s];return Wt(this,"shape",o),o},checks:[]});return It(r,t)}function P9(e,r,n){let i=Mt(r._zod.def,{get shape(){let t=r._zod.def.shape,a={...t};if(n)for(let o in n){if(!(o in a))throw Error(`Unrecognized key: "${o}"`);n[o]&&(a[o]=new e({type:"nonoptional",innerType:t[o]}))}else for(let o in t)a[o]=new e({type:"nonoptional",innerType:t[o]});return Wt(this,"shape",a),a}});return It(r,i)}function tr(e,r=0){var n;if(e.aborted===!0)return!0;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function Tt(e,r){return r.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Mr(e){return typeof e=="string"?e:e==null?void 0:e.message}function kt(e,r,n){var t,a,o,s,l,d;let i={...e,path:e.path??[]};if(!e.message){let p=Mr((o=(a=(t=e.inst)==null?void 0:t._zod.def)==null?void 0:a.error)==null?void 0:o.call(a,e))??Mr((s=r==null?void 0:r.error)==null?void 0:s.call(r,e))??Mr((l=n.customError)==null?void 0:l.call(n,e))??Mr((d=n.localeError)==null?void 0:d.call(n,e))??"Invalid input";i.message=p}return delete i.inst,delete i.continue,!(r!=null&&r.reportInput)&&delete i.input,i}function ri(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ni(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ge(e){let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return r}function Zn(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:{...r}}function O9(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function $1(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}function x1(e){let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}function M9(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return $1(r+n)}function D9(e){return x1(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function R9(e){let r=e.replace(/^0x/,"");if(r.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(r.length/2);for(let i=0;i<r.length;i+=2)n[i/2]=Number.parseInt(r.slice(i,i+2),16);return n}function L9(e){return Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}class U9{constructor(...r){}}var S1=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Ln,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},S0=F("$ZodError",S1),bt=F("$ZodError",S1,{Parent:Error});function I0(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function T0(e,r=n=>n.message){let n={_errors:[]},i=t=>{for(let a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>i({issues:o}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else{let o=n,s=0;for(;s<a.path.length;){let l=a.path[s];s!==a.path.length-1?o[l]=o[l]||{_errors:[]}:(o[l]=o[l]||{_errors:[]},o[l]._errors.push(r(a))),o=o[l],s++}}};return i(e),n}function I1(e,r=n=>n.message){let n={errors:[]},i=(t,a=[])=>{var o,s;for(let l of t.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(d=>i({issues:d},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{let d=[...a,...l.path];if(d.length===0){n.errors.push(r(l));continue}let p=n,m=0;for(;m<d.length;){let f=d[m],u=m===d.length-1;typeof f=="string"?(p.properties??(p.properties={}),(o=p.properties)[f]??(o[f]={errors:[]}),p=p.properties[f]):(p.items??(p.items=[]),(s=p.items)[f]??(s[f]={errors:[]}),p=p.items[f]),u&&p.errors.push(r(l)),m++}}};return i(e),n}function T1(e){let r=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?r.push(`[${i}]`):typeof i=="symbol"?r.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?r.push(`[${JSON.stringify(i)}]`):(r.length&&r.push("."),r.push(i));return r.join("")}function C1(e){var i;let r=[],n=[...e.issues].sort((t,a)=>(t.path??[]).length-(a.path??[]).length);for(let t of n)r.push(`✖ ${t.message}`),(i=t.path)!=null&&i.length&&r.push(` → at ${T1(t.path)}`);return r.join(`
|
|
47
|
+
`)}var Kr=e=>(r,n,i,t)=>{let a=i?Object.assign(i,{async:!1}):{async:!1},o=r._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new rr;if(o.issues.length){let s=new((t==null?void 0:t.Err)??e)(o.issues.map(l=>kt(l,a,st())));throw x0(s,t==null?void 0:t.callee),s}return o.value},Hs=Kr(bt),Qr=e=>async(r,n,i,t)=>{let a=i?Object.assign(i,{async:!0}):{async:!0},o=r._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let s=new((t==null?void 0:t.Err)??e)(o.issues.map(l=>kt(l,a,st())));throw x0(s,t==null?void 0:t.callee),s}return o.value},Gs=Qr(bt),en=e=>(r,n,i)=>{let t=i?{...i,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},t);if(a instanceof Promise)throw new rr;return a.issues.length?{success:!1,error:new(e??S0)(a.issues.map(o=>kt(o,t,st())))}:{success:!0,data:a.value}},z1=en(bt),tn=e=>async(r,n,i)=>{let t=i?Object.assign(i,{async:!0}):{async:!0},a=r._zod.run({value:n,issues:[]},t);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(o=>kt(o,t,st())))}:{success:!0,data:a.value}},E1=tn(bt),C0=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Kr(e)(r,n,t)},Z9=C0(bt),z0=e=>(r,n,i)=>Kr(e)(r,n,i),j9=z0(bt),E0=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Qr(e)(r,n,t)},B9=E0(bt),N0=e=>async(r,n,i)=>Qr(e)(r,n,i),q9=N0(bt),A0=e=>(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return en(e)(r,n,t)},F9=A0(bt),P0=e=>(r,n,i)=>en(e)(r,n,i),H9=P0(bt),O0=e=>async(r,n,i)=>{let t=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return tn(e)(r,n,t)},G9=O0(bt),M0=e=>async(r,n,i)=>tn(e)(r,n,i),J9=M0(bt),cr={};Ot(cr,{xid:()=>O1,uuid7:()=>X9,uuid6:()=>V9,uuid4:()=>Y9,uuid:()=>wr,uppercase:()=>sp,unicodeEmail:()=>Z1,undefined:()=>ap,ulid:()=>P1,time:()=>K1,string:()=>ep,sha512_hex:()=>b8,sha512_base64url:()=>_8,sha512_base64:()=>y8,sha384_hex:()=>m8,sha384_base64url:()=>g8,sha384_base64:()=>v8,sha256_hex:()=>d8,sha256_base64url:()=>p8,sha256_base64:()=>h8,sha1_hex:()=>u8,sha1_base64url:()=>f8,sha1_base64:()=>l8,rfc5322Email:()=>Q9,number:()=>R0,null:()=>ip,nanoid:()=>D1,md5_hex:()=>o8,md5_base64url:()=>c8,md5_base64:()=>s8,mac:()=>F1,lowercase:()=>op,ksuid:()=>M1,ipv6:()=>q1,ipv4:()=>B1,integer:()=>rp,idnEmail:()=>e8,html5Email:()=>K9,hostname:()=>n8,hex:()=>a8,guid:()=>L1,extendedDuration:()=>W9,emoji:()=>j1,email:()=>U1,e164:()=>W1,duration:()=>R1,domain:()=>i8,datetime:()=>Q1,date:()=>V1,cuid2:()=>A1,cuid:()=>N1,cidrv6:()=>G1,cidrv4:()=>H1,browserEmail:()=>t8,boolean:()=>np,bigint:()=>tp,base64url:()=>D0,base64:()=>J1});var N1=/^[cC][^\s-]{8,}$/,A1=/^[0-9a-z]+$/,P1=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,O1=/^[0-9a-vA-V]{20}$/,M1=/^[A-Za-z0-9]{27}$/,D1=/^[a-zA-Z0-9_-]{21}$/,R1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,W9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,L1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wr=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Y9=wr(4),V9=wr(6),X9=wr(7),U1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,K9=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Q9=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Z1=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,e8=Z1,t8=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,r8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function j1(){return new RegExp(r8,"u")}var B1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,q1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,F1=e=>{let r=Pt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},H1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,G1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,J1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,D0=/^[A-Za-z0-9_-]*$/,n8=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,i8=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,W1=/^\+[1-9]\d{6,14}$/,Y1="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",V1=new RegExp(`^${Y1}$`);function X1(e){return typeof e.precision=="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function K1(e){return new RegExp(`^${X1(e)}$`)}function Q1(e){let r=X1({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${r}(?:${n.join("|")})`;return new RegExp(`^${Y1}T(?:${i})$`)}var ep=e=>{let r=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},tp=/^-?\d+n?$/,rp=/^-?\d+$/,R0=/^-?\d+(?:\.\d+)?$/,np=/^(?:true|false)$/i,ip=/^null$/i,ap=/^undefined$/i,op=/^[^A-Z]*$/,sp=/^[^a-z]*$/,a8=/^[0-9a-fA-F]*$/;function rn(e,r){return new RegExp(`^[A-Za-z0-9+/]{${e}}${r}$`)}function nn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var o8=/^[0-9a-fA-F]{32}$/,s8=rn(22,"=="),c8=nn(22),u8=/^[0-9a-fA-F]{40}$/,l8=rn(27,"="),f8=nn(27),d8=/^[0-9a-fA-F]{64}$/,h8=rn(43,"="),p8=nn(43),m8=/^[0-9a-fA-F]{96}$/,v8=rn(64,""),g8=nn(64),b8=/^[0-9a-fA-F]{128}$/,y8=rn(86,"=="),_8=nn(86),qe=F("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),cp={number:"number",bigint:"bigint",object:"date"},L0=F("$ZodCheckLessThan",(e,r)=>{qe.init(e,r);let n=cp[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,a=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<a&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),U0=F("$ZodCheckGreaterThan",(e,r)=>{qe.init(e,r);let n=cp[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,a=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>a&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),up=F("$ZodCheckMultipleOf",(e,r)=>{qe.init(e,r),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):m1(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),lp=F("$ZodCheckNumberFormat",(e,r)=>{var o;qe.init(e,r),r.format=r.format||"float64";let n=(o=r.format)==null?void 0:o.includes("int"),i=n?"int":"number",[t,a]=w1[r.format];e._zod.onattach.push(s=>{let l=s._zod.bag;l.format=r.format,l.minimum=t,l.maximum=a,n&&(l.pattern=rp)}),e._zod.check=s=>{let l=s.value;if(n){if(!Number.isInteger(l)){s.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?s.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort}):s.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort});return}}l<t&&s.issues.push({origin:"number",input:l,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),l>a&&s.issues.push({origin:"number",input:l,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!r.abort})}}),fp=F("$ZodCheckBigIntFormat",(e,r)=>{qe.init(e,r);let[n,i]=k1[r.format];e._zod.onattach.push(t=>{let a=t._zod.bag;a.format=r.format,a.minimum=n,a.maximum=i}),e._zod.check=t=>{let a=t.value;a<n&&t.issues.push({origin:"bigint",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),a>i&&t.issues.push({origin:"bigint",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!r.abort})}}),dp=F("$ZodCheckMaxSize",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!sr(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{let t=i.value;t.size<=r.maximum||i.issues.push({origin:ri(t),code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),hp=F("$ZodCheckMinSize",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!sr(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;t.size>=r.minimum||i.issues.push({origin:ri(t),code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),pp=F("$ZodCheckSizeEquals",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!sr(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.size,t.maximum=r.size,t.size=r.size}),e._zod.check=i=>{let t=i.value,a=t.size;if(a===r.size)return;let o=a>r.size;i.issues.push({origin:ri(t),...o?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),mp=F("$ZodCheckMaxLength",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!sr(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<t&&(i._zod.bag.maximum=r.maximum)}),e._zod.check=i=>{let t=i.value;if(t.length<=r.maximum)return;let a=ni(t);i.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),vp=F("$ZodCheckMinLength",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!sr(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;if(t.length>=r.minimum)return;let a=ni(t);i.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),gp=F("$ZodCheckLengthEquals",(e,r)=>{var n;qe.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!sr(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=i=>{let t=i.value,a=t.length;if(a===r.length)return;let o=ni(t),s=a>r.length;i.issues.push({origin:o,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),an=F("$ZodCheckStringFormat",(e,r)=>{var n,i;qe.init(e,r),e._zod.onattach.push(t=>{let a=t._zod.bag;a.format=r.format,r.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(r.pattern))}),r.pattern?(n=e._zod).check??(n.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(i=e._zod).check??(i.check=()=>{})}),bp=F("$ZodCheckRegex",(e,r)=>{an.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),yp=F("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=op),an.init(e,r)}),_p=F("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=sp),an.init(e,r)}),wp=F("$ZodCheckIncludes",(e,r)=>{qe.init(e,r);let n=Pt(r.includes),i=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=i,e._zod.onattach.push(t=>{let a=t._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),kp=F("$ZodCheckStartsWith",(e,r)=>{qe.init(e,r);let n=new RegExp(`^${Pt(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(r.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:i.value,inst:e,continue:!r.abort})}}),$p=F("$ZodCheckEndsWith",(e,r)=>{qe.init(e,r);let n=new RegExp(`.*${Pt(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(r.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:i.value,inst:e,continue:!r.abort})}});function al(e,r,n){e.issues.length&&r.issues.push(...Tt(n,e.issues))}var xp=F("$ZodCheckProperty",(e,r)=>{qe.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>al(t,n,r.property));al(i,n,r.property)}}),Sp=F("$ZodCheckMimeType",(e,r)=>{qe.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e,continue:!r.abort})}}),Ip=F("$ZodCheckOverwrite",(e,r)=>{qe.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});class Tp{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let n=r.split(`
|
|
48
|
+
`).filter(a=>a),i=Math.min(...n.map(a=>a.length-a.trimStart().length)),t=n.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of t)this.content.push(a)}compile(){let r=Function,n=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(t=>` ${t}`)];return new r(...n,i.join(`
|
|
49
|
+
`))}}var Cp={major:4,minor:3,patch:5},ye=F("$ZodType",(e,r)=>{var t;var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Cp;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let a of i)for(let o of a._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),(t=e._zod.deferred)==null||t.push(()=>{e._zod.run=e._zod.parse});else{let a=(s,l,d)=>{let p=tr(s),m;for(let f of l){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(p)continue;let u=s.issues.length,h=f._zod.check(s);if(h instanceof Promise&&(d==null?void 0:d.async)===!1)throw new rr;if(m||h instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await h,s.issues.length!==u&&(p||(p=tr(s,u)))});else{if(s.issues.length===u)continue;p||(p=tr(s,u))}}return m?m.then(()=>s):s},o=(s,l,d)=>{if(tr(s))return s.aborted=!0,s;let p=a(l,i,d);if(p instanceof Promise){if(d.async===!1)throw new rr;return p.then(m=>e._zod.parse(m,d))}return e._zod.parse(p,d)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){let p=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return p instanceof Promise?p.then(m=>o(m,s,l)):o(p,s,l)}let d=e._zod.parse(s,l);if(d instanceof Promise){if(l.async===!1)throw new rr;return d.then(p=>a(p,i,l))}return a(d,i,l)}}$e(e,"~standard",()=>({validate:a=>{var o;try{let s=z1(e,a);return s.success?{value:s.data}:{issues:(o=s.error)==null?void 0:o.issues}}catch{return E1(e,a).then(l=>{var d;return l.success?{value:l.data}:{issues:(d=l.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),on=F("$ZodString",(e,r)=>{var n;ye.init(e,r),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??ep(e._zod.bag),e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),De=F("$ZodStringFormat",(e,r)=>{an.init(e,r),on.init(e,r)}),zp=F("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=L1),De.init(e,r)}),Ep=F("$ZodUUID",(e,r)=>{if(r.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(n===void 0)throw Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=wr(n))}else r.pattern??(r.pattern=wr());De.init(e,r)}),Np=F("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=U1),De.init(e,r)}),Ap=F("$ZodURL",(e,r)=>{De.init(e,r),e._zod.check=n=>{try{let i=n.value.trim(),t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,!r.hostname.test(t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,!r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),Pp=F("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=j1()),De.init(e,r)}),Op=F("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=D1),De.init(e,r)}),Mp=F("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=N1),De.init(e,r)}),Dp=F("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=A1),De.init(e,r)}),Rp=F("$ZodULID",(e,r)=>{r.pattern??(r.pattern=P1),De.init(e,r)}),Lp=F("$ZodXID",(e,r)=>{r.pattern??(r.pattern=O1),De.init(e,r)}),Up=F("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=M1),De.init(e,r)}),Zp=F("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=Q1(r)),De.init(e,r)}),jp=F("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=V1),De.init(e,r)}),Bp=F("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=K1(r)),De.init(e,r)}),qp=F("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=R1),De.init(e,r)}),Fp=F("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=B1),De.init(e,r),e._zod.bag.format="ipv4"}),Hp=F("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=q1),De.init(e,r),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!r.abort})}}}),Gp=F("$ZodMAC",(e,r)=>{r.pattern??(r.pattern=F1(r.delimiter)),De.init(e,r),e._zod.bag.format="mac"}),Jp=F("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=H1),De.init(e,r)}),Wp=F("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=G1),De.init(e,r),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw Error();let[t,a]=i;if(!a)throw Error();let o=Number(a);if(`${o}`!==a||o<0||o>128)throw Error();new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!r.abort})}}});function Z0(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Yp=F("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=J1),De.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Z0(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!r.abort})}});function Vp(e){if(!D0.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return Z0(n)}var Xp=F("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=D0),De.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Vp(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!r.abort})}}),Kp=F("$ZodE164",(e,r)=>{r.pattern??(r.pattern=W1),De.init(e,r)});function Qp(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch{return!1}}var em=F("$ZodJWT",(e,r)=>{De.init(e,r),e._zod.check=n=>{Qp(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),tm=F("$ZodCustomStringFormat",(e,r)=>{De.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),j0=F("$ZodNumber",(e,r)=>{ye.init(e,r),e._zod.pattern=e._zod.bag.pattern??R0,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=Number(n.value)}catch{}let t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;let a=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...a?{received:a}:{}}),n}}),rm=F("$ZodNumberFormat",(e,r)=>{lp.init(e,r),j0.init(e,r)}),B0=F("$ZodBoolean",(e,r)=>{ye.init(e,r),e._zod.pattern=np,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch{}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),q0=F("$ZodBigInt",(e,r)=>{ye.init(e,r),e._zod.pattern=tp,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),nm=F("$ZodBigIntFormat",(e,r)=>{fp.init(e,r),q0.init(e,r)}),im=F("$ZodSymbol",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),am=F("$ZodUndefined",(e,r)=>{ye.init(e,r),e._zod.pattern=ap,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),om=F("$ZodNull",(e,r)=>{ye.init(e,r),e._zod.pattern=ip,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),sm=F("$ZodAny",(e,r)=>{ye.init(e,r),e._zod.parse=n=>n}),cm=F("$ZodUnknown",(e,r)=>{ye.init(e,r),e._zod.parse=n=>n}),um=F("$ZodNever",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),lm=F("$ZodVoid",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),fm=F("$ZodDate",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch{}let t=n.value,a=t instanceof Date;return a&&!Number.isNaN(t.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:t,...a?{received:"Invalid Date"}:{},inst:e}),n}});function ol(e,r,n){e.issues.length&&r.issues.push(...Tt(n,e.issues)),r.value[n]=e.value}var dm=F("$ZodArray",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let a=[];for(let o=0;o<t.length;o++){let s=t[o],l=r.element._zod.run({value:s,issues:[]},i);l instanceof Promise?a.push(l.then(d=>ol(d,n,o))):ol(l,n,o)}return a.length?Promise.all(a).then(()=>n):n}});function jn(e,r,n,i,t){if(e.issues.length){if(t&&!(n in i))return;r.issues.push(...Tt(n,e.issues))}e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}function hm(e){var i,t,a,o;let r=Object.keys(e.shape);for(let s of r)if(!((o=(a=(t=(i=e.shape)==null?void 0:i[s])==null?void 0:t._zod)==null?void 0:a.traits)!=null&&o.has("$ZodType")))throw Error(`Invalid element at key "${s}": expected a Zod schema`);let n=_1(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)}}function pm(e,r,n,i,t,a){let o=[],s=t.keySet,l=t.catchall._zod,d=l.def.type,p=l.optout==="optional";for(let m in r){if(s.has(m))continue;if(d==="never"){o.push(m);continue}let f=l.run({value:r[m],issues:[]},i);f instanceof Promise?e.push(f.then(u=>jn(u,n,m,r,p))):jn(f,n,m,r,p)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:r,inst:a}),e.length?Promise.all(e).then(()=>n):n}var mm=F("$ZodObject",(e,r)=>{var o;if(ye.init(e,r),!((o=Object.getOwnPropertyDescriptor(r,"shape"))!=null&&o.get)){let s=r.shape;Object.defineProperty(r,"shape",{get:()=>{let l={...s};return Object.defineProperty(r,"shape",{value:l}),l}})}let n=Xr(()=>hm(r));$e(e._zod,"propValues",()=>{let s=r.shape,l={};for(let d in s){let p=s[d]._zod;if(p.values){l[d]??(l[d]=new Set);for(let m of p.values)l[d].add(m)}}return l});let i=_r,t=r.catchall,a;e._zod.parse=(s,l)=>{a??(a=n.value);let d=s.value;if(!i(d))return s.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),s;s.value={};let p=[],m=a.shape;for(let f of a.keys){let u=m[f],h=u._zod.optout==="optional",c=u._zod.run({value:d[f],issues:[]},l);c instanceof Promise?p.push(c.then(v=>jn(v,s,f,d,h))):jn(c,s,f,d,h)}return t?pm(p,d,s,l,n.value,e):p.length?Promise.all(p).then(()=>s):s}}),vm=F("$ZodObjectJIT",(e,r)=>{mm.init(e,r);let n=e._zod.parse,i=Xr(()=>hm(r)),t=m=>{var g,w;let f=new Tp(["shape","payload","ctx"]),u=i.value,h=k=>{let $=Fs(k);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};f.write("const input = payload.value;");let c=Object.create(null),v=0;for(let k of u.keys)c[k]=`key_${v++}`;f.write("const newResult = {};");for(let k of u.keys){let $=c[k],O=Fs(k),P=((w=(g=m[k])==null?void 0:g._zod)==null?void 0:w.optout)==="optional";f.write(`const ${$} = ${h(k)};`),P?f.write(`
|
|
50
|
+
if (${$}.issues.length) {
|
|
51
|
+
if (${O} in input) {
|
|
52
|
+
payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
53
|
+
...iss,
|
|
54
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
55
|
+
})));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (${$}.value === undefined) {
|
|
60
|
+
if (${O} in input) {
|
|
61
|
+
newResult[${O}] = undefined;
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
newResult[${O}] = ${$}.value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
`):f.write(`
|
|
68
|
+
if (${$}.issues.length) {
|
|
69
|
+
payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
|
|
70
|
+
...iss,
|
|
71
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
72
|
+
})));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (${$}.value === undefined) {
|
|
76
|
+
if (${O} in input) {
|
|
77
|
+
newResult[${O}] = undefined;
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
newResult[${O}] = ${$}.value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(k,$)=>b(m,k,$)},a,o=_r,s=!Rn.jitless,l=s&&g1.value,d=r.catchall,p;e._zod.parse=(m,f)=>{p??(p=i.value);let u=m.value;return o(u)?s&&l&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(a||(a=t(r.shape)),m=a(m,f),d?pm([],u,m,f,p,e):m):n(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),m)}});function sl(e,r,n,i){for(let a of e)if(a.issues.length===0)return r.value=a.value,r;let t=e.filter(a=>!tr(a));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(a=>a.issues.map(o=>kt(o,i,st())))}),r)}var ii=F("$ZodUnion",(e,r)=>{ye.init(e,r),$e(e._zod,"optin",()=>r.options.some(t=>t._zod.optin==="optional")?"optional":void 0),$e(e._zod,"optout",()=>r.options.some(t=>t._zod.optout==="optional")?"optional":void 0),$e(e._zod,"values",()=>{if(r.options.every(t=>t._zod.values))return new Set(r.options.flatMap(t=>Array.from(t._zod.values)))}),$e(e._zod,"pattern",()=>{if(r.options.every(t=>t._zod.pattern)){let t=r.options.map(a=>a._zod.pattern);return new RegExp(`^(${t.map(a=>ti(a.source)).join("|")})$`)}});let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,a)=>{if(n)return i(t,a);let o=!1,s=[];for(let l of r.options){let d=l._zod.run({value:t.value,issues:[]},a);if(d instanceof Promise)s.push(d),o=!0;else{if(d.issues.length===0)return d;s.push(d)}}return o?Promise.all(s).then(l=>sl(l,t,e,a)):sl(s,t,e,a)}});function cl(e,r,n,i){let t=e.filter(a=>a.issues.length===0);return t.length===1?(r.value=t[0].value,r):(t.length===0?r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(a=>a.issues.map(o=>kt(o,i,st())))}):r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:[],inclusive:!1}),r)}var gm=F("$ZodXor",(e,r)=>{ii.init(e,r),r.inclusive=!1;let n=r.options.length===1,i=r.options[0]._zod.run;e._zod.parse=(t,a)=>{if(n)return i(t,a);let o=!1,s=[];for(let l of r.options){let d=l._zod.run({value:t.value,issues:[]},a);d instanceof Promise?(s.push(d),o=!0):s.push(d)}return o?Promise.all(s).then(l=>cl(l,t,e,a)):cl(s,t,e,a)}}),bm=F("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,ii.init(e,r);let n=e._zod.parse;$e(e._zod,"propValues",()=>{let t={};for(let a of r.options){let o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(let[s,l]of Object.entries(o)){t[s]||(t[s]=new Set);for(let d of l)t[s].add(d)}}return t});let i=Xr(()=>{var o;let t=r.options,a=new Map;for(let s of t){let l=(o=s._zod.propValues)==null?void 0:o[r.discriminator];if(!l||l.size===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(s)}"`);for(let d of l){if(a.has(d))throw Error(`Duplicate discriminator value "${String(d)}"`);a.set(d,s)}}return a});e._zod.parse=(t,a)=>{let o=t.value;if(!_r(o))return t.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),t;let s=i.value.get(o==null?void 0:o[r.discriminator]);return s?s._zod.run(t,a):r.unionFallback?n(t,a):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:o,path:[r.discriminator],inst:e}),t)}}),ym=F("$ZodIntersection",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,a=r.left._zod.run({value:t,issues:[]},i),o=r.right._zod.run({value:t,issues:[]},i);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([s,l])=>ul(n,s,l)):ul(n,a,o)}});function Js(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(nr(e)&&nr(r)){let n=Object.keys(r),i=Object.keys(e).filter(a=>n.indexOf(a)!==-1),t={...e,...r};for(let a of i){let o=Js(e[a],r[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};t[a]=o.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let t=e[i],a=r[i],o=Js(t,a);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ul(e,r,n){let i=new Map,t;for(let s of r.issues)if(s.code==="unrecognized_keys"){t??(t=s);for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(s);let a=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&t&&e.issues.push({...t,keys:a}),tr(e))return e;let o=Js(r.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var F0=F("$ZodTuple",(e,r)=>{ye.init(e,r);let n=r.items;e._zod.parse=(i,t)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let o=[],s=[...n].reverse().findIndex(p=>p._zod.optin!=="optional"),l=s===-1?0:n.length-s;if(!r.rest){let p=a.length>n.length,m=a.length<l-1;if(p||m)return i.issues.push({...p?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:a,inst:e,origin:"array"}),i}let d=-1;for(let p of n){if(d++,d>=a.length&&d>=l)continue;let m=p._zod.run({value:a[d],issues:[]},t);m instanceof Promise?o.push(m.then(f=>In(f,i,d))):In(m,i,d)}if(r.rest){let p=a.slice(n.length);for(let m of p){d++;let f=r.rest._zod.run({value:m,issues:[]},t);f instanceof Promise?o.push(f.then(u=>In(u,i,d))):In(f,i,d)}}return o.length?Promise.all(o).then(()=>i):i}});function In(e,r,n){e.issues.length&&r.issues.push(...Tt(n,e.issues)),r.value[n]=e.value}var _m=F("$ZodRecord",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!nr(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let a=[],o=r.keyType._zod.values;if(o){n.value={};let s=new Set;for(let d of o)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){s.add(typeof d=="number"?d.toString():d);let p=r.valueType._zod.run({value:t[d],issues:[]},i);p instanceof Promise?a.push(p.then(m=>{m.issues.length&&n.issues.push(...Tt(d,m.issues)),n.value[d]=m.value})):(p.issues.length&&n.issues.push(...Tt(d,p.issues)),n.value[d]=p.value)}let l;for(let d in t)s.has(d)||(l=l??[],l.push(d));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{n.value={};for(let s of Reflect.ownKeys(t)){if(s==="__proto__")continue;let l=r.keyType._zod.run({value:s,issues:[]},i);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&R0.test(s)&&l.issues.length&&l.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){let p=r.keyType._zod.run({value:Number(s),issues:[]},i);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){r.mode==="loose"?n.value[s]=t[s]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>kt(p,i,st())),input:s,path:[s],inst:e});continue}let d=r.valueType._zod.run({value:t[s],issues:[]},i);d instanceof Promise?a.push(d.then(p=>{p.issues.length&&n.issues.push(...Tt(s,p.issues)),n.value[l.value]=p.value})):(d.issues.length&&n.issues.push(...Tt(s,d.issues)),n.value[l.value]=d.value)}}return a.length?Promise.all(a).then(()=>n):n}}),wm=F("$ZodMap",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of t){let l=r.keyType._zod.run({value:o,issues:[]},i),d=r.valueType._zod.run({value:s,issues:[]},i);l instanceof Promise||d instanceof Promise?a.push(Promise.all([l,d]).then(([p,m])=>{ll(p,m,n,o,t,e,i)})):ll(l,d,n,o,t,e,i)}return a.length?Promise.all(a).then(()=>n):n}});function ll(e,r,n,i,t,a,o){e.issues.length&&(Un.has(typeof i)?n.issues.push(...Tt(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:a,issues:e.issues.map(s=>kt(s,o,st()))})),r.issues.length&&(Un.has(typeof i)?n.issues.push(...Tt(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:a,key:i,issues:r.issues.map(s=>kt(s,o,st()))})),n.value.set(e.value,r.value)}var km=F("$ZodSet",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let a=[];n.value=new Set;for(let o of t){let s=r.valueType._zod.run({value:o,issues:[]},i);s instanceof Promise?a.push(s.then(l=>fl(l,n))):fl(s,n)}return a.length?Promise.all(a).then(()=>n):n}});function fl(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var $m=F("$ZodEnum",(e,r)=>{ye.init(e,r);let n=$0(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(t=>Un.has(typeof t)).map(t=>typeof t=="string"?Pt(t):t.toString()).join("|")})$`),e._zod.parse=(t,a)=>{let o=t.value;return i.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),xm=F("$ZodLiteral",(e,r)=>{if(ye.init(e,r),r.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(r.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.values.map(i=>typeof i=="string"?Pt(i):i?Pt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,t)=>{let a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r.values,input:a,inst:e}),i}}),Sm=F("$ZodFile",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Im=F("$ZodTransform",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ei(e.constructor.name);let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(n.value=a,n));if(t instanceof Promise)throw new rr;return n.value=t,n}});function dl(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}var H0=F("$ZodOptional",(e,r)=>{ye.init(e,r),e._zod.optin="optional",e._zod.optout="optional",$e(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),$e(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${ti(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>dl(a,n.value)):dl(t,n.value)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),Tm=F("$ZodExactOptional",(e,r)=>{H0.init(e,r),$e(e._zod,"values",()=>r.innerType._zod.values),$e(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(n,i)=>r.innerType._zod.run(n,i)}),Cm=F("$ZodNullable",(e,r)=>{ye.init(e,r),$e(e._zod,"optin",()=>r.innerType._zod.optin),$e(e._zod,"optout",()=>r.innerType._zod.optout),$e(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${ti(n.source)}|null)$`):void 0}),$e(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),zm=F("$ZodDefault",(e,r)=>{ye.init(e,r),e._zod.optin="optional",$e(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>hl(a,r)):hl(t,r)}});function hl(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var Em=F("$ZodPrefault",(e,r)=>{ye.init(e,r),e._zod.optin="optional",$e(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),Nm=F("$ZodNonOptional",(e,r)=>{ye.init(e,r),$e(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>pl(a,e)):pl(t,e)}});function pl(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var Am=F("$ZodSuccess",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ei("ZodSuccess");let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>(n.value=a.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),Pm=F("$ZodCatch",(e,r)=>{ye.init(e,r),$e(e._zod,"optin",()=>r.innerType._zod.optin),$e(e._zod,"optout",()=>r.innerType._zod.optout),$e(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(a=>(n.value=a.value,a.issues.length&&(n.value=r.catchValue({...n,error:{issues:a.issues.map(o=>kt(o,i,st()))},input:n.value}),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue({...n,error:{issues:t.issues.map(a=>kt(a,i,st()))},input:n.value}),n.issues=[]),n)}}),Om=F("$ZodNaN",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Mm=F("$ZodPipe",(e,r)=>{ye.init(e,r),$e(e._zod,"values",()=>r.in._zod.values),$e(e._zod,"optin",()=>r.in._zod.optin),$e(e._zod,"optout",()=>r.out._zod.optout),$e(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let a=r.out._zod.run(n,i);return a instanceof Promise?a.then(o=>Tn(o,r.in,i)):Tn(a,r.in,i)}let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(a=>Tn(a,r.out,i)):Tn(t,r.out,i)}});function Tn(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},n)}var G0=F("$ZodCodec",(e,r)=>{ye.init(e,r),$e(e._zod,"values",()=>r.in._zod.values),$e(e._zod,"optin",()=>r.in._zod.optin),$e(e._zod,"optout",()=>r.out._zod.optout),$e(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(a=>Cn(a,r,i)):Cn(t,r,i)}else{let t=r.out._zod.run(n,i);return t instanceof Promise?t.then(a=>Cn(a,r,i)):Cn(t,r,i)}}});function Cn(e,r,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let i=r.transform(e.value,e);return i instanceof Promise?i.then(t=>zn(e,t,r.out,n)):zn(e,i,r.out,n)}else{let i=r.reverseTransform(e.value,e);return i instanceof Promise?i.then(t=>zn(e,t,r.in,n)):zn(e,i,r.in,n)}}function zn(e,r,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:r,issues:e.issues},i)}var Dm=F("$ZodReadonly",(e,r)=>{ye.init(e,r),$e(e._zod,"propValues",()=>r.innerType._zod.propValues),$e(e._zod,"values",()=>r.innerType._zod.values),$e(e._zod,"optin",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optin}),$e(e._zod,"optout",()=>{var n,i;return(i=(n=r.innerType)==null?void 0:n._zod)==null?void 0:i.optout}),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(ml):ml(t)}});function ml(e){return e.value=Object.freeze(e.value),e}var Rm=F("$ZodTemplateLiteral",(e,r)=>{ye.init(e,r);let n=[];for(let i of r.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${i._zod.traits}`);let a=t.startsWith("^")?1:0,o=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(a,o))}else if(i===null||y1.has(typeof i))n.push(Pt(`${i}`));else throw Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,t)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:r.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Lm=F("$ZodFunction",(e,r)=>(ye.init(e,r),e._def=r,e._zod.def=r,e.implement=n=>{if(typeof n!="function")throw Error("implement() must be called with a function");return function(...i){let t=e._def.input?Hs(e._def.input,i):i,a=Reflect.apply(n,this,t);return e._def.output?Hs(e._def.output,a):a}},e.implementAsync=n=>{if(typeof n!="function")throw Error("implementAsync() must be called with a function");return async function(...i){let t=e._def.input?await Gs(e._def.input,i):i,a=await Reflect.apply(n,this,t);return e._def.output?await Gs(e._def.output,a):a}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new F0({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),Um=F("$ZodPromise",(e,r)=>{ye.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),Zm=F("$ZodLazy",(e,r)=>{ye.init(e,r),$e(e._zod,"innerType",()=>r.getter()),$e(e._zod,"pattern",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.pattern}),$e(e._zod,"propValues",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.propValues}),$e(e._zod,"optin",()=>{var n,i;return((i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optin)??void 0}),$e(e._zod,"optout",()=>{var n,i;return((i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optout)??void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),jm=F("$ZodCustom",(e,r)=>{qe.init(e,r),ye.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(a=>vl(a,n,i,e));vl(t,n,i,e)}});function vl(e,r,n,i){if(!e){let t={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),r.issues.push(Zn(t))}}var J0={};Ot(J0,{zhTW:()=>nk,zhCN:()=>tk,yo:()=>ak,vi:()=>Qw,uz:()=>Xw,ur:()=>Yw,uk:()=>Fm,ua:()=>Jw,tr:()=>Hw,th:()=>qw,ta:()=>jw,sv:()=>Uw,sl:()=>Rw,ru:()=>Mw,pt:()=>Pw,ps:()=>zw,pl:()=>Nw,ota:()=>Tw,no:()=>Sw,nl:()=>$w,ms:()=>ww,mk:()=>yw,lt:()=>gw,ko:()=>mw,km:()=>qm,kh:()=>hw,ka:()=>fw,ja:()=>uw,it:()=>sw,is:()=>aw,id:()=>nw,hy:()=>tw,hu:()=>Q8,he:()=>X8,frCA:()=>Y8,fr:()=>J8,fi:()=>H8,fa:()=>q8,es:()=>j8,eo:()=>U8,en:()=>Bm,de:()=>D8,da:()=>O8,cs:()=>A8,ca:()=>E8,bg:()=>C8,be:()=>I8,az:()=>x8,ar:()=>k8});var w8=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function r(t){return e[t]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${t.expected}، ولكن تم إدخال ${s}`:`مدخلات غير مقبولة: يفترض إدخال ${a}، ولكن تم إدخال ${s}`}case"invalid_value":return t.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${ve(t.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?` أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${a} ${t.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${a} ${t.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${t.prefix}"`:a.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${a.suffix}"`:a.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${a.includes}"`:a.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${a.pattern}`:`${n[a.format]??t.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${t.divisor}`;case"unrecognized_keys":return`معرف${t.keys.length>1?"ات":""} غريب${t.keys.length>1?"ة":""}: ${te(t.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${t.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${t.origin}`;default:return"مدخل غير مقبول"}}};function k8(){return{localeError:w8()}}var $8=()=>{let e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Yanlış dəyər: gözlənilən instanceof ${t.expected}, daxil olan ${s}`:`Yanlış dəyər: gözlənilən ${a}, daxil olan ${s}`}case"invalid_value":return t.values.length===1?`Yanlış dəyər: gözlənilən ${ve(t.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${a}${t.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Çox kiçik: gözlənilən ${t.origin} ${a}${t.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Yanlış mətn: "${a.prefix}" ilə başlamalıdır`:a.format==="ends_with"?`Yanlış mətn: "${a.suffix}" ilə bitməlidir`:a.format==="includes"?`Yanlış mətn: "${a.includes}" daxil olmalıdır`:a.format==="regex"?`Yanlış mətn: ${a.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[a.format]??t.format}`}case"not_multiple_of":return`Yanlış ədəd: ${t.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${t.keys.length>1?"lar":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${t.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function x8(){return{localeError:$8()}}function gl(e,r,n,i){let t=Math.abs(e),a=t%10,o=t%100;return o>=11&&o<=19?i:a===1?r:a>=2&&a<=4?n:i}var S8=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function r(t){return e[t]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Няправільны ўвод: чакаўся instanceof ${t.expected}, атрымана ${s}`:`Няправільны ўвод: чакаўся ${a}, атрымана ${s}`}case"invalid_value":return t.values.length===1?`Няправільны ўвод: чакалася ${ve(t.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);if(o){let s=Number(t.maximum),l=gl(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна ${o.verb} ${a}${t.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна быць ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);if(o){let s=Number(t.minimum),l=gl(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${t.origin} павінна ${o.verb} ${a}${t.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${t.origin} павінна быць ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${a.prefix}"`:a.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${a.suffix}"`:a.format==="includes"?`Няправільны радок: павінен змяшчаць "${a.includes}"`:a.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${a.pattern}`:`Няправільны ${n[a.format]??t.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${t.keys.length>1?"ключы":"ключ"}: ${te(t.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${t.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${t.origin}`;default:return"Няправільны ўвод"}}};function I8(){return{localeError:S8()}}var T8=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function r(t){return e[t]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Невалиден вход: очакван instanceof ${t.expected}, получен ${s}`:`Невалиден вход: очакван ${a}, получен ${s}`}case"invalid_value":return t.values.length===1?`Невалиден вход: очакван ${ve(t.values[0])}`:`Невалидна опция: очаквано едно от ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Твърде голямо: очаква се ${t.origin??"стойност"} да съдържа ${a}${t.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${t.origin??"стойност"} да бъде ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Твърде малко: очаква се ${t.origin} да съдържа ${a}${t.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${t.origin} да бъде ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;if(a.format==="starts_with")return`Невалиден низ: трябва да започва с "${a.prefix}"`;if(a.format==="ends_with")return`Невалиден низ: трябва да завършва с "${a.suffix}"`;if(a.format==="includes")return`Невалиден низ: трябва да включва "${a.includes}"`;if(a.format==="regex")return`Невалиден низ: трябва да съвпада с ${a.pattern}`;let o="Невалиден";return a.format==="emoji"&&(o="Невалидно"),a.format==="datetime"&&(o="Невалидно"),a.format==="date"&&(o="Невалидна"),a.format==="time"&&(o="Невалидно"),a.format==="duration"&&(o="Невалидна"),`${o} ${n[a.format]??t.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${t.divisor}`;case"unrecognized_keys":return`Неразпознат${t.keys.length>1?"и":""} ключ${t.keys.length>1?"ове":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${t.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${t.origin}`;default:return"Невалиден вход"}}};function C8(){return{localeError:T8()}}var z8=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Tipus invàlid: s'esperava instanceof ${t.expected}, s'ha rebut ${s}`:`Tipus invàlid: s'esperava ${a}, s'ha rebut ${s}`}case"invalid_value":return t.values.length===1?`Valor invàlid: s'esperava ${ve(t.values[0])}`:`Opció invàlida: s'esperava una de ${te(t.values," o ")}`;case"too_big":{let a=t.inclusive?"com a màxim":"menys de",o=r(t.origin);return o?`Massa gran: s'esperava que ${t.origin??"el valor"} contingués ${a} ${t.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"com a mínim":"més de",o=r(t.origin);return o?`Massa petit: s'esperava que ${t.origin} contingués ${a} ${t.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Format invàlid: ha de començar amb "${a.prefix}"`:a.format==="ends_with"?`Format invàlid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format invàlid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${a.pattern}`:`Format invàlid per a ${n[a.format]??t.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${t.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${t.origin}`;default:return"Entrada invàlida"}}};function E8(){return{localeError:z8()}}var N8=()=>{let e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function r(t){return e[t]??null}let n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Neplatný vstup: očekáváno instanceof ${t.expected}, obdrženo ${s}`:`Neplatný vstup: očekáváno ${a}, obdrženo ${s}`}case"invalid_value":return t.values.length===1?`Neplatný vstup: očekáváno ${ve(t.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Hodnota je příliš velká: ${t.origin??"hodnota"} musí mít ${a}${t.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${t.origin??"hodnota"} musí být ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Hodnota je příliš malá: ${t.origin??"hodnota"} musí mít ${a}${t.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${t.origin??"hodnota"} musí být ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Neplatný řetězec: musí začínat na "${a.prefix}"`:a.format==="ends_with"?`Neplatný řetězec: musí končit na "${a.suffix}"`:a.format==="includes"?`Neplatný řetězec: musí obsahovat "${a.includes}"`:a.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${a.pattern}`:`Neplatný formát ${n[a.format]??t.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${t.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${te(t.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${t.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${t.origin}`;default:return"Neplatný vstup"}}};function A8(){return{localeError:N8()}}var P8=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${s}`:`Ugyldigt input: forventede ${a}, fik ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig værdi: forventede ${ve(t.values[0])}`:`Ugyldigt valg: forventede en af følgende ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin),s=i[t.origin]??t.origin;return o?`For stor: forventede ${s??"value"} ${o.verb} ${a} ${t.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin),s=i[t.origin]??t.origin;return o?`For lille: forventede ${s} ${o.verb} ${a} ${t.minimum.toString()} ${o.unit}`:`For lille: forventede ${s} havde ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche mønsteret ${a.pattern}`:`Ugyldig ${n[a.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${t.origin}`;default:return"Ugyldigt input"}}};function O8(){return{localeError:P8()}}var M8=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){return e[t]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ungültige Eingabe: erwartet instanceof ${t.expected}, erhalten ${s}`:`Ungültige Eingabe: erwartet ${a}, erhalten ${s}`}case"invalid_value":return t.values.length===1?`Ungültige Eingabe: erwartet ${ve(t.values[0])}`:`Ungültige Option: erwartet eine von ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Zu groß: erwartet, dass ${t.origin??"Wert"} ${a}${t.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${t.origin??"Wert"} ${a}${t.maximum.toString()} ist`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Zu klein: erwartet, dass ${t.origin} ${a}${t.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${a}${t.minimum.toString()} ist`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ungültiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ungültiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ungültiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ungültiger String: muss dem Muster ${a.pattern} entsprechen`:`Ungültig: ${n[a.format]??t.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${t.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${t.origin}`;default:return"Ungültige Eingabe"}}};function D8(){return{localeError:M8()}}var R8=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return`Invalid input: expected ${a}, received ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${ve(t.values[0])}`:`Invalid option: expected one of ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Too big: expected ${t.origin??"value"} to have ${a}${t.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Too small: expected ${t.origin} to have ${a}${t.minimum.toString()} ${o.unit}`:`Too small: expected ${t.origin} to be ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function Bm(){return{localeError:R8()}}var L8=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(t){return e[t]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendiĝis instanceof ${t.expected}, riceviĝis ${s}`:`Nevalida enigo: atendiĝis ${a}, riceviĝis ${s}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendiĝis ${ve(t.values[0])}`:`Nevalida opcio: atendiĝis unu el ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${a}${t.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Tro malgranda: atendiĝis ke ${t.origin} havu ${a}${t.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${t.origin} estu ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${a.prefix}"`:a.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${a.suffix}"`:a.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${a.includes}"`:a.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}`:`Nevalida ${n[a.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} ŝlosilo${t.keys.length>1?"j":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function U8(){return{localeError:L8()}}var Z8=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Entrada inválida: se esperaba instanceof ${t.expected}, recibido ${s}`:`Entrada inválida: se esperaba ${a}, recibido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inválida: se esperaba ${ve(t.values[0])}`:`Opción inválida: se esperaba una de ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin),s=i[t.origin]??t.origin;return o?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${a}${t.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin),s=i[t.origin]??t.origin;return o?`Demasiado pequeño: se esperaba que ${s} tuviera ${a}${t.minimum.toString()} ${o.unit}`:`Demasiado pequeño: se esperaba que ${s} fuera ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Cadena inválida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inválida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inválida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${a.pattern}`:`Inválido ${n[a.format]??t.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[t.origin]??t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[t.origin]??t.origin}`;default:return"Entrada inválida"}}};function j8(){return{localeError:Z8()}}var B8=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function r(t){return e[t]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ورودی نامعتبر: میبایست instanceof ${t.expected} میبود، ${s} دریافت شد`:`ورودی نامعتبر: میبایست ${a} میبود، ${s} دریافت شد`}case"invalid_value":return t.values.length===1?`ورودی نامعتبر: میبایست ${ve(t.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${te(t.values,"|")} میبود`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`خیلی بزرگ: ${t.origin??"مقدار"} باید ${a}${t.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${t.origin??"مقدار"} باید ${a}${t.maximum.toString()} باشد`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`خیلی کوچک: ${t.origin} باید ${a}${t.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${t.origin} باید ${a}${t.minimum.toString()} باشد`}case"invalid_format":{let a=t;return a.format==="starts_with"?`رشته نامعتبر: باید با "${a.prefix}" شروع شود`:a.format==="ends_with"?`رشته نامعتبر: باید با "${a.suffix}" تمام شود`:a.format==="includes"?`رشته نامعتبر: باید شامل "${a.includes}" باشد`:a.format==="regex"?`رشته نامعتبر: باید با الگوی ${a.pattern} مطابقت داشته باشد`:`${n[a.format]??t.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${t.divisor} باشد`;case"unrecognized_keys":return`کلید${t.keys.length>1?"های":""} ناشناس: ${te(t.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${t.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${t.origin}`;default:return"ورودی نامعتبر"}}};function q8(){return{localeError:B8()}}var F8=()=>{let e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function r(t){return e[t]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${a}, oli ${s}`}case"invalid_value":return t.values.length===1?`Virheellinen syöte: täytyy olla ${ve(t.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${a}${t.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${a}${t.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen syöte: täytyy sisältää "${a.includes}"`:a.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${a.pattern}`:`Virheellinen ${n[a.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${te(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function H8(){return{localeError:F8()}}var G8=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Entrée invalide : instanceof ${t.expected} attendu, ${s} reçu`:`Entrée invalide : ${a} attendu, ${s} reçu`}case"invalid_value":return t.values.length===1?`Entrée invalide : ${ve(t.values[0])} attendu`:`Option invalide : une valeur parmi ${te(t.values,"|")} attendue`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Trop grand : ${t.origin??"valeur"} doit ${o.verb} ${a}${t.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${t.origin??"valeur"} doit être ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Trop petit : ${t.origin} doit ${o.verb} ${a}${t.minimum.toString()} ${o.unit}`:`Trop petit : ${t.origin} doit être ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${a.pattern}`:`${n[a.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${te(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function J8(){return{localeError:G8()}}var W8=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Entrée invalide : attendu instanceof ${t.expected}, reçu ${s}`:`Entrée invalide : attendu ${a}, reçu ${s}`}case"invalid_value":return t.values.length===1?`Entrée invalide : attendu ${ve(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"≤":"<",o=r(t.origin);return o?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${a}${t.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"≥":">",o=r(t.origin);return o?`Trop petit : attendu que ${t.origin} ait ${a}${t.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${t.origin} soit ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au motif ${a.pattern}`:`${n[a.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${te(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function Y8(){return{localeError:W8()}}var V8=()=>{let e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},r={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=d=>d?e[d]:void 0,i=d=>{let p=n(d);return p?p.label:d??e.unknown.label},t=d=>`ה${i(d)}`,a=d=>{var p;return(((p=n(d))==null?void 0:p.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},o=d=>d?r[d]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"};return d=>{var p;switch(d.code){case"invalid_type":{let m=d.expected,f=l[m??""]??i(m),u=ge(d.input),h=l[u]??((p=e[u])==null?void 0:p.label)??u;return/^[A-Z]/.test(d.expected)?`קלט לא תקין: צריך להיות instanceof ${d.expected}, התקבל ${h}`:`קלט לא תקין: צריך להיות ${f}, התקבל ${h}`}case"invalid_value":{if(d.values.length===1)return`ערך לא תקין: הערך חייב להיות ${ve(d.values[0])}`;let m=d.values.map(u=>ve(u));if(d.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${m[0]} או ${m[1]}`;let f=m[m.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${m.slice(0,-1).join(", ")} או ${f}`}case"too_big":{let m=o(d.origin),f=t(d.origin??"value");if(d.origin==="string")return`${(m==null?void 0:m.longLabel)??"ארוך"} מדי: ${f} צריכה להכיל ${d.maximum.toString()} ${(m==null?void 0:m.unit)??""} ${d.inclusive?"או פחות":"לכל היותר"}`.trim();if(d.origin==="number"){let c=d.inclusive?`קטן או שווה ל-${d.maximum}`:`קטן מ-${d.maximum}`;return`גדול מדי: ${f} צריך להיות ${c}`}if(d.origin==="array"||d.origin==="set"){let c=d.origin==="set"?"צריכה":"צריך",v=d.inclusive?`${d.maximum} ${(m==null?void 0:m.unit)??""} או פחות`:`פחות מ-${d.maximum} ${(m==null?void 0:m.unit)??""}`;return`גדול מדי: ${f} ${c} להכיל ${v}`.trim()}let u=d.inclusive?"<=":"<",h=a(d.origin??"value");return m!=null&&m.unit?`${m.longLabel} מדי: ${f} ${h} ${u}${d.maximum.toString()} ${m.unit}`:`${(m==null?void 0:m.longLabel)??"גדול"} מדי: ${f} ${h} ${u}${d.maximum.toString()}`}case"too_small":{let m=o(d.origin),f=t(d.origin??"value");if(d.origin==="string")return`${(m==null?void 0:m.shortLabel)??"קצר"} מדי: ${f} צריכה להכיל ${d.minimum.toString()} ${(m==null?void 0:m.unit)??""} ${d.inclusive?"או יותר":"לפחות"}`.trim();if(d.origin==="number"){let c=d.inclusive?`גדול או שווה ל-${d.minimum}`:`גדול מ-${d.minimum}`;return`קטן מדי: ${f} צריך להיות ${c}`}if(d.origin==="array"||d.origin==="set"){let c=d.origin==="set"?"צריכה":"צריך";if(d.minimum===1&&d.inclusive){let b=(d.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${c} להכיל ${b}`}let v=d.inclusive?`${d.minimum} ${(m==null?void 0:m.unit)??""} או יותר`:`יותר מ-${d.minimum} ${(m==null?void 0:m.unit)??""}`;return`קטן מדי: ${f} ${c} להכיל ${v}`.trim()}let u=d.inclusive?">=":">",h=a(d.origin??"value");return m!=null&&m.unit?`${m.shortLabel} מדי: ${f} ${h} ${u}${d.minimum.toString()} ${m.unit}`:`${(m==null?void 0:m.shortLabel)??"קטן"} מדי: ${f} ${h} ${u}${d.minimum.toString()}`}case"invalid_format":{let m=d;if(m.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${m.prefix}"`;if(m.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${m.suffix}"`;if(m.format==="includes")return`המחרוזת חייבת לכלול "${m.includes}"`;if(m.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${m.pattern}`;let f=s[m.format],u=(f==null?void 0:f.label)??m.format,h=((f==null?void 0:f.gender)??"m")==="f"?"תקינה":"תקין";return`${u} לא ${h}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${d.divisor}`;case"unrecognized_keys":return`מפתח${d.keys.length>1?"ות":""} לא מזוה${d.keys.length>1?"ים":"ה"}: ${te(d.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${t(d.origin??"array")}`;default:return"קלט לא תקין"}}};function X8(){return{localeError:V8()}}var K8=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){return e[t]??null}let n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Érvénytelen bemenet: a várt érték instanceof ${t.expected}, a kapott érték ${s}`:`Érvénytelen bemenet: a várt érték ${a}, a kapott érték ${s}`}case"invalid_value":return t.values.length===1?`Érvénytelen bemenet: a várt érték ${ve(t.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Túl nagy: ${t.origin??"érték"} mérete túl nagy ${a}${t.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${t.origin??"érték"} túl nagy: ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Túl kicsi: a bemeneti érték ${t.origin} mérete túl kicsi ${a}${t.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${t.origin} túl kicsi ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Érvénytelen string: "${a.prefix}" értékkel kell kezdődnie`:a.format==="ends_with"?`Érvénytelen string: "${a.suffix}" értékkel kell végződnie`:a.format==="includes"?`Érvénytelen string: "${a.includes}" értéket kell tartalmaznia`:a.format==="regex"?`Érvénytelen string: ${a.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[a.format]??t.format}`}case"not_multiple_of":return`Érvénytelen szám: ${t.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${t.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${t.origin}`;default:return"Érvénytelen bemenet"}}};function Q8(){return{localeError:K8()}}function bl(e,r,n){return Math.abs(e)===1?r:n}function dr(e){if(!e)return"";let r=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(r.includes(n)?"ն":"ը")}var ew=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function r(t){return e[t]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${t.expected}, ստացվել է ${s}`:`Սխալ մուտքագրում․ սպասվում էր ${a}, ստացվել է ${s}`}case"invalid_value":return t.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${ve(t.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);if(o){let s=Number(t.maximum),l=bl(s,o.unit.one,o.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${dr(t.origin??"արժեք")} կունենա ${a}${t.maximum.toString()} ${l}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${dr(t.origin??"արժեք")} լինի ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);if(o){let s=Number(t.minimum),l=bl(s,o.unit.one,o.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${dr(t.origin)} կունենա ${a}${t.minimum.toString()} ${l}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${dr(t.origin)} լինի ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${a.prefix}"-ով`:a.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${a.suffix}"-ով`:a.format==="includes"?`Սխալ տող․ պետք է պարունակի "${a.includes}"`:a.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${a.pattern} ձևաչափին`:`Սխալ ${n[a.format]??t.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${t.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${t.keys.length>1?"ներ":""}. ${te(t.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${dr(t.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${dr(t.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function tw(){return{localeError:ew()}}var rw=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${a}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${ve(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${a}${t.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Terlalu kecil: diharapkan ${t.origin} memiliki ${a}${t.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${n[a.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function nw(){return{localeError:rw()}}var iw=()=>{let e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function r(t){return e[t]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Rangt gildi: Þú slóst inn ${s} þar sem á að vera instanceof ${t.expected}`:`Rangt gildi: Þú slóst inn ${s} þar sem á að vera ${a}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert ráð fyrir ${ve(t.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} hafi ${a}${t.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} sé ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Of lítið: gert er ráð fyrir að ${t.origin} hafi ${a}${t.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${t.origin} sé ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ógildur strengur: verður að byrja á "${a.prefix}"`:a.format==="ends_with"?`Ógildur strengur: verður að enda á "${a.suffix}"`:a.format==="includes"?`Ógildur strengur: verður að innihalda "${a.includes}"`:a.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${a.pattern}`:`Rangt ${n[a.format]??t.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`Óþekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${te(t.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${t.origin}`;default:return"Rangt gildi"}}};function aw(){return{localeError:iw()}}var ow=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){return e[t]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${s}`:`Input non valido: atteso ${a}, ricevuto ${s}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${ve(t.values[0])}`:`Opzione non valida: atteso uno tra ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Troppo grande: ${t.origin??"valore"} deve avere ${a}${t.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Troppo piccolo: ${t.origin} deve avere ${a}${t.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${t.origin} deve essere ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${n[a.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${te(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function sw(){return{localeError:ow()}}var cw=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function r(t){return e[t]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`無効な入力: instanceof ${t.expected}が期待されましたが、${s}が入力されました`:`無効な入力: ${a}が期待されましたが、${s}が入力されました`}case"invalid_value":return t.values.length===1?`無効な入力: ${ve(t.values[0])}が期待されました`:`無効な選択: ${te(t.values,"、")}のいずれかである必要があります`;case"too_big":{let a=t.inclusive?"以下である":"より小さい",o=r(t.origin);return o?`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${o.unit??"要素"}${a}必要があります`:`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${a}必要があります`}case"too_small":{let a=t.inclusive?"以上である":"より大きい",o=r(t.origin);return o?`小さすぎる値: ${t.origin}は${t.minimum.toString()}${o.unit}${a}必要があります`:`小さすぎる値: ${t.origin}は${t.minimum.toString()}${a}必要があります`}case"invalid_format":{let a=t;return a.format==="starts_with"?`無効な文字列: "${a.prefix}"で始まる必要があります`:a.format==="ends_with"?`無効な文字列: "${a.suffix}"で終わる必要があります`:a.format==="includes"?`無効な文字列: "${a.includes}"を含む必要があります`:a.format==="regex"?`無効な文字列: パターン${a.pattern}に一致する必要があります`:`無効な${n[a.format]??t.format}`}case"not_multiple_of":return`無効な数値: ${t.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${t.keys.length>1?"群":""}: ${te(t.keys,"、")}`;case"invalid_key":return`${t.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${t.origin}内の無効な値`;default:return"無効な入力"}}};function uw(){return{localeError:cw()}}var lw=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function r(t){return e[t]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${t.expected}, მიღებული ${s}`:`არასწორი შეყვანა: მოსალოდნელი ${a}, მიღებული ${s}`}case"invalid_value":return t.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${ve(t.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${te(t.values,"|")}-დან`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} ${o.verb} ${a}${t.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} იყოს ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${t.origin} ${o.verb} ${a}${t.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${t.origin} იყოს ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${a.prefix}"-ით`:a.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${a.suffix}"-ით`:a.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${a.includes}"-ს`:a.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${a.pattern}`:`არასწორი ${n[a.format]??t.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${t.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${t.keys.length>1?"ები":"ი"}: ${te(t.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${t.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${t.origin}-ში`;default:return"არასწორი შეყვანა"}}};function fw(){return{localeError:lw()}}var dw=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function r(t){return e[t]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${t.expected} ប៉ុន្តែទទួលបាន ${s}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${a} ប៉ុន្តែទទួលបាន ${s}`}case"invalid_value":return t.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${ve(t.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${a} ${t.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`តូចពេក៖ ត្រូវការ ${t.origin} ${a} ${t.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${t.origin} ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${a.prefix}"`:a.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${a.suffix}"`:a.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${a.includes}"`:a.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${a.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[a.format]??t.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${t.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${te(t.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function qm(){return{localeError:dw()}}function hw(){return qm()}var pw=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`잘못된 입력: 예상 타입은 instanceof ${t.expected}, 받은 타입은 ${s}입니다`:`잘못된 입력: 예상 타입은 ${a}, 받은 타입은 ${s}입니다`}case"invalid_value":return t.values.length===1?`잘못된 입력: 값은 ${ve(t.values[0])} 이어야 합니다`:`잘못된 옵션: ${te(t.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let a=t.inclusive?"이하":"미만",o=a==="미만"?"이어야 합니다":"여야 합니다",s=r(t.origin),l=(s==null?void 0:s.unit)??"요소";return s?`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()}${l} ${a}${o}`:`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()} ${a}${o}`}case"too_small":{let a=t.inclusive?"이상":"초과",o=a==="이상"?"이어야 합니다":"여야 합니다",s=r(t.origin),l=(s==null?void 0:s.unit)??"요소";return s?`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()}${l} ${a}${o}`:`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()} ${a}${o}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`잘못된 문자열: "${a.prefix}"(으)로 시작해야 합니다`:a.format==="ends_with"?`잘못된 문자열: "${a.suffix}"(으)로 끝나야 합니다`:a.format==="includes"?`잘못된 문자열: "${a.includes}"을(를) 포함해야 합니다`:a.format==="regex"?`잘못된 문자열: 정규식 ${a.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[a.format]??t.format}`}case"not_multiple_of":return`잘못된 숫자: ${t.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${te(t.keys,", ")}`;case"invalid_key":return`잘못된 키: ${t.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${t.origin}`;default:return"잘못된 입력"}}};function mw(){return{localeError:pw()}}var Pr=e=>e.charAt(0).toUpperCase()+e.slice(1);function yl(e){let r=Math.abs(e),n=r%10,i=r%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var vw=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function r(t,a,o,s){let l=e[t]??null;return l===null?l:{unit:l.unit[a],verb:l.verb[s][o?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${s}, o tikėtasi - instanceof ${t.expected}`:`Gautas tipas ${s}, o tikėtasi - ${a}`}case"invalid_value":return t.values.length===1?`Privalo būti ${ve(t.values[0])}`:`Privalo būti vienas iš ${te(t.values,"|")} pasirinkimų`;case"too_big":{let a=i[t.origin]??t.origin,o=r(t.origin,yl(Number(t.maximum)),t.inclusive??!1,"smaller");if(o!=null&&o.verb)return`${Pr(a??t.origin??"reikšmė")} ${o.verb} ${t.maximum.toString()} ${o.unit??"elementų"}`;let s=t.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Pr(a??t.origin??"reikšmė")} turi būti ${s} ${t.maximum.toString()} ${o==null?void 0:o.unit}`}case"too_small":{let a=i[t.origin]??t.origin,o=r(t.origin,yl(Number(t.minimum)),t.inclusive??!1,"bigger");if(o!=null&&o.verb)return`${Pr(a??t.origin??"reikšmė")} ${o.verb} ${t.minimum.toString()} ${o.unit??"elementų"}`;let s=t.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Pr(a??t.origin??"reikšmė")} turi būti ${s} ${t.minimum.toString()} ${o==null?void 0:o.unit}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Eilutė privalo prasidėti "${a.prefix}"`:a.format==="ends_with"?`Eilutė privalo pasibaigti "${a.suffix}"`:a.format==="includes"?`Eilutė privalo įtraukti "${a.includes}"`:a.format==="regex"?`Eilutė privalo atitikti ${a.pattern}`:`Neteisingas ${n[a.format]??t.format}`}case"not_multiple_of":return`Skaičius privalo būti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${te(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let a=i[t.origin]??t.origin;return`${Pr(a??t.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function gw(){return{localeError:vw()}}var bw=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function r(t){return e[t]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Грешен внес: се очекува instanceof ${t.expected}, примено ${s}`:`Грешен внес: се очекува ${a}, примено ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${ve(t.values[0])}`:`Грешана опција: се очекува една ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Премногу голем: се очекува ${t.origin??"вредноста"} да има ${a}${t.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${t.origin??"вредноста"} да биде ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Премногу мал: се очекува ${t.origin} да има ${a}${t.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${t.origin} да биде ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Неважечка низа: мора да започнува со "${a.prefix}"`:a.format==="ends_with"?`Неважечка низа: мора да завршува со "${a.suffix}"`:a.format==="includes"?`Неважечка низа: мора да вклучува "${a.includes}"`:a.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${a.pattern}`:`Invalid ${n[a.format]??t.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${te(t.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${t.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${t.origin}`;default:return"Грешен внес"}}};function yw(){return{localeError:bw()}}var _w=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${s}`:`Input tidak sah: dijangka ${a}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${ve(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Terlalu besar: dijangka ${t.origin??"nilai"} ${o.verb} ${a}${t.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Terlalu kecil: dijangka ${t.origin} ${o.verb} ${a}${t.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${n[a.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${te(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function ww(){return{localeError:_w()}}var kw=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function r(t){return e[t]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${a}, ontving ${s}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${ve(t.values[0])}`:`Ongeldige optie: verwacht één van ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin),s=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return o?`Te ${s}: verwacht dat ${t.origin??"waarde"} ${a}${t.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${s}: verwacht dat ${t.origin??"waarde"} ${a}${t.maximum.toString()} is`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin),s=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return o?`Te ${s}: verwacht dat ${t.origin} ${a}${t.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${s}: verwacht dat ${t.origin} ${a}${t.minimum.toString()} is`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${n[a.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function $w(){return{localeError:kw()}}var xw=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${s}`:`Ugyldig input: forventet ${a}, fikk ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${ve(t.values[0])}`:`Ugyldig valg: forventet en av ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`For stor(t): forventet ${t.origin??"value"} til å ha ${a}${t.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til å ha ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`For lite(n): forventet ${t.origin} til å ha ${a}${t.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${t.origin} til å ha ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ugyldig streng: må starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: må ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: må inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: må matche mønsteret ${a.pattern}`:`Ugyldig ${n[a.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Sw(){return{localeError:xw()}}var Iw=()=>{let e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function r(t){return e[t]??null}let n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Fâsit giren: umulan instanceof ${t.expected}, alınan ${s}`:`Fâsit giren: umulan ${a}, alınan ${s}`}case"invalid_value":return t.values.length===1?`Fâsit giren: umulan ${ve(t.values[0])}`:`Fâsit tercih: mûteberler ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Fazla büyük: ${t.origin??"value"}, ${a}${t.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${t.origin??"value"}, ${a}${t.maximum.toString()} olmalıydı.`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Fazla küçük: ${t.origin}, ${a}${t.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${t.origin}, ${a}${t.minimum.toString()} olmalıydı.`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Fâsit metin: "${a.prefix}" ile başlamalı.`:a.format==="ends_with"?`Fâsit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`Fâsit metin: "${a.includes}" ihtivâ etmeli.`:a.format==="regex"?`Fâsit metin: ${a.pattern} nakşına uymalı.`:`Fâsit ${n[a.format]??t.format}`}case"not_multiple_of":return`Fâsit sayı: ${t.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${t.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Tw(){return{localeError:Iw()}}var Cw=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function r(t){return e[t]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ناسم ورودي: باید instanceof ${t.expected} وای, مګر ${s} ترلاسه شو`:`ناسم ورودي: باید ${a} وای, مګر ${s} ترلاسه شو`}case"invalid_value":return t.values.length===1?`ناسم ورودي: باید ${ve(t.values[0])} وای`:`ناسم انتخاب: باید یو له ${te(t.values,"|")} څخه وای`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`ډیر لوی: ${t.origin??"ارزښت"} باید ${a}${t.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${t.origin??"ارزښت"} باید ${a}${t.maximum.toString()} وي`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`ډیر کوچنی: ${t.origin} باید ${a}${t.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${t.origin} باید ${a}${t.minimum.toString()} وي`}case"invalid_format":{let a=t;return a.format==="starts_with"?`ناسم متن: باید د "${a.prefix}" سره پیل شي`:a.format==="ends_with"?`ناسم متن: باید د "${a.suffix}" سره پای ته ورسيږي`:a.format==="includes"?`ناسم متن: باید "${a.includes}" ولري`:a.format==="regex"?`ناسم متن: باید د ${a.pattern} سره مطابقت ولري`:`${n[a.format]??t.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${t.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${t.keys.length>1?"کلیډونه":"کلیډ"}: ${te(t.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${t.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${t.origin} کې`;default:return"ناسمه ورودي"}}};function zw(){return{localeError:Cw()}}var Ew=()=>{let e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function r(t){return e[t]??null}let n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${t.expected}, otrzymano ${s}`:`Nieprawidłowe dane wejściowe: oczekiwano ${a}, otrzymano ${s}`}case"invalid_value":return t.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${ve(t.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Za duża wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${a}${t.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Za mała wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${a}${t.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${a.prefix}"`:a.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${a.suffix}"`:a.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${a.includes}"`:a.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${a.pattern}`:`Nieprawidłow(y/a/e) ${n[a.format]??t.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${t.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${t.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Nw(){return{localeError:Ew()}}var Aw=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){return e[t]??null}let n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Tipo inválido: esperado instanceof ${t.expected}, recebido ${s}`:`Tipo inválido: esperado ${a}, recebido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inválida: esperado ${ve(t.values[0])}`:`Opção inválida: esperada uma das ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${a}${t.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Muito pequeno: esperado que ${t.origin} tivesse ${a}${t.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Texto inválido: deve começar com "${a.prefix}"`:a.format==="ends_with"?`Texto inválido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inválido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inválido: deve corresponder ao padrão ${a.pattern}`:`${n[a.format]??t.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Chave inválida em ${t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${t.origin}`;default:return"Campo inválido"}}};function Pw(){return{localeError:Aw()}}function _l(e,r,n,i){let t=Math.abs(e),a=t%10,o=t%100;return o>=11&&o<=19?i:a===1?r:a>=2&&a<=4?n:i}var Ow=()=>{let e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function r(t){return e[t]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Неверный ввод: ожидалось instanceof ${t.expected}, получено ${s}`:`Неверный ввод: ожидалось ${a}, получено ${s}`}case"invalid_value":return t.values.length===1?`Неверный ввод: ожидалось ${ve(t.values[0])}`:`Неверный вариант: ожидалось одно из ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);if(o){let s=Number(t.maximum),l=_l(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет иметь ${a}${t.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);if(o){let s=Number(t.minimum),l=_l(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${t.origin} будет иметь ${a}${t.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${t.origin} будет ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Неверная строка: должна начинаться с "${a.prefix}"`:a.format==="ends_with"?`Неверная строка: должна заканчиваться на "${a.suffix}"`:a.format==="includes"?`Неверная строка: должна содержать "${a.includes}"`:a.format==="regex"?`Неверная строка: должна соответствовать шаблону ${a.pattern}`:`Неверный ${n[a.format]??t.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспознанн${t.keys.length>1?"ые":"ый"} ключ${t.keys.length>1?"и":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${t.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${t.origin}`;default:return"Неверные входные данные"}}};function Mw(){return{localeError:Ow()}}var Dw=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){return e[t]??null}let n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pričakovano instanceof ${t.expected}, prejeto ${s}`:`Neveljaven vnos: pričakovano ${a}, prejeto ${s}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pričakovano ${ve(t.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} imelo ${a}${t.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Premajhno: pričakovano, da bo ${t.origin} imelo ${a}${t.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Neveljaven niz: mora se začeti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se končati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${n[a.format]??t.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i ključi":" ključ"}: ${te(t.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Rw(){return{localeError:Dw()}}var Lw=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function r(t){return e[t]??null}let n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: förväntat instanceof ${t.expected}, fick ${s}`:`Ogiltig inmatning: förväntat ${a}, fick ${s}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: förväntat ${ve(t.values[0])}`:`Ogiltigt val: förväntade en av ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`För stor(t): förväntade ${t.origin??"värdet"} att ha ${a}${t.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${t.origin??"värdet"} att ha ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`För lite(t): förväntade ${t.origin??"värdet"} att ha ${a}${t.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${t.origin??"värdet"} att ha ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ogiltig sträng: måste börja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig sträng: måste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig sträng: måste innehålla "${a.includes}"`:a.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${a.pattern}"`:`Ogiltig(t) ${n[a.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${te(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${t.origin??"värdet"}`;default:return"Ogiltig input"}}};function Uw(){return{localeError:Lw()}}var Zw=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function r(t){return e[t]??null}let n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${t.expected}, பெறப்பட்டது ${s}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${a}, பெறப்பட்டது ${s}`}case"invalid_value":return t.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${ve(t.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${te(t.values,"|")} இல் ஒன்று`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${a}${t.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${a}${t.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${a}${t.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${a}${t.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let a=t;return a.format==="starts_with"?`தவறான சரம்: "${a.prefix}" இல் தொடங்க வேண்டும்`:a.format==="ends_with"?`தவறான சரம்: "${a.suffix}" இல் முடிவடைய வேண்டும்`:a.format==="includes"?`தவறான சரம்: "${a.includes}" ஐ உள்ளடக்க வேண்டும்`:a.format==="regex"?`தவறான சரம்: ${a.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[a.format]??t.format}`}case"not_multiple_of":return`தவறான எண்: ${t.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${t.keys.length>1?"கள்":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${t.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function jw(){return{localeError:Zw()}}var Bw=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function r(t){return e[t]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${t.expected} แต่ได้รับ ${s}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${a} แต่ได้รับ ${s}`}case"invalid_value":return t.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${ve(t.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"ไม่เกิน":"น้อยกว่า",o=r(t.origin);return o?`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${a} ${t.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"อย่างน้อย":"มากกว่า",o=r(t.origin);return o?`น้อยกว่ากำหนด: ${t.origin} ควรมี${a} ${t.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${t.origin} ควรมี${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${a.prefix}"`:a.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${a.suffix}"`:a.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${a.includes}" อยู่ในข้อความ`:a.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${a.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[a.format]??t.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${t.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${te(t.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${t.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${t.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function qw(){return{localeError:Bw()}}var Fw=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function r(t){return e[t]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Geçersiz değer: beklenen instanceof ${t.expected}, alınan ${s}`:`Geçersiz değer: beklenen ${a}, alınan ${s}`}case"invalid_value":return t.values.length===1?`Geçersiz değer: beklenen ${ve(t.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Çok büyük: beklenen ${t.origin??"değer"} ${a}${t.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${t.origin??"değer"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Çok küçük: beklenen ${t.origin} ${a}${t.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Geçersiz metin: "${a.prefix}" ile başlamalı`:a.format==="ends_with"?`Geçersiz metin: "${a.suffix}" ile bitmeli`:a.format==="includes"?`Geçersiz metin: "${a.includes}" içermeli`:a.format==="regex"?`Geçersiz metin: ${a.pattern} desenine uymalı`:`Geçersiz ${n[a.format]??t.format}`}case"not_multiple_of":return`Geçersiz sayı: ${t.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${t.keys.length>1?"lar":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${t.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Hw(){return{localeError:Fw()}}var Gw=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function r(t){return e[t]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Неправильні вхідні дані: очікується instanceof ${t.expected}, отримано ${s}`:`Неправильні вхідні дані: очікується ${a}, отримано ${s}`}case"invalid_value":return t.values.length===1?`Неправильні вхідні дані: очікується ${ve(t.values[0])}`:`Неправильна опція: очікується одне з ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Занадто велике: очікується, що ${t.origin??"значення"} ${o.verb} ${a}${t.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${t.origin??"значення"} буде ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Занадто мале: очікується, що ${t.origin} ${o.verb} ${a}${t.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${t.origin} буде ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Неправильний рядок: повинен починатися з "${a.prefix}"`:a.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${a.suffix}"`:a.format==="includes"?`Неправильний рядок: повинен містити "${a.includes}"`:a.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${a.pattern}`:`Неправильний ${n[a.format]??t.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${t.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${t.keys.length>1?"і":""}: ${te(t.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${t.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${t.origin}`;default:return"Неправильні вхідні дані"}}};function Fm(){return{localeError:Gw()}}function Jw(){return Fm()}var Ww=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function r(t){return e[t]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`غلط ان پٹ: instanceof ${t.expected} متوقع تھا، ${s} موصول ہوا`:`غلط ان پٹ: ${a} متوقع تھا، ${s} موصول ہوا`}case"invalid_value":return t.values.length===1?`غلط ان پٹ: ${ve(t.values[0])} متوقع تھا`:`غلط آپشن: ${te(t.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`بہت بڑا: ${t.origin??"ویلیو"} کے ${a}${t.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${t.origin??"ویلیو"} کا ${a}${t.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`بہت چھوٹا: ${t.origin} کے ${a}${t.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${t.origin} کا ${a}${t.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let a=t;return a.format==="starts_with"?`غلط سٹرنگ: "${a.prefix}" سے شروع ہونا چاہیے`:a.format==="ends_with"?`غلط سٹرنگ: "${a.suffix}" پر ختم ہونا چاہیے`:a.format==="includes"?`غلط سٹرنگ: "${a.includes}" شامل ہونا چاہیے`:a.format==="regex"?`غلط سٹرنگ: پیٹرن ${a.pattern} سے میچ ہونا چاہیے`:`غلط ${n[a.format]??t.format}`}case"not_multiple_of":return`غلط نمبر: ${t.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${t.keys.length>1?"ز":""}: ${te(t.keys,"، ")}`;case"invalid_key":return`${t.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${t.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Yw(){return{localeError:Ww()}}var Vw=()=>{let e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function r(t){return e[t]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${s}`:`Noto‘g‘ri kirish: kutilgan ${a}, qabul qilingan ${s}`}case"invalid_value":return t.values.length===1?`Noto‘g‘ri kirish: kutilgan ${ve(t.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Juda katta: kutilgan ${t.origin??"qiymat"} ${a}${t.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Juda kichik: kutilgan ${t.origin} ${a}${t.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Noto‘g‘ri satr: "${a.prefix}" bilan boshlanishi kerak`:a.format==="ends_with"?`Noto‘g‘ri satr: "${a.suffix}" bilan tugashi kerak`:a.format==="includes"?`Noto‘g‘ri satr: "${a.includes}" ni o‘z ichiga olishi kerak`:a.format==="regex"?`Noto‘g‘ri satr: ${a.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[a.format]??t.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${t.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${t.keys.length>1?"lar":""}: ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${t.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function Xw(){return{localeError:Vw()}}var Kw=()=>{let e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function r(t){return e[t]??null}let n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${t.expected}, nhận được ${s}`:`Đầu vào không hợp lệ: mong đợi ${a}, nhận được ${s}`}case"invalid_value":return t.values.length===1?`Đầu vào không hợp lệ: mong đợi ${ve(t.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Quá lớn: mong đợi ${t.origin??"giá trị"} ${o.verb} ${a}${t.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${t.origin??"giá trị"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Quá nhỏ: mong đợi ${t.origin} ${o.verb} ${a}${t.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${a.prefix}"`:a.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${a.suffix}"`:a.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${a.includes}"`:a.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${a.pattern}`:`${n[a.format]??t.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${t.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${te(t.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${t.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${t.origin}`;default:return"Đầu vào không hợp lệ"}}};function Qw(){return{localeError:Kw()}}var ek=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function r(t){return e[t]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`无效输入:期望 instanceof ${t.expected},实际接收 ${s}`:`无效输入:期望 ${a},实际接收 ${s}`}case"invalid_value":return t.values.length===1?`无效输入:期望 ${ve(t.values[0])}`:`无效选项:期望以下之一 ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`数值过大:期望 ${t.origin??"值"} ${a}${t.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${t.origin??"值"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`数值过小:期望 ${t.origin} ${a}${t.minimum.toString()} ${o.unit}`:`数值过小:期望 ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`无效字符串:必须以 "${a.prefix}" 开头`:a.format==="ends_with"?`无效字符串:必须以 "${a.suffix}" 结尾`:a.format==="includes"?`无效字符串:必须包含 "${a.includes}"`:a.format==="regex"?`无效字符串:必须满足正则表达式 ${a.pattern}`:`无效${n[a.format]??t.format}`}case"not_multiple_of":return`无效数字:必须是 ${t.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${te(t.keys,", ")}`;case"invalid_key":return`${t.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${t.origin} 中包含无效值(value)`;default:return"无效输入"}}};function tk(){return{localeError:ek()}}var rk=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function r(t){return e[t]??null}let n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`無效的輸入值:預期為 instanceof ${t.expected},但收到 ${s}`:`無效的輸入值:預期為 ${a},但收到 ${s}`}case"invalid_value":return t.values.length===1?`無效的輸入值:預期為 ${ve(t.values[0])}`:`無效的選項:預期為以下其中之一 ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`數值過大:預期 ${t.origin??"值"} 應為 ${a}${t.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${t.origin??"值"} 應為 ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`數值過小:預期 ${t.origin} 應為 ${a}${t.minimum.toString()} ${o.unit}`:`數值過小:預期 ${t.origin} 應為 ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`無效的字串:必須以 "${a.prefix}" 開頭`:a.format==="ends_with"?`無效的字串:必須以 "${a.suffix}" 結尾`:a.format==="includes"?`無效的字串:必須包含 "${a.includes}"`:a.format==="regex"?`無效的字串:必須符合格式 ${a.pattern}`:`無效的 ${n[a.format]??t.format}`}case"not_multiple_of":return`無效的數字:必須為 ${t.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${t.keys.length>1?"們":""}:${te(t.keys,"、")}`;case"invalid_key":return`${t.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${t.origin} 中有無效的值`;default:return"無效的輸入值"}}};function nk(){return{localeError:rk()}}var ik=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function r(t){return e[t]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return t=>{switch(t.code){case"invalid_type":{let a=i[t.expected]??t.expected,o=ge(t.input),s=i[o]??o;return/^[A-Z]/.test(t.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${t.expected}, àmọ̀ a rí ${s}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${a}, àmọ̀ a rí ${s}`}case"invalid_value":return t.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${ve(t.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${te(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",o=r(t.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${t.origin??"iye"} ${o.verb} ${a}${t.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${a}${t.maximum}`}case"too_small":{let a=t.inclusive?">=":">",o=r(t.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${t.origin} ${o.verb} ${a}${t.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${a}${t.minimum}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${a.prefix}"`:a.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${a.suffix}"`:a.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${a.includes}"`:a.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${a.pattern}`:`Aṣìṣe: ${n[a.format]??t.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${t.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${te(t.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${t.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${t.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function ak(){return{localeError:ik()}}var wl,Hm=Symbol("ZodOutput"),Gm=Symbol("ZodInput");class Jm{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let i=n[0];return this._map.set(r,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){let n=r._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let t={...i,...this._map.get(r)};return Object.keys(t).length?t:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function W0(){return new Jm}(wl=globalThis).__zod_globalRegistry??(wl.__zod_globalRegistry=W0());var _t=globalThis.__zod_globalRegistry;function Wm(e,r){return new e({type:"string",...re(r)})}function Ym(e,r){return new e({type:"string",coerce:!0,...re(r)})}function Y0(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...re(r)})}function Bn(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...re(r)})}function V0(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...re(r)})}function X0(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(r)})}function K0(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(r)})}function Q0(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(r)})}function ai(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(r)})}function ec(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...re(r)})}function tc(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(r)})}function rc(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...re(r)})}function nc(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(r)})}function ic(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...re(r)})}function ac(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...re(r)})}function oc(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(r)})}function sc(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(r)})}function cc(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(r)})}function Vm(e,r){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...re(r)})}function uc(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(r)})}function lc(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(r)})}function fc(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...re(r)})}function dc(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...re(r)})}function hc(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...re(r)})}function pc(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...re(r)})}var Xm={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Km(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(r)})}function Qm(e,r){return new e({type:"string",format:"date",check:"string_format",...re(r)})}function ev(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...re(r)})}function tv(e,r){return new e({type:"string",format:"duration",check:"string_format",...re(r)})}function rv(e,r){return new e({type:"number",checks:[],...re(r)})}function nv(e,r){return new e({type:"number",coerce:!0,checks:[],...re(r)})}function iv(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...re(r)})}function av(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...re(r)})}function ov(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...re(r)})}function sv(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...re(r)})}function cv(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...re(r)})}function uv(e,r){return new e({type:"boolean",...re(r)})}function lv(e,r){return new e({type:"boolean",coerce:!0,...re(r)})}function fv(e,r){return new e({type:"bigint",...re(r)})}function dv(e,r){return new e({type:"bigint",coerce:!0,...re(r)})}function hv(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...re(r)})}function pv(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...re(r)})}function mv(e,r){return new e({type:"symbol",...re(r)})}function vv(e,r){return new e({type:"undefined",...re(r)})}function gv(e,r){return new e({type:"null",...re(r)})}function bv(e){return new e({type:"any"})}function yv(e){return new e({type:"unknown"})}function _v(e,r){return new e({type:"never",...re(r)})}function wv(e,r){return new e({type:"void",...re(r)})}function kv(e,r){return new e({type:"date",...re(r)})}function $v(e,r){return new e({type:"date",coerce:!0,...re(r)})}function xv(e,r){return new e({type:"nan",...re(r)})}function qt(e,r){return new L0({check:"less_than",...re(r),value:e,inclusive:!1})}function wt(e,r){return new L0({check:"less_than",...re(r),value:e,inclusive:!0})}function Ft(e,r){return new U0({check:"greater_than",...re(r),value:e,inclusive:!1})}function ft(e,r){return new U0({check:"greater_than",...re(r),value:e,inclusive:!0})}function mc(e){return Ft(0,e)}function vc(e){return qt(0,e)}function gc(e){return wt(0,e)}function bc(e){return ft(0,e)}function kr(e,r){return new up({check:"multiple_of",...re(r),value:e})}function zr(e,r){return new dp({check:"max_size",...re(r),maximum:e})}function Ht(e,r){return new hp({check:"min_size",...re(r),minimum:e})}function sn(e,r){return new pp({check:"size_equals",...re(r),size:e})}function cn(e,r){return new mp({check:"max_length",...re(r),maximum:e})}function ir(e,r){return new vp({check:"min_length",...re(r),minimum:e})}function un(e,r){return new gp({check:"length_equals",...re(r),length:e})}function oi(e,r){return new bp({check:"string_format",format:"regex",...re(r),pattern:e})}function si(e){return new yp({check:"string_format",format:"lowercase",...re(e)})}function ci(e){return new _p({check:"string_format",format:"uppercase",...re(e)})}function ui(e,r){return new wp({check:"string_format",format:"includes",...re(r),includes:e})}function li(e,r){return new kp({check:"string_format",format:"starts_with",...re(r),prefix:e})}function fi(e,r){return new $p({check:"string_format",format:"ends_with",...re(r),suffix:e})}function yc(e,r,n){return new xp({check:"property",property:e,schema:r,...re(n)})}function di(e,r){return new Sp({check:"mime_type",mime:e,...re(r)})}function Dt(e){return new Ip({check:"overwrite",tx:e})}function hi(e){return Dt(r=>r.normalize(e))}function pi(){return Dt(e=>e.trim())}function mi(){return Dt(e=>e.toLowerCase())}function vi(){return Dt(e=>e.toUpperCase())}function gi(){return Dt(e=>v1(e))}function Sv(e,r,n){return new e({type:"array",element:r,...re(n)})}function ok(e,r,n){return new e({type:"union",options:r,...re(n)})}function sk(e,r,n){return new e({type:"union",options:r,inclusive:!1,...re(n)})}function ck(e,r,n,i){return new e({type:"union",options:n,discriminator:r,...re(i)})}function uk(e,r,n){return new e({type:"intersection",left:r,right:n})}function lk(e,r,n,i){let t=n instanceof ye;return new e({type:"tuple",items:r,rest:t?n:null,...re(t?i:n)})}function fk(e,r,n,i){return new e({type:"record",keyType:r,valueType:n,...re(i)})}function dk(e,r,n,i){return new e({type:"map",keyType:r,valueType:n,...re(i)})}function hk(e,r,n){return new e({type:"set",valueType:r,...re(n)})}function pk(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e({type:"enum",entries:i,...re(n)})}function mk(e,r,n){return new e({type:"enum",entries:r,...re(n)})}function vk(e,r,n){return new e({type:"literal",values:Array.isArray(r)?r:[r],...re(n)})}function Iv(e,r){return new e({type:"file",...re(r)})}function gk(e,r){return new e({type:"transform",transform:r})}function bk(e,r){return new e({type:"optional",innerType:r})}function yk(e,r){return new e({type:"nullable",innerType:r})}function _k(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():b1(n)}})}function wk(e,r,n){return new e({type:"nonoptional",innerType:r,...re(n)})}function kk(e,r){return new e({type:"success",innerType:r})}function $k(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function xk(e,r,n){return new e({type:"pipe",in:r,out:n})}function Sk(e,r){return new e({type:"readonly",innerType:r})}function Ik(e,r,n){return new e({type:"template_literal",parts:r,...re(n)})}function Tk(e,r){return new e({type:"lazy",getter:r})}function Ck(e,r){return new e({type:"promise",innerType:r})}function Tv(e,r,n){let i=re(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:r,...i})}function Cv(e,r,n){return new e({type:"custom",check:"custom",fn:r,...re(n)})}function zv(e){let r=Ev(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Zn(i,n.value,r._zod.def));else{let t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=r),t.continue??(t.continue=!r._zod.def.abort),n.issues.push(Zn(t))}},e(n.value,n)));return r}function Ev(e,r){let n=new qe({check:"custom",...re(r)});return n._zod.check=e,n}function Nv(e){let r=new qe({check:"describe"});return r._zod.onattach=[n=>{let i=_t.get(n)??{};_t.add(n,{...i,description:e})}],r._zod.check=()=>{},r}function Av(e){let r=new qe({check:"meta"});return r._zod.onattach=[n=>{let i=_t.get(n)??{};_t.add(n,{...i,...e})}],r._zod.check=()=>{},r}function Pv(e,r){let n=re(r),i=n.truthy??["true","1","yes","on","y","enabled"],t=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),t=t.map(f=>typeof f=="string"?f.toLowerCase():f));let a=new Set(i),o=new Set(t),s=e.Codec??G0,l=e.Boolean??B0,d=new(e.String??on)({type:"string",error:n.error}),p=new l({type:"boolean",error:n.error}),m=new s({type:"pipe",in:d,out:p,transform:(f,u)=>{let h=f;return n.case!=="sensitive"&&(h=h.toLowerCase()),a.has(h)?!0:o.has(h)?!1:(u.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:u.value,inst:m,continue:!1}),{})},reverseTransform:(f,u)=>f===!0?i[0]||"true":t[0]||"false",error:n.error});return m}function ln(e,r,n,i={}){let t=re(i),a={...re(i),check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:o=>n.test(o),...t};return n instanceof RegExp&&(a.pattern=n),new e(a)}function $r(e){let r=(e==null?void 0:e.target)??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??_t,target:r,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Oe(e,r,n={path:[],schemaPath:[]}){var d,p;var i;let t=e._zod.def,a=r.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(e,o);let s=(p=(d=e._zod).toJSONSchema)==null?void 0:p.call(d);if(s)o.schema=s;else{let m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,o.schema,m);else{let u=o.schema,h=r.processors[t.type];if(!h)throw Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);h(e,r,u,m)}let f=e._zod.parent;f&&(o.ref||(o.ref=f),Oe(f,r,m),r.seen.get(f).isParent=!0)}let l=r.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),r.io==="input"&<(e)&&(delete o.schema.examples,delete o.schema.default),r.io==="input"&&o.schema._prefault&&((i=o.schema).default??(i.default=o.schema._prefault)),delete o.schema._prefault,r.seen.get(e).schema}function xr(e,r){var o,s,l,d;let n=e.seen.get(r);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let p of e.seen.entries()){let m=(o=e.metadataRegistry.get(p[0]))==null?void 0:o.id;if(m){let f=i.get(m);if(f&&f!==p[0])throw Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(m,p[0])}}let t=p=>{var h;let m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let c=(h=e.external.registry.get(p[0]))==null?void 0:h.id,v=e.external.uri??(g=>g);if(c)return{ref:v(c)};let b=p[1].defId??p[1].schema.id??`schema${e.counter++}`;return p[1].defId=b,{defId:b,ref:`${v("__shared")}#/${m}/${b}`}}if(p[1]===n)return{ref:"#"};let f=`#/${m}/`,u=p[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:f+u}},a=p=>{if(p[1].schema.$ref)return;let m=p[1],{ref:f,defId:u}=t(p);m.def={...m.schema},u&&(m.defId=u);let h=m.schema;for(let c in h)delete h[c];h.$ref=f};if(e.cycles==="throw")for(let p of e.seen.entries()){let m=p[1];if(m.cycle)throw Error(`Cycle detected: #/${(s=m.cycle)==null?void 0:s.join("/")}/<root>
|
|
84
|
+
|
|
85
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of e.seen.entries()){let m=p[1];if(r===p[0]){a(p);continue}if(e.external){let f=(l=e.external.registry.get(p[0]))==null?void 0:l.id;if(r!==p[0]&&f){a(p);continue}}if((d=e.metadataRegistry.get(p[0]))!=null&&d.id){a(p);continue}if(m.cycle){a(p);continue}if(m.count>1&&e.reused==="ref"){a(p);continue}}}function Sr(e,r){var o,s,l;let n=e.seen.get(r);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=d=>{let p=e.seen.get(d);if(p.ref===null)return;let m=p.def??p.schema,f={...m},u=p.ref;if(p.ref=null,u){i(u);let c=e.seen.get(u),v=c.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(v)):Object.assign(m,v),Object.assign(m,f),d._zod.parent===u)for(let b in m)b==="$ref"||b==="allOf"||b in f||delete m[b];if(v.$ref)for(let b in m)b==="$ref"||b==="allOf"||b in c.def&&JSON.stringify(m[b])===JSON.stringify(c.def[b])&&delete m[b]}let h=d._zod.parent;if(h&&h!==u){i(h);let c=e.seen.get(h);if(c!=null&&c.schema.$ref&&(m.$ref=c.schema.$ref,c.def))for(let v in m)v==="$ref"||v==="allOf"||v in c.def&&JSON.stringify(m[v])===JSON.stringify(c.def[v])&&delete m[v]}e.override({zodSchema:d,jsonSchema:m,path:p.path??[]})};for(let d of[...e.seen.entries()].reverse())i(d[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,(o=e.external)!=null&&o.uri){let d=(s=e.external.registry.get(r))==null?void 0:s.id;if(!d)throw Error("Schema is missing an `id` property");t.$id=e.external.uri(d)}Object.assign(t,n.def??n.schema);let a=((l=e.external)==null?void 0:l.defs)??{};for(let d of e.seen.entries()){let p=d[1];p.def&&p.defId&&(a[p.defId]=p.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{let d=JSON.parse(JSON.stringify(t));return Object.defineProperty(d,"~standard",{value:{...r["~standard"],jsonSchema:{input:Lr(r,"input",e.processors),output:Lr(r,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw Error("Error converting schema to JSON.")}}function lt(e,r){let n=r??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return lt(i.element,n);if(i.type==="set")return lt(i.valueType,n);if(i.type==="lazy")return lt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return lt(i.innerType,n);if(i.type==="intersection")return lt(i.left,n)||lt(i.right,n);if(i.type==="record"||i.type==="map")return lt(i.keyType,n)||lt(i.valueType,n);if(i.type==="pipe")return lt(i.in,n)||lt(i.out,n);if(i.type==="object"){for(let t in i.shape)if(lt(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(let t of i.options)if(lt(t,n))return!0;return!1}if(i.type==="tuple"){for(let t of i.items)if(lt(t,n))return!0;return!!(i.rest&<(i.rest,n))}return!1}var Ov=(e,r={})=>n=>{let i=$r({...n,processors:r});return Oe(e,i),xr(i,e),Sr(i,e)},Lr=(e,r,n={})=>i=>{let{libraryOptions:t,target:a}=i??{},o=$r({...t??{},target:a,io:r,processors:n});return Oe(e,o),xr(o,e),Sr(o,e)},zk={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Mv=(e,r,n,i)=>{let t=n;t.type="string";let{minimum:a,maximum:o,format:s,patterns:l,contentEncoding:d}=e._zod.bag;if(typeof a=="number"&&(t.minLength=a),typeof o=="number"&&(t.maxLength=o),s&&(t.format=zk[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),d&&(t.contentEncoding=d),l&&l.size>0){let p=[...l];p.length===1?t.pattern=p[0].source:p.length>1&&(t.allOf=[...p.map(m=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Dv=(e,r,n,i)=>{let t=n,{minimum:a,maximum:o,format:s,multipleOf:l,exclusiveMaximum:d,exclusiveMinimum:p}=e._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number",typeof p=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.minimum=p,t.exclusiveMinimum=!0):t.exclusiveMinimum=p),typeof a=="number"&&(t.minimum=a,typeof p=="number"&&r.target!=="draft-04"&&(p>=a?delete t.minimum:delete t.exclusiveMinimum)),typeof d=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(t.maximum=d,t.exclusiveMaximum=!0):t.exclusiveMaximum=d),typeof o=="number"&&(t.maximum=o,typeof d=="number"&&r.target!=="draft-04"&&(d<=o?delete t.maximum:delete t.exclusiveMaximum)),typeof l=="number"&&(t.multipleOf=l)},Rv=(e,r,n,i)=>{n.type="boolean"},Lv=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Uv=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Zv=(e,r,n,i)=>{r.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},jv=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},Bv=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},qv=(e,r,n,i)=>{n.not={}},Fv=(e,r,n,i)=>{},Hv=(e,r,n,i)=>{},Gv=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},Jv=(e,r,n,i)=>{let t=e._zod.def,a=$0(t.entries);a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),n.enum=a},Wv=(e,r,n,i)=>{let t=e._zod.def,a=[];for(let o of t.values)if(o===void 0){if(r.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(r.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let o=a[0];n.type=o===null?"null":typeof o,r.target==="draft-04"||r.target==="openapi-3.0"?n.enum=[o]:n.const=o}else a.every(o=>typeof o=="number")&&(n.type="number"),a.every(o=>typeof o=="string")&&(n.type="string"),a.every(o=>typeof o=="boolean")&&(n.type="boolean"),a.every(o=>o===null)&&(n.type="null"),n.enum=a},Yv=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},Vv=(e,r,n,i)=>{let t=n,a=e._zod.pattern;if(!a)throw Error("Pattern not found in template literal");t.type="string",t.pattern=a.source},Xv=(e,r,n,i)=>{let t=n,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:l}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),l?l.length===1?(a.contentMediaType=l[0],Object.assign(t,a)):(Object.assign(t,a),t.anyOf=l.map(d=>({contentMediaType:d}))):Object.assign(t,a)},Kv=(e,r,n,i)=>{n.type="boolean"},Qv=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},eg=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},tg=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},rg=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},ng=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},ig=(e,r,n,i)=>{let t=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o=="number"&&(t.minItems=o),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=Oe(a.element,r,{...i,path:[...i.path,"items"]})},ag=(e,r,n,i)=>{var d;let t=n,a=e._zod.def;t.type="object",t.properties={};let o=a.shape;for(let p in o)t.properties[p]=Oe(o[p],r,{...i,path:[...i.path,"properties",p]});let s=new Set(Object.keys(o)),l=new Set([...s].filter(p=>{let m=a.shape[p]._zod;return r.io==="input"?m.optin===void 0:m.optout===void 0}));l.size>0&&(t.required=Array.from(l)),((d=a.catchall)==null?void 0:d._zod.def.type)==="never"?t.additionalProperties=!1:a.catchall?a.catchall&&(t.additionalProperties=Oe(a.catchall,r,{...i,path:[...i.path,"additionalProperties"]})):r.io==="output"&&(t.additionalProperties=!1)},_c=(e,r,n,i)=>{let t=e._zod.def,a=t.inclusive===!1,o=t.options.map((s,l)=>Oe(s,r,{...i,path:[...i.path,a?"oneOf":"anyOf",l]}));a?n.oneOf=o:n.anyOf=o},og=(e,r,n,i)=>{let t=e._zod.def,a=Oe(t.left,r,{...i,path:[...i.path,"allOf",0]}),o=Oe(t.right,r,{...i,path:[...i.path,"allOf",1]}),s=d=>"allOf"in d&&Object.keys(d).length===1,l=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=l},sg=(e,r,n,i)=>{let t=n,a=e._zod.def;t.type="array";let o=r.target==="draft-2020-12"?"prefixItems":"items",s=r.target==="draft-2020-12"||r.target==="openapi-3.0"?"items":"additionalItems",l=a.items.map((f,u)=>Oe(f,r,{...i,path:[...i.path,o,u]})),d=a.rest?Oe(a.rest,r,{...i,path:[...i.path,s,...r.target==="openapi-3.0"?[a.items.length]:[]]}):null;r.target==="draft-2020-12"?(t.prefixItems=l,d&&(t.items=d)):r.target==="openapi-3.0"?(t.items={anyOf:l},d&&t.items.anyOf.push(d),t.minItems=l.length,!d&&(t.maxItems=l.length)):(t.items=l,d&&(t.additionalItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p=="number"&&(t.minItems=p),typeof m=="number"&&(t.maxItems=m)},cg=(e,r,n,i)=>{var d;let t=n,a=e._zod.def;t.type="object";let o=a.keyType,s=(d=o._zod.bag)==null?void 0:d.patterns;if(a.mode==="loose"&&s&&s.size>0){let p=Oe(a.valueType,r,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(let m of s)t.patternProperties[m.source]=p}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(t.propertyNames=Oe(a.keyType,r,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=Oe(a.valueType,r,{...i,path:[...i.path,"additionalProperties"]});let l=o._zod.values;if(l){let p=[...l].filter(m=>typeof m=="string"||typeof m=="number");p.length>0&&(t.required=p)}},ug=(e,r,n,i)=>{let t=e._zod.def,a=Oe(t.innerType,r,i),o=r.seen.get(e);r.target==="openapi-3.0"?(o.ref=t.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},lg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType},fg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},dg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType,r.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},hg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType;let o;try{o=t.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},pg=(e,r,n,i)=>{let t=e._zod.def,a=r.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;Oe(a,r,i);let o=r.seen.get(e);o.ref=a},mg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType,n.readOnly=!0},vg=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType},wc=(e,r,n,i)=>{let t=e._zod.def;Oe(t.innerType,r,i);let a=r.seen.get(e);a.ref=t.innerType},gg=(e,r,n,i)=>{let t=e._zod.innerType;Oe(t,r,i);let a=r.seen.get(e);a.ref=t},Ws={string:Mv,number:Dv,boolean:Rv,bigint:Lv,symbol:Uv,null:Zv,undefined:jv,void:Bv,never:qv,any:Fv,unknown:Hv,date:Gv,enum:Jv,literal:Wv,nan:Yv,template_literal:Vv,file:Xv,success:Kv,custom:Qv,function:eg,transform:tg,map:rg,set:ng,array:ig,object:ag,union:_c,intersection:og,tuple:sg,record:cg,nullable:ug,nonoptional:lg,default:fg,prefault:dg,catch:hg,pipe:pg,readonly:mg,promise:vg,optional:wc,lazy:gg};function bg(e,r){if("_idmap"in e){let i=e,t=$r({...r,processors:Ws}),a={};for(let l of i._idmap.entries()){let[d,p]=l;Oe(p,t)}let o={},s={registry:i,uri:r==null?void 0:r.uri,defs:a};t.external=s;for(let l of i._idmap.entries()){let[d,p]=l;xr(t,p),o[d]=Sr(t,p)}if(Object.keys(a).length>0){let l=t.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:a}}return{schemas:o}}let n=$r({...r,processors:Ws});return Oe(e,n),xr(n,e),Sr(n,e)}class Ek{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(r){this.ctx.counter=r}get seen(){return this.ctx.seen}constructor(r){let n=(r==null?void 0:r.target)??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=$r({processors:Ws,target:n,...(r==null?void 0:r.metadata)&&{metadata:r.metadata},...(r==null?void 0:r.unrepresentable)&&{unrepresentable:r.unrepresentable},...(r==null?void 0:r.override)&&{override:r.override},...(r==null?void 0:r.io)&&{io:r.io}})}process(r,n={path:[],schemaPath:[]}){return Oe(r,this.ctx,n)}emit(r,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),xr(this.ctx,r);let i=Sr(this.ctx,r),{"~standard":t,...a}=i;return a}}var Nk={},yg={};Ot(yg,{xor:()=>C2,xid:()=>Xg,void:()=>k2,uuidv7:()=>qg,uuidv6:()=>Bg,uuidv4:()=>jg,uuid:()=>Zg,url:()=>Fg,unknown:()=>ar,union:()=>Li,undefined:()=>_2,ulid:()=>Vg,uint64:()=>b2,uint32:()=>m2,tuple:()=>Fc,transform:()=>Zi,templateLiteral:()=>j2,symbol:()=>y2,superRefine:()=>gu,success:()=>L2,stringbool:()=>W2,stringFormat:()=>c2,string:()=>qn,strictObject:()=>I2,set:()=>P2,refine:()=>vu,record:()=>Hc,readonly:()=>lu,promise:()=>B2,preprocess:()=>V2,prefault:()=>nu,pipe:()=>Br,partialRecord:()=>E2,optional:()=>Zr,object:()=>S2,number:()=>Cc,nullish:()=>R2,nullable:()=>jr,null:()=>Pc,nonoptional:()=>iu,never:()=>Di,nativeEnum:()=>O2,nanoid:()=>Jg,nan:()=>U2,meta:()=>G2,map:()=>A2,mac:()=>e2,looseRecord:()=>N2,looseObject:()=>T2,literal:()=>M2,lazy:()=>hu,ksuid:()=>Kg,keyof:()=>x2,jwt:()=>s2,json:()=>Y2,ipv6:()=>t2,ipv4:()=>Qg,intersection:()=>Bc,int64:()=>g2,int32:()=>p2,int:()=>Fn,instanceof:()=>J2,httpUrl:()=>Hg,hostname:()=>u2,hex:()=>l2,hash:()=>f2,guid:()=>Ug,function:()=>Hn,float64:()=>h2,float32:()=>d2,file:()=>D2,exactOptional:()=>Kc,enum:()=>Ui,emoji:()=>Gg,email:()=>Lg,e164:()=>o2,discriminatedUnion:()=>z2,describe:()=>H2,date:()=>$2,custom:()=>F2,cuid2:()=>Yg,cuid:()=>Wg,codec:()=>Z2,cidrv6:()=>n2,cidrv4:()=>r2,check:()=>q2,catch:()=>su,boolean:()=>zc,bigint:()=>v2,base64url:()=>a2,base64:()=>i2,array:()=>vn,any:()=>w2,_function:()=>Hn,_default:()=>tu,_ZodString:()=>bi,ZodXor:()=>Uc,ZodXID:()=>Si,ZodVoid:()=>Rc,ZodUnknown:()=>Mc,ZodUnion:()=>bn,ZodUndefined:()=>Nc,ZodUUID:()=>zt,ZodURL:()=>dn,ZodULID:()=>xi,ZodType:()=>ke,ZodTuple:()=>qc,ZodTransform:()=>Vc,ZodTemplateLiteral:()=>fu,ZodSymbol:()=>Ec,ZodSuccess:()=>au,ZodStringFormat:()=>Re,ZodString:()=>fn,ZodSet:()=>Jc,ZodRecord:()=>yn,ZodReadonly:()=>uu,ZodPromise:()=>pu,ZodPrefault:()=>ru,ZodPipe:()=>qi,ZodOptional:()=>ji,ZodObject:()=>gn,ZodNumberFormat:()=>ur,ZodNumber:()=>hn,ZodNullable:()=>Qc,ZodNull:()=>Ac,ZodNonOptional:()=>Bi,ZodNever:()=>Dc,ZodNanoID:()=>wi,ZodNaN:()=>cu,ZodMap:()=>Gc,ZodMAC:()=>Tc,ZodLiteral:()=>Wc,ZodLazy:()=>du,ZodKSUID:()=>Ii,ZodJWT:()=>Oi,ZodIntersection:()=>jc,ZodIPv6:()=>Ci,ZodIPv4:()=>Ti,ZodGUID:()=>Ur,ZodFunction:()=>mu,ZodFile:()=>Yc,ZodExactOptional:()=>Xc,ZodEnum:()=>Ir,ZodEmoji:()=>_i,ZodEmail:()=>yi,ZodE164:()=>Pi,ZodDiscriminatedUnion:()=>Zc,ZodDefault:()=>eu,ZodDate:()=>Ri,ZodCustomStringFormat:()=>Er,ZodCustom:()=>_n,ZodCodec:()=>Fi,ZodCatch:()=>ou,ZodCUID2:()=>$i,ZodCUID:()=>ki,ZodCIDRv6:()=>Ei,ZodCIDRv4:()=>zi,ZodBoolean:()=>pn,ZodBigIntFormat:()=>Mi,ZodBigInt:()=>mn,ZodBase64URL:()=>Ai,ZodBase64:()=>Ni,ZodArray:()=>Lc,ZodAny:()=>Oc});var _g={};Ot(_g,{uppercase:()=>ci,trim:()=>pi,toUpperCase:()=>vi,toLowerCase:()=>mi,startsWith:()=>li,slugify:()=>gi,size:()=>sn,regex:()=>oi,property:()=>yc,positive:()=>mc,overwrite:()=>Dt,normalize:()=>hi,nonpositive:()=>gc,nonnegative:()=>bc,negative:()=>vc,multipleOf:()=>kr,minSize:()=>Ht,minLength:()=>ir,mime:()=>di,maxSize:()=>zr,maxLength:()=>cn,lte:()=>wt,lt:()=>qt,lowercase:()=>si,length:()=>un,includes:()=>ui,gte:()=>ft,gt:()=>Ft,endsWith:()=>fi});var kc={};Ot(kc,{time:()=>$g,duration:()=>xg,datetime:()=>wg,date:()=>kg,ZodISOTime:()=>Sc,ZodISODuration:()=>Ic,ZodISODateTime:()=>$c,ZodISODate:()=>xc});var $c=F("ZodISODateTime",(e,r)=>{Zp.init(e,r),Re.init(e,r)});function wg(e){return Km($c,e)}var xc=F("ZodISODate",(e,r)=>{jp.init(e,r),Re.init(e,r)});function kg(e){return Qm(xc,e)}var Sc=F("ZodISOTime",(e,r)=>{Bp.init(e,r),Re.init(e,r)});function $g(e){return ev(Sc,e)}var Ic=F("ZodISODuration",(e,r)=>{qp.init(e,r),Re.init(e,r)});function xg(e){return tv(Ic,e)}var Sg=(e,r)=>{S0.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>T0(e,n)},flatten:{value:n=>I0(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ln,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ln,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ak=F("ZodError",Sg),yt=F("ZodError",Sg,{Parent:Error}),Ig=Kr(yt),Tg=Qr(yt),Cg=en(yt),zg=tn(yt),Eg=C0(yt),Ng=z0(yt),Ag=E0(yt),Pg=N0(yt),Og=A0(yt),Mg=P0(yt),Dg=O0(yt),Rg=M0(yt),ke=F("ZodType",(e,r)=>(ye.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:Lr(e,"input"),output:Lr(e,"output")}}),e.toJSONSchema=Ov(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>e.clone(Te.mergeDefs(r,{checks:[...r.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>It(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>Ig(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Cg(e,n,i),e.parseAsync=async(n,i)=>Tg(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>zg(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Eg(e,n,i),e.decode=(n,i)=>Ng(e,n,i),e.encodeAsync=async(n,i)=>Ag(e,n,i),e.decodeAsync=async(n,i)=>Pg(e,n,i),e.safeEncode=(n,i)=>Og(e,n,i),e.safeDecode=(n,i)=>Mg(e,n,i),e.safeEncodeAsync=async(n,i)=>Dg(e,n,i),e.safeDecodeAsync=async(n,i)=>Rg(e,n,i),e.refine=(n,i)=>e.check(vu(n,i)),e.superRefine=n=>e.check(gu(n)),e.overwrite=n=>e.check(Dt(n)),e.optional=()=>Zr(e),e.exactOptional=()=>Kc(e),e.nullable=()=>jr(e),e.nullish=()=>Zr(jr(e)),e.nonoptional=n=>iu(e,n),e.array=()=>vn(e),e.or=n=>Li([e,n]),e.and=n=>Bc(e,n),e.transform=n=>Br(e,Zi(n)),e.default=n=>tu(e,n),e.prefault=n=>nu(e,n),e.catch=n=>su(e,n),e.pipe=n=>Br(e,n),e.readonly=()=>lu(e),e.describe=n=>{let i=e.clone();return _t.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=_t.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return _t.get(e);let i=e.clone();return _t.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),bi=F("_ZodString",(e,r)=>{on.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Mv(e,i,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(oi(...i)),e.includes=(...i)=>e.check(ui(...i)),e.startsWith=(...i)=>e.check(li(...i)),e.endsWith=(...i)=>e.check(fi(...i)),e.min=(...i)=>e.check(ir(...i)),e.max=(...i)=>e.check(cn(...i)),e.length=(...i)=>e.check(un(...i)),e.nonempty=(...i)=>e.check(ir(1,...i)),e.lowercase=i=>e.check(si(i)),e.uppercase=i=>e.check(ci(i)),e.trim=()=>e.check(pi()),e.normalize=(...i)=>e.check(hi(...i)),e.toLowerCase=()=>e.check(mi()),e.toUpperCase=()=>e.check(vi()),e.slugify=()=>e.check(gi())}),fn=F("ZodString",(e,r)=>{on.init(e,r),bi.init(e,r),e.email=n=>e.check(Y0(yi,n)),e.url=n=>e.check(ai(dn,n)),e.jwt=n=>e.check(pc(Oi,n)),e.emoji=n=>e.check(ec(_i,n)),e.guid=n=>e.check(Bn(Ur,n)),e.uuid=n=>e.check(V0(zt,n)),e.uuidv4=n=>e.check(X0(zt,n)),e.uuidv6=n=>e.check(K0(zt,n)),e.uuidv7=n=>e.check(Q0(zt,n)),e.nanoid=n=>e.check(tc(wi,n)),e.guid=n=>e.check(Bn(Ur,n)),e.cuid=n=>e.check(rc(ki,n)),e.cuid2=n=>e.check(nc($i,n)),e.ulid=n=>e.check(ic(xi,n)),e.base64=n=>e.check(fc(Ni,n)),e.base64url=n=>e.check(dc(Ai,n)),e.xid=n=>e.check(ac(Si,n)),e.ksuid=n=>e.check(oc(Ii,n)),e.ipv4=n=>e.check(sc(Ti,n)),e.ipv6=n=>e.check(cc(Ci,n)),e.cidrv4=n=>e.check(uc(zi,n)),e.cidrv6=n=>e.check(lc(Ei,n)),e.e164=n=>e.check(hc(Pi,n)),e.datetime=n=>e.check(wg(n)),e.date=n=>e.check(kg(n)),e.time=n=>e.check($g(n)),e.duration=n=>e.check(xg(n))});function qn(e){return Wm(fn,e)}var Re=F("ZodStringFormat",(e,r)=>{De.init(e,r),bi.init(e,r)}),yi=F("ZodEmail",(e,r)=>{Np.init(e,r),Re.init(e,r)});function Lg(e){return Y0(yi,e)}var Ur=F("ZodGUID",(e,r)=>{zp.init(e,r),Re.init(e,r)});function Ug(e){return Bn(Ur,e)}var zt=F("ZodUUID",(e,r)=>{Ep.init(e,r),Re.init(e,r)});function Zg(e){return V0(zt,e)}function jg(e){return X0(zt,e)}function Bg(e){return K0(zt,e)}function qg(e){return Q0(zt,e)}var dn=F("ZodURL",(e,r)=>{Ap.init(e,r),Re.init(e,r)});function Fg(e){return ai(dn,e)}function Hg(e){return ai(dn,{protocol:/^https?$/,hostname:cr.domain,...Te.normalizeParams(e)})}var _i=F("ZodEmoji",(e,r)=>{Pp.init(e,r),Re.init(e,r)});function Gg(e){return ec(_i,e)}var wi=F("ZodNanoID",(e,r)=>{Op.init(e,r),Re.init(e,r)});function Jg(e){return tc(wi,e)}var ki=F("ZodCUID",(e,r)=>{Mp.init(e,r),Re.init(e,r)});function Wg(e){return rc(ki,e)}var $i=F("ZodCUID2",(e,r)=>{Dp.init(e,r),Re.init(e,r)});function Yg(e){return nc($i,e)}var xi=F("ZodULID",(e,r)=>{Rp.init(e,r),Re.init(e,r)});function Vg(e){return ic(xi,e)}var Si=F("ZodXID",(e,r)=>{Lp.init(e,r),Re.init(e,r)});function Xg(e){return ac(Si,e)}var Ii=F("ZodKSUID",(e,r)=>{Up.init(e,r),Re.init(e,r)});function Kg(e){return oc(Ii,e)}var Ti=F("ZodIPv4",(e,r)=>{Fp.init(e,r),Re.init(e,r)});function Qg(e){return sc(Ti,e)}var Tc=F("ZodMAC",(e,r)=>{Gp.init(e,r),Re.init(e,r)});function e2(e){return Vm(Tc,e)}var Ci=F("ZodIPv6",(e,r)=>{Hp.init(e,r),Re.init(e,r)});function t2(e){return cc(Ci,e)}var zi=F("ZodCIDRv4",(e,r)=>{Jp.init(e,r),Re.init(e,r)});function r2(e){return uc(zi,e)}var Ei=F("ZodCIDRv6",(e,r)=>{Wp.init(e,r),Re.init(e,r)});function n2(e){return lc(Ei,e)}var Ni=F("ZodBase64",(e,r)=>{Yp.init(e,r),Re.init(e,r)});function i2(e){return fc(Ni,e)}var Ai=F("ZodBase64URL",(e,r)=>{Xp.init(e,r),Re.init(e,r)});function a2(e){return dc(Ai,e)}var Pi=F("ZodE164",(e,r)=>{Kp.init(e,r),Re.init(e,r)});function o2(e){return hc(Pi,e)}var Oi=F("ZodJWT",(e,r)=>{em.init(e,r),Re.init(e,r)});function s2(e){return pc(Oi,e)}var Er=F("ZodCustomStringFormat",(e,r)=>{tm.init(e,r),Re.init(e,r)});function c2(e,r,n={}){return ln(Er,e,r,n)}function u2(e){return ln(Er,"hostname",cr.hostname,e)}function l2(e){return ln(Er,"hex",cr.hex,e)}function f2(e,r){let n=(r==null?void 0:r.enc)??"hex",i=`${e}_${n}`,t=cr[i];if(!t)throw Error(`Unrecognized hash format: ${i}`);return ln(Er,i,t,r)}var hn=F("ZodNumber",(e,r)=>{j0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Dv(e,i,t),e.gt=(i,t)=>e.check(Ft(i,t)),e.gte=(i,t)=>e.check(ft(i,t)),e.min=(i,t)=>e.check(ft(i,t)),e.lt=(i,t)=>e.check(qt(i,t)),e.lte=(i,t)=>e.check(wt(i,t)),e.max=(i,t)=>e.check(wt(i,t)),e.int=i=>e.check(Fn(i)),e.safe=i=>e.check(Fn(i)),e.positive=i=>e.check(Ft(0,i)),e.nonnegative=i=>e.check(ft(0,i)),e.negative=i=>e.check(qt(0,i)),e.nonpositive=i=>e.check(wt(0,i)),e.multipleOf=(i,t)=>e.check(kr(i,t)),e.step=(i,t)=>e.check(kr(i,t)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Cc(e){return rv(hn,e)}var ur=F("ZodNumberFormat",(e,r)=>{rm.init(e,r),hn.init(e,r)});function Fn(e){return iv(ur,e)}function d2(e){return av(ur,e)}function h2(e){return ov(ur,e)}function p2(e){return sv(ur,e)}function m2(e){return cv(ur,e)}var pn=F("ZodBoolean",(e,r)=>{B0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Rv(e,n,i)});function zc(e){return uv(pn,e)}var mn=F("ZodBigInt",(e,r)=>{q0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Lv(e,i),e.gte=(i,t)=>e.check(ft(i,t)),e.min=(i,t)=>e.check(ft(i,t)),e.gt=(i,t)=>e.check(Ft(i,t)),e.gte=(i,t)=>e.check(ft(i,t)),e.min=(i,t)=>e.check(ft(i,t)),e.lt=(i,t)=>e.check(qt(i,t)),e.lte=(i,t)=>e.check(wt(i,t)),e.max=(i,t)=>e.check(wt(i,t)),e.positive=i=>e.check(Ft(BigInt(0),i)),e.negative=i=>e.check(qt(BigInt(0),i)),e.nonpositive=i=>e.check(wt(BigInt(0),i)),e.nonnegative=i=>e.check(ft(BigInt(0),i)),e.multipleOf=(i,t)=>e.check(kr(i,t));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function v2(e){return fv(mn,e)}var Mi=F("ZodBigIntFormat",(e,r)=>{nm.init(e,r),mn.init(e,r)});function g2(e){return hv(Mi,e)}function b2(e){return pv(Mi,e)}var Ec=F("ZodSymbol",(e,r)=>{im.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Uv(e,n)});function y2(e){return mv(Ec,e)}var Nc=F("ZodUndefined",(e,r)=>{am.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>jv(e,n)});function _2(e){return vv(Nc,e)}var Ac=F("ZodNull",(e,r)=>{om.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Zv(e,n,i)});function Pc(e){return gv(Ac,e)}var Oc=F("ZodAny",(e,r)=>{sm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Fv()});function w2(){return bv(Oc)}var Mc=F("ZodUnknown",(e,r)=>{cm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Hv()});function ar(){return yv(Mc)}var Dc=F("ZodNever",(e,r)=>{um.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>qv(e,n,i)});function Di(e){return _v(Dc,e)}var Rc=F("ZodVoid",(e,r)=>{lm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Bv(e,n)});function k2(e){return wv(Rc,e)}var Ri=F("ZodDate",(e,r)=>{fm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Gv(e,i),e.min=(i,t)=>e.check(ft(i,t)),e.max=(i,t)=>e.check(wt(i,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function $2(e){return kv(Ri,e)}var Lc=F("ZodArray",(e,r)=>{dm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ig(e,n,i,t),e.element=r.element,e.min=(n,i)=>e.check(ir(n,i)),e.nonempty=n=>e.check(ir(1,n)),e.max=(n,i)=>e.check(cn(n,i)),e.length=(n,i)=>e.check(un(n,i)),e.unwrap=()=>e.element});function vn(e,r){return Sv(Lc,e,r)}function x2(e){let r=e._zod.def.shape;return Ui(Object.keys(r))}var gn=F("ZodObject",(e,r)=>{vm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ag(e,n,i,t),Te.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>Ui(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ar()}),e.loose=()=>e.clone({...e._zod.def,catchall:ar()}),e.strict=()=>e.clone({...e._zod.def,catchall:Di()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Te.extend(e,n),e.safeExtend=n=>Te.safeExtend(e,n),e.merge=n=>Te.merge(e,n),e.pick=n=>Te.pick(e,n),e.omit=n=>Te.omit(e,n),e.partial=(...n)=>Te.partial(ji,e,n[0]),e.required=(...n)=>Te.required(Bi,e,n[0])});function S2(e,r){let n={type:"object",shape:e??{},...Te.normalizeParams(r)};return new gn(n)}function I2(e,r){return new gn({type:"object",shape:e,catchall:Di(),...Te.normalizeParams(r)})}function T2(e,r){return new gn({type:"object",shape:e,catchall:ar(),...Te.normalizeParams(r)})}var bn=F("ZodUnion",(e,r)=>{ii.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>_c(e,n,i,t),e.options=r.options});function Li(e,r){return new bn({type:"union",options:e,...Te.normalizeParams(r)})}var Uc=F("ZodXor",(e,r)=>{bn.init(e,r),gm.init(e,r),e._zod.processJSONSchema=(n,i,t)=>_c(e,n,i,t),e.options=r.options});function C2(e,r){return new Uc({type:"union",options:e,inclusive:!1,...Te.normalizeParams(r)})}var Zc=F("ZodDiscriminatedUnion",(e,r)=>{bn.init(e,r),bm.init(e,r)});function z2(e,r,n){return new Zc({type:"union",options:r,discriminator:e,...Te.normalizeParams(n)})}var jc=F("ZodIntersection",(e,r)=>{ym.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>og(e,n,i,t)});function Bc(e,r){return new jc({type:"intersection",left:e,right:r})}var qc=F("ZodTuple",(e,r)=>{F0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>sg(e,n,i,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Fc(e,r,n){let i=r instanceof ye,t=i?n:r;return new qc({type:"tuple",items:e,rest:i?r:null,...Te.normalizeParams(t)})}var yn=F("ZodRecord",(e,r)=>{_m.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>cg(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType});function Hc(e,r,n){return new yn({type:"record",keyType:e,valueType:r,...Te.normalizeParams(n)})}function E2(e,r,n){let i=It(e);return i._zod.values=void 0,new yn({type:"record",keyType:i,valueType:r,...Te.normalizeParams(n)})}function N2(e,r,n){return new yn({type:"record",keyType:e,valueType:r,mode:"loose",...Te.normalizeParams(n)})}var Gc=F("ZodMap",(e,r)=>{wm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>rg(e,n),e.keyType=r.keyType,e.valueType=r.valueType,e.min=(...n)=>e.check(Ht(...n)),e.nonempty=n=>e.check(Ht(1,n)),e.max=(...n)=>e.check(zr(...n)),e.size=(...n)=>e.check(sn(...n))});function A2(e,r,n){return new Gc({type:"map",keyType:e,valueType:r,...Te.normalizeParams(n)})}var Jc=F("ZodSet",(e,r)=>{km.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ng(e,n),e.min=(...n)=>e.check(Ht(...n)),e.nonempty=n=>e.check(Ht(1,n)),e.max=(...n)=>e.check(zr(...n)),e.size=(...n)=>e.check(sn(...n))});function P2(e,r){return new Jc({type:"set",valueType:e,...Te.normalizeParams(r)})}var Ir=F("ZodEnum",(e,r)=>{$m.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(i,t,a)=>Jv(e,i,t),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{let a={};for(let o of i)if(n.has(o))a[o]=r.entries[o];else throw Error(`Key ${o} not found in enum`);return new Ir({...r,checks:[],...Te.normalizeParams(t),entries:a})},e.exclude=(i,t)=>{let a={...r.entries};for(let o of i)if(n.has(o))delete a[o];else throw Error(`Key ${o} not found in enum`);return new Ir({...r,checks:[],...Te.normalizeParams(t),entries:a})}});function Ui(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Ir({type:"enum",entries:n,...Te.normalizeParams(r)})}function O2(e,r){return new Ir({type:"enum",entries:e,...Te.normalizeParams(r)})}var Wc=F("ZodLiteral",(e,r)=>{xm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Wv(e,n,i),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function M2(e,r){return new Wc({type:"literal",values:Array.isArray(e)?e:[e],...Te.normalizeParams(r)})}var Yc=F("ZodFile",(e,r)=>{Sm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Xv(e,n,i),e.min=(n,i)=>e.check(Ht(n,i)),e.max=(n,i)=>e.check(zr(n,i)),e.mime=(n,i)=>e.check(di(Array.isArray(n)?n:[n],i))});function D2(e){return Iv(Yc,e)}var Vc=F("ZodTransform",(e,r)=>{Im.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>tg(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ei(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Te.issue(a,n.value,r));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(Te.issue(o))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(a=>(n.value=a,n)):(n.value=t,n)}});function Zi(e){return new Vc({type:"transform",transform:e})}var ji=F("ZodOptional",(e,r)=>{H0.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>wc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Zr(e){return new ji({type:"optional",innerType:e})}var Xc=F("ZodExactOptional",(e,r)=>{Tm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>wc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Kc(e){return new Xc({type:"optional",innerType:e})}var Qc=F("ZodNullable",(e,r)=>{Cm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ug(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function jr(e){return new Qc({type:"nullable",innerType:e})}function R2(e){return Zr(jr(e))}var eu=F("ZodDefault",(e,r)=>{zm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>fg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tu(e,r){return new eu({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Te.shallowClone(r)}})}var ru=F("ZodPrefault",(e,r)=>{Em.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>dg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function nu(e,r){return new ru({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():Te.shallowClone(r)}})}var Bi=F("ZodNonOptional",(e,r)=>{Nm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>lg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function iu(e,r){return new Bi({type:"nonoptional",innerType:e,...Te.normalizeParams(r)})}var au=F("ZodSuccess",(e,r)=>{Am.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Kv(e,n,i),e.unwrap=()=>e._zod.def.innerType});function L2(e){return new au({type:"success",innerType:e})}var ou=F("ZodCatch",(e,r)=>{Pm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>hg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function su(e,r){return new ou({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var cu=F("ZodNaN",(e,r)=>{Om.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Yv(e,n)});function U2(e){return xv(cu,e)}var qi=F("ZodPipe",(e,r)=>{Mm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>pg(e,n,i,t),e.in=r.in,e.out=r.out});function Br(e,r){return new qi({type:"pipe",in:e,out:r})}var Fi=F("ZodCodec",(e,r)=>{qi.init(e,r),G0.init(e,r)});function Z2(e,r,n){return new Fi({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}var uu=F("ZodReadonly",(e,r)=>{Dm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>mg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function lu(e){return new uu({type:"readonly",innerType:e})}var fu=F("ZodTemplateLiteral",(e,r)=>{Rm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Vv(e,n,i)});function j2(e,r){return new fu({type:"template_literal",parts:e,...Te.normalizeParams(r)})}var du=F("ZodLazy",(e,r)=>{Zm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>gg(e,n,i,t),e.unwrap=()=>e._zod.def.getter()});function hu(e){return new du({type:"lazy",getter:e})}var pu=F("ZodPromise",(e,r)=>{Um.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>vg(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function B2(e){return new pu({type:"promise",innerType:e})}var mu=F("ZodFunction",(e,r)=>{Lm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>eg(e,n)});function Hn(e){return new mu({type:"function",input:Array.isArray(e==null?void 0:e.input)?Fc(e==null?void 0:e.input):(e==null?void 0:e.input)??vn(ar()),output:(e==null?void 0:e.output)??ar()})}var _n=F("ZodCustom",(e,r)=>{jm.init(e,r),ke.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Qv(e,n)});function q2(e){let r=new qe({check:"custom"});return r._zod.check=e,r}function F2(e,r){return Tv(_n,e??(()=>!0),r)}function vu(e,r={}){return Cv(_n,e,r)}function gu(e){return zv(e)}var H2=Nv,G2=Av;function J2(e,r={}){let n=new _n({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...Te.normalizeParams(r)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var W2=(...e)=>Pv({Codec:Fi,Boolean:pn,String:fn},...e);function Y2(e){let r=hu(()=>Li([qn(e),Cc(),zc(),Pc(),vn(r),Hc(qn(),r)]));return r}function V2(e,r){return Br(Zi(e),r)}var Pk={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Ok(e){st({customError:e})}function Mk(){return st().customError}var Ys;Ys||(Ys={});var ie={...yg,..._g,iso:kc},Dk=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Rk(e,r){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":r??"draft-2020-12"}function Lk(e,r){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return r.rootSchema;let i=r.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let t=n[1];if(!t||!r.defs[t])throw Error(`Reference not found: ${e}`);return r.defs[t]}throw Error(`Reference not found: ${e}`)}function X2(e,r){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ie.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return ie.lazy(()=>{if(!r.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return r.refs.get(t)});r.processing.add(t);let a=Lk(t,r),o=ot(a,r);return r.refs.set(t,o),r.processing.delete(t),o}if(e.enum!==void 0){let t=e.enum;if(r.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return ie.null();if(t.length===0)return ie.never();if(t.length===1)return ie.literal(t[0]);if(t.every(o=>typeof o=="string"))return ie.enum(t);let a=t.map(o=>ie.literal(o));return a.length<2?a[0]:ie.union([a[0],a[1],...a.slice(2)])}if(e.const!==void 0)return ie.literal(e.const);let n=e.type;if(Array.isArray(n)){let t=n.map(a=>{let o={...e,type:a};return X2(o,r)});return t.length===0?ie.never():t.length===1?t[0]:ie.union(t)}if(!n)return ie.any();let i;switch(n){case"string":{let t=ie.string();if(e.format){let a=e.format;a==="email"?t=t.check(ie.email()):a==="uri"||a==="uri-reference"?t=t.check(ie.url()):a==="uuid"||a==="guid"?t=t.check(ie.uuid()):a==="date-time"?t=t.check(ie.iso.datetime()):a==="date"?t=t.check(ie.iso.date()):a==="time"?t=t.check(ie.iso.time()):a==="duration"?t=t.check(ie.iso.duration()):a==="ipv4"?t=t.check(ie.ipv4()):a==="ipv6"?t=t.check(ie.ipv6()):a==="mac"?t=t.check(ie.mac()):a==="cidr"?t=t.check(ie.cidrv4()):a==="cidr-v6"?t=t.check(ie.cidrv6()):a==="base64"?t=t.check(ie.base64()):a==="base64url"?t=t.check(ie.base64url()):a==="e164"?t=t.check(ie.e164()):a==="jwt"?t=t.check(ie.jwt()):a==="emoji"?t=t.check(ie.emoji()):a==="nanoid"?t=t.check(ie.nanoid()):a==="cuid"?t=t.check(ie.cuid()):a==="cuid2"?t=t.check(ie.cuid2()):a==="ulid"?t=t.check(ie.ulid()):a==="xid"?t=t.check(ie.xid()):a==="ksuid"&&(t=t.check(ie.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t=n==="integer"?ie.number().int():ie.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":{i=ie.boolean();break}case"null":{i=ie.null();break}case"object":{let t={},a=e.properties||{},o=new Set(e.required||[]);for(let[l,d]of Object.entries(a)){let p=ot(d,r);t[l]=o.has(l)?p:p.optional()}if(e.propertyNames){let l=ot(e.propertyNames,r),d=e.additionalProperties&&typeof e.additionalProperties=="object"?ot(e.additionalProperties,r):ie.any();if(Object.keys(t).length===0){i=ie.record(l,d);break}let p=ie.object(t).passthrough(),m=ie.looseRecord(l,d);i=ie.intersection(p,m);break}if(e.patternProperties){let l=e.patternProperties,d=Object.keys(l),p=[];for(let f of d){let u=ot(l[f],r),h=ie.string().regex(new RegExp(f));p.push(ie.looseRecord(h,u))}let m=[];if(Object.keys(t).length>0&&m.push(ie.object(t).passthrough()),m.push(...p),m.length===0)i=ie.object({}).passthrough();else if(m.length===1)i=m[0];else{let f=ie.intersection(m[0],m[1]);for(let u=2;u<m.length;u++)f=ie.intersection(f,m[u]);i=f}break}let s=ie.object(t);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(ot(e.additionalProperties,r)):i=s.passthrough();break}case"array":{let{prefixItems:t,items:a}=e;if(t&&Array.isArray(t)){let o=t.map(l=>ot(l,r)),s=a&&typeof a=="object"&&!Array.isArray(a)?ot(a,r):void 0;s?i=ie.tuple(o).rest(s):i=ie.tuple(o),typeof e.minItems=="number"&&(i=i.check(ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ie.maxLength(e.maxItems)))}else if(Array.isArray(a)){let o=a.map(l=>ot(l,r)),s=e.additionalItems&&typeof e.additionalItems=="object"?ot(e.additionalItems,r):void 0;s?i=ie.tuple(o).rest(s):i=ie.tuple(o),typeof e.minItems=="number"&&(i=i.check(ie.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ie.maxLength(e.maxItems)))}else if(a!==void 0){let o=ot(a,r),s=ie.array(o);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=ie.array(ie.any());break}default:throw Error(`Unsupported type: ${n}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ot(e,r){if(typeof e=="boolean")return e?ie.any():ie.never();let n=X2(e,r),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(d=>ot(d,r)),l=ie.union(s);n=i?ie.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(d=>ot(d,r)),l=ie.xor(s);n=i?ie.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:ie.any();else{let s=i?n:ot(e.allOf[0],r),l=i?0:1;for(let d=l;d<e.allOf.length;d++)s=ie.intersection(s,ot(e.allOf[d],r));n=s}e.nullable===!0&&r.version==="openapi-3.0"&&(n=ie.nullable(n)),e.readOnly===!0&&(n=ie.readonly(n));let t={},a=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of a)s in e&&(t[s]=e[s]);let o=["contentEncoding","contentMediaType","contentSchema"];for(let s of o)s in e&&(t[s]=e[s]);for(let s of Object.keys(e))Dk.has(s)||(t[s]=e[s]);return Object.keys(t).length>0&&r.registry.add(n,t),n}function Uk(e,r){if(typeof e=="boolean")return e?ie.any():ie.never();let n=Rk(e,r==null?void 0:r.defaultTarget),i=e.$defs||e.definitions||{},t={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:(r==null?void 0:r.registry)??_t};return ot(e,t)}var K2={};Ot(K2,{string:()=>Zk,number:()=>jk,date:()=>Fk,boolean:()=>Bk,bigint:()=>qk});function Zk(e){return Ym(fn,e)}function jk(e){return nv(hn,e)}function Bk(e){return lv(pn,e)}function qk(e){return dv(mn,e)}function Fk(e){return $v(Ri,e)}st(Bm());var Hk=j.union([j.literal("light"),j.literal("dark")]).describe("Color theme preference for the host environment."),bu=j.union([j.literal("inline"),j.literal("fullscreen"),j.literal("pip")]).describe("Display mode for UI presentation."),Gk=j.union([j.literal("--color-background-primary"),j.literal("--color-background-secondary"),j.literal("--color-background-tertiary"),j.literal("--color-background-inverse"),j.literal("--color-background-ghost"),j.literal("--color-background-info"),j.literal("--color-background-danger"),j.literal("--color-background-success"),j.literal("--color-background-warning"),j.literal("--color-background-disabled"),j.literal("--color-text-primary"),j.literal("--color-text-secondary"),j.literal("--color-text-tertiary"),j.literal("--color-text-inverse"),j.literal("--color-text-ghost"),j.literal("--color-text-info"),j.literal("--color-text-danger"),j.literal("--color-text-success"),j.literal("--color-text-warning"),j.literal("--color-text-disabled"),j.literal("--color-text-ghost"),j.literal("--color-border-primary"),j.literal("--color-border-secondary"),j.literal("--color-border-tertiary"),j.literal("--color-border-inverse"),j.literal("--color-border-ghost"),j.literal("--color-border-info"),j.literal("--color-border-danger"),j.literal("--color-border-success"),j.literal("--color-border-warning"),j.literal("--color-border-disabled"),j.literal("--color-ring-primary"),j.literal("--color-ring-secondary"),j.literal("--color-ring-inverse"),j.literal("--color-ring-info"),j.literal("--color-ring-danger"),j.literal("--color-ring-success"),j.literal("--color-ring-warning"),j.literal("--font-sans"),j.literal("--font-mono"),j.literal("--font-weight-normal"),j.literal("--font-weight-medium"),j.literal("--font-weight-semibold"),j.literal("--font-weight-bold"),j.literal("--font-text-xs-size"),j.literal("--font-text-sm-size"),j.literal("--font-text-md-size"),j.literal("--font-text-lg-size"),j.literal("--font-heading-xs-size"),j.literal("--font-heading-sm-size"),j.literal("--font-heading-md-size"),j.literal("--font-heading-lg-size"),j.literal("--font-heading-xl-size"),j.literal("--font-heading-2xl-size"),j.literal("--font-heading-3xl-size"),j.literal("--font-text-xs-line-height"),j.literal("--font-text-sm-line-height"),j.literal("--font-text-md-line-height"),j.literal("--font-text-lg-line-height"),j.literal("--font-heading-xs-line-height"),j.literal("--font-heading-sm-line-height"),j.literal("--font-heading-md-line-height"),j.literal("--font-heading-lg-line-height"),j.literal("--font-heading-xl-line-height"),j.literal("--font-heading-2xl-line-height"),j.literal("--font-heading-3xl-line-height"),j.literal("--border-radius-xs"),j.literal("--border-radius-sm"),j.literal("--border-radius-md"),j.literal("--border-radius-lg"),j.literal("--border-radius-xl"),j.literal("--border-radius-full"),j.literal("--border-width-regular"),j.literal("--shadow-hairline"),j.literal("--shadow-sm"),j.literal("--shadow-md"),j.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),Jk=j.record(Gk.describe(`Style variables for theming MCP apps.
|
|
86
|
+
|
|
87
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
88
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
89
|
+
|
|
90
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
91
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),j.union([j.string(),j.undefined()]).describe(`Style variables for theming MCP apps.
|
|
92
|
+
|
|
93
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
94
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
95
|
+
|
|
96
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
97
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
|
|
98
|
+
|
|
99
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
100
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
101
|
+
|
|
102
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
103
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);j.object({method:j.literal("ui/open-link"),params:j.object({url:j.string().describe("URL to open in the host's browser")})});var Wk=j.object({isError:j.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),Yk=j.object({isError:j.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();j.object({method:j.literal("ui/notifications/sandbox-proxy-ready"),params:j.object({})});var yu=j.object({connectDomains:j.array(j.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:j.array(j.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:j.array(j.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:j.array(j.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),_u=j.object({camera:j.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:j.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:j.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:j.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")});j.object({method:j.literal("ui/notifications/size-changed"),params:j.object({width:j.number().optional().describe("New width in pixels."),height:j.number().optional().describe("New height in pixels.")})});var Vk=j.object({method:j.literal("ui/notifications/tool-input"),params:j.object({arguments:j.record(j.string(),j.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Xk=j.object({method:j.literal("ui/notifications/tool-input-partial"),params:j.object({arguments:j.record(j.string(),j.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),Kk=j.object({method:j.literal("ui/notifications/tool-cancelled"),params:j.object({reason:j.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Qk=j.object({fonts:j.string().optional()}),e7=j.object({variables:Jk.optional().describe("CSS variables for theming the app."),css:Qk.optional().describe("CSS blocks that apps can inject.")}),t7=j.object({method:j.literal("ui/resource-teardown"),params:j.object({})});j.record(j.string(),j.unknown());var kl=j.object({text:j.object({}).optional().describe("Host supports text content blocks."),image:j.object({}).optional().describe("Host supports image content blocks."),audio:j.object({}).optional().describe("Host supports audio content blocks."),resource:j.object({}).optional().describe("Host supports resource content blocks."),resourceLink:j.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:j.object({}).optional().describe("Host supports structured content.")}),r7=j.object({experimental:j.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:j.object({}).optional().describe("Host supports opening external URLs."),serverTools:j.object({listChanged:j.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:j.object({listChanged:j.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:j.object({}).optional().describe("Host accepts log messages."),sandbox:j.object({permissions:_u.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:yu.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:kl.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:kl.optional().describe("Host supports receiving content messages (ui/message) from the Guest UI.")}),n7=j.object({experimental:j.object({}).optional().describe("Experimental features (structure TBD)."),tools:j.object({listChanged:j.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call.")});j.object({method:j.literal("ui/notifications/initialized"),params:j.object({}).optional()});j.object({csp:yu.optional().describe("Content Security Policy configuration."),permissions:_u.optional().describe("Sandbox permissions requested by the UI."),domain:j.string().optional().describe("Dedicated origin for widget sandbox."),prefersBorder:j.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")});j.object({method:j.literal("ui/request-display-mode"),params:j.object({mode:bu.describe("The display mode being requested.")})});var i7=j.object({mode:bu.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),a7=j.union([j.literal("model"),j.literal("app")]).describe("Tool visibility scope - who can access the tool.");j.object({resourceUri:j.string().optional(),visibility:j.array(a7).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
104
|
+
- "model": Tool visible to and callable by the agent
|
|
105
|
+
- "app": Tool callable by the app from this server only`)});j.object({method:j.literal("ui/message"),params:j.object({role:j.literal("user").describe('Message role, currently only "user" is supported.'),content:j.array(Vr).describe("Message content blocks (text, image, etc.).")})});j.object({method:j.literal("ui/notifications/sandbox-resource-ready"),params:j.object({html:j.string().describe("HTML content to load into the inner iframe."),sandbox:j.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:yu.optional().describe("CSP configuration from resource metadata."),permissions:_u.optional().describe("Sandbox permissions from resource metadata.")})});var o7=j.object({method:j.literal("ui/notifications/tool-result"),params:Qn.describe("Standard MCP tool execution result.")}),Q2=j.object({toolInfo:j.object({id:Fr.optional().describe("JSON-RPC id of the tools/call request."),tool:k0.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Hk.optional().describe("Current color theme preference."),styles:e7.optional().describe("Style configuration for theming the app."),displayMode:bu.optional().describe("How the UI is currently displayed."),availableDisplayModes:j.array(j.string()).optional().describe("Display modes the host supports."),containerDimensions:j.union([j.object({height:j.number().describe("Fixed container height in pixels.")}),j.object({maxHeight:j.union([j.number(),j.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(j.union([j.object({width:j.number().describe("Fixed container width in pixels.")}),j.object({maxWidth:j.union([j.number(),j.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
106
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:j.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:j.string().optional().describe("User's timezone in IANA format."),userAgent:j.string().optional().describe("Host application identifier."),platform:j.union([j.literal("web"),j.literal("desktop"),j.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:j.object({touch:j.boolean().optional().describe("Whether the device supports touch input."),hover:j.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:j.object({top:j.number().describe("Top safe area inset in pixels."),right:j.number().describe("Right safe area inset in pixels."),bottom:j.number().describe("Bottom safe area inset in pixels."),left:j.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),s7=j.object({method:j.literal("ui/notifications/host-context-changed"),params:Q2.describe("Partial context update containing only changed fields.")});j.object({method:j.literal("ui/update-model-context"),params:j.object({content:j.array(Vr).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:j.record(j.string(),j.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});j.object({method:j.literal("ui/initialize"),params:j.object({appInfo:Xn.describe("App identification (name and version)."),appCapabilities:n7.describe("Features and capabilities this app provides."),protocolVersion:j.string().describe("Protocol version this app supports.")})});var c7=j.object({protocolVersion:j.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Xn.describe("Host application identification and version."),hostCapabilities:r7.describe("Features and capabilities provided by the host."),hostContext:Q2.describe("Rich context about the host environment.")}).passthrough();class u7 extends l9{constructor(n,i={},t={autoResize:!0}){super(t);at(this,"_appInfo");at(this,"_capabilities");at(this,"options");at(this,"_hostCapabilities");at(this,"_hostInfo");at(this,"_hostContext");at(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=t,this.setRequestHandler(Kn,a=>(console.log("Received ping:",a.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(Vk,i=>n(i.params))}set ontoolinputpartial(n){this.setNotificationHandler(Xk,i=>n(i.params))}set ontoolresult(n){this.setNotificationHandler(o7,i=>n(i.params))}set ontoolcancelled(n){this.setNotificationHandler(Kk,i=>n(i.params))}set onhostcontextchanged(n){this.setNotificationHandler(s7,i=>{this._hostContext={...this._hostContext,...i.params},n(i.params)})}set onteardown(n){this.setRequestHandler(t7,(i,t)=>n(i.params,t))}set oncalltool(n){this.setRequestHandler(l1,(i,t)=>n(i.params,t))}set onlisttools(n){this.setRequestHandler(u1,(i,t)=>n(i.params,t))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,i){return await this.request({method:"tools/call",params:n},Qn,i)}sendMessage(n,i){return this.request({method:"ui/message",params:n},Yk,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this.request({method:"ui/update-model-context",params:n},s0,i)}openLink(n,i){return this.request({method:"ui/open-link",params:n},Wk,i)}requestDisplayMode(n,i){return this.request({method:"ui/request-display-mode",params:n},i7,i)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,i=0,t=0,a=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let s=document.documentElement,l=s.style.width,d=s.style.height;s.style.width="fit-content",s.style.height="fit-content";let p=s.getBoundingClientRect();s.style.width=l,s.style.height=d;let m=window.innerWidth-s.clientWidth,f=Math.ceil(p.width+m),u=Math.ceil(p.height);(f!==i||u!==t)&&(i=f,t=u,this.sendSizeChanged({width:f,height:u}))}))};a();let o=new ResizeObserver(a);return o.observe(document.documentElement),o.observe(document.body),()=>o.disconnect()}async connect(n=new d9(window.parent,window.parent),i){var t;await super.connect(n);try{let a=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:h9}},c7,i);if(a===void 0)throw Error(`Server sent invalid initialize result: ${a}`);this._hostCapabilities=a.hostCapabilities,this._hostInfo=a.hostInfo,this._hostContext=a.hostContext,await this.notification({method:"ui/notifications/initialized"}),(t=this.options)!=null&&t.autoResize&&this.setupSizeChangedNotifications()}catch(a){throw this.close(),a}}}function l7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vi,$l;function f7(){if($l)return Vi;$l=1;var e="6.6.0";return Vi=e,Vi}var Xi,xl;function wu(){if(xl)return Xi;xl=1;var e=function(n,i){var t=this;if(i||(i={}),t.qpm=i.qpm?parseInt(i.qpm,10):null,!t.qpm){var a=n.metaText?n.metaText.tempo:null;t.qpm=n.getBpm(a)}t.extraMeasuresAtBeginning=i.extraMeasuresAtBeginning?parseInt(i.extraMeasuresAtBeginning,10):0,t.beatCallback=i.beatCallback,t.eventCallback=i.eventCallback,t.lineEndCallback=i.lineEndCallback,t.lineEndAnticipation=i.lineEndAnticipation?parseInt(i.lineEndAnticipation,10):0,t.beatSubdivisions=i.beatSubdivisions?parseInt(i.beatSubdivisions,10):1,t.beatSubdivisions||(t.beatSubdivisions=1),t.joggerTimer=null,t.replaceTarget=function(s){if(t.noteTimings=s.setTiming(t.qpm,t.extraMeasuresAtBeginning),s.noteTimings.length===0&&(t.noteTimings=s.setTiming(0,0)),t.lineEndCallback&&(t.lineEndTimings=r(s.noteTimings,t.lineEndAnticipation)),t.startTime=null,t.currentBeat=0,t.currentEvent=0,t.currentLine=0,t.currentTime=0,t.isPaused=!1,t.isRunning=!1,t.pausedPercent=null,t.justUnpaused=!1,t.newSeekPercent=0,t.lastTimestamp=0,t.noteTimings.length!==0){t.millisecondsPerBeat=1e3/(t.qpm/60)/t.beatSubdivisions,t.lastMoment=t.noteTimings[t.noteTimings.length-1].milliseconds;var l=s.getMeter(),d="";if(l&&l.type==="specified"&&l.value&&l.value.length>0&&l.value[0].num.indexOf("+")>0&&(d=l.value[0].num),t.beatStarts=[],d){for(var p=t.noteTimings[t.noteTimings.length-1].millisecondsPerMeasure,m=t.lastMoment/p,f=d.split("+"),u=0;u<f.length;u++)f[u]=parseInt(f[u],10)/2;for(var h=0,c=0,v=0;v<m;v++)for(var b=v*p,g=0,w=0;w<f.length;w++){var k=f[w];if(t.beatSubdivisions===1)t.beatSubdivisions===1&&h<t.lastMoment&&t.beatStarts.push({b:c,ts:h}),h+=k*t.millisecondsPerBeat;else for(var $=k*t.beatSubdivisions,O=0;O<Math.floor($);O++){var P=O/$,y=Math.round(b+g*t.millisecondsPerBeat);y<t.lastMoment&&t.beatStarts.push({b:c+P,ts:y}),g++}c++}t.beatStarts.push({b:m*f.length,ts:t.lastMoment}),t.totalBeats=t.beatStarts.length}else{t.totalBeats=Math.round(t.lastMoment/t.millisecondsPerBeat);for(var C=0;C<t.totalBeats+1;C++)t.beatStarts.push({b:C/t.beatSubdivisions,ts:Math.round(C*t.millisecondsPerBeat)})}}},t.replaceTarget(n),t.doTiming=function(s){if(t.lastTimestamp!==s&&(t.lastTimestamp=s,!t.isPaused&&t.isRunning)){for(t.startTime||(t.startTime=s),t.currentTime=s-t.startTime,t.currentTime+=16;t.noteTimings.length>t.currentEvent&&t.noteTimings[t.currentEvent].milliseconds<t.currentTime;){if(t.eventCallback&&t.noteTimings[t.currentEvent].type==="event"){var l=t.startTime;t.eventCallback(t.noteTimings[t.currentEvent]),l!==t.startTime&&(t.currentTime=s-t.startTime)}t.currentEvent++}if(t.lineEndCallback&&t.lineEndTimings.length>t.currentLine&&t.lineEndTimings[t.currentLine].milliseconds<t.currentTime&&t.currentEvent<t.noteTimings.length){var d=t.noteTimings[t.currentEvent].milliseconds===t.currentTime?t.noteTimings[t.currentEvent]:t.noteTimings[t.currentEvent-1];t.lineEndCallback(t.lineEndTimings[t.currentLine],d,{line:t.currentLine,endTimings:t.lineEndTimings,currentTime:t.currentTime}),t.currentLine++}if(t.currentTime<t.lastMoment){if(requestAnimationFrame(t.doTiming),t.currentBeat<t.beatStarts.length&&t.beatStarts[t.currentBeat].ts<=t.currentTime){var p=t.doBeatCallback(s);t.currentBeat++,p!==null&&(t.currentTime=p)}}else if(t.currentBeat<=t.totalBeats&&t.beatCallback){var m=t.doBeatCallback(s);t.currentBeat++,m!==null&&(t.currentTime=m),requestAnimationFrame(t.doTiming)}if(t.currentTime>=t.lastMoment)if(t.eventCallback){var f=t.eventCallback(null);t.shouldStop(f).then(function(u){u&&t.stop()})}else t.stop()}},t.shouldStop=function(s){return new Promise(function(l){if(!s)return l(!0);if(s==="continue")return l(!1);s.then&&s.then(function(d){l(d!=="continue")})})},t.doBeatCallback=function(s){if(t.beatCallback){for(var l=t.currentEvent;l<t.noteTimings.length&&t.noteTimings[l].left===null;)l++;var d,p;if(l<t.noteTimings.length){for(d=t.noteTimings[l].milliseconds,l=Math.max(0,t.currentEvent-1);l>=0&&t.noteTimings[l].left===null;)l--;p=t.noteTimings[l]}var m={},f={};if(p){m.top=p.top,m.height=p.height;var u=Math.max(0,s-t.startTime-p.milliseconds),h=d-p.milliseconds,c=p.endX-p.left,v=h?u*c/h:0;m.left=p.left+v,t.currentEvent===0&&p.milliseconds>s-t.startTime&&(m.left=void 0),f={timestamp:s,startTime:t.startTime,ev:p,endMs:d,offMs:u,offPx:v,gapMs:h,gapPx:c}}else f={timestamp:s,startTime:t.startTime};var b=t.startTime;if(t.beatCallback(t.beatStarts[t.currentBeat].b,t.totalBeats/t.beatSubdivisions,t.lastMoment,m,f),b!==t.startTime)return s-t.startTime}return null};var o=60;t.animationJogger=function(){t.isRunning&&(t.doTiming(performance.now()),t.joggerTimer=setTimeout(t.animationJogger,o))},t.start=function(s,l){if(t.isRunning=!0,t.isPaused&&(t.isPaused=!1,s===void 0&&(t.justUnpaused=!0)),s)t.setProgress(s,l);else if(s===0)t.reset();else if(t.pausedPercent!==null){var d=performance.now();t.currentTime=t.lastMoment*t.pausedPercent,t.startTime=d-t.currentTime,t.pausedPercent=null,t.reportNext=!0}requestAnimationFrame(t.doTiming),t.joggerTimer=setTimeout(t.animationJogger,o)},t.pause=function(){t.isPaused=!0;var s=performance.now();t.pausedPercent=(s-t.startTime)/t.lastMoment,t.isRunning=!1,t.joggerTimer&&(clearTimeout(t.joggerTimer),t.joggerTimer=null)},t.currentMillisecond=function(){return t.currentTime},t.reset=function(){t.currentBeat=0,t.currentEvent=0,t.currentLine=0,t.startTime=null,t.pausedPercent=null},t.stop=function(){t.pause(),t.reset()},t.setProgress=function(s,l){var d;switch(l){case"seconds":t.currentTime=s*1e3,t.currentTime<0&&(t.currentTime=0),t.currentTime>t.lastMoment&&(t.currentTime=t.lastMoment),d=t.currentTime/t.lastMoment;break;case"beats":t.currentTime=s*t.millisecondsPerBeat*t.beatSubdivisions,t.currentTime<0&&(t.currentTime=0),t.currentTime>t.lastMoment&&(t.currentTime=t.lastMoment),d=t.currentTime/t.lastMoment;break;default:d=s,d<0&&(d=0),d>1&&(d=1),t.currentTime=t.lastMoment*d;break}t.isRunning||(t.pausedPercent=d);var p=performance.now();for(t.startTime=p-t.currentTime,t.currentEvent=0;t.noteTimings.length>t.currentEvent&&t.noteTimings[t.currentEvent].milliseconds<t.currentTime;)t.currentEvent++;if(t.lineEndCallback)for(t.currentLine=0;t.lineEndTimings.length>t.currentLine&&t.lineEndTimings[t.currentLine].milliseconds+t.lineEndAnticipation<t.currentTime;)t.currentLine++;var m=t.currentBeat;for(t.currentBeat=0;t.currentBeat<t.beatStarts.length&&!(t.beatStarts[t.currentBeat].ts>t.currentTime);t.currentBeat++);t.currentBeat--,t.beatCallback&&m!==t.currentBeat&&(t.doBeatCallback(t.startTime+t.currentTime),t.currentBeat++),t.eventCallback&&t.currentEvent>=0&&t.noteTimings[t.currentEvent].type==="event"&&t.eventCallback(t.noteTimings[t.currentEvent]),t.lineEndCallback&&t.lineEndCallback(t.lineEndTimings[t.currentLine],t.noteTimings[t.currentEvent],{line:t.currentLine,endTimings:t.lineEndTimings}),t.joggerTimer=setTimeout(t.animationJogger,o)}};function r(n,i){for(var t=[],a=null,o=0;o<n.length;o++){var s=n[o];s.type!=="end"&&s.top!==a&&(t.push({measureNumber:s.measureNumber,milliseconds:s.milliseconds-i,top:s.top,bottom:s.top+s.height}),a=s.top)}return t}return Xi=e,Xi}var Ki,Sl;function d7(){if(Sl)return Ki;Sl=1;var e=wu(),r={};return(function(){var n,i;r.startAnimation=function(t,a,o){n&&(n.stop(),n=void 0),o.showCursor&&(i=t.querySelector(".abcjs-cursor"),i||(i=document.createElement("DIV"),i.className="abcjs-cursor cursor",i.style.position="absolute",t.appendChild(i),t.style.position="relative"));function s(h){for(var c=0;c<h.length;c++){var v=h[c];v.classList.contains("abcjs-bar")||(v.style.display="none")}}var l;function d(h){if(l){var c=t.querySelectorAll(l);s(c)}l=h}function p(h){var c=t.querySelectorAll(h);s(c)}function m(h){o.hideCurrentMeasure?p(h):o.hideFinishedMeasures&&d(h)}function f(h){return".abcjs-l"+h.line+".abcjs-m"+h.measureNumber}function u(h){if(h){if(h.measureStart){var c=f(h);c&&m(c)}i&&(i.style.left=h.left+"px",i.style.top=h.top+"px",i.style.width=h.width+"px",i.style.height=h.height+"px")}else n.stop(),n=void 0}n=new e(a,{qpm:o.bpm,eventCallback:u}),n.start()},r.pauseAnimation=function(t){n&&(t?n.pause():n.start())},r.stopAnimation=function(){n&&(n.stop(),n=void 0)}})(),Ki=r,Ki}var Qi,Il;function Et(){if(Il)return Qi;Il=1;var e={};return e.cloneArray=function(r){for(var n=[],i=0;i<r.length;i++)n.push(Object.assign({},r[i]));return n},e.cloneHashOfHash=function(r){var n={};for(var i in r)r.hasOwnProperty(i)&&(n[i]=Object.assign({},r[i]));return n},e.cloneHashOfArrayOfHash=function(r){var n={};for(var i in r)r.hasOwnProperty(i)&&(n[i]=e.cloneArray(r[i]));return n},e.strip=function(r){return r.replace(/^\s+/,"").replace(/\s+$/,"")},e.startsWith=function(r,n){return r.indexOf(n)===0},e.endsWith=function(r,n){var i=r.length-n.length;return i>=0&&r.lastIndexOf(n)===i},e.last=function(r){return r.length===0?null:r[r.length-1]},Qi=e,Qi}var ea,Tl;function ku(){if(Tl)return ea;Tl=1;var e=Et(),r={};return(function(){var n,i,t,a,o;r.initialize=function(_,x,S,M,U){n=_,i=x,t=S,a=M,o=U,s()};function s(){t.annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},t.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},t.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},t.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},t.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},t.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},t.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},t.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},t.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},t.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},t.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},a.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},a.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},a.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},a.formatting.annotationfont=t.annotationfont,a.formatting.gchordfont=t.gchordfont,a.formatting.historyfont=t.historyfont,a.formatting.infofont=t.infofont,a.formatting.measurefont=t.measurefont,a.formatting.partsfont=t.partsfont,a.formatting.repeatfont=t.repeatfont,a.formatting.textfont=t.textfont,a.formatting.tripletfont=t.tripletfont,a.formatting.vocalfont=t.vocalfont,a.formatting.wordsfont=t.wordsfont}var l={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},d=function(_){switch(_){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}},p=function(_,x,S,M,U){function q(){var Me=parseInt(_[0].token);return _.shift(),x?_.length===0?{face:x.face,weight:x.weight,style:x.style,decoration:x.decoration,size:Me}:_.length===1&&_[0].token==="box"&&l[U]?{face:x.face,weight:x.weight,style:x.style,decoration:x.decoration,size:Me,box:!0}:(i("Extra parameters in font definition.",S,M),{face:x.face,weight:x.weight,style:x.style,decoration:x.decoration,size:Me}):(i("Can't set just the size of the font since there is no default value.",S,M),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:Me})}if(_[0].token==="*"){if(_.shift(),_[0].type==="number")return q();i("Expected font size number after *.",S,M)}if(_[0].type==="number")return q();for(var Z=[],V,ne="normal",Y="normal",ce="none",fe=!1,pe="face",K=!1;_.length;){var he=_.shift(),ee=he.token.toLowerCase();switch(pe){case"face":K||ee!=="utf"&&he.type!=="number"&&ee!=="bold"&&ee!=="italic"&&ee!=="underline"&&ee!=="box"?Z.length>0&&he.token==="-"?(K=!0,Z[Z.length-1]=Z[Z.length-1]+he.token):K?(K=!1,Z[Z.length-1]=Z[Z.length-1]+he.token):Z.push(he.token):he.type==="number"?(V?i("Font size specified twice in font definition.",S,M):V=he.token,pe="modifier"):ee==="bold"?ne="bold":ee==="italic"?Y="italic":ee==="underline"?ce="underline":ee==="box"?(l[U]?fe=!0:i(`This font style doesn't support "box"`,S,M),pe="finished"):ee==="utf"?(he=_.shift(),pe="size"):i("Unknown parameter "+he.token+" in font definition.",S,M);break;case"size":he.type==="number"?V?i("Font size specified twice in font definition.",S,M):V=he.token:i("Expected font size in font definition.",S,M),pe="modifier";break;case"modifier":ee==="bold"?ne="bold":ee==="italic"?Y="italic":ee==="underline"?ce="underline":ee==="box"?(l[U]?fe=!0:i(`This font style doesn't support "box"`,S,M),pe="finished"):i("Unknown parameter "+he.token+" in font definition.",S,M);break;case"finished":i('Extra characters found after "box" in font definition.',S,M);break}}V===void 0?x?V=x.size:(i("Must specify the size of the font since there is no default value.",S,M),V=12):V=parseFloat(V),Z=Z.join(" "),Z===""&&(x?Z=x.face:(i("Must specify the name of the font since there is no default value.",S,M),Z="sans-serif"));var be=d(Z),_e={};return be?(_e.face=be.face,_e.weight=be.weight,_e.style=be.style,_e.decoration=be.decoration,_e.size=V,fe&&(_e.box=!0),_e):(_e.face=Z,_e.weight=ne,_e.style=Y,_e.decoration=ce,_e.size=V,fe&&(_e.box=!0),_e)},m=function(_,x,S){return x.length===0?'Directive "'+_+'" requires a font as a parameter.':(t[_]=p(x,t[_],S,0,_),t.is_in_header&&(a.formatting[_]=t[_]),null)},f=function(_,x,S){return x.length===0?'Directive "'+_+'" requires a font as a parameter.':(a.formatting[_]=p(x,a.formatting[_],S,0,_),null)},u=function(_,x){var S="";x.forEach(function(U){S+=U.token});var M=parseFloat(S);if(isNaN(M)||M===0)return'Directive "'+_+'" requires a number as a parameter.';a.formatting.scale=M},h=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],c=function(_){var x=_.split(/\s+/);if(x.length!==2&&x.length!==3)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var S=x[0],M=parseInt(x[1],10);if((isNaN(M)||M<35||M>81)&&x[1]&&(M=h.indexOf(x[1].toLowerCase())+35),isNaN(M)||M<35||M>81)return{error:'Expected drum name, received "'+x[1]+'"'};var U={sound:M};return x.length===3&&(U.noteHead=x[2]),{key:S,value:U}},v=function(_,x){var S=n.getMeasurement(x);return S.used===0||x.length!==0?{error:'Directive "'+_+'" requires a measurement as a parameter.'}:S.value},b=function(_,x){var S=n.getMeasurement(x);return S.used===0||x.length!==0?'Directive "'+_+'" requires a measurement as a parameter.':(a.formatting[_]=S.value,null)},g=function(_,x,S,M,U){if(S.length!==1||S[0].type!=="number")return'Directive "'+x+'" requires a number as a parameter.';var q=S[0].intt;return M!==void 0&&q<M?'Directive "'+x+'" requires a number greater than or equal to '+M+" as a parameter.":U!==void 0&&q>U?'Directive "'+x+'" requires a number less than or equal to '+U+" as a parameter.":(t[_]=q,null)},w=function(_,x,S){if(S.length===1&&(S[0].token==="true"||S[0].token==="false"))return t[_]=S[0].token==="true",null;var M=g(_,x,S,0,1);return M!==null?M:(t[_]=t[_]===1,null)},k=function(_,x,S,M){if(S.length!==1)return'Directive "'+x+'" requires one of [ '+M.join(", ")+" ] as a parameter.";for(var U=S[0].token,q=!1,Z=0;!q&&Z<M.length;Z++)M[Z]===U&&(q=!0);return q?(t[_]=U,null):'Directive "'+x+'" requires one of [ '+M.join(", ")+" ] as a parameter."},$=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],O=["gchord","ptstress","beatstring"],P=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc","gchordbars"],y=["program"],C=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],E=["beat"],z=["drone"],A=["portamento"],R=["expand","grace","trim"],T=["drum","chordname"],I=["bassprog","chordprog"],N=function(_,x,S){var M=_.shift().token,U=[];if($.indexOf(M)>=0)_.length!==0&&i("Unexpected parameter in MIDI "+M,S,0);else if(O.indexOf(M)>=0)_.length!==1?i("Expected one parameter in MIDI "+M,S,0):U.push(_[0].token);else if(P.indexOf(M)>=0)_.length!==1?i("Expected one parameter in MIDI "+M,S,0):_[0].type!=="number"?i("Expected one integer parameter in MIDI "+M,S,0):U.push(_[0].intt);else if(y.indexOf(M)>=0)_.length!==1&&_.length!==2?i("Expected one or two parameters in MIDI "+M,S,0):_[0].type!=="number"||_.length===2&&_[1].type!=="number"?i("Expected integer parameter in MIDI "+M,S,0):(U.push(_[0].intt),_.length===2&&U.push(_[1].intt));else if(C.indexOf(M)>=0)_.length!==2?i("Expected two parameters in MIDI "+M,S,0):_[0].type!=="number"||_[1].type!=="number"?i("Expected two integer parameters in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[1].intt));else if(A.indexOf(M)>=0)_.length!==2?i("Expected two parameters in MIDI "+M,S,0):_[0].type!=="alpha"||_[1].type!=="number"?i("Expected one string and one integer parameters in MIDI "+M,S,0):(U.push(_[0].token),U.push(_[1].intt));else if(M==="drummap")_.length===2&&_[0].type==="alpha"&&_[1].type==="number"?(x.formatting||(x.formatting={}),x.formatting.midi||(x.formatting.midi={}),x.formatting.midi.drummap||(x.formatting.midi.drummap={}),x.formatting.midi.drummap[_[0].token]=_[1].intt,U=x.formatting.midi.drummap):_.length===3&&_[0].type==="punct"&&_[1].type==="alpha"&&_[2].type==="number"?(x.formatting||(x.formatting={}),x.formatting.midi||(x.formatting.midi={}),x.formatting.midi.drummap||(x.formatting.midi.drummap={}),x.formatting.midi.drummap[_[0].token+_[1].token]=_[2].intt,U=x.formatting.midi.drummap):i("Expected one note name and one integer parameter in MIDI "+M,S,0);else if(R.indexOf(M)>=0)_.length!==3||_[0].type!=="number"||_[1].token!=="/"||_[2].type!=="number"?i("Expected fraction parameter in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[2].intt));else if(E.indexOf(M)>=0)_.length!==4?i("Expected four parameters in MIDI "+M,S,0):_[0].type!=="number"||_[1].type!=="number"||_[2].type!=="number"||_[3].type!=="number"?i("Expected four integer parameters in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[1].intt),U.push(_[2].intt),U.push(_[3].intt));else if(z.indexOf(M)>=0)_.length!==5?i("Expected five parameters in MIDI "+M,S,0):_[0].type!=="number"||_[1].type!=="number"||_[2].type!=="number"||_[3].type!=="number"||_[4].type!=="number"?i("Expected five integer parameters in MIDI "+M,S,0):(U.push(_[0].intt),U.push(_[1].intt),U.push(_[2].intt),U.push(_[3].intt),U.push(_[4].intt));else if(y.indexOf(M)>=0)_.length!==1||_.length!==4?i("Expected one or two parameters in MIDI "+M,S,0):_[0].type!=="number"?i("Expected integer parameter in MIDI "+M,S,0):_.length===4?(_[1].token!=="octave"&&i("Expected octave parameter in MIDI "+M,S,0),_[2].token!=="="&&i("Expected octave parameter in MIDI "+M,S,0),_[3].type!=="number"&&i("Expected integer parameter for octave in MIDI "+M,S,0)):(U.push(_[0].intt),_.length===4&&U.push(_[3].intt));else if(T.indexOf(M)>=0)if(_.length<2)i("Expected string parameter and at least one integer parameter in MIDI "+M,S,0);else if(_[0].type!=="alpha")i("Expected string parameter and at least one integer parameter in MIDI "+M,S,0);else{var q=_.shift();for(U.push(q.token);_.length>0;)q=_.shift(),q.type!=="number"&&i("Expected integer parameter in MIDI "+M,S,0),U.push(q.intt)}else if(I.indexOf(M)>=0){if(_.length!==1&&_.length!==2)i("Expected one or two parameters in MIDI "+M,S,0);else if(_[0].type!=="number")i("Expected integer parameter in MIDI "+M,S,0);else if(_.length===2&&_[1].type!=="alpha")i("Expected alpha parameter in MIDI "+M,S,0);else if(U.push(_[0].intt),_.length===2){var Z=_[1].token;Z.indexOf("octave=")!=-1?(Z=Z.replace("octave=",""),Z=parseInt(Z),isNaN(Z)?i("Expected octave value in MIDI"+M):(Z<-1&&(i("Expected octave= in MIDI "+M+" to be >= -1 (recv:"+Z+")"),Z=-1),Z>3&&(i("Expected octave= in MIDI "+M+" to be <= 3 (recv:"+Z+")"),Z=3),U.push(Z))):i("Expected octave= in MIDI"+M)}}o.hasBeginMusic()?o.appendElement("midi",-1,-1,{cmd:M,params:U}):(x.formatting.midi===void 0&&(x.formatting.midi={}),x.formatting.midi[M]=U)};r.parseFontChangeLine=function(_){_=_.replace(/\$\$/g,"");var x=_.split("$");if(x.length>1&&t.setfont){var S=[];x[0]!==""&&S.push({text:x[0]});for(var M=1;M<x.length;M++)if(x[M][0]==="0")S.push({text:x[M].substring(1).replace(/\x03/g,"$$")});else{var U=parseInt(x[M][0],10);t.setfont[U]?S.push({font:t.setfont[U],text:x[M].substring(1).replace(/\x03/g,"$$")}):S[S.length-1].text+="$"+x[M].replace(/\x03/g,"$$")}return S}return _.replace(/\x03/g,"$$")};var D=["auto","above","below","hidden"];r.addDirective=function(_){var x=n.tokenize(_,0,_.length);if(x.length===0||x[0].type!=="alpha")return null;var S=_.substring(_.indexOf(x[0].token)+x[0].token.length);S=n.stripComment(S);var M=x.shift().token.toLowerCase(),U="",q;switch(M){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"jazzchords":a.formatting.jazzchords=!0;break;case"accentAbove":a.formatting.accentAbove=!0;break;case"germanAlphabet":a.formatting.germanAlphabet=!0;break;case"landscape":t.landscape=!0;break;case"papersize":t.papersize=S;break;case"graceslurs":if(x.length!==1)return"Directive graceslurs requires one parameter: 0 or 1";if(x[0].token==="0"||x[0].token==="false")a.formatting.graceSlurs=!1;else if(x[0].token==="1"||x[0].token==="true")a.formatting.graceSlurs=!0;else return"Directive graceslurs requires one parameter: 0 or 1 (received "+x[0].token+")";break;case"lineThickness":var Z=L(x);if(Z.value!==void 0&&(a.formatting.lineThickness=Z.value),Z.error)return Z.error;break;case"stretchlast":var V=L(x);if(V.value!==void 0&&(a.formatting.stretchlast=V.value),V.error)return V.error;break;case"titlecaps":t.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return k("vocalPosition",M,x,D);case"dynamic":return k("dynamicPosition",M,x,D);case"gchord":return k("chordPosition",M,x,D);case"ornament":return k("ornamentPosition",M,x,D);case"volume":return k("volumePosition",M,x,D);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return b(M,x);case"voicescale":if(x.length!==1||x[0].type!=="number")return"voicescale requires one float as a parameter";var ne=x.shift();return t.currentVoice&&(t.currentVoice.scale=ne.floatt,o.changeVoiceScale(t.currentVoice.scale)),null;case"voicecolor":if(x.length!==1)return"voicecolor requires one string as a parameter";var Y=x.shift();return t.currentVoice&&(t.currentVoice.color=Y.token,o.changeVoiceColor(t.currentVoice.color)),null;case"vskip":var ce=Math.round(v(M,x));return ce.error?ce.error:(o.addSpacing(ce),null);case"scale":u(M,x);break;case"sep":if(x.length===0)o.addSeparator(14,14,85,{startChar:t.iChar,endChar:t.iChar+5});else{var fe=n.getMeasurement(x);if(fe.used===0)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var pe=fe.value;if(fe=n.getMeasurement(x),fe.used===0)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var K=fe.value;if(fe=n.getMeasurement(x),fe.used===0||x.length!==0)return'Directive "'+M+'" requires 3 numbers: space above, space below, length of line';var he=fe.value;o.addSeparator(pe,K,he,{startChar:t.iChar,endChar:t.iChar+S.length})}break;case"barsperstaff":if(U=g("barsperstaff",M,x),U!==null)return U;break;case"staffnonote":if(x.length!==1)return"Directive staffnonote requires one parameter: 0 or 1";if(x[0].token==="0")t.staffnonote=!0;else if(x[0].token==="1")t.staffnonote=!1;else return"Directive staffnonote requires one parameter: 0 or 1 (received "+x[0].token+")";break;case"printtempo":if(U=w("printTempo",M,x),U!==null)return U;break;case"partsbox":if(U=w("partsBox",M,x),U!==null)return U;t.partsfont.box=t.partsBox;break;case"freegchord":if(U=w("freegchord",M,x),U!==null)return U;break;case"measurenb":case"barnumbers":if(U=g("barNumbers",M,x),U!==null)return U;break;case"setbarnb":if(x.length!==1||x[0].type!=="number")return"Directive setbarnb requires a number as a parameter.";t.currBarNumber=o.setBarNumberImmediate(x[0].intt);break;case"keywarn":if(x.length!==1||x[0].type!=="number"||x[0].intt!==1&&x[0].intt!==0)return"Directive "+M+" requires 0 or 1 as a parameter.";t[M]=x[0].intt===1;break;case"begintext":var ee="";for(q=n.nextLine();q&&q.indexOf("%%endtext")!==0;){if(e.startsWith(q,"%%")){var be=q.substring(2);be=be.trim()+`
|
|
107
|
+
`,ee+=be}else ee+=q.trim()+`
|
|
108
|
+
`;q=n.nextLine()}o.addText(ee,{startChar:t.iChar,endChar:t.iChar+ee.length+7});break;case"continueall":t.continueall=!0;break;case"beginps":for(q=n.nextLine();q&&q.indexOf("%%endps")!==0;)n.nextLine();i("Postscript ignored",_,0);break;case"deco":S.length>0&&t.ignoredDecorations.push(S.substring(0,S.indexOf(" "))),i("Decoration redefinition ignored",_,0);break;case"text":var _e=n.translateString(S);o.addText(r.parseFontChangeLine(_e),{startChar:t.iChar,endChar:t.iChar+S.length+7});break;case"center":var Me=n.translateString(S);o.addCentered(r.parseFontChangeLine(Me));break;case"font":break;case"setfont":var Ce=n.tokenize(S,0,S.length);if(Ce.length>=4&&Ce[0].token==="-"&&Ce[1].type==="number"){var We=parseInt(Ce[1].token);We>=1&&We<=9&&(t.setfont||(t.setfont=[]),Ce.shift(),Ce.shift(),t.setfont[We]=p(Ce,t.setfont[We],_,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return m(M,x,_);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return f(M,x,_);case"barlabelfont":case"barnumberfont":case"barnumfont":return m("measurefont",x,_);case"staves":case"score":t.score_is_present=!0;for(var Fe=function(Ut,Eb,Ou,Mu,Nb){(Eb||t.staves.length===0)&&t.staves.push({index:t.staves.length,numVoices:0});var Zt=e.last(t.staves);Ou!==void 0&&Zt.bracket===void 0&&(Zt.bracket=Ou),Mu!==void 0&&Zt.brace===void 0&&(Zt.brace=Mu),Nb&&(Zt.connectBarLines="end"),t.voices[Ut]===void 0&&(t.voices[Ut]={staffNum:Zt.index,index:Zt.numVoices},Zt.numVoices++)},Ke=!1,H=!1,W=!1,B=!1,G=!1,Q=!1,ae=!1,ue,xe=function(){if(ae=!0,ue){var Ut="start";ue.staffNum>0&&(t.staves[ue.staffNum-1].connectBarLines==="start"||t.staves[ue.staffNum-1].connectBarLines==="continue")&&(Ut="continue"),t.staves[ue.staffNum].connectBarLines=Ut}};x.length;){var oe=x.shift();switch(oe.token){case"(":Ke?i("Can't nest parenthesis in %%score",_,oe.start):(Ke=!0,B=!0);break;case")":!Ke||B?i("Unexpected close parenthesis in %%score",_,oe.start):Ke=!1;break;case"[":H?i("Can't nest brackets in %%score",_,oe.start):(H=!0,G=!0);break;case"]":!H||G?i("Unexpected close bracket in %%score",_,oe.start):(H=!1,t.staves[ue.staffNum].bracket="end");break;case"{":W?i("Can't nest braces in %%score",_,oe.start):(W=!0,Q=!0);break;case"}":!W||Q?i("Unexpected close brace in %%score",_,oe.start):(W=!1,t.staves[ue.staffNum].brace="end");break;case"|":xe();break;default:for(var me="";(oe.type==="alpha"||oe.type==="number")&&(me+=oe.token,oe.continueId);)oe=x.shift();var Le=!Ke||B,Ye=G?"start":H?"continue":void 0,we=Q?"start":W?"continue":void 0;Fe(me,Le,Ye,we,ae),B=!1,G=!1,Q=!1,ae=!1,ue=t.voices[me],M==="staves"&&xe();break}}break;case"maxstaves":var Ie=n.getInt(S);Ie.digits===0?i("Expected number of staves in maxstaves"):Ie.value>0&&(a.formatting.maxStaves=Ie.value);break;case"newpage":var nt=n.getInt(S);o.addNewPage(nt.digits===0?-1:nt.value);break;case"abc":var Se=S.split(" ");switch(Se[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var Ct=Se.shift();o.addMetaText(M+Ct,Se.join(" "),{startChar:t.iChar,endChar:t.iChar+S.length+5});break;default:return"Unknown directive: "+M+Se[0]}break;case"header":case"footer":var ct=n.getMeat(S,0,S.length);ct=S.substring(ct.start,ct.end),ct[0]==='"'&&ct[ct.length-1]==='"'&&(ct=ct.substring(1,ct.length-1));var it=ct.split(" "),Rt={};it.length===1?Rt={left:"",center:it[0],right:""}:it.length===2?Rt={left:it[0],center:it[1],right:""}:Rt={left:it[0],center:it[1],right:it[2]},it.length>3&&i("Too many tabs in "+M+": "+it.length+" found.",S,0),o.addMetaTextObj(M,Rt,{startChar:t.iChar,endChar:t.iChar+_.length});break;case"midi":var Lt=n.tokenize(S,0,S.length,!0);Lt.length>0&&Lt[0].token==="="&&Lt.shift(),Lt.length===0?i("Expected midi command",S,0):N(Lt,a,S);break;case"percmap":var Xt=c(S);Xt.error?i(Xt.error,_,8):(a.formatting.percmap||(a.formatting.percmap={}),a.formatting.percmap[Xt.key]=Xt.value);break;case"visualtranspose":var fr=n.getInt(S);fr.digits===0?i("Expected number of half steps in visualTranspose"):t.globalTranspose=fr.value;break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[M]=S;break;default:return"Unknown directive: "+M}return null},r.globalFormatting=function(_){for(var x in _)if(_.hasOwnProperty(x)){var S=""+_[x],M=n.tokenize(S,0,S.length),U;switch(x){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":m(x,M,S);break;case"scale":u(x,M);break;case"partsbox":U=w("partsBox",x,M),U!==null&&i(U),t.partsfont.box=t.partsBox;break;case"freegchord":U=w("freegchord",x,M),U!==null&&i(U);break;case"fontboxpadding":(M.length!==1||M[0].type!=="number")&&i('Directive "'+x+'" requires a number as a parameter.'),a.formatting.fontboxpadding=M[0].floatt;break;case"stafftopmargin":(M.length!==1||M[0].type!=="number")&&i('Directive "'+x+'" requires a number as a parameter.'),a.formatting.stafftopmargin=M[0].floatt;break;case"stretchlast":var q=L(M);if(q.value!==void 0&&(a.formatting.stretchlast=q.value),q.error)return q.error;break;default:i("Formatting directive unrecognized: ",x,0)}}};function L(_){if(_.length===0)return{value:1};if(_.length===1)if(_[0].type==="number"){if(_[0].floatt>=0||_[0].floatt<=1)return{value:_[0].floatt}}else{if(_[0].token==="false")return{value:0};if(_[0].token==="true")return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+_[0].token+")"}}})(),ea=r,ea}var ta,Cl;function h7(){if(Cl)return ta;Cl=1;var e={};const r=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];return e.pitchIndex=function(n){return r.indexOf(n)},e.noteName=function(n){return r[n]},ta=e,ta}var ra,zl;function eb(){if(zl)return ra;zl=1;var e=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],i=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];function t(a,o,s,l){if(!o||o%12===0)return a;for(;o<0;)o+=12;o>11&&(o=o%12);var d=a.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!d)return a;var p=d[1],m=d[2],f=d[3],u=d[4],h=e.indexOf(p);if(h<0&&(h=r.indexOf(p)),h<0&&(h=n.indexOf(p)),h<0&&(h=i.indexOf(p)),h<0)return a;h+=o,h=h%12,s?l?a=i[h]:a=r[h]:l?a=n[h]:a=e[h];var c=m&&(m.indexOf("dim")>=0||m.indexOf("°")>=0);if(c&&a==="A#"&&(a="Bb"),c&&a==="D#"&&(a="Eb"),c&&a==="A♯"&&(a="B♭"),c&&a==="D♯"&&(a="E♭"),m&&(a+=m),f){var h=e.indexOf(f);h<0&&(h=r.indexOf(f)),h<0&&(h=n.indexOf(f)),h<0&&(h=i.indexOf(f)),a+="/",h>=0?(h+=o,h=h%12,s?l?a+=i[h]:a+=r[h]:l?a+=n[h]:a+=e[h]):a+=f}return u&&(a+=u),a}return ra=t,ra}var na,El;function tb(){if(El)return na;El=1;var e={C:{modes:["CMaj","CIon","Amin","AAeo","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","DbIon","Bbmin","BbAeo","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","DIon","Bmin","BAeo","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","EbIon","Cmin","CAeo","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","EIon","C#min","C#Aeo","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","FIon","Dmin","DAeo","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","GbIon","Ebmin","EbAeo","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","GIon","Emin","EAeo","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","AbIon","Fmin","FAeo","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","AIon","F#min","F#Aeo","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","BbIon","Gmin","GAeo","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","BIon","G#min","G#Aeo","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","C#Ion","A#min","A#Aeo","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","F#Ion","D#min","D#Aeo","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","CbIon","Abmin","AbAeo","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},r=["maj","ion","min","aeo","m","mix","dor","phr","lyd","loc"];function n(l){return r.indexOf(l.toLowerCase())>=0}var i=null;function t(){i={};for(var l=Object.keys(e),d=0;d<l.length;d++){var p=e[l[d]];i[l[d].toLowerCase()]=l[d];for(var m=0;m<p.modes.length;m++){var f=p.modes[m].toLowerCase();i[f]=l[d]}}}function a(l){i||t();var d=l.toLowerCase().match(/([a-g][b#]?)(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)?/);if(!d||!d[2])return l;d=d[1]+d[2];var p=i[d];return p||l}function o(l,d){var p=e[l];if(!p||d==="")return l;var m=d.toLowerCase().match(/^(maj|ion|min|aeo|mix|dor|phr|lyd|loc|m)/);if(!m)return l;for(var f=m[1],u=0;u<p.modes.length;u++){var h=p.modes[u],c=h.toLowerCase().indexOf(f);if(c!==-1&&c===h.length-f.length)return h.substring(0,h.length-f.length)}return l}function s(l,d){var p=e[l];if(!p)return l;for(;d<0;)d+=12;for(var m=(p.stepsFromC+d)%12,f=0;f<Object.keys(e).length;f++){var u=Object.keys(e)[f];if(e[u].stepsFromC===m)return u}return l}return na={relativeMajor:a,relativeMode:o,transposeKey:s,isLegalMode:n},na}var ia,Nl;function rb(){if(Nl)return ia;Nl=1;var{relativeMajor:e}=tb(),r={acc:"sharp",note:"f"},n={acc:"sharp",note:"c"},i={acc:"sharp",note:"g"},t={acc:"sharp",note:"d"},a={acc:"sharp",note:"A"},o={acc:"sharp",note:"e"},s={acc:"sharp",note:"B"},l={acc:"flat",note:"B"},d={acc:"flat",note:"e"},p={acc:"flat",note:"A"},m={acc:"flat",note:"d"},f={acc:"flat",note:"G"},u={acc:"flat",note:"c"},h={acc:"flat",note:"F"},c={"C#":[r,n,i,t,a,o,s],"F#":[r,n,i,t,a,o],B:[r,n,i,t,a],E:[r,n,i,t],A:[r,n,i],D:[r,n],G:[r],C:[],F:[l],Bb:[l,d],Eb:[l,d,p],Cm:[l,d,p],Ab:[l,d,p,m],Db:[l,d,p,m,f],Gb:[l,d,p,m,f,u],Cb:[l,d,p,m,f,u,h],"A#":[l,d],"B#":[],"D#":[l,d,p],"E#":[l],"G#":[l,d,p,m],none:[]};function v(b){var g=c[e(b)];return g?JSON.parse(JSON.stringify(g)):null}return ia=v,ia}var aa,Al;function nb(){if(Al)return aa;Al=1;var e=h7(),r=eb(),n=rb(),i={},t={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},a=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],o=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];i.keySignature=function(f,u,h,c,v){if(f.clef.type==="perc"||f.clef.type==="none")return{accidentals:n(u),root:h,acc:c};v||(v=0),f.localTransposeVerticalMovement=0,f.localTransposePreferFlats=!1;var b=n(u);if(!b)return f.key;if(f.localTranspose=(f.globalTranspose?f.globalTranspose:0)+v,!f.localTranspose)return{accidentals:b,root:h,acc:c};if(f.globalTransposeOrigKeySig=b,f.localTranspose%12===0)return f.localTransposeVerticalMovement=f.localTranspose/12*7,{accidentals:b,root:h,acc:c};var g=u[0];u[1]==="b"||u[1]==="#"?(g+=u[1],u=u.substr(2)):u=u.substr(1);var w=t[g],k=w!==void 0;k||(w=0,g="C",u="");for(var $=w+f.localTranspose;$<0;)$+=12;$>11&&($=$%12);var O=u[0]==="m"?o[$]:a[$],P=O+u,y=n(P);(y.length===0||y[0].acc==="flat")&&(f.localTransposePreferFlats=!0);var C=P.charCodeAt(0)-g.charCodeAt(0);return f.localTranspose>0?(C<0||C===0&&(g[1]==="#"||P[1]==="b"))&&(C+=7):f.localTranspose<0&&(C>0||C===0&&(g[1]==="b"||P[1]==="#"))&&(C-=7),f.localTranspose>0?f.localTransposeVerticalMovement=C+Math.floor(f.localTranspose/12)*7:f.localTransposeVerticalMovement=C+Math.ceil(f.localTranspose/12)*7,k?{accidentals:y,root:O[0],acc:O.length>1?O[1]:""}:{accidentals:[],root:h,acc:c}},i.chordName=function(f,u){return r(u,f.localTranspose,f.localTransposePreferFlats,f.freegchord)};var s=["c","d","e","f","g","a","b"];function l(f,u,h,c,v){for(var b=s[(f+49)%7],g=0,w=0;w<c.length;w++)c[w].note.toLowerCase()===b&&(g=d[c[w].acc]);for(var k=d[h],$=k-g,O=s[(u+49)%7],P=0,y=0;y<v.accidentals.length;y++)v.accidentals[y].note.toLowerCase()===O&&(P=d[v.accidentals[y].acc]);var C=$+P;return C<-2&&(u--,C+=O==="c"||O==="f"?1:2),C>2&&(u++,C-=O==="b"||O==="e"?1:2),[u,C]}var d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},p={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},m={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};return i.note=function(f,u){if(!(!f.localTranspose||f.clef.type==="perc")){var h=u.pitch;if(f.localTransposeVerticalMovement&&(u.pitch=u.pitch+f.localTransposeVerticalMovement,u.name)){var c=u.accidental?u.name.substring(1):u.name,v=u.accidental?u.name[0]:"",b=e.pitchIndex(c);u.name=v+e.noteName(b+f.localTransposeVerticalMovement)}if(u.accidental){var g=l(h,u.pitch,u.accidental,f.globalTransposeOrigKeySig,f.targetKey);u.pitch=g[0],u.accidental=p[g[1]],u.name&&(u.name=m[g[1]]+u.name.replace(/[_^=]/g,""))}}},aa=i,aa}var oa,Pl;function $u(){if(Pl)return oa;Pl=1;var e=ku(),r=nb(),n={};return(function(){var i,t,a,o;n.initialize=function(u,h,c,v,b){i=u,t=h,a=c,o=b},n.standardKey=function(u,h,c,v){return r.keySignature(a,u,h,c,v)};var s={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},l=function(u,h){var c=s[u],v=c?c.mid:0;return v+h};n.fixClef=function(u){var h=s[u.type];h&&(u.clefPos=h.pitch,u.type=h.clef)},n.deepCopyKey=function(u){var h={accidentals:[],root:u.root,acc:u.acc,mode:u.mode};return u.accidentals.forEach(function(c){h.accidentals.push(Object.assign({},c))}),h};var d={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};n.addPosToKey=function(u,h){var c=u.verticalPos;h.accidentals.forEach(function(v){var b=d[v.note];b=b-c,v.verticalPos=b}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){var b=d[v.note];b=b-c,v.verticalPos=b}),c<-10?(h.accidentals.forEach(function(v){v.verticalPos-=7,(v.verticalPos>=11||v.verticalPos===10&&v.acc==="flat")&&(v.verticalPos-=7),v.note==="A"&&v.acc==="sharp"&&(v.verticalPos-=7),(v.note==="G"||v.note==="F")&&v.acc==="flat"&&(v.verticalPos-=7)}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){v.verticalPos-=7,(v.verticalPos>=11||v.verticalPos===10&&v.acc==="flat")&&(v.verticalPos-=7),v.note==="A"&&v.acc==="sharp"&&(v.verticalPos-=7),(v.note==="G"||v.note==="F")&&v.acc==="flat"&&(v.verticalPos-=7)})):c<-4?(h.accidentals.forEach(function(v){v.verticalPos-=7,c===-8&&(v.note==="f"||v.note==="g")&&v.acc==="sharp"&&(v.verticalPos-=7)}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){v.verticalPos-=7,c===-8&&(v.note==="f"||v.note==="g")&&v.acc==="sharp"&&(v.verticalPos-=7)})):c>=7&&(h.accidentals.forEach(function(v){v.verticalPos+=7}),h.impliedNaturals&&h.impliedNaturals.forEach(function(v){v.verticalPos+=7}))},n.fixKey=function(u,h){var c=Object.assign({},h);return n.addPosToKey(u,c),c};var p=function(u){var h=0,c=u[h++];(c==="^"||c==="_")&&(c=u[h++]);var v=d[c];for(v===void 0&&(v=6);h<u.length;h++)if(u[h]===",")v-=7;else if(u[h]==="'")v+=7;else break;return{mid:v-6,str:u.substring(h)}},m=function(u){for(var h=0;h<u.length;h++)u[h].note==="b"?u[h].note="B":u[h].note==="a"?u[h].note="A":u[h].note==="F"?u[h].note="f":u[h].note==="E"?u[h].note="e":u[h].note==="D"?u[h].note="d":u[h].note==="C"?u[h].note="c":u[h].note==="G"&&u[h].acc==="sharp"?u[h].note="g":u[h].note==="g"&&u[h].acc==="flat"&&(u[h].note="G")};n.parseKey=function(u,h){u.length===0&&(u="none");var c=i.tokenize(u,0,u.length),v={};if(c.length===0)return t("Must pass in key signature.",u,0),v;switch(c[0].token){case"HP":e.addDirective("bagpipes"),a.key={root:"HP",accidentals:[],acc:"",mode:""},v.foundKey=!0,c.shift();break;case"Hp":e.addDirective("bagpipes"),a.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},v.foundKey=!0,c.shift();break;case"none":a.key={root:"none",accidentals:[],acc:"",mode:""},v.foundKey=!0,c.shift();break;default:var b=i.getKeyPitch(c[0].token);if(b.len>0){v.foundKey=!0;var g="",w="";c[0].token.length>1?c[0].token=c[0].token.substring(1):c.shift();var k=b.token;if(c.length>0){var $=i.getSharpFlat(c[0].token);if($.len>0&&(c[0].token.length>1?c[0].token=c[0].token.substring(1):c.shift(),k+=$.token,g=$.token),c.length>0){var O=i.getMode(c[0].token);O.len>0&&(c.shift(),k+=O.token,w=O.token)}if(n.standardKey(k,b.token,g,0)===void 0)return t("Unsupported key signature: "+k,u,0),v}var P=n.deepCopyKey(a.key),y=!h&&a.globalTranspose?-a.globalTranspose:0,C;if(h&&(C=a.globalTransposeOrigKeySig),a.key=n.deepCopyKey(n.standardKey(k,b.token,g,y)),h&&(a.globalTransposeOrigKeySig=C),a.key.mode=w,P&&a.keywarn!==!1){for(var E,z=0;z<a.key.accidentals.length;z++)for(E=0;E<P.accidentals.length;E++)P.accidentals[E].note&&a.key.accidentals[z].note.toLowerCase()===P.accidentals[E].note.toLowerCase()&&(P.accidentals[E].note=null);for(E=0;E<P.accidentals.length;E++)P.accidentals[E].note&&(a.key.impliedNaturals||(a.key.impliedNaturals=[]),a.key.impliedNaturals.push({acc:"natural",note:P.accidentals[E].note}))}}break}if(c.length===0||(c[0].token==="exp"&&c.shift(),c.length===0)||(c[0].token==="oct"&&c.shift(),c.length===0))return v;var A=i.getKeyAccidentals2(c);if(A.warn&&t(A.warn,u,0),A.accs){v.foundKey||(v.foundKey=!0,a.key={root:"none",acc:"",mode:"",accidentals:[]}),m(A.accs);for(var R=0;R<A.accs.length;R++){for(var T=!1,I=0;I<a.key.accidentals.length&&!T;I++)a.key.accidentals[I].note===A.accs[R].note&&(T=!0,a.key.accidentals[I].acc!==A.accs[R].acc&&(a.key.accidentals[I].acc=A.accs[R].acc,a.key.explicitAccidentals||(a.key.explicitAccidentals=[]),a.key.explicitAccidentals.push(A.accs[R])));if(!T&&(a.key.explicitAccidentals||(a.key.explicitAccidentals=[]),a.key.explicitAccidentals.push(A.accs[R]),a.key.accidentals.push(A.accs[R]),a.key.impliedNaturals))for(var N=0;N<a.key.impliedNaturals.length;N++)a.key.impliedNaturals[N].note===A.accs[R].note&&a.key.impliedNaturals.splice(N,1)}}for(var D;c.length>0;)switch(c[0].token){case"m":case"middle":if(c.shift(),c.length===0)return t("Expected = after middle",u,0),v;if(D=c.shift(),D.token!=="="){t("Expected = after middle",u,D.start);break}if(c.length===0)return t("Expected parameter after middle=",u,0),v;var L=i.getPitchFromTokens(c);L.warn&&t(L.warn,u,0),L.position&&(a.clef.verticalPos=L.position-6);break;case"transpose":if(c.shift(),c.length===0)return t("Expected = after transpose",u,0),v;if(D=c.shift(),D.token!=="="){t("Expected = after transpose",u,D.start);break}if(c.length===0)return t("Expected parameter after transpose=",u,0),v;if(c[0].type!=="number"){t("Expected number after transpose",u,c[0].start);break}a.clef.transpose=c[0].intt,c.shift();break;case"stafflines":if(c.shift(),c.length===0)return t("Expected = after stafflines",u,0),v;if(D=c.shift(),D.token!=="="){t("Expected = after stafflines",u,D.start);break}if(c.length===0)return t("Expected parameter after stafflines=",u,0),v;if(c[0].type!=="number"){t("Expected number after stafflines",u,c[0].start);break}a.clef.stafflines=c[0].intt,c.shift();break;case"staffscale":if(c.shift(),c.length===0)return t("Expected = after staffscale",u,0),v;if(D=c.shift(),D.token!=="="){t("Expected = after staffscale",u,D.start);break}if(c.length===0)return t("Expected parameter after staffscale=",u,0),v;if(c[0].type!=="number"){t("Expected number after staffscale",u,c[0].start);break}a.clef.staffscale=c[0].floatt,c.shift();break;case"octave":if(c.shift(),c.length===0)return t("Expected = after octave",u,0),v;if(D=c.shift(),D.token!=="="){t("Expected = after octave",u,D.start);break}if(c.length===0)return t("Expected parameter after octave=",u,0),v;if(c[0].type!=="number"){t("Expected number after octave",u,c[0].start);break}a.octave=c[0].intt,c.shift();break;case"style":if(c.shift(),c.length===0)return t("Expected = after style",u,0),v;if(D=c.shift(),D.token!=="="){t("Expected = after style",u,D.start);break}if(c.length===0)return t("Expected parameter after style=",u,0),v;switch(c[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":a.style=c[0].token,c.shift();break;default:t("error parsing style element: "+c[0].token,u,c[0].start);break}break;case"clef":if(c.shift(),c.length===0)return t("Expected = after clef",u,0),v;if(D=c.shift(),D.token!=="="){t("Expected = after clef",u,D.start);break}if(c.length===0)return t("Expected parameter after clef=",u,0),v;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var _=c.shift();switch(_.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":_.token="alto";break;case"F":_.token="bass";break;case"G":_.token="treble";break;case"c":_.token="alto";break;case"f":_.token="bass";break;case"g":_.token="treble";break;default:t("Expected clef name. Found "+_.token,u,_.start);break}c.length>0&&c[0].type==="number"&&(_.token+=c[0].token,c.shift()),c.length>1&&(c[0].token==="-"||c[0].token==="+"||c[0].token==="^"||c[0].token==="_")&&c[1].token==="8"&&(_.token+=c[0].token+c[1].token,c.shift(),c.shift()),a.clef={type:_.token,verticalPos:l(_.token,0)},a.currentVoice&&a.currentVoice.transpose!==void 0&&(a.clef.transpose=a.currentVoice.transpose),v.foundClef=!0;break;default:t("Unknown parameter: "+c[0].token,u,c[0].start),c.shift()}return v};var f=function(u){var h=a.voices[u];if(!(a.currentVoice&&a.currentVoice.index===h.index&&a.currentVoice.staffNum===h.staffNum))return a.currentVoice=h,o.setCurrentVoice(h.staffNum,h.index,u)};n.parseVoice=function(u,h,c){var v=i.getMeat(u,h,c),b=v.start,g=v.end,w=i.getToken(u,b,g);if(w.length===0){t("Expected a voice id",u,b);return}var k=!1;a.voices[w]===void 0&&(a.voices[w]={},k=!0,a.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",u,b)),b+=w.length,b+=i.eatWhiteSpace(u,b);for(var $={startStaff:k},O=function(L){var _=i.getVoiceToken(u,b,g);_.warn!==void 0?t("Expected value for "+L+" in voice: "+_.warn,u,b):_.err!==void 0?t("Expected value for "+L+" in voice: "+_.err,u,b):_.token.length===0&&u[b]!=='"'?t("Expected value for "+L+" in voice",u,b):$[L]=_.token,b+=_.len},P=function(L,_,x){var S=i.getVoiceToken(u,b,g);S.warn!==void 0?t("Expected value for "+_+" in voice: "+S.warn,u,b):S.err!==void 0?t("Expected value for "+_+" in voice: "+S.err,u,b):S.token.length===0&&u[b]!=='"'?t("Expected value for "+_+" in voice",u,b):(S.token=parseFloat(S.token),a.voices[L][_]=S.token),b+=S.len},y=function(L,_){var x=i.getVoiceToken(u,b,g);if(x.warn!==void 0)t("Expected value for "+L+" in voice: "+x.warn,u,b);else if(x.err!==void 0)t("Expected value for "+L+" in voice: "+x.err,u,b);else if(x.token.length===0&&u[b]!=='"')t("Expected value for "+L+" in voice",u,b);else return x.token;b+=x.len},C=function(L,_){var x={_B:2,_E:9,_b:-10,_e:-3},S=i.getVoiceToken(u,b,g);if(S.warn!==void 0)t("Expected one of (_B, _E, _b, _e) for "+_+" in voice: "+S.warn,u,b);else if(S.token.length===0&&u[b]!=='"')t("Expected one of (_B, _E, _b, _e) for "+_+" in voice",u,b);else{var M=x[S.token];M?a.voices[L][_]=M:t("Expected one of (_B, _E, _b, _e) for "+_+" in voice",u,b)}b+=S.len};b<g;){var E=i.getVoiceToken(u,b,g);if(b+=E.len,E.warn)t("Error parsing voice: "+E.warn,u,b);else{var z=null;switch(E.token){case"clef":case"cl":O("clef");var A=0;$.clef!==void 0&&($.clef=$.clef.replace(/[',]/g,""),$.clef.indexOf("+16")!==-1&&(A+=14,$.clef=$.clef.replace("+16","")),$.verticalPos=l($.clef,A));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":case"treble+8":case"treble-8":case"treble^8":case"treble_8":case"treble1":case"treble2":case"treble3":case"treble4":case"treble5":case"bass+8":case"bass-8":case"bass^8":case"bass_8":case"bass+16":case"bass-16":case"bass^16":case"bass_16":case"bass1":case"bass2":case"bass3":case"bass4":case"bass5":case"tenor1":case"tenor2":case"tenor3":case"tenor4":case"tenor5":case"alto1":case"alto2":case"alto3":case"alto4":case"alto5":case"alto+8":case"alto-8":case"alto^8":case"alto_8":var R=0;$.clef=E.token.replace(/[',]/g,""),$.verticalPos=l($.clef,R),a.voices[w].clef=E.token;break;case"staves":case"stave":case"stv":O("staves");break;case"brace":case"brc":O("brace");break;case"bracket":case"brk":O("bracket");break;case"name":case"nm":O("name");break;case"subname":case"sname":case"snm":O("subname");break;case"merge":$.startStaff=!1;break;case"stem":case"stems":z=i.getVoiceToken(u,b,g),z.warn!==void 0?t("Expected value for stems in voice: "+z.warn,u,b):z.err!==void 0?t("Expected value for stems in voice: "+z.err,u,b):z.token==="up"||z.token==="down"?a.voices[w].stem=z.token:t("Expected up or down for voice stem",u,b),b+=z.len;break;case"up":case"down":a.voices[w].stem=E.token;break;case"middle":case"m":O("verticalPos"),$.verticalPos=p($.verticalPos).mid;break;case"gchords":case"gch":a.voices[w].suppressChords=!0,z=i.getVoiceToken(u,b,g),z.token==="0"&&(b=b+z.len);break;case"space":case"spc":O("spacing");break;case"scale":P(w,"scale");break;case"score":C(w,"scoreTranspose");break;case"transpose":P(w,"transpose");break;case"stafflines":P(w,"stafflines");break;case"staffscale":P(w,"staffscale");break;case"octave":P(w,"octave");break;case"volume":P(w,"volume");break;case"cue":var T=y("cue");T==="on"?a.voices[w].scale=.6:a.voices[w].scale=1;break;case"style":z=i.getVoiceToken(u,b,g),z.warn!==void 0?t("Expected value for style in voice: "+z.warn,u,b):z.err!==void 0?t("Expected value for style in voice: "+z.err,u,b):z.token==="normal"||z.token==="harmonic"||z.token==="rhythm"||z.token==="x"||z.token==="triangle"?a.voices[w].style=z.token:t("Expected one of [normal, harmonic, rhythm, x, triangle] for voice style",u,b),b+=z.len;break}}b+=i.eatWhiteSpace(u,b)}if(($.startStaff||a.staves.length===0)&&(a.staves.push({index:a.staves.length,meter:a.origMeter}),a.score_is_present||(a.staves[a.staves.length-1].numVoices=0)),a.voices[w].staffNum===void 0){a.voices[w].staffNum=a.staves.length-1;var I=0;for(var N in a.voices)a.voices.hasOwnProperty(N)&&a.voices[N].staffNum===a.voices[w].staffNum&&I++;a.voices[w].index=I-1}var D=a.staves[a.voices[w].staffNum];return a.score_is_present||D.numVoices++,$.clef&&(D.clef={type:$.clef,verticalPos:$.verticalPos}),$.spacing&&(D.spacing_below_offset=$.spacing),$.verticalPos&&(D.verticalPos=$.verticalPos),$.name&&(D.name?D.name.push($.name):D.name=[$.name]),$.subname&&(D.subname?D.subname.push($.subname):D.subname=[$.subname]),f(w)}})(),oa=n,oa}var sa,Ol;function p7(){if(Ol)return sa;Ol=1;var e=Et(),r=ku(),n=$u(),i=function(t,a,o,s,l){this.reset=function(m,f,u,h){n.initialize(m,f,u,h,l),r.initialize(m,f,u,h,l)},this.reset(t,a,o,s),this.setTitle=function(m,f){o.hasMainTitle?l.addSubtitle(m,{startChar:o.iChar,endChar:o.iChar+f+2}):(l.addMetaText("title",m,{startChar:o.iChar,endChar:o.iChar+f+2}),o.hasMainTitle=!0)},this.setMeter=function(m){if(m=t.stripComment(m),m==="C")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"common_time"};if(m==="C|")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"cut_time"};if(m==="o")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_perfectum"};if(m==="c")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_imperfectum"};if(m==="o.")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if(m==="c.")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(m.length===0||m.toLowerCase()==="none")return o.havent_set_length===!0&&(o.default_length=.125,o.havent_set_length=!1),null;var f=t.tokenize(m,0,m.length);try{var u=function(){var w={value:0,num:""},k=f.shift();for(k.token==="("&&(k=f.shift());;){if(k.type!=="number")throw"Expected top number of meter";if(w.value+=parseInt(k.token),w.num+=k.token,f.length===0||f[0].token==="/")return w;if(k=f.shift(),k.token===")"){if(f.length===0||f[0].token==="/")return w;throw"Unexpected paren in meter"}if(k.token!=="."&&k.token!=="+"||(w.num+=k.token,f.length===0))throw"Expected top number of meter";k=f.shift()}return w},h=function(){var w=u();if(f.length===0)return w;var k=f.shift();if(k.token!=="/")throw"Expected slash in meter";if(k=f.shift(),k.type!=="number")throw"Expected bottom number of meter";return w.den=k.token,w.value=w.value/parseInt(w.den),w};if(f.length===0)throw"Expected meter definition in M: line";for(var c={type:"specified",value:[]},v=0;;){var b=h();v+=b.value;var g={num:b.num};if(b.den!==void 0&&(g.den=b.den),c.value.push(g),f.length===0)break}return o.havent_set_length===!0&&(o.default_length=v<.75?.0625:.125,o.havent_set_length=!1),c}catch(w){a(w,m,0)}return null},this.calcTempo=function(m){var f=.25;o.meter&&o.meter.type==="specified"?f=1/parseInt(o.meter.value[0].den):o.origMeter&&o.origMeter.type==="specified"&&(f=1/parseInt(o.origMeter.value[0].den));for(var u=0;u<m.duration;u++)m.duration[u]=f*m.duration[u];return m},this.resolveTempo=function(){o.tempo&&(this.calcTempo(o.tempo),s.metaText.tempo=o.tempo,delete o.tempo)},this.addUserDefinition=function(m,f,u){var h=m.indexOf("=",f);if(h===-1){a("Need an = in a macro definition",m,f);return}var c=e.strip(m.substring(f,h)),v=e.strip(m.substring(h+1));if(c.length!==1){a("Macro definitions can only be one character",m,f);return}var b="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~";if(b.indexOf(c)===-1){a("Macro definitions must be H-Y, h-w, or tilde",m,f);return}if(v.length===0){a("Missing macro definition",m,f);return}o.macros===void 0&&(o.macros={}),o.macros[c]=v},this.setDefaultLength=function(m,f,u){var h=m.substring(f,u).replace(/ /g,""),c=h.split("/");if(c.length===2){var v=parseInt(c[0]),b=parseInt(c[1]);b>0&&(o.default_length=v/b,o.havent_set_length=!1)}else c.length===1&&c[0]==="1"&&(o.default_length=1,o.havent_set_length=!1)};var d={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(m,f,u,h){try{var c=t.tokenize(m,f,u);if(c.length===0)throw"Missing parameter in Q: field";var v={startChar:h+f-2,endChar:h+u},b=!0,g=c.shift();if(g.type==="quote"&&(v.preString=g.token,g=c.shift(),c.length===0))return d[v.preString.toLowerCase()]&&(v.bpm=d[v.preString.toLowerCase()],v.suppressBpm=!0),{type:"immediate",tempo:v};if(g.type==="alpha"&&g.token==="C"){if(c.length===0)throw"Missing tempo after C in Q: field";if(g=c.shift(),g.type==="punct"&&g.token==="="){if(c.length===0)throw"Missing tempo after = in Q: field";if(g=c.shift(),g.type!=="number")throw"Expected number after = in Q: field";v.duration=[1],v.bpm=parseInt(g.token)}else if(g.type==="number"){if(v.duration=[parseInt(g.token)],c.length===0)throw"Missing = after duration in Q: field";if(g=c.shift(),g.type!=="punct"||g.token!=="=")throw"Expected = after duration in Q: field";if(c.length===0)throw"Missing tempo after = in Q: field";if(g=c.shift(),g.type!=="number")throw"Expected number after = in Q: field";v.bpm=parseInt(g.token)}else throw"Expected number or equal after C in Q: field"}else if(g.type==="number"){var w=parseInt(g.token);if(c.length===0||c[0].type==="quote")v.duration=[1],v.bpm=w;else{if(b=!1,g=c.shift(),g.type!=="punct"&&g.token!=="/"||(g=c.shift(),g.type!=="number"))throw"Expected fraction in Q: field";var k=parseInt(g.token);for(v.duration=[w/k];c.length>0&&c[0].token!=="="&&c[0].type!=="quote";){if(g=c.shift(),g.type!=="number"||(w=parseInt(g.token),g=c.shift(),g.type!=="punct"&&g.token!=="/")||(g=c.shift(),g.type!=="number"))throw"Expected fraction in Q: field";k=parseInt(g.token),v.duration.push(w/k)}if(g=c.shift(),g.type!=="punct"&&g.token!=="=")throw"Expected = in Q: field";if(g=c.shift(),g.type!=="number")throw"Expected tempo in Q: field";v.bpm=parseInt(g.token)}}else throw"Unknown value in Q: field";if(c.length!==0&&(g=c.shift(),g.type==="quote"&&(v.postString=g.token,g=c.shift()),c.length!==0))throw"Unexpected string at end of Q: field";return o.printTempo===!1&&(v.suppress=!0),{type:b?"delaySet":"immediate",tempo:v}}catch($){return a($,m,f),{type:"none"}}},this.letter_to_inline_header=function(m,f,u){var h=!1,c=t.eatWhiteSpace(m,f);if(f+=c,m.length>=f+5&&m[f]==="["&&m[f+2]===":"){var v=m.indexOf("]",f),b=o.iChar+f,g=o.iChar+v+1;switch(m.substring(f,f+3)){case"[I:":var w=r.addDirective(m.substring(f+3,v));return w&&a(w,m,f),[v-f+1+c];case"[M:":var k=this.setMeter(m.substring(f+3,v));return l.hasBeginMusic()&&k?l.appendStartingElement("meter",b,g,k):o.meter=k,[v-f+1+c];case"[K:":var $=n.parseKey(m.substring(f+3,v),!0);return $.foundClef&&l.hasBeginMusic()&&l.appendStartingElement("clef",b,g,o.clef),$.foundKey&&l.hasBeginMusic()&&l.appendStartingElement("key",b,g,n.fixKey(o.clef,o.key)),[v-f+1+c];case"[P:":var O=r.parseFontChangeLine(m.substring(f+3,v));return u||s.lines.length<=s.lineNum?o.partForNextLine={title:O,startChar:b,endChar:g}:l.appendElement("part",b,g,{title:O}),[v-f+1+c];case"[L:":return this.setDefaultLength(m,f+3,v),[v-f+1+c];case"[Q:":if(v>0){var P=this.setTempo(m,f+3,v,o.iChar);return P.type==="delaySet"?l.hasBeginMusic()?l.appendElement("tempo",b,g,this.calcTempo(P.tempo)):o.tempoForNextLine=["tempo",b,g,this.calcTempo(P.tempo)]:P.type==="immediate"&&(!u&&l.hasBeginMusic()?l.appendElement("tempo",b,g,P.tempo):o.tempoForNextLine=["tempo",b,g,P.tempo]),[v-f+1+c,m[f+1],m.substring(f+3,v)]}break;case"[V:":if(v>0)return h=n.parseVoice(m,f+3,v),[v-f+1+c,m[f+1],m.substring(f+3,v),h];break;case"[r:":return[v-f+1+c]}}return[0]},this.letter_to_body_header=function(m,f){var u=!1;if(m.length>=f+3)switch(m.substring(f,f+2)){case"I:":var h=r.addDirective(m.substring(f+2));return h&&a(h,m,f),[m.length];case"M:":var c=this.setMeter(m.substring(f+2));return l.hasBeginMusic()&&c&&l.appendStartingElement("meter",o.iChar+f,o.iChar+m.length,c),[m.length];case"K:":var v=n.parseKey(m.substring(f+2),l.hasBeginMusic());return v.foundClef&&l.hasBeginMusic()&&o.keywarn!==!1&&l.appendStartingElement("clef",o.iChar+f,o.iChar+m.length,o.clef),v.foundKey&&l.hasBeginMusic()&&o.keywarn!==!1&&l.appendStartingElement("key",o.iChar+f,o.iChar+m.length,n.fixKey(o.clef,o.key)),[m.length];case"P:":return l.hasBeginMusic()&&l.appendElement("part",o.iChar+f,o.iChar+m.length,{title:m.substring(f+2)}),[m.length];case"L:":return this.setDefaultLength(m,f+2,m.length),[m.length];case"Q:":var b=m.indexOf("",f+2);b===-1&&(b=m.length);var g=this.setTempo(m,f+2,b,o.iChar);return g.type==="delaySet"?l.appendElement("tempo",o.iChar+f,o.iChar+m.length,this.calcTempo(g.tempo)):g.type==="immediate"&&l.appendElement("tempo",o.iChar+f,o.iChar+m.length,g.tempo),[b,m[f],e.strip(m.substring(f+2))];case"V:":return u=n.parseVoice(m,f+2,m.length),[m.length,m[f],e.strip(m.substring(f+2)),u]}return[0]};var p={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(m){var f=p[m[0]],u=m.length-2,h=t.translateString(t.stripComment(m.substring(2)));if(f==="unalignedWords"||f==="notes")l.addMetaTextArray(f,r.parseFontChangeLine(h),{startChar:o.iChar,endChar:o.iChar+m.length});else if(f!==void 0)l.addMetaText(f,r.parseFontChangeLine(h),{startChar:o.iChar,endChar:o.iChar+m.length});else{var c=o.iChar,v=c+m.length;switch(m[0]){case"H":for(l.addMetaTextArray("history",r.parseFontChangeLine(h),{startChar:o.iChar,endChar:o.iChar+m.length}),m=t.peekLine();m&&m[1]!==":";)t.nextLine(),l.addMetaTextArray("history",r.parseFontChangeLine(t.translateString(t.stripComment(m))),{startChar:o.iChar,endChar:o.iChar+m.length}),m=t.peekLine();break;case"K":this.resolveTempo();var b=n.parseKey(m.substring(2),!1);!o.is_in_header&&l.hasBeginMusic()&&o.keywarn!==!1&&(b.foundClef&&l.appendStartingElement("clef",c,v,o.clef),b.foundKey&&l.appendStartingElement("key",c,v,n.fixKey(o.clef,o.key))),o.is_in_header=!1;break;case"L":this.setDefaultLength(m,2,m.length);break;case"M":o.origMeter=o.meter=this.setMeter(m.substring(2));break;case"P":o.is_in_header?l.addMetaText("partOrder",r.parseFontChangeLine(h),{startChar:o.iChar,endChar:o.iChar+m.length}):o.partForNextLine={title:h,startChar:c,endChar:v};break;case"Q":var g=this.setTempo(m,2,m.length,o.iChar);g.type==="delaySet"?o.tempo=g.tempo:g.type==="immediate"&&(s.metaText.tempo?o.tempoForNextLine=["tempo",c,v,g.tempo]:s.metaText.tempo=g.tempo);break;case"T":o.titlecaps&&(h=h.toUpperCase()),this.setTitle(r.parseFontChangeLine(t.theReverser(h)),u);break;case"U":this.addUserDefinition(m,2,m.length);break;case"V":if(n.parseVoice(m,2,m.length),!o.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":a("Ignored header",m,0);break;default:return{regular:!0}}}return{}}};return sa=i,sa}var mt={},Ml;function m7(){return Ml||(Ml=1,mt.legalAccents=["trill","trillh","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x","style=triangle","D.C.alcoda","D.C.alfine","D.S.alcoda","D.S.alfine","editorial","courtesy"],mt.volumeDecorations=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],mt.dynamicDecorations=["crescendo(","crescendo)","diminuendo(","diminuendo)","glissando(","glissando)","~(","~)"],mt.accentPseudonyms=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],mt.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],mt.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",mt.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],mt.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},mt.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},mt.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},mt.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}),mt}var ca,Dl;function v7(){if(Dl)return ca;Dl=1;var e=$u(),r=nb(),n,i,t,a,o,s,{legalAccents:l,volumeDecorations:d,dynamicDecorations:p,accentPseudonyms:m,accentDynamicPseudonyms:f,nonDecorations:u,durations:h,pitches:c,rests:v,accMap:b,tripletQ:g}=m7(),w=function(_,x,S,M,U,q){n=_,i=x,t=S,a=M,o=U,s=q,this.lineContinuation=!1},k=function(_,x,S){if(_.inTie[x]===void 0)return!1;var M=_.currentVoice?_.currentVoice.staffNum*100+_.currentVoice.index:0;return!!(_.inTie[x][M]&&(S.pitches!==void 0||S.rest.type!=="spacer"))},$={};w.prototype.parseMusic=function(_){s.resolveTempo(),t.is_in_header=!1;for(var x=0,S=t.iChar;n.isWhiteSpace(_[x])&&x<_.length;)x++;if(!(x===_.length||_[x]==="%")){var M=t.start_new_line;t.continueall===void 0?t.start_new_line=!0:t.start_new_line=!1;var U=0,q=s.letter_to_body_header(_,x);q[0]>0&&(x+=q[0],q[1]==="V"&&this.startNewLine());for(var Z=0;x<_.length;){var V=x;if(_[x]==="%")break;var ne=s.letter_to_inline_header(_,x,M);if(ne[0]>0)x+=ne[0],ne[1]==="V"&&(M=!0);else{(!o.hasBeginMusic()||M&&!this.lineContinuation)&&(this.startNewLine(),M=!1);for(var Y;;)if(Y=n.eatWhiteSpace(_,x),Y>0&&(x+=Y),x>0&&_[x-1]===""&&(Y=s.letter_to_body_header(_,x),Y[0]>0&&(Y[1]==="V"&&this.startNewLine(),x=Y[0],t.start_new_line=!1)),Y=A(_,x),Y[0]>0&&(x+=Y[0]),Y=P(_,x),Y[0]>0){$.chord||($.chord=[]);var ce=n.translateString(Y[1]);ce=ce.replace(/;/g,`
|
|
109
|
+
`);for(var fe=!1,pe=0;pe<$.chord.length;pe++)$.chord[pe].position===Y[2]&&(fe=!0,$.chord[pe].name+=`
|
|
110
|
+
`+ce);fe===!1&&(Y[2]===null&&Y[3]?$.chord.push({name:ce,rel_position:Y[3]}):$.chord.push({name:ce,position:Y[2]})),x+=Y[0];var K=n.skipWhiteSpace(_.substring(x));K>0&&($.force_end_beam_last=!0),x+=K}else if(u.indexOf(_[x])===-1?Y=z(_,x):Y=[0],Y[0]>0)Y[1]===null?x+1<_.length&&this.startNewLine():Y[1].length>0&&(Y[1].indexOf("style=")===0?$.style=Y[1].substr(6):($.decoration===void 0&&($.decoration=[]),Y[1]==="beambr1"?$.beambr=1:Y[1]==="beambr2"?$.beambr=2:$.decoration.push(Y[1]))),x+=Y[0];else if(Y=y(_,x),Y[0]>0)$.gracenotes=Y[1],x+=Y[0];else break;if(Y=R(_,x),Y[0]>0){Z=0,$.gracenotes!==void 0&&($.rest={type:"spacer"},$.duration=.125,t.addFormattingOptions($,a.formatting,"note"),o.appendElement("note",S+x,S+x+Y[0],$),t.measureNotEmpty=!0,$={});var he={type:Y[1]};he.type.length===0?i("Unknown bar type",_,x):(t.inEnding&&he.type!=="bar_thin"&&(he.endEnding=!0,t.inEnding=!1),Y[2]&&(he.startEnding=Y[2],t.inEnding&&(he.endEnding=!0),t.inEnding=!0,Y[1]==="bar_right_repeat"?t.restoreStartEndingHoldOvers():t.duplicateStartEndingHoldOvers()),$.decoration!==void 0&&(he.decoration=$.decoration),$.chord!==void 0&&(he.chord=$.chord),he.startEnding&&t.barFirstEndingNum===void 0?t.barFirstEndingNum=t.currBarNumber:he.startEnding&&he.endEnding&&t.barFirstEndingNum?t.currBarNumber=t.barFirstEndingNum:he.endEnding&&(t.barFirstEndingNum=void 0),he.type!=="bar_invisible"&&t.measureNotEmpty&&L()&&(t.currBarNumber++,t.barNumbers&&t.currBarNumber%t.barNumbers===0&&(he.barNumber=t.currBarNumber)),t.addFormattingOptions($,a.formatting,"bar"),o.appendElement("bar",S+V,S+x+Y[0],he),t.measureNotEmpty=!1,$={}),x+=Y[0]}else if(_[x]==="&")Y=C(_,x),Y[0]>0&&(o.appendElement("overlay",S,S+1,{}),x+=1,Z++);else{if(Y=T(_,x),Y.consumed>0&&(Y.startSlur!==void 0&&($.startSlur=Y.startSlur),Y.dottedSlur&&($.dottedSlur=!0),Y.triplet!==void 0&&(U>0?i("Can't nest triplets",_,x):($.startTriplet=Y.triplet,$.tripletMultiplier=Y.tripletQ/Y.triplet,$.tripletR=Y.num_notes,U=Y.num_notes===void 0?Y.triplet:Y.num_notes)),x+=Y.consumed),_[x]==="["){x++;for(var ee=null,be=!1,_e=!1;!_e;){var Me=z(_,x);Me[0]>0&&(x+=Me[0]);var Ce=N(_,x,{},!1);if(Ce!==null&&Ce.pitch!==void 0)Me[0]>0&&Me[1].indexOf("style=")!==0&&($.decoration===void 0&&($.decoration=[]),$.decoration.push(Me[1])),Ce.end_beam&&($.end_beam=!0,delete Ce.end_beam),$.pitches===void 0?($.duration=Ce.duration,$.pitches=[Ce]):$.pitches.push(Ce),delete Ce.duration,Me[0]>0&&Me[1].indexOf("style=")===0&&($.pitches[$.pitches.length-1].style=Me[1].substr(6)),t.inTieChord[$.pitches.length]&&(Ce.endTie=!0,t.inTieChord[$.pitches.length]=void 0),Ce.startTie&&(t.inTieChord[$.pitches.length]=!0),x=Ce.endChar,delete Ce.endChar;else if(_[x]===" ")i("Spaces are not allowed in chords",_,x),x++;else{if(x<_.length&&_[x]==="]"){x++,t.next_note_duration!==0&&($.duration=$.duration*t.next_note_duration,t.next_note_duration=0),k(t,Z,$)&&($.pitches.forEach(function(Q){Q.endTie=!0}),O(t,Z,!1)),U>0&&!($.rest&&$.rest.type==="spacer")&&(U--,U===0&&($.endTriplet=!0));for(var We=!1;x<_.length&&!We;){switch(_[x]){case" ":case" ":I($);break;case")":$.endSlur===void 0?$.endSlur=1:$.endSlur++;break;case"-":$.pitches.forEach(function(Q){Q.startTie={}}),O(t,Z,!0);break;case">":case"<":var Fe=D(_,x);x+=Fe[0]-1,t.next_note_duration=Fe[2],ee?ee=ee*Fe[1]:ee=Fe[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var Ke=n.getFraction(_,x);ee=Ke.value,x=Ke.index;var H=_[x];H===" "&&(be=!0),H==="-"||H===")"||H===" "||H==="<"||H===">"?x--:We=!0;break;case"0":ee=0;break;default:We=!0;break}We||x++}}else i("Expected ']' to end the chords",_,x);$.pitches!==void 0&&(ee!==null&&($.duration=$.duration*ee,be&&I($)),t.addFormattingOptions($,a.formatting,"note"),o.appendElement("note",S+V,S+x,$),t.measureNotEmpty=!0,$={}),_e=!0}}}else{var W={},B=N(_,x,W,!0);if(W.endTie!==void 0&&O(t,Z,!0),B!==null){B.pitch!==void 0?($.pitches=[{}],B.accidental!==void 0&&($.pitches[0].accidental=B.accidental),$.pitches[0].pitch=B.pitch,$.pitches[0].name=B.name,(B.midipitch||B.midipitch===0)&&($.pitches[0].midipitch=B.midipitch),B.endSlur!==void 0&&($.pitches[0].endSlur=B.endSlur),B.endTie!==void 0&&($.pitches[0].endTie=B.endTie),B.startSlur!==void 0&&($.pitches[0].startSlur=B.startSlur),$.startSlur!==void 0&&($.pitches[0].startSlur=$.startSlur),$.dottedSlur!==void 0&&($.pitches[0].dottedSlur=!0),B.startTie!==void 0&&($.pitches[0].startTie=B.startTie),$.startTie!==void 0&&($.pitches[0].startTie=$.startTie)):($.rest=B.rest,B.rest.type==="multimeasure"&&L()&&(t.currBarNumber+=B.rest.text-1),B.endSlur!==void 0&&($.endSlur=B.endSlur),B.endTie!==void 0&&($.rest.endTie=B.endTie),B.startSlur!==void 0&&($.startSlur=B.startSlur),B.startTie!==void 0&&($.rest.startTie=B.startTie),$.startTie!==void 0&&($.rest.startTie=$.startTie)),B.chord!==void 0&&($.chord=B.chord),B.duration!==void 0&&($.duration=B.duration),B.decoration!==void 0&&($.decoration=B.decoration),B.graceNotes!==void 0&&($.graceNotes=B.graceNotes),delete $.startSlur,delete $.dottedSlur,k(t,Z,$)&&($.pitches!==void 0?$.pitches[0].endTie=!0:$.rest.type!=="spacer"&&($.rest.endTie=!0),O(t,Z,!1)),(B.startTie||$.startTie)&&O(t,Z,!0),x=B.endChar,U>0&&!(B.rest&&B.rest.type==="spacer")&&(U--,U===0&&($.endTriplet=!0)),B.end_beam&&I($),$.rest&&$.rest.type==="rest"&&$.duration===1&&E(t)<=1&&($.rest.type="whole",$.duration=E(t)),$.duration<1&&h.indexOf($.duration)===-1&&$.duration!==0&&(!$.rest||$.rest.type!=="spacer")&&i("Duration not representable: "+_.substring(V,x),_,x),t.addFormattingOptions($,a.formatting,"note");var G=o.appendElement("note",S+V,S+x,$);G||(this.startNewLine(),o.appendElement("note",S+V,S+x,$)),t.measureNotEmpty=!0,$={}}}x===V&&(_[x]!==" "&&_[x]!=="`"&&i("Unknown character ignored",_,x),x++)}}}this.lineContinuation=_.indexOf("")>=0||q[0]>0,this.lineContinuation||($={})}};var O=function(_,x,S){var M=_.currentVoice?_.currentVoice.staffNum*100+_.currentVoice.index:0;_.inTie[x]===void 0&&(_.inTie[x]=[]),_.inTie[x][M]=S},P=function(_,x){if(_[x]==='"'){var S=n.getBrackettedSubstring(_,x,5);if(S[2]||i("Missing the closing quote while parsing the chord symbol",_,x),S[0]>0&&S[1].length>0&&S[1][0]==="^")S[1]=S[1].substring(1),S[2]="above";else if(S[0]>0&&S[1].length>0&&S[1][0]==="_")S[1]=S[1].substring(1),S[2]="below";else if(S[0]>0&&S[1].length>0&&S[1][0]==="<")S[1]=S[1].substring(1),S[2]="left";else if(S[0]>0&&S[1].length>0&&S[1][0]===">")S[1]=S[1].substring(1),S[2]="right";else if(S[0]>0&&S[1].length>0&&S[1][0]==="@"){S[1]=S[1].substring(1);var M=n.getFloat(S[1]);if(M.digits===0)return i("Missing first position in absolutely positioned annotation.",_,x),S[1]=S[1].replace("@",""),S[2]="above",S;if(S[1]=S[1].substring(M.digits),S[1][0]!==",")return i("Missing comma absolutely positioned annotation.",_,x),S[1]=S[1].replace("@",""),S[2]="above",S;S[1]=S[1].substring(1);var U=n.getFloat(S[1]);if(U.digits===0)return i("Missing second position in absolutely positioned annotation.",_,x),S[1]=S[1].replace("@",""),S[2]="above",S;S[1]=S[1].substring(U.digits);var q=n.skipWhiteSpace(S[1]);S[1]=S[1].substring(q),S[2]=null,S[3]={x:M.value,y:U.value}}else t.freegchord!==!0&&(S[1]=S[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),S[1]=S[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),S[1]=S[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),S[2]="default",S[1]=r.chordName(t,S[1]);return S}return[0,""]},y=function(_,x){if(_[x]==="{"){var S=n.getBrackettedSubstring(_,x,1,"}");S[2]||i("Missing the closing '}' while parsing grace note",_,x),_[x+S[0]]===")"&&(S[0]++,S[1]+=")");for(var M=[],U=0,q=!1;U<S[1].length;){var Z=!1;S[1][U]==="/"&&(Z=!0,U++);var V=N(S[1],U,{},!1);V!==null?(V.duration=V.duration/(t.default_length*8),Z&&(V.acciaccatura=!0),V.rest?i("Rests not allowed as grace notes '"+S[1][U]+"' while parsing grace note",_,x):M.push(V),q&&(V.endTie=!0,q=!1),V.startTie&&(q=!0),U=V.endChar,delete V.endChar,V.end_beam&&(V.endBeam=!0,delete V.end_beam)):(S[1][U]===" "?M.length>0&&(M[M.length-1].endBeam=!0):i("Unknown character '"+S[1][U]+"' while parsing grace note",_,x),U++)}if(M.length)return[S[0],M]}return[0]};function C(_,x){if(_[x]==="&"){for(var S=x;_[x]&&_[x]!==":"&&_[x]!=="|";)x++;return[x-S,_.substring(S+1,x)]}return[0]}function E(_){var x=_.origMeter;return!x||x.type!=="specified"||!x.value||x.value.length===0?1:parseInt(x.value[0].num,10)/parseInt(x.value[0].den,10)}var z=function(_,x){var S=t.macros[_[x]];if(S!==void 0)return(S[0]==="!"||S[0]==="+")&&(S=S.substring(1)),(S[S.length-1]==="!"||S[S.length-1]==="+")&&(S=S.substring(0,S.length-1)),l.includes(S)?[1,S]:d.includes(S)?(t.volumePosition==="hidden"&&(S=""),[1,S]):p.includes(S)?(t.dynamicPosition==="hidden"&&(S=""),[1,S]):(t.ignoredDecorations.includes(S)||i("Unknown macro: "+S,_,x),[1,""]);switch(_[x]){case".":if(_[x+1]==="("||_[x+1]==="-")break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var M=n.getBrackettedSubstring(_,x,5);if(M[1].length>1&&(M[1][0]==="^"||M[1][0]==="_")&&(M[1]=M[1].substring(1)),l.includes(M[1]))return M;if(d.includes(M[1]))return t.volumePosition==="hidden"&&(M[1]=""),M;if(p.includes(M[1]))return t.dynamicPosition==="hidden"&&(M[1]=""),M;var U=m.findIndex(function(q){return M[1]===q[0]});return U>=0?(M[1]=m[U][1],M):(U=f.findIndex(function(q){return M[1]===q[0]}),U>=0?(M[1]=f[U][1],t.dynamicPosition==="hidden"&&(M[1]=""),M):_[x]==="!"&&(M[0]===1||_[x+M[0]-1]!=="!")?[1,null]:(i("Unknown decoration: "+M[1],_,x),M[1]="",M));case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"];case"t":return[1,"trillh"]}return[0,0]},A=function(_,x){for(var S=x;n.isWhiteSpace(_[x]);)x++;return[x-S]},R=function(_,x){var S=n.getBarLine(_,x);if(S.len===0)return[0,""];if(S.warn)return i(S.warn,_,x),[S.len,""];for(var M=0;M<_.length&&_[x+S.len+M]===" ";M++);var U=S.len;if(_[x+S.len+M]==="["&&(S.len+=M+1),_[x+S.len]==='"'&&_[x+S.len-1]==="["){var q=n.getBrackettedSubstring(_,x+S.len,5);return[S.len+q[0],S.token,q[1]]}var Z=n.getTokenOf(_.substring(x+S.len),"1234567890-,");return Z.len===0||Z.token[0]==="-"?[U,S.token]:[S.len+Z.len,S.token,Z.token]},T=function(_,x){var S={},M=x;for(_[x]==="."&&_[x+1]==="("&&(S.dottedSlur=!0,x++);_[x]==="("||n.isWhiteSpace(_[x]);)_[x]==="("&&(x+1<_.length&&_[x+1]>="2"&&_[x+1]<="9"?(S.triplet!==void 0?i("Can't nest triplets",_,x):(S.triplet=_[x+1]-"0",S.tripletQ=g[S.triplet],S.num_notes=S.triplet,x+2<_.length&&_[x+2]===":"&&(x+3<_.length&&_[x+3]===":"?x+4<_.length&&_[x+4]>="1"&&_[x+4]<="9"?(S.num_notes=_[x+4]-"0",x+=3):i("expected number after the two colons after the triplet to mark the duration",_,x):x+3<_.length&&_[x+3]>="1"&&_[x+3]<="9"?(S.tripletQ=_[x+3]-"0",x+4<_.length&&_[x+4]===":"?x+5<_.length&&_[x+5]>="1"&&_[x+5]<="9"&&(S.num_notes=_[x+5]-"0",x+=4):x+=2):i("expected number after the triplet to mark the duration",_,x))),x++):S.startSlur===void 0?S.startSlur=1:S.startSlur++),x++;return S.consumed=x-M,S};w.prototype.startNewLine=function(){var _={startChar:-1,endChar:-1};t.partForNextLine.title&&(_.part=t.partForNextLine),_.clef=t.currentVoice&&t.staves[t.currentVoice.staffNum].clef!==void 0?Object.assign({},t.staves[t.currentVoice.staffNum].clef):Object.assign({},t.clef);var x=t.currentVoice?t.currentVoice.scoreTranspose:0;if(_.key=e.standardKey(t.key.root+t.key.acc+t.key.mode,t.key.root,t.key.acc,x),_.key.mode=t.key.mode,t.key.impliedNaturals&&(_.key.impliedNaturals=t.key.impliedNaturals),t.key.explicitAccidentals)for(var S=0;S<t.key.explicitAccidentals.length;S++){for(var M=!1,U=0;U<_.key.accidentals.length;U++)_.key.accidentals[U].note===t.key.explicitAccidentals[S].note&&(_.key.accidentals[U].acc=t.key.explicitAccidentals[S].acc,M=!0);M||_.key.accidentals.push(t.key.explicitAccidentals[S])}if(t.targetKey=_.key,_.key.explicitAccidentals&&delete _.key.explicitAccidentals,e.addPosToKey(_.clef,_.key),t.meter!==null?(t.currentVoice?(t.staves.forEach(function(ne){ne.meter=t.meter}),_.meter=t.staves[t.currentVoice.staffNum].meter,t.staves[t.currentVoice.staffNum].meter=null):_.meter=t.meter,t.meter=null):t.currentVoice&&t.staves[t.currentVoice.staffNum].meter&&(_.meter=t.staves[t.currentVoice.staffNum].meter,t.staves[t.currentVoice.staffNum].meter=null),t.currentVoice&&t.currentVoice.name&&(_.name=t.currentVoice.name),t.vocalfont&&(_.vocalfont=t.vocalfont),t.tripletfont&&(_.tripletfont=t.tripletfont),t.gchordfont&&(_.gchordfont=t.gchordfont),t.style&&(_.style=t.style),t.currentVoice){var q=t.staves[t.currentVoice.staffNum];q.brace&&(_.brace=q.brace),q.bracket&&(_.bracket=q.bracket),q.connectBarLines&&(_.connectBarLines=q.connectBarLines),q.name&&(_.name=q.name[t.currentVoice.index]),q.subname&&(_.subname=q.subname[t.currentVoice.index]),t.currentVoice.stem&&(_.stem=t.currentVoice.stem),t.currentVoice.stafflines&&(_.stafflines=t.currentVoice.stafflines),t.currentVoice.staffscale&&(_.staffscale=t.currentVoice.staffscale),t.currentVoice.scale&&(_.scale=t.currentVoice.scale),t.currentVoice.color&&(_.color=t.currentVoice.color),t.currentVoice.style&&(_.style=t.currentVoice.style),t.currentVoice.transpose&&(_.clef.transpose=t.currentVoice.transpose),_.currentVoice=t.currentVoice;for(var Z=Object.keys(t.voices),V=0;V<Z.length;V++)_.currentVoice.staffNum===t.voices[Z[V]].staffNum&&_.currentVoice.index===t.voices[Z[V]].index&&(_.currentVoiceName=Z[V])}t.barNumbers===0&&L()&&t.currBarNumber!==1&&(_.barNumber=t.currBarNumber),o.startNewLine(_),t.key.impliedNaturals&&delete t.key.impliedNaturals,t.partForNextLine={},t.tempoForNextLine.length===4&&o.appendElement(t.tempoForNextLine[0],t.tempoForNextLine[1],t.tempoForNextLine[2],t.tempoForNextLine[3]),t.tempoForNextLine=[]};var I=function(_){return _.duration!==void 0&&_.duration<.25&&(_.end_beam=!0),_},N=function(_,x,S,M){var U=function(pe){return pe==="octave"||pe==="duration"||pe==="Zduration"||pe==="broken_rhythm"||pe==="end_slur"},q;_[x]==="."&&_[x+1]==="-"&&(q=!0,x++);for(var Z="startSlur",V=!1;;){switch(_[x]){case"(":if(Z==="startSlur")S.startSlur===void 0?S.startSlur=1:S.startSlur++;else return U(Z)?(S.endChar=x,S):null;break;case")":if(U(Z))S.endSlur===void 0?S.endSlur=1:S.endSlur++;else return null;break;case"^":if(Z==="startSlur")S.accidental="sharp",Z="sharp2";else if(Z==="sharp2")S.accidental="dblsharp",Z="pitch";else return U(Z)?(S.endChar=x,S):null;break;case"_":if(Z==="startSlur")S.accidental="flat",Z="flat2";else if(Z==="flat2")S.accidental="dblflat",Z="pitch";else return U(Z)?(S.endChar=x,S):null;break;case"=":if(Z==="startSlur")S.accidental="natural",Z="pitch";else return U(Z)?(S.endChar=x,S):null;break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if(Z==="startSlur"||Z==="sharp2"||Z==="flat2"||Z==="pitch"){if(S.pitch=c[_[x]],S.pitch+=7*(t.currentVoice&&t.currentVoice.octave!==void 0?t.currentVoice.octave:t.octave),S.name=_[x],S.accidental&&(S.name=b[S.accidental]+S.name),r.note(t,S),Z="octave",M&&t.next_note_duration!==0?(S.duration=t.default_length*t.next_note_duration,t.next_note_duration=0,V=!0):S.duration=t.default_length,t.clef&&t.clef.type==="perc"||t.currentVoice&&t.currentVoice.clef==="perc"){var ne=_[x];S.accidental&&(ne=b[S.accidental]+ne),a.formatting&&a.formatting.midi&&a.formatting.midi.drummap&&(S.midipitch=a.formatting.midi.drummap[ne])}}else return U(Z)?(S.endChar=x,S):null;break;case",":if(Z==="octave")S.pitch-=7,S.name+=",";else return U(Z)?(S.endChar=x,S):null;break;case"'":if(Z==="octave")S.pitch+=7,S.name+="'";else return U(Z)?(S.endChar=x,S):null;break;case"x":case"X":case"y":case"z":case"Z":if(Z==="startSlur")S.rest={type:v[_[x]]},delete S.accidental,delete S.startSlur,delete S.startTie,delete S.endSlur,delete S.endTie,delete S.end_beam,delete S.grace_notes,S.rest.type.indexOf("multimeasure")>=0?(S.duration=a.getBarLength(),S.rest.text=1,Z="Zduration"):(M&&t.next_note_duration!==0?(S.duration=t.default_length*t.next_note_duration,t.next_note_duration=0,V=!0):S.duration=t.default_length,Z="duration");else return U(Z)?(S.endChar=x,S):null;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if(Z==="octave"||Z==="duration"){var Y=n.getFraction(_,x);for(S.duration=S.duration*Y.value,S.endChar=Y.index;Y.index<_.length&&(n.isWhiteSpace(_[Y.index])||_[Y.index]==="-");)_[Y.index]==="-"?S.startTie={}:S=I(S),Y.index++;x=Y.index-1,Z="broken_rhythm"}else if(Z==="sharp2")S.accidental="quartersharp",Z="pitch";else if(Z==="flat2")S.accidental="quarterflat",Z="pitch";else if(Z==="Zduration"){var ce=n.getNumber(_,x);return S.duration=ce.num*a.getBarLength(),S.rest.text=ce.num,S.endChar=ce.index,S}else return null;break;case"-":if(Z==="startSlur")o.addTieToLastNote(q),S.endTie=!0;else if(Z==="octave"||Z==="duration"||Z==="end_slur")if(S.startTie={},!V&&M)Z="broken_rhythm";else return n.isWhiteSpace(_[x+1])&&I(S),S.endChar=x+1,S;else return Z==="broken_rhythm"?(S.endChar=x,S):null;break;case" ":case" ":if(U(Z)){S.end_beam=!0,q=!1;do _[x]==="."&&_[x+1]==="-"&&(q=!0,x++),_[x]==="-"&&(S.startTie={},q&&(S.startTie.style="dotted")),x++;while(x<_.length&&(n.isWhiteSpace(_[x])||_[x]==="-")||_[x]==="."&&_[x+1]==="-");if(S.endChar=x,!V&&M&&(_[x]==="<"||_[x]===">"))x--,Z="broken_rhythm";else return S}else return null;break;case">":case"<":if(U(Z))if(M){var fe=D(_,x);x+=fe[0]-1,t.next_note_duration=fe[2],S.duration=fe[1]*S.duration,Z="end_slur"}else return S.endChar=x,S;else return null;break;default:return U(Z)?(S.endChar=x,S):null}if(x++,x===_.length)return U(Z)?(S.endChar=x,S):null}return null},D=function(_,x){switch(_[x]){case">":return x<_.length-2&&_[x+1]===">"&&_[x+2]===">"?[3,1.875,.125]:x<_.length-1&&_[x+1]===">"?[2,1.75,.25]:[1,1.5,.5];case"<":return x<_.length-2&&_[x+1]==="<"&&_[x+2]==="<"?[3,.125,1.875]:x<_.length-1&&_[x+1]==="<"?[2,.25,1.75]:[1,.5,1.5]}return null};function L(){return t.currentVoice===void 0||t.currentVoice.staffNum===0&&t.currentVoice.index===0}return ca=w,ca}var ua,Rl;function g7(){if(Rl)return ua;Rl=1;var e=Et(),r=function(n,i){this.lineIndex=0,this.lines=n,this.multilineVars=i,this.skipWhiteSpace=function(u){for(var h=0;h<u.length;h++)if(!this.isWhiteSpace(u[h]))return h;return u.length};var t=function(u,h){return h>=u.length};this.eatWhiteSpace=function(u,h){for(var c=h;c<u.length;c++)if(!this.isWhiteSpace(u[c]))return c-h;return c-h},this.getKeyPitch=function(u){var h=this.skipWhiteSpace(u);if(t(u,h))return{len:0};switch(u[h]){case"A":return{len:h+1,token:"A"};case"B":return{len:h+1,token:"B"};case"C":return{len:h+1,token:"C"};case"D":return{len:h+1,token:"D"};case"E":return{len:h+1,token:"E"};case"F":return{len:h+1,token:"F"};case"G":return{len:h+1,token:"G"}}return{len:0}},this.getSharpFlat=function(u){if(u==="bass")return{len:0};switch(u[0]){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(u){var h=function(b,g){for(;g<b.length&&(b[g]>="a"&&b[g]<="z"||b[g]>="A"&&b[g]<="Z");)g++;return g},c=this.skipWhiteSpace(u);if(t(u,c))return{len:0};var v=u.substring(c,c+3).toLowerCase();switch((v.length>1&&v[1]===" "||v[1]==="^"||v[1]==="_"||v[1]==="=")&&(v=v[0]),v){case"mix":return{len:h(u,c),token:"Mix"};case"dor":return{len:h(u,c),token:"Dor"};case"phr":return{len:h(u,c),token:"Phr"};case"lyd":return{len:h(u,c),token:"Lyd"};case"loc":return{len:h(u,c),token:"Loc"};case"aeo":return{len:h(u,c),token:"m"};case"maj":return{len:h(u,c),token:""};case"ion":return{len:h(u,c),token:""};case"min":return{len:h(u,c),token:"m"};case"m":return{len:h(u,c),token:"m"}}return{len:0}},this.getClef=function(u,h){var c=u,v=this.skipWhiteSpace(u);if(t(u,v))return{len:0};var b=!1,g=u.substring(v);if(e.startsWith(g,"clef=")&&(b=!0,g=g.substring(5),v+=5),g.length===0&&b)return{len:v+5,warn:"No clef specified: "+c};var w=this.skipWhiteSpace(g);if(t(g,w))return{len:0};w>0&&(v+=w,g=g.substring(w));var k=null;if(e.startsWith(g,"treble"))k="treble";else if(e.startsWith(g,"bass3"))k="bass3";else if(e.startsWith(g,"bass"))k="bass";else if(e.startsWith(g,"tenor"))k="tenor";else if(e.startsWith(g,"alto2"))k="alto2";else if(e.startsWith(g,"alto1"))k="alto1";else if(e.startsWith(g,"alto"))k="alto";else if(!h&&b&&e.startsWith(g,"none"))k="none";else if(e.startsWith(g,"perc"))k="perc";else if(!h&&b&&e.startsWith(g,"C"))k="tenor";else if(!h&&b&&e.startsWith(g,"F"))k="bass";else if(!h&&b&&e.startsWith(g,"G"))k="treble";else return{len:v+5,warn:"Unknown clef specified: "+c};return g=g.substring(k.length),w=this.isMatch(g,"+8"),w>0?k+="+8":(w=this.isMatch(g,"-8"),w>0&&(k+="-8")),{len:v+k.length,token:k,explicit:b}},this.getBarLine=function(u,h){switch(u[h]){case"]":switch(++h,u[h]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++h,u[h]>="1"&&u[h]<="9"||u[h]==='"'?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}case":":switch(++h,u[h]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++h,u[h]){case"]":switch(++h,u[h]){case"|":return++h,u[h]===":"?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}case"|":return++h,u[h]===":"?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}default:return{len:1,warn:"Unknown bar symbol"}}case"[":if(++h,u[h]==="|")switch(++h,u[h]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}else return u[h]>="1"&&u[h]<="9"||u[h]==='"'?{len:1,token:"bar_invisible"}:{len:0};case"|":switch(++h,u[h]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++h,u[h]===":"?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var c=0;u[h+c]===":";)c++;return{len:1+c,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(u,h){for(var c=0;c<u.length;c++)if(h.indexOf(u[c])<0)return{len:c,token:u.substring(0,c)};return{len:c,token:u}},this.getToken=function(u,h,c){for(var v=h;v<c&&!this.isWhiteSpace(u[v]);)v++;return u.substring(h,v)},this.isMatch=function(u,h){var c=this.skipWhiteSpace(u);return t(u,c)?0:e.startsWith(u.substring(c),h)?c+h.length:0},this.getPitchFromTokens=function(u){var h={},c={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};if(h.position=c[u[0].token],h.position===void 0)return{warn:"Pitch expected. Found: "+u[0].token};for(u.shift();u.length;)switch(u[0].token){case",":h.position-=7,u.shift();break;case"'":h.position+=7,u.shift();break;default:return h}return h},this.getKeyAccidentals2=function(u){for(var h;u.length>0;){var c;if(u[0].token==="^"){if(c="sharp",u.shift(),u.length===0)return{accs:h,warn:"Expected note name after "+c};switch(u[0].token){case"^":c="dblsharp",u.shift();break;case"/":c="quartersharp",u.shift();break}}else if(u[0].token==="=")c="natural",u.shift();else if(u[0].token==="_"){if(c="flat",u.shift(),u.length===0)return{accs:h,warn:"Expected note name after "+c};switch(u[0].token){case"_":c="dblflat",u.shift();break;case"/":c="quarterflat",u.shift();break}}else return{accs:h};if(u.length===0)return{accs:h,warn:"Expected note name after "+c};switch(u[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":h===void 0&&(h=[]),h.push({acc:c,note:u[0].token[0]}),u[0].token.length===1?u.shift():u[0].token=u[0].token.substring(1);break;default:return{accs:h,warn:"Expected note name after "+c+" Found: "+u[0].token}}}return{accs:h}},this.getKeyAccidental=function(u){var h={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},c=this.skipWhiteSpace(u);if(t(u,c))return{len:0};var v=null;switch(u[c]){case"^":case"_":case"=":v=u[c];break;default:return{len:0}}if(c++,t(u,c))return{len:1,warn:"Expected note name after accidental"};switch(u[c]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:c+1,token:{acc:h[v],note:u[c]}};case"^":case"_":case"/":if(v+=u[c],c++,t(u,c))return{len:2,warn:"Expected note name after accidental"};switch(u[c]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:c+1,token:{acc:h[v],note:u[c]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(u){return u===" "||u===" "||u===""},this.getMeat=function(u,h,c){var v=u.indexOf("%",h);for(v>=0&&v<c&&(c=v);h<c&&(u[h]===" "||u[h]===" "||u[h]==="");)h++;for(;h<c&&(u[c-1]===" "||u[c-1]===" "||u[c-1]==="");)c--;return{start:h,end:c}};var a=function(u){return u>="A"&&u<="Z"||u>="a"&&u<="z"},o=function(u){return u>="0"&&u<="9"};this.tokenize=function(u,h,c,v){var b=this.getMeat(u,h,c);h=b.start,c=b.end;for(var g=[],w;h<c;){if(u[h]==='"'){for(w=h+1;w<c&&u[w]!=='"';)w++;g.push({type:"quote",token:u.substring(h+1,w),start:h+1,end:w}),w++}else if(a(u[h])){if(w=h+1,v)for(;w<c&&!this.isWhiteSpace(u[w]);)w++;else for(;w<c&&a(u[w]);)w++;g.push({type:"alpha",token:u.substring(h,w),continueId:o(u[w]),start:h,end:w}),h=w+1}else if(u[h]==="."&&o(u[w+1])){w=h+1;for(var k=null,$=null;w<c&&o(u[w]);)w++;$=parseFloat(u.substring(h,w)),g.push({type:"number",token:u.substring(h,w),intt:k,floatt:$,continueId:a(u[w]),start:h,end:w}),h=w+1}else if(o(u[h])||u[h]==="-"&&o(u[w+1])){w=h+1;for(var O=null,P=null;w<c&&o(u[w]);)w++;if(u[w]==="."&&o(u[w+1]))for(w++;w<c&&o(u[w]);)w++;else O=parseInt(u.substring(h,w));P=parseFloat(u.substring(h,w)),g.push({type:"number",token:u.substring(h,w),intt:O,floatt:P,continueId:a(u[w]),start:h,end:w}),h=w+1}else u[h]===" "||u[h]===" "||g.push({type:"punct",token:u[h],start:h,end:h+1}),w=h+1;h=w}return g},this.getVoiceToken=function(u,h,c){for(var v=h;v<c&&this.isWhiteSpace(u[v])||u[v]==="=";)v++;if(u[v]==='"'){var b=u.indexOf('"',v+1);return b===-1||b>=c?{len:1,err:"Missing close quote"}:{len:b-h+1,token:this.translateString(u.substring(v+1,b))}}else{for(var g=v;g<c&&!this.isWhiteSpace(u[g])&&u[g]!=="=";)g++;return{len:g-h+1,token:u.substring(v,g)}}};var s={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},l={"#":"♯",b:"♭","=":"♮"},d={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(u){var h=u.split("\\");if(h.length===1)return u;var c=null;return h.forEach(function(v){if(c===null)c=v;else{var b=s[v.substring(0,2)];b!==void 0?c+=b+v.substring(2):(b=d[v.substring(0,3)],b!==void 0?c+=b+v.substring(3):(b=l[v.substring(0,1)],b!==void 0?c+=b+v.substring(1):c+="\\"+v))}}),c},this.getNumber=function(u,h){for(var c=0;h<u.length;)switch(u[h]){case"0":c=c*10,h++;break;case"1":c=c*10+1,h++;break;case"2":c=c*10+2,h++;break;case"3":c=c*10+3,h++;break;case"4":c=c*10+4,h++;break;case"5":c=c*10+5,h++;break;case"6":c=c*10+6,h++;break;case"7":c=c*10+7,h++;break;case"8":c=c*10+8,h++;break;case"9":c=c*10+9,h++;break;default:return{num:c,index:h}}return{num:c,index:h}},this.getFraction=function(u,h){var c=1,v=1;if(u[h]!=="/"){var b=this.getNumber(u,h);c=b.num,h=b.index}if(u[h]==="/")if(h++,u[h]==="/"){for(var g=.5;u[h++]==="/";)g=g/2;return{value:c*g,index:h-1}}else{var w=h,k=this.getNumber(u,h);k.num===0&&w===h&&(k.num=2),k.num!==0&&(v=k.num),h=k.index}return{value:c/v,index:h}};function p(u){const c=/^(\d+)\./.exec(u);return c?c[1]:null}var m=[{match:/,\s*The$/,replace:"The "},{match:/,\s*the$/,replace:"the "},{match:/,\s*A$/,replace:"A "},{match:/,\s*a$/,replace:"a "},{match:/,\s*An$/,replace:"An "},{match:/,\s*an$/,replace:"an "},{match:/,\s*Da$/,replace:"Da "},{match:/,\s*La$/,replace:"La "},{match:/,\s*Le$/,replace:"Le "},{match:/,\s*Les$/,replace:"Les "},{match:/,\s*Ye$/,replace:"Ye "}];this.theReverser=function(u){for(var h=0;h<m.length;h++){var c=m[h],v=u.match(c.match);if(v){var b=p(u);b&&(u=u.replace(b+".",""),u=u.trim());var g=v[0].length,w=c.replace+u.substring(0,u.length-g);return b&&(w=b+". "+w),w}}return u},this.stripComment=function(u){var h=u.indexOf("%");return h>=0?e.strip(u.substring(0,h)):e.strip(u)},this.getInt=function(u){var h=parseInt(u);if(isNaN(h))return{digits:0};var c=""+h,v=u.indexOf(c);return{value:h,digits:v+c.length}},this.getFloat=function(u){var h=parseFloat(u);if(isNaN(h))return{digits:0};var c=""+h,v=u.indexOf(c);return{value:h,digits:v+c.length}},this.getMeasurement=function(u){if(u.length===0)return{used:0};var h=1,c="";if(u[0].token==="-")u.shift(),c="-",h++;else if(u[0].type!=="number")return{used:0};if(c+=u.shift().token,u.length===0)return{used:1,value:parseInt(c)};var v=u.shift();if(v.token==="."){if(h++,u.length===0)return{used:h,value:parseInt(c)};if(u[0].type==="number"&&(v=u.shift(),c=c+"."+v.token,h++,u.length===0))return{used:h,value:parseFloat(c)};v=u.shift()}switch(v.token){case"pt":return{used:h+1,value:parseFloat(c)};case"px":return{used:h+1,value:parseFloat(c)};case"cm":return{used:h+1,value:parseFloat(c)/2.54*72};case"in":return{used:h+1,value:parseFloat(c)*72};default:return u.unshift(v),{used:h,value:parseFloat(c)}}};var f=function(u){return u=u.replace(/\\n/g,`
|
|
111
|
+
`),u=u.replace(/\\"/g,'"'),u};this.getBrackettedSubstring=function(u,h,c,v){for(var b=v||u[h],g=h+1,w=!1;g<u.length&&(w||u[g]!==b);)w=u[g]==="\\",++g;return u[g]===b?[g-h+1,f(u.substring(h+1,g)),!0]:(g=h+c,g>u.length-1&&(g=u.length-1),[g-h+1,f(u.substring(h+1,g)),!1])}};return r.prototype.peekLine=function(){return this.lines[this.lineIndex]},r.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex<this.lines.length){var n=this.lines[this.lineIndex];return this.lineIndex++,n}return null},ua=r,ua}var la,Ll;function ib(){if(Ll)return la;Ll=1;function e(p,m,f){if(!(!m||p.lines.length===0)){var u=p.deline({lineBreaks:!1}),h=n(u,m);p.lines=r(u,h,f),p.lineBreaks=h}}function r(p,m,f){for(var u=[],h=[],c=[],v=1,b=0;b<m.length;b++){var g=m[b];if(p[g.ogLine].staff){var w=p[g.ogLine].staff[g.staff];if(u[g.line]||(u[g.line]={staff:[]}),!u[g.line].staff[g.staff]){u[g.line].staff[g.staff]={voices:[]},f!==void 0&&g.staff===0&&g.line>0&&(u[g.line].staff[g.staff].barNumber=v);for(var k=Object.keys(w),$=0;$<k.length;$++){var O=k[$]==="voices";k[$]==="meter"&&g.line!==0&&(O=!0),O||(u[g.line].staff[g.staff][k[$]]=w[k[$]])}h[g.staff]&&(u[g.line].staff[g.staff].key=h[g.staff])}u[g.line].staff[g.staff].voices[g.voice]||(u[g.line].staff[g.staff].voices[g.voice]=[]),u[g.line].staff[g.staff].voices[g.voice]=p[g.ogLine].staff[g.staff].voices[g.voice].slice(g.start,g.end+1),c[g.staff*10+g.voice]&&u[g.line].staff[g.staff].voices[g.voice].unshift({el_type:"stem",direction:c[g.staff*10+g.voice].direction});for(var P=u[g.line].staff[g.staff].voices[g.voice],y=P.length-1;y>=0;y--)if(P[y].el_type==="key"){h[g.staff]={root:P[y].root,acc:P[y].acc,mode:P[y].mode,accidentals:P[y].accidentals.filter(function(E){return E.acc!=="natural"})};break}for(y=P.length-1;y>=0;y--)if(P[y].el_type==="stem"){c[g.staff*10+g.voice]={direction:P[y].direction};break}if(f!==void 0&&g.staff===0&&g.voice===0)for(y=0;y<P.length;y++)P[y].el_type==="bar"&&(v++,y===P.length-1?delete P[y].barNumber:P[y].barNumber=v)}else u[g.line]=p[g.ogLine]}for(var C=0;C<u.length;C++)u[C].staff&&(u[C].staff=u[C].staff.filter(function(E){return E!=null}));return u}function n(p,m){for(var f=[],u=0,h=0,c=0,v=0;v<p.length;v++){var b=p[v];if(b.staff){var g=h,w=m[u];u++;for(var k=0;k<b.staff.length;k++)for(var $=b.staff[k],O=0;O<$.voices.length;O++){c=g;for(var P=0,y=0,C=$.voices[O],E=0,z=0;z<C.length;z++){var A=C[z];A.el_type==="bar"&&(w[y]===P&&(f.push({ogLine:v,line:c,staff:k,voice:O,start:E,end:z}),E=z+1,c++,h=Math.max(h,c),y++),P++)}f.push({ogLine:v,line:c,staff:k,voice:O,start:E,end:C.length}),c++,h=Math.max(h,c)}}else f.push({ogLine:v,line:c}),c++,h=Math.max(h,c)}return f}function i(p,m){for(var f=[],u=[],h=0,c=0;c<p.length;c++){var v=p[c],b=h+v;if(b<m)h=b;else{var g=m-h,w=b-m;g<w&&h>0?(f.push(c-1),u.push(Math.round(h-v)),h=v):c<p.length-1&&(f.push(c),u.push(Math.round(h)),h=0)}}return u.push(Math.round(h)),{lineBreaks:f,totals:u}}function t(p){for(var m=[],f=0;f<p.length;f++)m.push(p[f]);return m}function a(p,m,f,u,h,c,v,b,g,w,k){for(var $=w;$<p.length;$++){var O=p[$];f+=O,u+=O;var P=Math.abs(f-m[b]),y=Math.abs(P-c)<m[0]/10;if(y)if(P<c){var C=t(h),E=t(g);E.push($-1),C.push(u-O),k.push({accumulator:f,lineAccumulator:O,lineWidths:C,lastVariance:Math.abs(f-m[b+1]),highestVariance:Math.max(v,c),currLine:b+1,lineBreaks:E,startIndex:$+1})}else P>c&&$<p.length-1&&(C=t(h),E=t(g),k.push({accumulator:f,lineAccumulator:u,lineWidths:C,lastVariance:P,highestVariance:Math.max(v,P),currLine:b,lineBreaks:E,startIndex:$+1}));P>c?(g.push($-1),b++,v=Math.max(v,c),c=Math.abs(f-m[b]),h.push(u-O),u=O):c=P}h.push(u)}function o(p,m,f,u){for(var h=Math.ceil(p.total/m),c=Math.floor(p.total/h),v=[],b=0;b<h;b++)v.push(c*(b+1));var g=[];g.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var w=0;w<g.length;)a(p.measureWidths,v,g[w].accumulator,g[w].lineAccumulator,g[w].lineWidths,g[w].lastVariance,g[w].highestVariance,g[w].currLine,g[w].lineBreaks,g[w].startIndex,g),w++;for(b=0;b<g.length;b++){var k=g[b];k.variances=[],k.aveVariance=0;for(var $=0;$<k.lineWidths.length;$++){var O=k.lineWidths[$];k.variances.push(O-v[0]),k.aveVariance+=Math.abs(O-v[0])}k.aveVariance=k.aveVariance/k.lineWidths.length,u.attempts.push({type:"optimizeLineWidths",lineBreaks:k.lineBreaks,variances:k.variances,aveVariance:k.aveVariance,widths:p.measureWidths})}var P=9999999,y=-1;for(b=0;b<g.length;b++)k=g[b],k.aveVariance<P&&(P=k.aveVariance,y=b);return{failed:!1,lineBreaks:g[y].lineBreaks,variance:g[y].highestVariance}}function s(p,m,f){for(var u=[],h=[],c=0,v=!1,b=0;b<p.length;b++)c+=p[b],c>m&&(v=!0),b%f===f-1&&(b!==p.length-1&&u.push(b),h.push(Math.round(c)),c=0);return{failed:v,totals:h,lineBreaks:u}}function l(p,m,f){var u={lineBreaks:p,staffwidth:m};for(var h in f)f.hasOwnProperty(h)&&h!=="wrap"&&h!=="staffwidth"&&(u[h]=f[h]);return{revisedParams:u}}function d(p,m,f){if(m.length===0||f.staffwidth<m[0].left)return{reParse:!1,explanation:"Staff width is narrower than the margin",revisedParams:f};var u=f.scale?Math.max(f.scale,.1):1,h=f.wrap.minSpacing?Math.max(parseFloat(f.wrap.minSpacing),1):1,c=f.wrap.minSpacingLimit?Math.max(parseFloat(f.wrap.minSpacingLimit),1):h-.1,v=f.wrap.maxSpacing?Math.max(parseFloat(f.wrap.maxSpacing),1):void 0;f.wrap.lastLineLimit&&!v&&(v=Math.max(parseFloat(f.wrap.lastLineLimit),1));for(var b=f.wrap.preferredMeasuresPerLine?Math.max(parseInt(f.wrap.preferredMeasuresPerLine,10),0):void 0,g=[],w=[],k=0;k<m.length;k++){var $=m[k],O=f.staffwidth-$.left,P=O/h/u,y=O/v/u,C=O/c/u,E={widths:$,lineBreakPoint:P,minLineSize:y,attempts:[],staffWidth:f.staffwidth,minWidth:Math.round(C)},z=null;if(b){var A=s($.measureWidths,P,b);E.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:b,lineBreaks:A.lineBreaks,failed:A.failed,totals:A.totals}),A.failed||(z=A.lineBreaks)}if(!z){var R=i($.measureWidths,P);E.attempts.push({type:"Free Form",lineBreaks:R.lineBreaks,totals:R.totals}),z=R.lineBreaks,z.length>0&&$.measureWidths.length<25&&(R=o($,P,z,E),E.attempts.push({type:"Optimize",failed:R.failed,reason:R.reason,lineBreaks:R.lineBreaks,totals:R.totals}),R.failed||(z=R.lineBreaks))}g.push(z),w.push(E)}var T=f.staffwidth,I=l(g,T,f);return I.explanation=w,I.reParse=!0,I}return la={wrapLines:e,calcLineWraps:d},la}var fa,Ul;function b7(){if(Ul)return fa;Ul=1;function e(l){const d=l.getMeterFraction(),p=d.num===4&&d.den===4;if(!(d.num===2&&d.den===2)&&!p)throw new Error("notCommonTime");const f=l.deline();let u=[],h=!1;return f.forEach(c=>{if(c.subtitle)h&&u.push({type:"subtitle",subtitle:c.subtitle.text});else if(c.text)h=!0,u.push({type:"text",text:c.text.text});else if(c.staff){h=!0;const v=c.staff,b=n(v);u=u.concat(b)}}),t(u),a(u),o(u),u}const r=["break","(break)","no chord","n.c.","tacet"];function n(l){const d=[];let p="",m=[],f={chord:["","","",""]},u="",h="";if(l.forEach((c,v)=>{c.voices&&c.voices.forEach((b,g)=>{let w=0,k=0;b.forEach($=>{if($.el_type==="part")m.length>0&&v===0&&g===0&&(d.push({type:"part",name:p,lines:[m]}),m=[]),p=$.title;else if($.el_type==="note"){s($,f);const O=Math.floor(w);if($.chord&&$.chord.length>0){const P=$.chord[0],y=P.position==="default"||r.indexOf(P.name.toLowerCase())>=0?P.name:"";y&&(O>0&&!f.chord[0]&&(f.chord[0]=u),u=y,f.chord[O]?O<4&&!f.chord[O+1]&&(f.chord[O+1]=y):f.chord[O]=y),$.chord.forEach(C=>{C.position!=="default"&&r.indexOf(P.name.toLowerCase())<0&&(f.annotations||(f.annotations=[]),f.annotations.push(C.name))})}if(!$.rest||$.rest.type!=="spacer"){const P=Math.floor($.duration*4);if(P>4)k+=Math.floor(P/4),w=0;else{let y=$.duration*4;$.tripletMultiplier&&(y*=$.tripletMultiplier),w+=y}}}else if($.el_type==="bar"){if(h&&(f.ending=h,h=""),s($,f),($.type==="bar_dbl_repeat"||$.type==="bar_left_repeat")&&(f.hasStartRepeat=!0),($.type==="bar_dbl_repeat"||$.type==="bar_right_repeat")&&(f.hasEndRepeat=!0),$.startEnding&&(h=$.startEnding),w>=4){if(f.chord[0]===""&&(f.chord[1]||f.chord[2]||f.chord[3])&&(f.chord[0]=i(m)),v===0&&g===0)m.push(f);else{let O=k,P=0;for(;O>=d[P].lines[0].length&&P<d.length;)O-=d[P].lines[0].length,P++;if(P<d.length&&O<d[P].lines[0].length){const y=d[P].lines[0][O];!y.chord[0]&&f.chord[0]&&(y.chord[0]=f.chord[0]),!y.chord[1]&&f.chord[1]&&(y.chord[1]=f.chord[1]),!y.chord[2]&&f.chord[2]&&(y.chord[2]=f.chord[2]),!y.chord[3]&&f.chord[3]&&(y.chord[3]=f.chord[3]),f.annotations&&(y.annotations?y.annotations=y.annotations.concat(f.annotations):y.annotations=f.annotations)}k++}f={chord:["","","",""]}}else f.chord=["","","",""];w=0}else $.el_type}),v===0&&g===0&&d.push({type:"part",name:p,lines:[m]})})}),!u)throw new Error("noChords");return d}function i(l){for(let d=l.length-1;d>=0;d--)for(let p=l[d].chord.length-1;p>=0;p--)if(l[d].chord[p])return l[d].chord[p]}function t(l){l.forEach(d=>{if(d.type==="part"){const p=d.lines[0],m=p.findIndex(u=>!!u.ending),f=p.findIndex((u,h)=>h>m&&!!u.ending);if(m>=0&&f>=0&&f-m===p.length-f){let u=!0;for(let h=0;h<f-m&&u;h++){const c=p[m+h],v=p[f+h];if(c.chord[0]!==v.chord[0]&&(u=!1),c.chord[1]!==v.chord[1]&&(u=!1),c.chord[2]!==v.chord[2]&&(u=!1),c.chord[3]!==v.chord[3]&&(u=!1),c.annotations&&!v.annotations&&(u=!1),!c.annotations&&v.annotations&&(u=!1),c.annotations&&v.annotations)if(c.annotations.length!==v.annotations.length)u=!1;else for(let b=0;b<c.annotations.length;b++)c.annotations[b]!==v.annotations[b]&&(u=!1)}u&&(delete p[m].ending,p.splice(f,p.length-f))}}})}function a(l){l.forEach(d=>{if(d.type==="part"){const p=[],m=d.lines[0];let f=!1;const u=m.findIndex(v=>!!v.hasEndRepeat);(u>=0?Math.min(u+1,m.length):m.length)===12&&(f=!0);const c=f?4:8;for(let v=0;v<m.length;v+=c){const b=m.slice(v,v+c),g=b.findIndex(w=>!!w.hasEndRepeat);g>=0&&g<b.length-1?(p.push(b.slice(0,g+1)),p.push(b.slice(g+1))):p.push(b)}for(let v=0;v<p.length;v++)if(p[v][0].ending){const b=Math.max(0,v-1),g=p[b].length-p[v].length,w=[];for(let k=0;k<g;k++)w.push({noBorder:!0,chord:["","","",""]});p[v]=w.concat(p[v])}d.lines=p}})}function o(l){l.forEach(d=>{if(d.lines){let p=!1,m="";d.lines.forEach(f=>{f.forEach(u=>{if(!u.noBorder){const h=u.chord;!h[0]&&!h[1]&&!h[2]&&!h[3]?(p?m&&(h[0]="%"):h[0]=m,p=!0):!h[1]&&!h[2]&&!h[3]?(p=!0,m=h[0]):(p=!1,m=h[3]||h[2]||h[1])}})})}})}function s(l,d){if(l.decoration)for(let p=0;p<l.decoration.length;p++)switch(l.decoration[p]){case"fermata":case"segno":case"coda":case"D.C.":case"D.S.":case"D.C.alcoda":case"D.C.alfine":case"D.S.alcoda":case"D.S.alfine":case"fine":d.annotations||(d.annotations=[]),d.annotations.push(l.decoration[p]);break}}return fa=e,fa}var da,Zl;function pt(){if(Zl)return da;Zl=1;var e={};return e.FONTEM=360,e.FONTSIZE=30,e.STEP=e.FONTSIZE*93/720,e.SPACE=10,e.TOPNOTE=15,e.STAVEHEIGHT=100,e.INDENT=50,da=e,da}var ha,jl;function y7(){if(jl)return ha;jl=1;const e=Et();function r(a){this.sections=[{type:"startRepeat",index:-1}],this.addBar=function(o){var s=a.length-1,l=o.type==="bar_left_repeat"||o.type==="bar_dbl_repeat",d=o.type==="bar_right_repeat"||o.type==="bar_dbl_repeat",p=o.startEnding?t(o.startEnding):void 0;d&&this.sections.push({type:"endRepeat",index:s}),l&&this.sections.push({type:"startRepeat",index:s}),p&&this.sections.push({type:"startEnding",index:s,endings:p})},this.resolveRepeats=function(){var o,s=this.sections[this.sections.length-1],l=a.length-1;if(s.type==="startRepeat"?s.end=l:s.index+1<l&&this.sections.push({type:"startRepeat",index:s.index+1}),this.sections.length<2)return a;for(var d=[],p=null,m=0;m<this.sections.length;m++){var f=this.sections[m];switch(f.type){case"startRepeat":if(p){if(p.common.end||(p.common.end=f.index),p.endings)for(o=0;o<p.endings.length;o++)p.endings[o]&&!p.endings[o].end&&p.endings[o].start!==f.index&&(p.endings[o].end=f.index);this.sections[m-1].type==="endRepeat"&&p.endings&&p.endings.length&&(p.endings[p.endings.length]={start:-1,end:-1}),d.push(p)}if(p){var u=p.common.end;if(p.endings)for(o=0;o<p.endings.length;o++)p.endings[o]&&(u=Math.max(u,p.endings[o].end));u<f.index-1&&(console.log("gap",a.slice(u+1,f.index)),d.push({common:{start:u+1,end:f.index}}))}p={common:{start:f.index}};break;case"startEnding":{if(p)for(p.common.end||(p.common.end=f.index),p.endings||(p.endings=[]),o=0;o<f.endings.length;o++)p.endings[f.endings[o]]={start:f.index+1};break}case"endRepeat":if(p){if(p.endings||(p.endings=[]),p.endings.length>0)for(o=0;o<p.endings.length;o++)p.endings[o]&&!p.endings[o].end&&(p.endings[o].end=f.index);p.common.end||(p.common.end=f.index)}break}}if(p){if(p.common.end||(p.common.end=l),p.endings)for(o=0;o<p.endings.length;o++)p.endings[o]&&!p.endings[o].end&&(p.endings[o].end=l);d.push(p)}for(var h=[],c=-1,v=0;v<d.length;v++){var b=d[v];if(!b.endings)n(a,h,b.common.start,b.common.end);else if(b.endings.length===0)n(a,h,b.common.start,b.common.end),n(a,h,b.common.start,b.common.end);else for(o=0;o<b.endings.length;o++){var g=b.endings[o];g&&(n(a,h,b.common.start,b.common.end),g.start>0&&n(a,h,g.start,g.end),c=Math.max(c,g.end))}}return h}}function n(a,o,s,l){for(var d=s;d<=l;d++)o.push(i(a[d]))}function i(a){var o=Object.assign({},a);return o.pitches&&(o.pitches=e.cloneArray(o.pitches)),o}function t(a){var o=[],s,l,d;if(a.indexOf(",")>0)for(l=a.split(","),d=0;d<l.length;d++)s=parseInt(l[d],10),s>0&&o.push(s);else if(a.indexOf("-")>0){l=a.split("-");var p=parseInt(l[0],10),m=parseInt(l[1],10);for(d=p;d<=m;d++)o.push(d)}else s=parseInt(a,10),s>0&&o.push(s);return o}return ha=r,ha}var pa,Bl;function ab(){if(Bl)return pa;Bl=1;var e,r=Et(),n=y7();return(function(){var i=1,t=128;e=function(v,b){b=b||{};var g,w=b.program||0,k=b.midiTranspose||0;v.visualTranspose&&(k-=v.visualTranspose);var $=b.channel||0,O=!1,P=b.drum||"",y=b.drumBars||1,C=b.drumIntro||0,E=P!=="",z=!!b.drumOff,A=[],R=50;w=parseInt(w,10),k=parseInt(k,10),$=parseInt($,10),$===10&&(w=t),P=P.split(" "),y=parseInt(y,10),C=parseInt(C,10);var T=v.formatting.bagpipes;T&&(w=71);var I=[];if(v.formatting.midi){var N=v.formatting.midi;N.program&&N.program.length>0&&(w=N.program[0],N.program.length>1&&(w=N.program[1],$=N.program[0]),O=!0),N.transpose&&(k=N.transpose[0]),N.channel&&($=N.channel[0],O=!0),N.drum&&(P=N.drum),N.drumbars&&(y=N.drumbars[0]),N.drumon&&(E=!0),$===10&&(w=t),N.beat&&I.push({el_type:"beat",beats:N.beat}),N.nobeataccents&&I.push({el_type:"beataccents",value:!1})}b.qpm?g=parseInt(b.qpm,10):v.metaText.tempo?g=p(v.metaText.tempo,v.getBeatLength()):b.defaultQpm?g=b.defaultQpm:g=180;var D=[];T&&D.push({el_type:"bagpipes"}),D.push({el_type:"instrument",program:w}),$&&D.push({el_type:"channel",channel:$}),k&&D.push({el_type:"transpose",transpose:k}),D.push({el_type:"tempo",qpm:g});for(var L=0;L<I.length;L++)D.push(I[L]);var _=[],x=[],S=[],M=[],U=[0],q={};q[0]={el_type:"tempo",qpm:g,timing:0};for(var Z,V=[],ne=!1,Y=v.lines,ce=0;ce<Y.length;ce++){var fe=Y[ce];if(fe.staff){let we=function(Ie){var nt={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]},Se;if(Ie.decoration){if(Ie.decoration.indexOf("pppp")>=0?Se="pppp":Ie.decoration.indexOf("ppp")>=0?Se="ppp":Ie.decoration.indexOf("pp")>=0?Se="pp":Ie.decoration.indexOf("p")>=0?Se="p":Ie.decoration.indexOf("mp")>=0?Se="mp":Ie.decoration.indexOf("mf")>=0?Se="mf":Ie.decoration.indexOf("f")>=0?Se="f":Ie.decoration.indexOf("ff")>=0?Se="ff":Ie.decoration.indexOf("fff")>=0?Se="fff":Ie.decoration.indexOf("ffff")>=0&&(Se="ffff"),Se){Z=nt[Se].slice(0);let fr=[Z];Array.isArray(Ie.decoration)&&(fr=[],Ie.decoration.forEach(Ut=>{Ut in nt&&fr.push(nt[Ut].slice(0))})),_[K].push({el_type:"beat",beats:Z.slice(0),volumesPerNotePitch:fr}),S[be]=!1,M[be]=!1}if(Ie.decoration.indexOf("crescendo(")>=0){var Ct=a(_e,W,"crescendo)"),ct=Math.min(127,Z[0]+R),it=o(_e,W+Ct+1,Object.keys(nt));it&&(ct=nt[it][0]),Ct>0?S[be]=Math.floor((ct-Z[0])/Ct):S[be]=!1,M[be]=!1}else if(Ie.decoration.indexOf("crescendo)")>=0)S[be]=!1;else if(Ie.decoration.indexOf("diminuendo(")>=0){var Rt=a(_e,W,"diminuendo)"),Lt=Math.max(15,Z[0]-R),Xt=o(_e,W+Rt+1,Object.keys(nt));Xt&&(Lt=nt[Xt][0]),S[be]=!1,Rt>0?M[be]=Math.floor((Lt-Z[0])/Rt):M[be]=!1}else Ie.decoration.indexOf("diminuendo)")>=0&&(M[be]=!1)}};for(var Ye=we,pe=fe.staff,K=0,he=0;he<pe.length;he++){var ee=pe[he];if(!(ee.clef&&ee.clef.type==="TAB"))for(var be=0;be<ee.voices.length;be++){var _e=ee.voices[be];if(!_[K]){_[K]=[].concat(JSON.parse(JSON.stringify(D)));var Me=d(fe.staff,K);Me&&_[K].unshift({el_type:"name",trackName:Me}),V[K]=new n(_[K])}if(k&&ee.clef.type==="perc"&&_[K].push({el_type:"transpose",transpose:0}),ee.clef&&ee.clef.type==="perc"&&!O)for(var Ce=0;Ce<_[K].length;Ce++)_[K][Ce].el_type==="instrument"&&(_[K][Ce].program=t);else ee.key&&u(_[K],ee.key);ee.meter&&h(_[K],ee.meter),!ne&&E&&(_[K].push({el_type:"drum",params:{pattern:P,bars:y,on:E,intro:C}}),ne=!0),ee.clef&&ee.clef.type!=="perc"&&ee.clef.transpose&&(ee.clef.el_type="clef",_[K].push({el_type:"transpose",transpose:ee.clef.transpose}),x[K]=!1),ee.clef&&ee.clef.type&&(ee.clef.type.indexOf("-8")>=0?(_[K].push({el_type:"transpose",transpose:-12}),x[K]=!0):ee.clef.type.indexOf("+8")>=0?(_[K].push({el_type:"transpose",transpose:12}),x[K]=!0):x[K]&&(_[K].push({el_type:"transpose",transpose:0}),x[K]=!1)),v.formatting.midi&&v.formatting.midi.drumoff&&(_[K].push({el_type:"bar"}),_[K].push({el_type:"drum",params:{pattern:"",on:!1}}));var We=0,Fe=0,Ke=0,H=0;Z=[105,95,85,1];for(var W=0;W<_e.length;W++){var B=_e[W];switch(B.el_type){case"note":if(S[be]&&(Z[0]+=S[be],Z[1]+=S[be],Z[2]+=S[be],_[K].push({el_type:"beat",beats:Z.slice(0)})),M[be]&&(Z[0]+=M[be],Z[1]+=M[be],Z[2]+=M[be],_[K].push({el_type:"beat",beats:Z.slice(0)})),we(B),!B.rest||B.rest.type!=="spacer"){var G={elem:B,el_type:"note",timing:U[K]};if(B.style?G.style=B.style:A[K]&&(G.style=A[K]),G.duration=B.duration===0?.25:B.duration,B.startTriplet){if(Fe=B.tripletMultiplier,Ke=B.startTriplet*Fe*B.duration,B.startTriplet!==B.tripletR&&W+B.tripletR<=_e.length){for(var Q=0,ae=W;ae<W+B.tripletR;ae++)Q+=_e[ae].duration;Ke=Fe*Q}G.duration=G.duration*Fe,G.duration=Math.round(G.duration*1e6)/1e6,H=G.duration}else Fe&&(B.endTriplet?(Fe=0,G.duration=Math.round((Ke-H)*1e6)/1e6):(G.duration=G.duration*Fe,G.duration=Math.round(G.duration*1e6)/1e6,H+=G.duration));B.rest&&(G.rest=B.rest),B.decoration&&(G.decoration=B.decoration.slice(0)),B.pitches&&(G.pitches=r.cloneArray(B.pitches)),B.gracenotes&&(G.gracenotes=r.cloneArray(B.gracenotes)),B.chord&&(G.chord=r.cloneArray(B.chord)),_[K].push(G),B.style==="rhythm"&&l(_),We++,U[K]+=G.duration}break;case"key":case"keySignature":u(_[K],B);break;case"meter":h(_[K],B);break;case"clef":B.transpose&&_[K].push({el_type:"transpose",transpose:B.transpose}),B.type&&(B.type.indexOf("-8")>=0?_[K].push({el_type:"transpose",transpose:-12}):B.type.indexOf("+8")>=0&&_[K].push({el_type:"transpose",transpose:12}));break;case"tempo":g=p(B,v.getBeatLength()),_[K].push({el_type:"tempo",qpm:g,timing:U[K]}),q[""+U[K]]={el_type:"tempo",qpm:g,timing:U[K]};break;case"bar":We>0&&_[K].push({el_type:"bar"}),we(B),We=0,V[K].addBar(B,K);break;case"style":A[K]=B.head;break;case"timeSignature":_[K].push(m(B));break;case"part":break;case"stem":case"scale":case"break":case"font":break;case"midi":var ue=!1;switch(B.cmd){case"drumon":E=!0,ue=!0;break;case"drumoff":E=!1,ue=!0;break;case"drum":P=B.params,ue=!0;break;case"drumbars":y=B.params[0],ue=!0;break;case"drummap":break;case"channel":B.params[0]===10&&_[K].push({el_type:"instrument",program:t});break;case"program":c(_[K],{el_type:"instrument",program:B.params[0]}),O=!0;break;case"transpose":_[K].push({el_type:"transpose",transpose:B.params[0]});break;case"gchordoff":_[K].push({el_type:"gchordOn",tacet:!0});break;case"gchordon":_[K].push({el_type:"gchordOn",tacet:!1});break;case"beat":_[K].push({el_type:"beat",beats:B.params});break;case"nobeataccents":_[K].push({el_type:"beataccents",value:!1});break;case"beataccents":_[K].push({el_type:"beataccents",value:!0});break;case"vol":case"volinc":_[K].push({el_type:B.cmd,volume:B.params[0]});break;case"swing":case"gchord":case"bassvol":case"chordvol":_[K].push({el_type:B.cmd,param:B.params[0]});break;case"bassprog":case"chordprog":_[K].push({el_type:B.cmd,value:B.params[0],octaveShift:B.params[1]});break;case"gchordbars":_[K].push({el_type:B.cmd,param:B.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",B.cmd,B)}ue&&(_[0].push({el_type:"drum",params:{pattern:P,bars:y,intro:C,on:E}}),ne=!0);break;default:console.log("MIDI: element type "+B.el_type+" not handled.")}}K++,U[K]||(U[K]=0)}}}}for(var xe=0;xe<V.length;xe++)_[xe]=V[xe].resolveRepeats();if(s(_,q),C)for(var oe=v.getPickupLength(),me=0;me<_.length;me++){for(var Le=0;_[me][Le].el_type!=="note"&&_[me].length>Le;)Le++;if(_[me].length>Le){for(var ae=0;ae<C;ae++)oe===0||ae<C-1?(_[me].splice(Le,0,{el_type:"note",rest:{type:"rest"},duration:i},{el_type:"bar"}),Le+=2):_[me].splice(Le++,0,{el_type:"note",rest:{type:"rest"},duration:i-oe});z&&(E=!1,_[me].splice(Le++,0,{el_type:"drum",params:{pattern:P,bars:y,intro:C,on:E}}),z=!1)}}return _.length>0&&_[0].length>0&&(_[0][0].pickupLength=v.getPickupLength()),_};function a(v,b,g){for(var w=0,k=b+1;k<v.length;k++)if(v[k].el_type==="note"&&w++,v[k].decoration&&v[k].decoration.indexOf(g)>=0)return w;return w}function o(v,b,g){for(var w=Math.min(v.length,b+3),k=b;k<w;k++)if(v[k].el_type==="note"&&v[k].decoration){for(var $=0;$<v[k].decoration.length;$++)if(g.indexOf(v[k].decoration[$])>=0)return v[k].decoration[$]}return null}function s(v,b){if(!(!b||b.length===0))for(var g=Object.keys(b),w=0;w<v.length;w++)for(var k=v[w],$=b[0]?b[0].qpm:0,O=0;O<k.length;O++){var P=k[O];P.el_type==="tempo"&&($=P.qpm),g.indexOf(""+P.timing)>=0&&$!==b[""+P.timing].qpm&&($=b[""+P.timing].qpm,P.el_type==="tempo"?(P.qpm=b[""+P.timing].qpm,O++):(v[w].splice(O,0,{el_type:"tempo",qpm:b[""+P.timing].qpm,timing:P.timing}),O+=2))}}function l(v){for(var b=0;b<v.length;b++)for(var g=v[b],w=g.length-1;w>=0&&g[w].el_type!=="bar";)g[w].noChordVoice=!0,w--}function d(v,b){if(!(!v||v.length<=b||!v[b].title))return v[b].title.join(" ")}function p(v,b){var g=.25;v.duration&&(g=v.duration[0]);var w=60;return v.bpm&&(w=v.bpm),g*w/b}function m(v){var b;switch(v.type){case"common_time":b={el_type:"meter",num:4,den:4},i=4/4;break;case"cut_time":b={el_type:"meter",num:2,den:2},i=2/2;break;case"specified":let k=0;if(v.value&&v.value.length>0&&v.value[0].num.indexOf("+")>0)for(var g=v.value[0].num.split("+"),w=0;w<g.length;w++)k+=parseInt(g[w],10);else k=parseInt(v.value[0].num,10);b={el_type:"meter",num:k,den:v.value[0].den},i=k/parseInt(v.value[0].den,10);break;default:b={el_type:"meter"},i=1}return b}function f(v){for(var b=[],g=0;g<v.length;g++)v[g].acc!=="natural"&&b.push(v[g]);return b}function u(v,b){var g;b.root==="HP"?g={el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}:g={el_type:"key",accidentals:f(b.accidentals)},c(v,g)}function h(v,b){var g=m(b);c(v,g)}function c(v,b){for(var g=v.length-1;g>=0;g--)if(v[g].el_type===b.el_type){JSON.stringify(v[g])!==JSON.stringify(b)&&v.push(b);return}v.push(b)}})(),pa=e,pa}var ma,ql;function _7(){if(ql)return ma;ql=1;var e=function(d,p,m,f){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=d,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!p,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=f,this.tempoChangeFactor=1,this.bassInstrument=m.bassprog&&m.bassprog.length>=1?m.bassprog[0]:0,this.chordInstrument=m.chordprog&&m.chordprog.length>=1?m.chordprog[0]:0,this.bassOctaveShift=m.bassprog&&m.bassprog.length===2?m.bassprog[1]:0,this.chordOctaveShift=m.chordprog&&m.chordprog.length===2?m.chordprog[1]:0,this.boomVolume=m.bassvol&&m.bassvol.length===1?m.bassvol[0]:64,this.chickVolume=m.chordvol&&m.chordvol.length===1?m.chordvol[0]:48,m.gchord&&m.gchord.length>0?this.overridePattern=i(m.gchord[0]):this.overridePattern=void 0};e.prototype.setMeter=function(l){this.meter=l},e.prototype.setTempoChangeFactor=function(l){this.tempoChangeFactor=l},e.prototype.setLastBarTime=function(l){this.lastBarTime=l},e.prototype.setTranspose=function(l){this.transpose=l},e.prototype.setRhythmHead=function(l,d){this.hasRhythmHead=l;var p=[];if(l&&this.lastChord&&this.lastChord.chick)for(var m=0;m<this.lastChord.chick.length;m++){var f=Object.assign({},d.pitches[0]);f.actualPitch=this.lastChord.chick[m],p.push(f)}return p},e.prototype.barEnd=function(l){this.chordTrack.length>0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,o(l.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},e.prototype.gChordOn=function(l){this.chordsOff||(this.gChordTacet=l.tacet)},e.prototype.paramChange=function(l){switch(l.el_type){case"gchord":l.param&&l.param.length>0?this.overridePattern=i(l.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=l.value,l.octaveShift!=null&&l.octaveShift!=null?this.bassOctaveShift=l.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=l.value,l.octaveShift!=null&&l.octaveShift!=null?this.chordOctaveShift=l.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=l.param;break;case"chordvol":this.chickVolume=l.param;break;default:console.log("unhandled midi param",l)}},e.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},e.prototype.addTrack=function(l){this.chordTrackEmpty()||l.push(this.chordTrack)},e.prototype.findChord=function(l){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!l.chord||l.chord.length===0)return null;for(var d=0;d<l.chord.length;d++){var p=l.chord[d];if(p.position==="default")return p.name;if(this.breakSynonyms.indexOf(p.name.toLowerCase())>=0)return"break"}return null},e.prototype.interpretChord=function(l){if(l.length!==0){if(l==="break")return{chick:[]};var d=l.substring(0,1);if(d==="("){if(l=l.substring(1,l.length-1),l.length===0)return;d=l.substring(0,1)}var p=this.basses[d];if(p){for(var m=this.transpose;m<-8;)m+=12;for(;m>8;)m-=12;p+=m,p<33?p+=12:p>44&&(p-=12);var f=p;p+=this.bassOctaveShift*12;var u=p-5,h;l.length===1&&(h=this.chordNotes(p,""));var c=l.substring(1),v=c.substring(0,1);v==="b"||v==="♭"?(f--,p--,u--,c=c.substring(1)):(v==="#"||v==="♯")&&(f++,p++,u++,c=c.substring(1));var b=c.split("/");if(h=this.chordNotes(f,b[0]),h.length>=3){var g=h[2]-h[0];u=u+g-7}if(b.length===2){var w=this.basses[b[1].substring(0,1)];if(w){var k=b[1].substring(1),$={"#":1,"♯":1,b:-1,"♭":-1}[k]||0;p=this.basses[b[1].substring(0,1)]+$+m,p+=this.bassOctaveShift*12,u=p}}return{boom:p,boom2:u,chick:h}}}},e.prototype.chordNotes=function(l,d){var p=this.chordIntervals[d];p||(d.slice(0,2).toLowerCase()==="ma"||d[0]==="M"?p=this.chordIntervals.M:d[0]==="m"||d[0]==="-"?p=this.chordIntervals.m:p=this.chordIntervals.M),l+=12,l+=this.chordOctaveShift*12;for(var m=[],f=0;f<p.length;f++)m.push(l+p[f]);return m},e.prototype.writeNote=function(l,d,p,m,f,u){l!==void 0&&this.chordTrack.push({cmd:"note",pitch:l,volume:p,start:this.lastBarTime+m*s(d,this.tempoChangeFactor),duration:s(f,this.tempoChangeFactor),gap:0,instrument:u})},e.prototype.chordTrackEmpty=function(){for(var l=!0,d=0;d<this.chordTrack.length&&l;d++)this.chordTrack[d].cmd==="note"&&(l=!1);return l},e.prototype.resolveChords=function(l,d){if(!this.hasRhythmHead){var p=this.meter.num,m=this.meter.den,f=1/m,u=f/2,h=parseInt(p,10)/parseInt(m,10),c=h-(d-l)/this.tempoChangeFactor;Math.abs(c)<1e-5&&(c=0),(this.currentChords.length===0||this.currentChords[0].beat!==0)&&this.currentChords.unshift({beat:0,chord:this.chordLastBar});var v=t(this.currentChords,8*p/m),b=this.overridePattern?this.overridePattern:this.rhythmPatterns[p+"/"+m];if(c){b=[];for(var g=(d-l)/this.tempoChangeFactor*8,w=0;w<g/2;w+=2)b.push("chick"),b.push("")}if(!b){b=[];for(var w=0;w<8*p/m/2;w++)b.push("chick"),b.push("")}for(var k=!0,$=Math.min(b.length,v.length),w=0;w<$;w++){w>0&&v[w-1]&&v[w]&&v[w-1].boom!==v[w].boom&&(k=!0);var O=b[w],P=O.indexOf("boom")>=0,y=!P&&w!==0&&b[0].indexOf("boom")>=0&&(!v[w-1]||v[w-1].boom!==v[w].boom),C=r(v[w],O,k,y);P&&(k=!1);for(var E=0;E<C.length;E++)this.writeNote(C[E],.125,P||y?this.boomVolume:this.chickVolume,w,u,P||y?this.bassInstrument:this.chordInstrument),y?y=!1:P=!1}}},e.prototype.processChord=function(l){if(!this.chordTrackFinished){var d=this.findChord(l);if(d){var p=this.interpretChord(d);if(p){this.chordTrack.length===0&&this.chordTrack.push({cmd:"program",channel:this.chordChannel,instrument:this.chordInstrument}),this.lastChord=p;var m=a(this.lastBarTime,o(l.time));this.currentChords.push({chord:this.lastChord,beat:m,start:o(l.time)})}}}};function r(l,d,p,m){var f=[];if(!l)return f;d.indexOf("boom")>=0?f.push(p?l.boom:l.boom2):m&&f.push(l.boom);var u=l.chick.length;if(d.indexOf("chick")>=0)for(var h=0;h<u;h++)f.push(l.chick[h]);switch(d){case"DO":f.push(l.chick[0]);break;case"MI":f.push(l.chick[1]);break;case"SOL":f.push(n(l,2));break;case"TI":f.push(n(l,3));break;case"TOP":f.push(n(l,4));break;case"do":f.push(l.chick[0]+12);break;case"mi":f.push(l.chick[1]+12);break;case"sol":f.push(n(l,2)+12);break;case"ti":f.push(n(l,3)+12);break;case"top":f.push(n(l,4)+12);break}return f}function n(l,d){var p=Math.floor(d/l.chick.length),m=l.chick[d%l.chick.length];return m+p*12}function i(l){for(var d=[],p=0;p<l.length;p++){var m=l[p];switch(m){case"z":d.push("");break;case"2":d.push("");break;case"c":d.push("chick");break;case"b":d.push("boom&chick");break;case"f":d.push("boom");break;case"G":d.push("DO");break;case"H":d.push("MI");break;case"I":d.push("SOL");break;case"J":d.push("TI");break;case"K":d.push("TOP");break;case"g":d.push("do");break;case"h":d.push("mi");break;case"i":d.push("sol");break;case"j":d.push("ti");break;case"k":d.push("top");break}}return d}function t(l,d,p){var m=[];if(l.length===0)return m;for(var f=l[0].chord,u=1;u<l.length;u++){for(var h=l[u];m.length<h.beat;)m.push(f);f=h.chord}for(;m.length<d;)m.push(f);return m}function a(l,d){var p=d-l;return p*8}e.prototype.breakSynonyms=["break","(break)","no chord","n.c.","tacet"],e.prototype.basses={A:33,B:35,C:36,D:38,E:40,F:41,G:43},e.prototype.chordIntervals={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],ø7:[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],Δ7:[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21],5:[0,7],"5(8)":[0,7,12],"5add8":[0,7,12]},e.prototype.rhythmPatterns={"2/2":["boom","","","","chick","","",""],"3/2":["boom","","","","chick","","","","chick","","",""],"4/2":["boom","","","","chick","","","","boom","","","","chick","","",""],"2/4":["boom","","chick",""],"3/4":["boom","","chick","","chick",""],"4/4":["boom","","chick","","boom","","chick",""],"5/4":["boom","","chick","","chick","","boom","","chick",""],"6/4":["boom","","chick","","boom","","chick","","boom","","chick",""],"3/8":["boom","","chick"],"5/8":["boom","chick","chick","boom","chick"],"6/8":["boom","","chick","boom","","chick"],"7/8":["boom","chick","chick","boom","chick","boom","chick"],"9/8":["boom","","chick","boom","","chick","boom","","chick"],"10/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick"],"11/8":["boom","chick","chick","boom","chick","chick","boom","chick","boom","chick","chick"],"12/8":["boom","","chick","boom","","chick","boom","","chick","boom","","chick"]};function o(l){return l/1e6}function s(l,d){return Math.round(l*d*1e6)/1e6}return ma=e,ma}var va,Fl;function ob(){if(Fl)return va;Fl=1;var e={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};function r(n){var i=(n.accidental?n.accidental[0]:"x")+n.verticalPos;return e[i]}return va=r,va}var ga,Hl;function w7(){if(Hl)return ga;Hl=1;var e,r=_7(),n=ob();return(function(){var i,t,a,o,s,l=1,d,p,m,f,u,h,c={num:4,den:4},v=128,b,g=!0,w=105,k=95,$=85,O=[[w,k,$]],P=.25,y,C,E=0,z,A={},R,T=0,I,N=0,D=-.001,L=.4;e=function(H,W,B,G){W||(W={}),G||(G={}),i=[],t=[0,0,0,0,0,0,0],o=[],s=W.qpm,l=1,d=void 0,p=void 0,m=void 0,f=void 0,u=0,I=B,c={num:4,den:4},g=!0,w=105,k=95,$=85,O=[],P=.25,y=void 0,C=void 0,E=0,z=[],A={},R=1,H.length>0&&H[0].length>0&&(T=H[0][0].pickupLength),W.bassprog!==void 0&&!G.bassprog&&(G.bassprog=[W.bassprog]),W.bassvol!==void 0&&!G.bassvol&&(G.bassvol=[W.bassvol]),W.chordprog!==void 0&&!G.chordprog&&(G.chordprog=[W.chordprog]),W.chordvol!==void 0&&!G.chordvol&&(G.chordvol=[W.chordvol]),W.gchord!==void 0&&!G.gchord&&(G.gchord=[W.gchord]),h=new r(H.length,W.chordsOff,G,c),M(H,W);for(var Q=0;Q<H.length;Q++){a=0,h.setTranspose(a);var ae=H[Q];m=[{cmd:"program",channel:Q,instrument:d}],f=void 0,b=0,h.setLastBarTime(0);var ue=!1;(W.voicesOff===!0||W.voicesOff&&W.voicesOff.length&&W.voicesOff.indexOf(Q)>=0)&&(ue=!0);for(var xe=0;xe<ae.length;xe++){var oe=ae[xe];switch(oe.el_type){case"name":f={cmd:"text",type:"name",text:oe.trackName};break;case"note":Y(oe,ue);break;case"key":t=K(oe);break;case"meter":c=oe,h.setMeter(c),P=U(c),We();break;case"tempo":s?l=oe.qpm?s/oe.qpm:1:s=oe.qpm,h.setTempoChangeFactor(l);break;case"transpose":a=oe.transpose,h.setTranspose(a);break;case"bar":h.barEnd(oe),i=[],Q===0&&Fe(H.length+1),h.setRhythmHead(!1),b=x(oe.time),h.setLastBarTime(b);break;case"bagpipes":break;case"instrument":if(d===void 0&&(d=oe.program),p=oe.program,m.length>0&&m[m.length-1].cmd==="program")m[m.length-1].instrument=oe.program;else{var me;for(me=m.length-1;me>=0&&m[me].cmd!=="program";me--);(me<0||m[me].instrument!==oe.program)&&m.push({cmd:"program",channel:0,instrument:oe.program})}break;case"channel":_(oe.channel);break;case"drum":A=Ce(oe.params),We();break;case"gchordOn":h.gChordOn(oe);break;case"beat":w=oe.beats[0],k=oe.beats[1],$=oe.beats[2],oe.volumesPerNotePitch?O=oe.volumesPerNotePitch:O=[];break;case"vol":y=oe.volume;break;case"volinc":C=oe.volume;break;case"beataccents":g=oe.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":h.paramChange(oe);break;default:console.log("MIDI creation. Unknown el_type: "+oe.el_type+`
|
|
112
|
+
`);break}}m[0].instrument===void 0&&(m[0].instrument=d||0),f&&m.unshift(f),o.push(m),h.finish(),z.length>0}return W.detuneOctave&&Ke(o,parseInt(W.detuneOctave,10)),h.addTrack(o),z.length>0&&o.push(z),{tempo:s,instrument:d,tracks:o,totalDuration:u}};function _(H){for(var W=m.length-1;W>=0;W--)if(m[W].cmd==="program"){m[W].channel=H;return}}function x(H){return H/1e6}function S(H){return Math.round(H*l*1e6)/1e6}function M(H,W){for(var B=0;B<H.length;B++){for(var G=H[B],Q={},ae=W.qpm,ue=0,xe=1,oe=0;oe<G.length;oe++){var me=G[oe];if(me.el_type==="tempo"){ae?xe=me.qpm?ae/me.qpm:1:ae=me.qpm;continue}me.time=ue;var Le=me.duration?me.duration:0;if(ue+=Math.round(Le*xe*1e6),me.pitches){for(var Ye=0;Ye<me.pitches.length;Ye++){var we=me.pitches[Ye];if(we){if(we.duration=me.duration,we.startTie)Q[we.pitch]===void 0?Q[we.pitch]={el:oe,pitch:Ye}:(G[Q[we.pitch].el].pitches[Q[we.pitch].pitch].duration+=we.duration,me.pitches[Ye]=null);else if(we.endTie){var Ie=Q[we.pitch];if(Ie){var nt=we.duration;delete G[Ie.el].pitches[Ie.pitch].startTie,G[Ie.el].pitches[Ie.pitch].duration+=nt,me.pitches[Ye]=null,delete Q[we.pitch]}else delete we.endTie}}}delete me.duration}}for(var Se in Q)if(Q.hasOwnProperty(Se)){var Ct=Q[Se];delete G[Ct.el].pitches[Ct.pitch].startTie}}}function U(H){switch(parseInt(H.den,10)){case 2:return .5;case 4:return .25;case 8:return H.num%3===0?.375:.125;case 16:return .125}return .25}function q(H,W,B){var G=B-H;return G/W}function Z(H,W,B){if(W)return 0;let G=w,Q=k,ae=$;B!==void 0&&O.length>=B+1&&(G=O[B][0],Q=O[B][1],ae=O[B][2]);var ue;if(y!==void 0)ue=y,y=void 0;else if(!g)ue=Q;else if(T>H)ue=ae;else{var xe=q(b,U(c),H);xe===0?ue=G:parseInt(xe,10)===xe?ue=Q:ue=ae}return C&&(ue+=C,C=void 0),ue<0&&(ue=0),ue>127&&(ue=127),W?0:ue}function V(H,W){var B={};if(H.decoration)for(var G=0;G<H.decoration.length;G++)H.decoration[G]==="staccato"?B.thisBreakBetweenNotes="staccato":H.decoration[G]==="tenuto"?B.thisBreakBetweenNotes="tenuto":H.decoration[G]==="accent"?B.velocity=Math.min(127,W*1.5):H.decoration[G]==="trill"?B.noteModification="trill":H.decoration[G]==="lowermordent"?B.noteModification="lowermordent":H.decoration[G]==="uppermordent"?B.noteModification="pralltriller":H.decoration[G]==="mordent"?B.noteModification="mordent":H.decoration[G]==="turn"?B.noteModification="turn":H.decoration[G]==="roll"?B.noteModification="roll":H.decoration[G]==="pralltriller"?B.noteModification="pralltriller":H.decoration[G]==="trillh"&&(B.noteModification="trillh");return B}function ne(H,W){var B=W.start,G=W.duration,Q=S(1/32);switch(H){case"trill":for(var ae=2;G>0;)m.push({cmd:"note",pitch:W.pitch+ae,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),ae=ae===2?0:2,G-=Q,B+=Q;break;case"trillh":for(var ae=1;G>0;)m.push({cmd:"note",pitch:W.pitch+ae,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),ae=ae===1?0:1,G-=Q,B+=Q;break;case"pralltriller":m.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,m.push({cmd:"note",pitch:W.pitch+2,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,m.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:G,gap:0,instrument:p});break;case"mordent":case"lowermordent":m.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,m.push({cmd:"note",pitch:W.pitch-2,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q,B+=Q,m.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:G,gap:0,instrument:p});break;case"turn":Q=W.duration/4,m.push({cmd:"note",pitch:W.pitch+2,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),m.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B+Q,duration:Q,gap:0,instrument:p,style:"decoration"}),m.push({cmd:"note",pitch:W.pitch-1,volume:W.volume,start:B+Q*2,duration:Q,gap:0,instrument:p,style:"decoration"}),m.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B+Q*3,duration:Q,gap:0,instrument:p,style:"decoration"});break;case"roll":for(;G>0;)m.push({cmd:"note",pitch:W.pitch,volume:W.volume,start:B,duration:Q,gap:0,instrument:p,style:"decoration"}),G-=Q*2,B+=Q*2;break}}function Y(H,W){var B=Z(x(H.time),W);h.processChord(H);var G;if(H.gracenotes&&H.pitches&&H.pitches.length>0&&H.pitches[0]&&(G=he(H.gracenotes,H.pitches[0].duration),H.elem&&(H.elem.midiGraceNotePitches=ee(G,x(H.time),B*2/3,p))),H.elem){var Q=x(H.time),ae=Q/P/s*60*1e3;if(H.elem.currentTrackMilliseconds===void 0)H.elem.currentTrackMilliseconds=ae,H.elem.currentTrackWholeNotes=Q;else if(H.elem.currentTrackMilliseconds.length===void 0)H.elem.currentTrackMilliseconds!==ae&&(H.elem.currentTrackMilliseconds=[H.elem.currentTrackMilliseconds,ae],H.elem.currentTrackWholeNotes=[H.elem.currentTrackWholeNotes,Q]);else{for(var ue=!1,xe=0;xe<H.elem.currentTrackMilliseconds.length;xe++)H.elem.currentTrackMilliseconds[xe]===ae&&(ue=!0);ue||(H.elem.currentTrackMilliseconds.push(ae),H.elem.currentTrackWholeNotes.push(Q))}}if(H.pitches){var oe="",me=V(H,B);me.thisBreakBetweenNotes&&(oe=me.thisBreakBetweenNotes),me.velocity&&(B=me.velocity);var Le=H.pitches;H.style==="rhythm"&&(Le=h.setRhythmHead(!0,H)),H.elem&&(H.elem.midiPitches=[]);for(var Ye=0;Ye<Le.length;Ye++){let it=B;!me.velocity&&Array.isArray(H.decoration)&&H.decoration.length>Ye&&(it=Z(x(H.time),W,Ye));var we=Le[Ye];if(we){we.startSlur&&(E+=we.startSlur.length),we.endSlur&&(E-=we.endSlur.length);var Ie=we.actualPitch?we.actualPitch:pe(we);if(p===v&&I){var nt=n(we);nt&&I[nt]&&(Ie=I[nt].sound)}var Se={cmd:"note",pitch:Ie,volume:it,start:x(H.time),duration:S(we.duration),instrument:p,startChar:H.elem.startChar,endChar:H.elem.endChar};if(Se=be(Se),H.gracenotes&&(Se.duration=Se.duration/2,Se.start=Se.start+Se.duration),H.elem&&H.elem.midiPitches.push(Se),me.noteModification)ne(me.noteModification,Se);else{switch(E>0?Se.endType="tenuto":oe&&(Se.endType=oe),Se.endType){case"tenuto":Se.gap=D;break;case"staccato":var Ct=Se.duration*L;Se.gap=s/60*Ct;break;default:Se.gap=N;break}m.push(Se)}}}m.length-1}var ct=ce(H);u=Math.max(u,x(H.time)+S(ct))}function ce(H){return H.pitches&&H.pitches.length>0&&H.pitches[0]?H.pitches[0].duration:H.elem?H.elem.duration:H.duration}var fe=[0,2,4,5,7,9,11];function pe(H){if(H.midipitch!==void 0)return H.midipitch;var W=H.pitch;if(H.accidental)switch(H.accidental){case"sharp":i[W]=1;break;case"flat":i[W]=-1;break;case"natural":i[W]=0;break;case"dblsharp":i[W]=2;break;case"dblflat":i[W]=-2;break;case"quartersharp":i[W]=.25;break;case"quarterflat":i[W]=-.25;break}var B=_e(W)*12+fe[Me(W)]+60;return i[W]!==void 0?B+=i[W]:B+=t[Me(W)],B+=a,B}function K(H){var W=[0,0,0,0,0,0,0];if(!H.accidentals)return W;for(var B=0;B<H.accidentals.length;B++){var G=H.accidentals[B],Q;switch(G.acc){case"flat":Q=-1;break;case"quarterflat":Q=-.25;break;case"sharp":Q=1;break;case"quartersharp":Q=.25;break;default:Q=0;break}var ae=G.note.toLowerCase(),ue=Me(ae.charCodeAt(0)-99);W[ue]+=Q}return W}function he(H,W){for(var B=0,G=[],Q,ae=0;ae<H.length;ae++)Q=H[ae],B+=Q.duration;var ue=W/2/B;for(ae=0;ae<H.length;ae++){Q=H[ae];var xe=pe(Q);if(p===v&&I){var oe=n(Q);oe&&I[oe]&&(xe=I[oe].sound)}var me={pitch:xe,duration:Q.duration*ue};me=be(me),G.push(me)}return G}function ee(H,W,B,G){var Q=[];B=Math.round(B);for(var ae=0;ae<H.length;ae++){var ue=H[ae];m.push({cmd:"note",pitch:ue.pitch,volume:B,start:W,duration:ue.duration,gap:0,instrument:G,style:"grace"}),Q.push({pitch:ue.pitch,durationInMeasures:ue.duration,volume:B,instrument:G}),W+=ue.duration}return Q}function be(H){var W=""+H.pitch;return W.indexOf(".75")>=0?(H.pitch=Math.round(H.pitch),H.cents=-50):W.indexOf(".25")>=0&&(H.pitch=Math.round(H.pitch),H.cents=50),H}function _e(H){return Math.floor(H/7)}function Me(H){return H=H%7,H<0&&(H+=7),H}function Ce(H){if(H.pattern.length===0||H.on===!1)return{on:!1};for(var W=H.pattern[0],B=[],G="",Q=0,ae=0;ae<W.length;ae++)if(W[ae]==="d"&&Q++,W[ae]==="d"||W[ae]==="z")G.length!==0?(B.push(G),G=W[ae]):G=G+W[ae];else{if(G.length===0)return{on:!1};G=G+W[ae]}if(G.length!==0&&B.push(G),H.pattern.length!==Q*2+1)return{on:!1};for(var ue={on:!0,bars:H.bars,pattern:[]},xe=U(c),oe=0,me=0;me<B.length;me++){G=B[me];for(var Le=1,Ye=!1,we=0,Ie=1;Ie<G.length;Ie++)switch(G[Ie]){case"/":we!==0&&(Le*=we),we=0,Ye=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":we=we*10+G[Ie];break;default:return{on:!1}}Ye?(we===0&&(we=2),Le/=we):we&&(Le*=we),G[0]==="d"?(ue.pattern.push({len:Le*xe,pitch:H.pattern[1+oe],velocity:H.pattern[1+oe+Q]}),oe++):ue.pattern.push({len:Le*xe,pitch:null})}return R=H.bars?H.bars:1,ue}function We(){if(!(!A||!A.pattern)){for(var H=A,W=0,B=c.num/c.den,G=0;G<H.pattern.length;G++)W+=H.pattern[G].len;var Q=W/R/B;for(G=0;G<H.pattern.length;G++)H.pattern[G].len=H.pattern[G].len/Q;A=H}}function Fe(H){if(!(z.length===0&&!A.on)){var W=c.num/c.den;if(z.length===0){if(u<W)return;z.push({cmd:"program",channel:H,instrument:v})}if(A.on)for(var B=b,G=0;G<A.pattern.length;G++){var Q=S(A.pattern[G].len);A.pattern[G].pitch&&z.push({cmd:"note",pitch:A.pattern[G].pitch,volume:A.pattern[G].velocity,start:B,duration:Q,gap:0,instrument:v}),B+=Q}}}function Ke(H,W){for(var B={},G=0;G<H.length;G++)for(var Q=0;Q<H[G].length;Q++){var ae=H[G][Q];ae.cmd==="note"&&(B[ae.start]===void 0&&(B[ae.start]=[]),B[ae.start].push({track:G,event:Q,pitch:ae.pitch}))}var ue=Object.keys(B);for(G=0;G<ue.length;G++){var xe=B[ue[G]];if(xe.length>1){xe=xe.sort(function(we,Ie){return we.pitch-Ie.pitch});var oe=xe[xe.length-1],me=oe.pitch%12,Le=!1;for(Q=0;!Le&&Q<xe.length-1;Q++)xe[Q].pitch%12===me&&(Le=!0);if(Le){var Ye=H[oe.track][oe.event];Ye.cents||(Ye.cents=0),Ye.cents+=W}}}}})(),ga=e,ga}var ba,Gl;function k7(){if(Gl)return ba;Gl=1;function e(l,d){d||(d={});for(var p=!!d.lineBreaks,m=[],f=!1,u=[],h=[],c=[],v=[],b=[],g=[],w=[],k=0;k<l.length;k++){var $=s(l[k]);if($.staff){if(f&&!$.vskip)for(var O=m[m.length-1],P=0;P<O.staff.length;P++){var y=$.staff[P],C=O.staff[P];if(y&&(o(y.meter,u[P])||(n(y.meter,y.voices),u[P]=y.meter,delete y.meter),o(y.key,h[P])||(i(y.key,y.voices),h[P]=y.key,delete y.key),y.title&&(C.abbrevTitle=y.title),o(y.clef,c[P])||(t(y.clef,y.voices),c[P]=y.clef,delete y.clef),o(y.vocalfont,v[P])||(a(y.vocalfont,y.voices,"vocalfont"),v[P]=y.vocalfont,delete y.vocalfont),o(y.gchordfont,b[P])||(a(y.gchordfont,y.voices,"gchordfont"),b[P]=y.gchordfont,delete y.gchordfont),o(y.tripletfont,g[P])||(a(y.tripletfont,y.voices,"tripletfont"),g[P]=y.tripletfont,delete y.tripletfont),o(y.annotationfont,w[P])||(a(y.annotationfont,y.voices,"annotationfont"),w[P]=y.annotationfont,delete y.annotationfont)),y)for(var E=0;E<C.voices.length;E++){var z=C.voices[E],A=y.voices[E];p&&z.push({el_type:"break"}),A&&(C.voices[E]=z.concat(A))}}else{for(var R=0;R<$.staff.length;R++)h[R]=$.staff[R].key,u[R]=$.staff[R].meter,c[R]=$.staff[R].clef;m.push(s($))}f=!0}else f=!1,m.push($)}return m}function r(l,d){return l==="abselem"?"abselem":d}function n(l,d){l.el_type="meter",l.startChar=-1,l.endChar=-1;for(var p=0;p<d.length;p++)d[p].unshift(l)}function i(l,d){l.el_type="key",l.startChar=-1,l.endChar=-1;for(var p=0;p<d.length;p++)d[p].unshift(l)}function t(l,d){l.el_type="clef",l.startChar=-1,l.endChar=-1;for(var p=0;p<d.length;p++)d[p].unshift(l)}function a(l,d,p){l.el_type="font",l.type=p,l.startChar=-1,l.endChar=-1;for(var m=0;m<d.length;m++)d[m].unshift(l)}function o(l,d){if(!l)return!0;var p=JSON.stringify(l,r),m=JSON.stringify(d,r);return p===m}function s(l){for(var d={},p=Object.keys(l),m=0;m<p.length;m++)if(p[m]!=="staff")d[p[m]]=l[p[m]];else{d.staff=[];for(var f=0;f<l.staff.length;f++){for(var u={},h=Object.keys(l.staff[f]),c=0;c<h.length;c++)if(h[c]!=="voices")u[h[c]]=l.staff[f][h[c]];else{u.voices=[];for(var v=0;v<l.staff[f].voices.length;v++)u.voices.push([].concat(l.staff[f].voices[v]))}d.staff.push(u)}}return d}return ba=e,ba}var ya,Jl;function sb(){if(Jl)return ya;Jl=1;var e=Et(),r=pt(),n=ab(),i=w7(),t=k7(),a=function(){this.reset=function(){this.version="1.1.0",this.media="screen",this.metaText={},this.metaTextInfo={},this.formatting={},this.lines=[],this.staffNum=0,this.voiceNum=0,this.lineNum=0,this.runningFonts={},delete this.visualTranspose},this.reset();function o(f,u,h,c){for(var v=0;v<c.length;v++)f[h][c[v]]=u[h][c[v]]}this.copyTopInfo=function(f){var u=["tempo","title","header","rhythm","origin","composer","author","partOrder"];o(this,f,"metaText",u),o(this,f,"metaTextInfo",u)},this.copyBottomInfo=function(f){var u=["unalignedWords","book","source","discography","notes","transcription","history","abc-copyright","abc-creator","abc-edited-by","footer"];o(this,f,"metaText",u),o(this,f,"metaTextInfo",u)},this.getBeatLength=function(){var f=this.getMeterFraction(),u=1;return f.num===6||f.num===9||f.num===12||f.num===3&&f.den===8?u=3:f.den===8&&(f.num===5||f.num===7)&&(u=2),u/f.den};function s(f,u){for(var h=0,c=0;c<f.length;c++)if(f[c].staff)for(var v=0;v<f[c].staff.length;v++)for(var b=0;b<f[c].staff[v].voices.length;b++)for(var g=f[c].staff[v].voices[b],w=1,k=0;k<g.length;k++){var $=g[k].rest&&g[k].rest.type==="spacer";if(g[k].startTriplet&&(w=g[k].tripletMultiplier),g[k].duration&&!$&&g[k].el_type!=="tempo"&&(h+=g[k].duration*w),g[k].endTriplet&&(w=1),h>=u&&(h-=u),g[k].el_type==="bar")return h}return h}this.getPickupLength=function(){var f=this.getBarLength(),u=s(this.lines,f);return u<1e-8||f-u<1e-8?0:u},this.getBarLength=function(){var f=this.getMeterFraction();return f.num/f.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(f){var u;if(f)u=f;else{var h=this.metaText?this.metaText.tempo:null;u=this.getBpm(h)}u<=0&&(u=1);var c=this.getBeatsPerMeasure(),v=c/u;return v*6e4},this.getBeatsPerMeasure=function(){var f=this.getBeatLength(),u=this.getBarLength();return u/f},this.getMeter=function(){for(var f=0;f<this.lines.length;f++){var u=this.lines[f];if(u.staff)for(var h=0;h<u.staff.length;h++){var c=u.staff[h].meter;if(c)return c}}return{type:"common_time"}},this.getMeterFraction=function(){var f=this.getMeter(),u=4,h=4;if(f)if(f.type==="specified"){if(f.value&&f.value.length>0&&f.value[0].num.indexOf("+")>0){var c=f.value[0].num.split("+");u=0;for(var v=0;v<c.length;v++)u+=parseInt(c[v],10)}else u=parseInt(f.value[0].num,10);h=parseInt(f.value[0].den,10)}else f.type==="cut_time"?(u=2,h=2):f.type==="common_time"&&(u=4,h=4);return this.meter={num:u,den:h},this.meter},this.getKeySignature=function(){for(var f=0;f<this.lines.length;f++){var u=this.lines[f];if(u.staff){for(var h=0;h<u.staff.length;h++)if(u.staff[h].key)return u.staff[h].key}}return{}},this.getElementFromChar=function(f){for(var u=0;u<this.lines.length;u++){var h=this.lines[u];if(h.staff)for(var c=0;c<h.staff.length;c++)for(var v=h.staff[c],b=0;b<v.voices.length;b++)for(var g=v.voices[b],w=0;w<g.length;w++){var k=g[w];if(k.startChar&&k.endChar&&k.startChar<=f&&k.endChar>f)return k}}return null};function l(f){for(var u,h,c,v,b=f.length-1;b>=0;b--){var g=f[b];g.type==="bar"?(g.top=c,g.nextTop=u,u=c,g.bottom=v,g.nextBottom=h,h=v):g.type==="event"&&(c=g.top,v=g.top+g.height)}}function d(f){var u=[];for(var h in f)f.hasOwnProperty(h)&&u.push(f[h]);return u=u.sort(function(c,v){var b=c.milliseconds-v.milliseconds;return b!==0?b:c.type==="bar"?-1:1}),u}this.addElementToEvents=function(f,u,h,c,v,b,g,w,k,$){if(u.hint)return{isTiedState:void 0,duration:0};var O=u.durationClass?u.durationClass:u.duration;if(u.abcelem.rest&&u.abcelem.rest.type==="spacer"&&(O=0),O>0){for(var P=[],y=0;y<u.elemset.length;y++)u.elemset[y]!==null&&P.push(u.elemset[y]);var C=u.startTie;if(k!==void 0)f["event"+k].elements.push(P),$&&(f["event"+h]||(f["event"+h]={type:"event",milliseconds:h,line:b,measureNumber:g,top:c,height:v,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),f["event"+h].measureStart=!0,$=!1),C||(k=void 0);else{if(!f["event"+h])f["event"+h]={type:"event",milliseconds:h,line:b,measureNumber:g,top:c,height:v,left:u.x,width:u.w,elements:[P],startChar:u.abcelem.startChar,endChar:u.abcelem.endChar,startCharArray:[u.abcelem.startChar],endCharArray:[u.abcelem.endChar],midiPitches:u.abcelem.midiPitches?e.cloneArray(u.abcelem.midiPitches):[]},u.abcelem.midiGraceNotePitches&&(f["event"+h].midiGraceNotePitches=e.cloneArray(u.abcelem.midiGraceNotePitches));else{if(f["event"+h].left?f["event"+h].left=Math.min(f["event"+h].left,u.x):f["event"+h].left=u.x,f["event"+h].elements.push(P),f["event"+h].startCharArray.push(u.abcelem.startChar),f["event"+h].endCharArray.push(u.abcelem.endChar),f["event"+h].startChar===null&&(f["event"+h].startChar=u.abcelem.startChar),f["event"+h].endChar===null&&(f["event"+h].endChar=u.abcelem.endChar),u.abcelem.midiPitches&&u.abcelem.midiPitches.length){f["event"+h].midiPitches||(f["event"+h].midiPitches=[]);for(var y=0;y<u.abcelem.midiPitches.length;y++)f["event"+h].midiPitches.push(u.abcelem.midiPitches[y])}if(u.abcelem.midiGraceNotePitches&&u.abcelem.midiGraceNotePitches.length){f["event"+h].midiGraceNotePitches||(f["event"+h].midiGraceNotePitches=[]);for(var E=0;E<u.abcelem.midiGraceNotePitches.length;E++)f["event"+h].midiGraceNotePitches.push(u.abcelem.midiGraceNotePitches[E])}}$&&(f["event"+h].measureStart=!0,$=!1)}}return{isTiedState:k,duration:O/w,nextIsBar:$||u.type==="bar"}},this.makeVoicesArray=function(){for(var f=[],u=[],h={},c=0;c<this.engraver.staffgroups.length;c++){var v=this.engraver.staffgroups[c];if(v&&v.staffs&&v.staffs.length>0){var b=v.staffs[0],g=b.absoluteY,w=g-b.top*r.STEP,k=v.staffs[v.staffs.length-1];g=k.absoluteY;for(var $=g-k.bottom*r.STEP,O=$-w,P=v.voices,y=0;y<P.length;y++)if(!(P[y].staff&&P[y].staff.isTabStaff)){var C=!1;f[y]||(f[y]=[]),u[y]===void 0&&(u[y]=0);for(var E=P[y].children,z=0;z<E.length;z++)E[z].type==="tempo"&&(h[u[y]]=this.getBpm(E[z].abcelem)),f[y].push({top:w,height:O,line:v.line,measureNumber:u[y],elem:E[z]}),E[z].type==="bar"&&C&&u[y]++,(E[z].type==="note"||E[z].type==="rest")&&(C=!0)}}}return this.tempoLocations=h,f},this.setupEvents=function(f,u,h,c){c||(c=1);for(var v=[],b={},g=f,w,k=!0,$=this.makeVoicesArray(),O=0,P=0;P<$.length;P++){var y=g,C=Math.round(y*1e3),E=0,z=-1,A=$[P],R=h;u=this.getBeatLength()*R/60;for(var T=-1,I=0;I<A.length;I++){var N=A[I].measureNumber;T!==N&&this.tempoLocations[N]&&(R=this.tempoLocations[N],u=c*this.getBeatLength()*R/60,T=N);var D=A[I].elem,L=this.addElementToEvents(b,D,C,A[I].top,A[I].height,A[I].line,A[I].measureNumber,u,w,k);w=L.isTiedState,k=L.nextIsBar,y+=L.duration;var _;if(D.duration>0&&b["event"+C]&&(_="event"+C),C=Math.round(y*1e3),D.type==="bar"){var x=D.abcelem.type,S=x==="bar_right_repeat"||x==="bar_dbl_repeat",M=D.abcelem.startEnding==="1",U=x==="bar_left_repeat"||x==="bar_dbl_repeat"||x==="bar_right_repeat";if(S){I>0&&(b[_].endX=D.x),z===-1&&(z=I);var q=0;T=-1;for(var Z=E;Z<z;Z++){N=A[Z].measureNumber,T!==N&&this.tempoLocations[N]&&(R=this.tempoLocations[N],u=c*this.getBeatLength()*R/60,T=N);var V=A[Z].elem;L=this.addElementToEvents(b,V,C,A[Z].top,A[Z].height,A[Z].line,A[Z].measureNumber,u,w,k),w=L.isTiedState,k=L.nextIsBar,y+=L.duration,q=C,C=Math.round(y*1e3)}b["event"+q]&&(b["event"+q].endX=A[z].elem.x),k=!0,z=-1}M&&(z=I),U&&(E=I)}}O=Math.max(O,C)}return v=d(b),l(v),m(this.lines,v),v.push({type:"end",milliseconds:O}),this.addUsefulCallbackInfo(v,R*c),v},this.addUsefulCallbackInfo=function(f,u){for(var h=this.millisecondsPerMeasure(u),c=0;c<f.length;c++){var v=f[c];v.millisecondsPerMeasure=h}};function p(f,u){for(;u<f.length&&f[u].left===null;)u++;return f[u]}function m(f,u){if(!(u.length<1)){for(var h=0;h<u.length-1;h++){var c=u[h],v=p(u,h+1);if(c.left!==null){var b=v&&c.top===v.top?v.left:f[c.line].staffGroup.w;c.endX!==void 0?b>c.left&&(c.endX=Math.min(c.endX,b)):c.endX=b}}var g=u[u.length-1];g.endX=f[g.line].staffGroup.w}}this.getBpm=function(f){var u;if(f||(f=this.metaText?this.metaText.tempo:null),f){u=f.bpm;var h=this.getBeatLength(),c=f.duration&&f.duration.length>0?f.duration[0]:h;u=u*c/h}if(!u){u=180;var v=this.getMeterFraction();v&&v.num!==3&&v.num%3===0&&(u=120)}return u},this.setTiming=function(f,u){if(u=u||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var h=this.metaText?this.metaText.tempo:null,c=this.getBpm(h),v=1;f?h&&(v=f/c):f=c;var b=this.getBeatLength(),g=f/60,w=this.getBarLength(),k=w/b*u/g;k&&(k-=this.getPickupLength()/b/g);var $=b*g;return this.noteTimings=this.setupEvents(k,$,f,v),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*g):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(f){f||(f={});var u=n(this,f);return i(u,f,this.formatting.percmap,this.formatting.midi)},this.deline=function(f){return t(this.lines,f)},this.findSelectableElement=function(f){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(f):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}};return ya=a,ya}var _a,Wl;function $7(){if(Wl)return _a;Wl=1;var e=$u(),r=function(y){var C=this,E={},z="";y.reset(),this.setVisualTranspose=function(A){A!==void 0&&(y.visualTranspose=A)},this.cleanUp=function(A,R,T){u(y),delete y.runningFonts,i(y),y.metaText.tempo&&y.metaText.tempo.bpm&&!y.metaText.tempo.duration&&(y.metaText.tempo.duration=[y.getBeatLength()]);var I=!1,N,D,L;for(N=0;N<y.lines.length;N++)if(y.lines[N].staff!==void 0){var _=!1;for(D=0;D<y.lines[N].staff.length;D++)if(y.lines[N].staff[D]===void 0)I=!0,y.lines[N].staff[D]=null;else for(L=0;L<y.lines[N].staff[D].voices.length;L++)y.lines[N].staff[D].voices[L]===void 0?y.lines[N].staff[D].voices[L]=[]:h(y.lines[N].staff[D].voices[L])&&(_=!0);_||(y.lines[N]=null,I=!0)}if(I&&(y.lines=y.lines.filter(function(Z){return!!Z}),y.lines.forEach(function(Z){Z.staff&&(Z.staff=Z.staff.filter(function(V){return!!V}))})),A)for(;l(y.lines,A););if(R){for(I=!1,N=0;N<y.lines.length;N++)if(y.lines[N].staff!==void 0)for(D=0;D<y.lines[N].staff.length;D++){var x=!1;for(L=0;L<y.lines[N].staff[D].voices.length;L++)c(y.lines[N].staff[D].voices[L])&&(x=!0);x||(I=!0,y.lines[N].staff[D]=null)}I&&y.lines.forEach(function(Z){Z.staff&&(Z.staff=Z.staff.filter(function(V){return!!V}))})}for(o(y.lines),N=0;N<y.lines.length;N++)if(y.lines[N].staff)for(D=0;D<y.lines[N].staff.length;D++)delete y.lines[N].staff[D].workingClef;for(;t(y););for(var N=0;N<y.lines.length;N++){var S=y.lines[N].staff;if(S)for(y.staffNum=0;y.staffNum<S.length;y.staffNum++)for(S[y.staffNum].clef&&e.fixClef(S[y.staffNum].clef),y.voiceNum=0;y.voiceNum<S[y.staffNum].voices.length;y.voiceNum++){var M=S[y.staffNum].voices[y.voiceNum];s(M,y.staffNum,y.voiceNum,T);for(var U=0;U<M.length;U++)M[U].el_type==="clef"&&e.fixClef(M[U]);if(M.length>0&&M[M.length-1].barNumber){var q=p(y.lines,N);q&&(q.staff[0].barNumber=M[M.length-1].barNumber),delete M[M.length-1].barNumber}}}return delete y.staffNum,delete y.voiceNum,delete y.lineNum,delete y.potentialStartBeam,delete y.potentialEndBeam,delete y.vskipPending,T},this.addTieToLastNote=function(A){var R=m(y);return R&&R.pitches&&R.pitches.length>0?(R.pitches[0].startTie={},A&&(R.pitches[0].startTie.style="dotted"),!0):!1},this.appendElement=function(A,R,T,I){if(I.el_type=A,R!==null&&(I.startChar=R),T!==null&&(I.endChar=T),A==="note"){var N=f(I);N>=.25||I.force_end_beam_last&&y.potentialStartBeam!==void 0?w(y):I.end_beam&&y.potentialStartBeam!==void 0?I.rest===void 0?g(I,y):w(y):I.rest===void 0&&(y.potentialStartBeam===void 0?I.end_beam||(y.potentialStartBeam=I,delete y.potentialEndBeam):y.potentialEndBeam=I)}else w(y);return delete I.end_beam,delete I.force_end_beam_last,I.rest&&I.rest.type==="invisible"&&delete I.decoration,y.lines.length<=y.lineNum||y.lines[y.lineNum].staff.length<=y.staffNum?!1:(b(C,y,I,E,z),!0)},this.appendStartingElement=function(A,R,T,I){u(y);var N;A==="key"&&(N=I.impliedNaturals,delete I.impliedNaturals,delete I.explicitAccidentals);var D=Object.assign({},I);if(y.lines[y.lineNum]){var L=y.lines[y.lineNum].staff;if(L){L.length<=y.staffNum&&(L[y.staffNum]={},L[y.staffNum].clef=Object.assign({},L[0].clef),L[y.staffNum].key=Object.assign({},L[0].key),L[0].meter&&(L[y.staffNum].meter=Object.assign({},L[0].meter)),L[y.staffNum].workingClef=Object.assign({},L[0].workingClef),L[y.staffNum].voices=[[]]),A==="clef"&&(L[y.staffNum].workingClef=D);for(var _=L[y.staffNum].voices[y.voiceNum],x=0;x<_.length;x++){if(_[x].el_type==="note"||_[x].el_type==="bar"){D.el_type=A,D.startChar=R,D.endChar=T,N&&(D.accidentals=N.concat(D.accidentals)),_.push(D);return}if(_[x].el_type===A){D.el_type=A,D.startChar=R,D.endChar=T,N&&(D.accidentals=N.concat(D.accidentals)),_[x]=D;return}}L[y.staffNum][A]=I}}},this.addSubtitle=function(A,R){v(y,{subtitle:{text:A,startChar:R.startChar,endChar:R.endChar}})},this.addSpacing=function(A){y.vskipPending=A},this.addNewPage=function(A){v(y,{newpage:A})},this.addSeparator=function(A,R,T,I){v(y,{separator:{spaceAbove:Math.round(A),spaceBelow:Math.round(R),lineLength:Math.round(T),startChar:I.startChar,endChar:I.endChar}})},this.addText=function(A,R){v(y,{text:{text:A,startChar:R.startChar,endChar:R.endChar}})},this.addCentered=function(A){v(y,{text:[{text:A,center:!0}]})},this.changeVoiceScale=function(A){C.appendElement("scale",null,null,{size:A})},this.changeVoiceColor=function(A){C.appendElement("color",null,null,{color:A})},this.startNewLine=function(A){u(y),A.currentVoiceName&&(z=A.currentVoiceName,E[A.currentVoiceName]=A),y.lines[y.lineNum]===void 0?P(C,y,A):y.lines[y.lineNum].staff===void 0?(y.lineNum++,this.startNewLine(A)):y.lines[y.lineNum].staff[y.staffNum]===void 0?O(C,y,A):y.lines[y.lineNum].staff[y.staffNum].voices[y.voiceNum]===void 0?$(C,y,A):h(y.lines[y.lineNum].staff[y.staffNum].voices[y.voiceNum])?(y.lineNum++,this.startNewLine(A)):A.part&&C.appendElement("part",A.part.startChar,A.part.endChar,{title:A.part.title})},this.setRunningFont=function(A,R){y.runningFonts[A]=R},this.setBarNumberImmediate=function(A){var R=this.getCurrentVoice();if(R&&R.length>0){var T=R[R.length-1];if(T.el_type==="bar")T.barNumber!==void 0&&(T.barNumber=A);else return A-1}return A},this.hasBeginMusic=function(){for(var A=0;A<y.lines.length;A++)if(y.lines[A].staff)return!0;return!1},this.isFirstLine=function(A){for(var R=A-1;R>=0;R--)if(y.lines[R].staff!==void 0)return!1;return!0},this.getCurrentVoice=function(){var A=d(y.lines,y.lineNum);if(!A)return null;var R=A.staff[y.staffNum];return R&&R.voices[y.voiceNum]!==void 0?R.voices[y.voiceNum]:null},this.setCurrentVoice=function(A,R,T){y.staffNum=A,y.voiceNum=R,z=T;for(var I=0;I<y.lines.length;I++)if(y.lines[I].staff&&(y.lines[I].staff[A]===void 0||y.lines[I].staff[A].voices[R]===void 0||!h(y.lines[I].staff[A].voices[R])))return y.lineNum=I,!!(!y.lines[I].staff[A]||y.lines[I].staff[A].voices[R]);return y.lineNum=I,!1},this.addMetaText=function(A,R,T){y.metaText[A]===void 0?(y.metaText[A]=R,y.metaTextInfo[A]=T):(typeof y.metaText[A]=="string"&&typeof R=="string"?y.metaText[A]+=`
|
|
113
|
+
`+R:(y.metaText[A]==="string"&&(y.metaText[A]=[{text:y.metaText[A]}]),typeof R=="string"&&(R=[{text:R}]),y.metaText[A]=y.metaText[A].concat(R)),y.metaTextInfo[A].endChar=T.endChar)},this.addMetaTextArray=function(A,R,T){y.metaText[A]===void 0?(y.metaText[A]=[R],y.metaTextInfo[A]=T):(y.metaText[A].push(R),y.metaTextInfo[A].endChar=T.endChar)},this.addMetaTextObj=function(A,R,T){y.metaText[A]=R,y.metaTextInfo[A]=T}};function n(y){if(!y||typeof y=="string")return!1;for(var C=0;C<y.length;C++)if(typeof y[C]!="string")return!1;return!0}function i(y){n(y.metaText.notes)&&(y.metaText.notes=y.metaText.notes.join(`
|
|
114
|
+
`)),n(y.metaText.history)&&(y.metaText.history=y.metaText.history.join(`
|
|
115
|
+
`))}function t(y){for(var C=!1,E=[],z=0;z<y.lines.length;z++){var A=y.lines[z];if(A.staff)for(var R=0;R<A.staff.length;R++){for(var T=A.staff[R],I=[],N=0;N<T.voices.length;N++){var D=T.voices[N];I.push({hasOverlay:!1,voice:[],snip:[]}),E[z]=0;for(var L=0,_=!1,x=-1,S=0;S<D.length;S++){var M=D[S];if(M.el_type==="overlay"&&!_){C=!0,_=!0,x=S,I[N].hasOverlay=!0;for(var U=0;U<z;U++)E[U]&&y.lines[U].staff&&T.voices.length>=y.lines[U].staff[0].voices.length&&y.lines[U].staff[0].voices.push([{el_type:"note",duration:E[U],rest:{type:"invisible"},startChar:M.startChar,endChar:M.endChar}])}else M.el_type==="bar"?(_?(_=!1,I[N].snip.push({start:x,len:S-x}),I[N].voice.push(M)):(L>0&&I[N].voice.push({el_type:"note",duration:L,rest:{type:"invisible"},startChar:M.startChar,endChar:M.endChar}),I[N].voice.push(M)),L=0):M.el_type==="note"?_?I[N].voice.push(M):(!M.rest||M.rest.type!=="spacer")&&(L+=M.duration,E[z]+=M.duration):(M.el_type==="scale"||M.el_type==="stem"||M.el_type==="overlay"||M.el_type==="style"||M.el_type==="transpose"||M.el_type==="color")&&I[N].voice.push(M)}I[N].hasOverlay&&I[N].snip.length===0&&I[N].snip.push({start:x,len:D.length-x})}for(N=0;N<I.length;N++){var q=I[N];if(q.hasOverlay){q.voice.splice(0,0,{el_type:"stem",direction:"down"}),T.voices.push(q.voice);for(var Z=q.snip.length-1;Z>=0;Z--){var V=q.snip[Z];T.voices[N].splice(V.start,V.len),T.voices[N].splice(V.start+1,0,{el_type:"stem",direction:"auto"});var ne=a(T.voices[N],V.start);T.voices[N].splice(ne,0,{el_type:"stem",direction:"up"})}for(Z=0;Z<T.voices[T.voices.length-1].length;Z++){T.voices[T.voices.length-1][Z]=Object.assign({},T.voices[T.voices.length-1][Z]);var Y=T.voices[T.voices.length-1][Z];Y.el_type==="bar"&&Y.startEnding&&delete Y.startEnding,Y.el_type==="bar"&&Y.endEnding&&delete Y.endEnding}}}}}return C}function a(y,C){for(var E=C-1;E>0&&y[E].el_type!=="bar";E--);return E}function o(y){for(var C=!0,E=0;E<y.length;E++){var z=y[E];if(z.staff){for(var A=0;A<z.staff.length;A++){var R=z.staff[A];if(R.title){for(var T=!1,I=0;I<R.title.length;I++)R.title[I]?(R.title[I]=C?R.title[I].name:R.title[I].subname,R.title[I]?T=!0:R.title[I]=""):R.title[I]="";T||delete R.title}}C=!1}}}function s(y,C,E,z){z[C]||(z[C]=[]),z[C][E]||(z[C][E]=[]);for(var A,R=function(Z,V,ne){if(z[C][E][ne]===void 0){for(A=0;A<z[C][E].length;A++)if(z[C][E][A]!==void 0){ne=A;break}if(z[C][E][ne]===void 0){var Y=ne*100+1;Z.endSlur.forEach(function(pe){Y===pe&&--Y}),z[C][E][ne]=[Y]}}for(var ce,fe=0;fe<V;fe++)ce=z[C][E][ne].pop(),Z.endSlur.push(ce);return z[C][E][ne].length===0&&delete z[C][E][ne],ce},T=function(Z,V,ne,Y){Z.startSlur=[],z[C][E][ne]===void 0&&(z[C][E][ne]=[]);for(var ce=ne*100+1,fe=0;fe<V;fe++)Y&&(Y.forEach(function(pe){ce===pe&&++ce}),Y.forEach(function(pe){ce===pe&&++ce}),Y.forEach(function(pe){ce===pe&&++ce})),z[C][E][ne].forEach(function(pe){ce===pe&&++ce}),z[C][E][ne].forEach(function(pe){ce===pe&&++ce}),z[C][E][ne].push(ce),Z.startSlur.push({label:ce}),Z.dottedSlur&&(Z.startSlur[Z.startSlur.length-1].style="dotted",delete Z.dottedSlur),ce++},I=0;I<y.length;I++){var N=y[I];if(N.el_type==="note"){if(N.gracenotes)for(var D=0;D<N.gracenotes.length;D++){if(N.gracenotes[D].endSlur){var L=N.gracenotes[D].endSlur;N.gracenotes[D].endSlur=[];for(var _=0;_<L;_++)R(N.gracenotes[D],1,20)}N.gracenotes[D].startSlur&&(A=N.gracenotes[D].startSlur,T(N.gracenotes[D],A,20))}if(N.endSlur&&(A=N.endSlur,N.endSlur=[],R(N,A,0)),N.startSlur&&(A=N.startSlur,T(N,A,0)),N.pitches){for(var x=[],S=0;S<N.pitches.length;S++)if(N.pitches[S].endSlur){var M=N.pitches[S].endSlur;N.pitches[S].endSlur=[];for(var U=0;U<M;U++){var q=R(N.pitches[S],1,S+1);x.push(q)}}for(S=0;S<N.pitches.length;S++)N.pitches[S].startSlur&&(A=N.pitches[S].startSlur,T(N.pitches[S],A,S+1,x));N.gracenotes&&N.pitches[0].endSlur&&N.pitches[0].endSlur[0]===100&&N.pitches[0].startSlur&&(N.gracenotes[0].endSlur?N.gracenotes[0].endSlur.push(N.pitches[0].startSlur[0].label):N.gracenotes[0].endSlur=[N.pitches[0].startSlur[0].label],N.pitches[0].endSlur.length===1?delete N.pitches[0].endSlur:N.pitches[0].endSlur[0]===100?N.pitches[0].endSlur.shift():N.pitches[0].endSlur[N.pitches[0].endSlur.length-1]===100&&N.pitches[0].endSlur.pop(),z[C][E][1].length===1?delete z[C][E][1]:z[C][E][1].pop())}}}}function l(y,C){for(var E=0;E<y.length;E++)if(y[E].staff!==void 0)for(var z=0;z<y[E].staff.length;z++)for(var A=[],R=0;R<y[E].staff[z].voices.length;R++)for(var T=y[E].staff[z].voices[R],I=0,N=0;N<T.length;N++)if(T[N].el_type==="bar"){if(I++,I>=C&&N<T.length-1){var D=p(y,E);if(!D){var L=JSON.parse(JSON.stringify(y[E]));y.push(Object.assign({},L)),D=y[y.length-1];for(var _=0;_<D.staff.length;_++)for(var x=0;x<D.staff[_].voices.length;x++)D.staff[_].voices[x]=[]}var S=N+1,M=y[E].staff[z].voices[R].slice(S);return y[E].staff[z].voices[R]=y[E].staff[z].voices[R].slice(0,S),D.staff[z].voices[R]=A.concat(M.concat(D.staff[z].voices[R])),!0}}else T[N].duration||A.push(T[N]);return!1}function d(y,C){if(y.length<=C)return null;for(;C>=0;){if(y[C].staff)return y[C];C--}return null}function p(y,C){for(C++;y.length>C;){if(y[C].staff)return y[C];C++}return null}function m(y){if(!y.lines[y.lineNum]||!y.lines[y.lineNum].staff||!y.lines[y.lineNum].staff[y.staffNum])return null;var C=y.lines[y.lineNum].staff[y.staffNum].voices[y.voiceNum];if(!C)return null;for(var E=C.length-1;E>=0;E--){var z=C[E];if(z.el_type==="note")return z}return null}function f(y){return y.duration?y.duration:0}function u(y){y.potentialStartBeam&&y.potentialEndBeam&&(y.potentialStartBeam.startBeam=!0,y.potentialEndBeam.endBeam=!0),delete y.potentialStartBeam,delete y.potentialEndBeam}function h(y){for(var C=0;C<y.length;C++)if(y[C].el_type==="note"||y[C].el_type==="bar")return!0;return!1}function c(y){for(var C=0;C<y.length;C++)if(y[C].el_type==="note"&&(y[C].rest===void 0||y[C].chord!==void 0))return!0;return!1}function v(y,C){y.vskipPending&&(C.vskip=y.vskipPending,delete y.vskipPending),y.lines.push(C)}function b(y,C,E,z,A){var R=C.lines[C.lineNum].staff[C.staffNum];if(E.pitches!==void 0){var T=R.workingClef.verticalPos;E.pitches.forEach(function(N){N.verticalPos=N.pitch-T})}if(E.gracenotes!==void 0){var I=R.workingClef.verticalPos;E.gracenotes.forEach(function(N){N.verticalPos=N.pitch-I})}R.voices.length<=C.voiceNum&&(z[A]||(z[A]={}),$(y,C,z[A])),R.voices[C.voiceNum].push(E)}function g(y,C){C.potentialStartBeam.startBeam=!0,y.endBeam=!0,delete C.potentialStartBeam,delete C.potentialEndBeam}function w(y){y.potentialStartBeam!==void 0&&y.potentialEndBeam!==void 0&&(y.potentialStartBeam.startBeam=!0,y.potentialEndBeam.endBeam=!0),delete y.potentialStartBeam,delete y.potentialEndBeam}function k(y,C,E){if(y.runningFonts[C]){for(var z=!1,A=Object.keys(E),R=0;R<A.length;R++)y.runningFonts[C][A[R]]!==E[A[R]]&&(z=!0);z&&(y.lines[y.lineNum].staff[y.staffNum][C]=E)}y.runningFonts[C]=E}function $(y,C,E){var z=C.lines[C.lineNum].staff[C.staffNum];if(z.voices[C.voiceNum]=[],z.title||(z.title=[]),z.title[C.voiceNum]={name:E.name,subname:E.subname},E.style&&y.appendElement("style",null,null,{head:E.style}),E.stem)y.appendElement("stem",null,null,{direction:E.stem});else if(C.voiceNum>0){if(z.voices[0]!==void 0){for(var A=!1,R=0;R<z.voices[0].length;R++)z.voices[0].el_type==="stem"&&(A=!0);if(!A){var T={el_type:"stem",direction:"up"};z.voices[0].splice(0,0,T)}}y.appendElement("stem",null,null,{direction:"down"})}E.scale&&y.appendElement("scale",null,null,{size:E.scale}),E.color&&y.appendElement("color",null,null,{color:E.color})}function O(y,C,E){E.key&&E.key.impliedNaturals&&(E.key.accidentals=E.key.accidentals.concat(E.key.impliedNaturals),delete E.key.impliedNaturals),C.lines[C.lineNum].staff[C.staffNum]={voices:[],clef:E.clef,key:E.key,workingClef:E.clef};var z=C.lines[C.lineNum].staff[C.staffNum];E.stafflines!==void 0&&(z.clef.stafflines=E.stafflines,z.workingClef.stafflines=E.stafflines),E.staffscale&&(z.staffscale=E.staffscale),E.annotationfont&&k(C,"annotationfont",E.annotationfont),E.gchordfont&&k(C,"gchordfont",E.gchordfont),E.tripletfont&&k(C,"tripletfont",E.tripletfont),E.vocalfont&&k(C,"vocalfont",E.vocalfont),E.bracket&&(z.bracket=E.bracket),E.brace&&(z.brace=E.brace),E.connectBarLines&&(z.connectBarLines=E.connectBarLines),E.barNumber&&(z.barNumber=E.barNumber),$(y,C,E),E.part&&y.appendElement("part",E.part.startChar,E.part.endChar,{title:E.part.title}),E.meter!==void 0&&(z.meter=E.meter),C.vskipPending&&(C.lines[C.lineNum].vskip=C.vskipPending,delete C.vskipPending)}function P(y,C,E){C.lines[C.lineNum]={staff:[]},O(y,C,E)}return _a=r,_a}var wa,Yl;function cb(){if(Yl)return wa;Yl=1;var e=Et(),r=ku(),n=p7(),i=v7(),t=g7(),a=ib(),o=b7(),s=sb(),l=$7(),d=function(){var p=new s,m=new l(p),f,u="",h="";this.getTune=function(){var T={formatting:p.formatting,lines:p.lines,media:p.media,metaText:p.metaText,metaTextInfo:p.metaTextInfo,version:p.version,addElementToEvents:p.addElementToEvents,addUsefulCallbackInfo:p.addUsefulCallbackInfo,getTotalTime:p.getTotalTime,getTotalBeats:p.getTotalBeats,getBarLength:p.getBarLength,getBeatLength:p.getBeatLength,getBeatsPerMeasure:p.getBeatsPerMeasure,getBpm:p.getBpm,getMeter:p.getMeter,getMeterFraction:p.getMeterFraction,getPickupLength:p.getPickupLength,getKeySignature:p.getKeySignature,getElementFromChar:p.getElementFromChar,makeVoicesArray:p.makeVoicesArray,millisecondsPerMeasure:p.millisecondsPerMeasure,setupEvents:p.setupEvents,setTiming:p.setTiming,setUpAudio:p.setUpAudio,deline:p.deline,findSelectableElement:p.findSelectableElement,getSelectableArray:p.getSelectableArray};return p.lineBreaks&&(T.lineBreaks=p.lineBreaks),p.visualTranspose&&(T.visualTranspose=p.visualTranspose),p.chordGrid&&(T.chordGrid=p.chordGrid),T};function c(T,I,N){T.positioning||(T.positioning={}),T.positioning[I]=N}function v(T,I,N){T.fonts||(T.fonts={}),T.fonts[I]=N}var b={reset:function(){for(var T in this)this.hasOwnProperty(T)&&typeof this[T]!="function"&&delete this[T];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(T,I){return this[T].decoration!==I[T].decoration||this[T].face!==I[T].face||this[T].size!==I[T].size||this[T].style!==I[T].style||this[T].weight!==I[T].weight},addFormattingOptions:function(T,I,N){N==="note"?(this.vocalPosition!=="auto"&&c(T,"vocalPosition",this.vocalPosition),this.dynamicPosition!=="auto"&&c(T,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&c(T,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&c(T,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&c(T,"volumePosition",this.volumePosition),this.differentFont("annotationfont",I)&&v(T,"annotationfont",this.annotationfont),this.differentFont("gchordfont",I)&&v(T,"gchordfont",this.gchordfont),this.differentFont("vocalfont",I)&&v(T,"vocalfont",this.vocalfont),this.differentFont("tripletfont",I)&&v(T,"tripletfont",this.tripletfont)):N==="bar"&&(this.dynamicPosition!=="auto"&&c(T,"dynamicPosition",this.dynamicPosition),this.chordPosition!=="auto"&&c(T,"chordPosition",this.chordPosition),this.ornamentPosition!=="auto"&&c(T,"ornamentPosition",this.ornamentPosition),this.volumePosition!=="auto"&&c(T,"volumePosition",this.volumePosition),this.differentFont("measurefont",I)&&v(T,"measurefont",this.measurefont),this.differentFont("repeatfont",I)&&v(T,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var T=0;T<this.inTie.length;T++)if(this.endingHoldOver.inTie.push([]),this.inTie[T])for(var I=0;I<this.inTie[T].length;I++)this.endingHoldOver.inTie[T].push(this.inTie[T][I]);for(var N in this.inTieChord)this.inTieChord.hasOwnProperty(N)&&(this.endingHoldOver.inTieChord[N]=this.inTieChord[N])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var T=0;T<this.endingHoldOver.inTie.length;T++){this.inTie.push([]);for(var I=0;I<this.endingHoldOver.inTie[T].length;I++)this.inTie[T].push(this.endingHoldOver.inTie[T][I])}for(var N in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(N)&&(this.inTieChord[N]=this.endingHoldOver.inTieChord[N])}}},g=function(T){b.warnings||(b.warnings=[]),b.warnings.push(T)},w=function(T){b.warningObjects||(b.warningObjects=[]),b.warningObjects.push(T)},k=function(T){var I=T.replace(/\x12/g," ");return I=I.replace(/&/g,"&"),I=I.replace(/</g,"<"),I.replace(/>/g,">")},$=function(T,I,N){I||(I=" ");var D=I[N];(D===" "||!D)&&(D="SPACE");var L=k(I.substring(N-64,N))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+D+"</span>"+k(I.substring(N+1).substring(0,64));g("Music Line:"+f.lineIndex+":"+(N+1)+": "+T+": "+L),w({message:T,line:I,startChar:b.iChar+N,column:N})},O,P;this.getWarnings=function(){return b.warnings},this.getWarningObjects=function(){return b.warningObjects};var y=function(T,I){if(I.indexOf("")>=0){u+=I;return}if(I=u+I,u="",!T){$("Can't add words before the first line of music",T,0);return}I=e.strip(I),I[I.length-1]!=="-"&&(I=I+" ");for(var N=[],D=0,L=!1,_=function(M){var U=e.strip(I.substring(D,M));if(U=U.replace(/\\([-_*|~])/g,"$1"),D=M+1,U.length>0){L&&(U=U.replace(/~/g," "));var q=I[M];return q!=="_"&&q!=="-"&&(q=" "),N.push({syllable:f.translateString(U),divider:q}),L=!1,!0}return!1},x=!1,S=0;S<I.length;S++){switch(I[S]){case" ":case"":_(S);break;case"-":!x&&!_(S)&&N.length>0&&(e.last(N).divider="-",N.push({skip:!0,to:"next"}));break;case"_":x||(_(S),N.push({skip:!0,to:"slur"}));break;case"*":x||(_(S),N.push({skip:!0,to:"next"}));break;case"|":x||(_(S),N.push({skip:!0,to:"bar"}));break;case"~":x||(L=!0);break}x=I[S]==="\\"}T.forEach(function(M){if(N.length!==0){if(N[0].skip){switch(N[0].to){case"next":M.el_type==="note"&&M.pitches!==null&&N.shift();break;case"slur":M.el_type==="note"&&M.pitches!==null&&N.shift();break;case"bar":M.el_type==="bar"&&N.shift();break}M.el_type!=="bar"&&(M.lyric===void 0?M.lyric=[{syllable:"",divider:" "}]:M.lyric.push({syllable:"",divider:" "}))}else if(M.el_type==="note"&&M.rest===void 0){var U=N.shift();U.syllable&&(U.syllable=U.syllable.replace(/ +/g," ")),M.lyric===void 0?M.lyric=[U]:M.lyric.push(U)}}})},C=function(T,I){if(I.indexOf("")>=0){h+=I;return}if(I=h+I,h="",!T){$("Can't add symbols before the first line of music",T,0);return}I=e.strip(I),I[I.length-1]!=="-"&&(I=I+" ");for(var N=[],D=0,L=!1,_=function(S){var M=e.strip(I.substring(D,S));if(D=S+1,M.length>0){L&&(M=M.replace(/~/g," "));var U=I[S];return U!=="_"&&U!=="-"&&(U=" "),N.push({syllable:f.translateString(M),divider:U}),L=!1,!0}return!1},x=0;x<I.length;x++)switch(I[x]){case" ":case"":_(x);break;case"-":!_(x)&&N.length>0&&(e.last(N).divider="-",N.push({skip:!0,to:"next"}));break;case"_":_(x),N.push({skip:!0,to:"slur"});break;case"*":_(x),N.push({skip:!0,to:"next"});break;case"|":_(x),N.push({skip:!0,to:"bar"});break;case"~":L=!0;break}T.forEach(function(S){if(N.length!==0){if(N[0].skip)switch(N[0].to){case"next":S.el_type==="note"&&S.pitches!==null&&N.shift();break;case"slur":S.el_type==="note"&&S.pitches!==null&&N.shift();break;case"bar":S.el_type==="bar"&&N.shift();break}else if(S.el_type==="note"&&S.rest===void 0){var M=N.shift();S.lyric===void 0?S.lyric=[M]:S.lyric.push(M)}}})},E=function(T){if(e.startsWith(T,"%%")){var I=r.addDirective(T.substring(2));I&&$(I,T,2);return}var N=T.indexOf("%");if(N>=0&&(T=T.substring(0,N)),T=T.replace(/\s+$/,""),T.length!==0){if(u){y(m.getCurrentVoice(),T.substring(2));return}if(h){C(m.getCurrentVoice(),T.substring(2));return}if(T.length<2||T[1]!==":"||P.lineContinuation){P.parseMusic(T);return}var D=O.parseHeader(T);D.regular&&P.parseMusic(T),D.newline&&P.startNewLine(),D.words&&y(m.getCurrentVoice(),T.substring(2)),D.symbols&&C(m.getCurrentVoice(),T.substring(2))}};function z(T,I){T.push({el_type:"hint"});for(var N=0;N<I.length;N++){var D=I[N],L=Object.assign({},D);if(T.push(L),D.el_type==="bar")return}}function A(T,I){for(var N=0;N<T.length;N++){var D=T[N],L=I[N];if(L)for(var _=0;_<L.voices.length;_++){var x=L.voices[_],S=D.voices[_];S&&z(S,x)}}}function R(){for(var T=0;T<p.lines.length;T++){var I=p.lines[T].staff;if(I){for(var N=T+1;N<p.lines.length&&p.lines[N].staff===void 0;)N++;if(N<p.lines.length){var D=p.lines[N].staff;A(I,D)}}}}this.parse=function(T,I,N){I||(I={}),N||(N=0),p.reset(),T=T.replace(/\r\n?/g,`
|
|
116
|
+
`)+`
|
|
117
|
+
`;var D=T.split(`
|
|
118
|
+
\\`);if(D.length>1){for(var L=1;L<D.length;L++)for(;D[L].length>0&&D[L][0]!==`
|
|
119
|
+
`;)D[L]=D[L].substr(1),D[L-1]+=" ";T=D.join(" ")}T=T.replace(/\\([ \t]*)(%.*)*\n/g,function(Z,V,ne){var Y=ne?Array(ne.length+1).join(" "):"";return V+""+Y+`
|
|
120
|
+
`});var _=T.split(`
|
|
121
|
+
`);e.last(_).length===0&&_.pop(),f=new t(_,b),O=new n(f,$,b,p,m),P=new i(f,$,b,p,m,O),I.print&&(p.media="print"),b.reset(),b.iChar=N,I.visualTranspose?(b.globalTranspose=parseInt(I.visualTranspose),b.globalTranspose===0?b.globalTranspose=void 0:m.setVisualTranspose(I.visualTranspose)):b.globalTranspose=void 0,I.lineBreaks&&(b.lineBreaks=I.lineBreaks),O.reset(f,$,b,p);try{I.format&&r.globalFormatting(I.format);for(var x=f.nextLine();x;){if(I.header_only&&b.is_in_header===!1||I.stop_on_warning&&b.warnings)throw"normal_abort";var S=b.is_in_header;E(x),S&&!b.is_in_header&&(m.setRunningFont("annotationfont",b.annotationfont),m.setRunningFont("gchordfont",b.gchordfont),m.setRunningFont("tripletfont",b.tripletfont),m.setRunningFont("vocalfont",b.vocalfont)),x=f.nextLine()}u&&y(m.getCurrentVoice(),""),h&&C(m.getCurrentVoice(),""),b.openSlurs=m.cleanUp(b.barsperstaff,b.staffnonote,b.openSlurs)}catch(Z){if(Z!=="normal_abort")throw Z}var M=792,U=8.5*72;switch(b.papersize){case"legal":M=1008,U=8.5*72;break;case"A4":M=11.7*72,U=8.3*72;break}if(b.landscape){var q=M;M=U,U=q}if(p.formatting.pagewidth||(p.formatting.pagewidth=U),p.formatting.pageheight||(p.formatting.pageheight=M),I.hint_measures&&R(),a.wrapLines(p,b.lineBreaks,b.barNumbers),I.chordGrid)try{p.chordGrid=o(p)}catch(Z){switch(Z.message){case"notCommonTime":$("Chord grid only works for 2/2 and 4/4 time.",0,0);break;case"noChords":$("No chords are found in the tune.",0,0);break;default:$(Z.message,0,0)}}}};return wa=d,wa}var ka,Vl;function x7(){if(Vl)return ka;Vl=1;var e=Et(),r=function(n){var i="",t=n.match(/(\s*)/);n=e.strip(n);for(var a=n.split(`
|
|
122
|
+
X:`),o=1;o<a.length;o++)a[o]="X:"+a[o];var s=t?t[0].length:0,l=[];if(a.forEach(function(f){l.push({abc:f,startPos:s}),s+=f.length+1}),l.length>1&&!e.startsWith(l[0].abc,"X:")){var d=l.shift(),p=d.abc.split(`
|
|
123
|
+
`);p.forEach(function(f){e.startsWith(f,"%%")&&(i+=f+`
|
|
124
|
+
`)})}var m=i;return l.forEach(function(f){var u=f.abc.indexOf(`
|
|
125
|
+
|
|
126
|
+
`);u>0&&(f.abc=f.abc.substring(0,u)),f.pure=f.abc,f.abc=i+f.abc,f.title="";var h=f.pure.split("T:");h.length>1&&(h=h[1].split(`
|
|
127
|
+
`),f.title=e.strip(h[0]));var c=f.pure.substring(2,f.pure.indexOf(`
|
|
128
|
+
`));f.id=e.strip(c)}),{header:m,tunes:l}};return ka=r,ka}var $a,Xl;function S7(){if(Xl)return $a;Xl=1;function e(r,n){this.numLines=r,this.lineSpace=n,this.verticalSize=this.numLines*this.lineSpace;var i=3;this.bar={pitch:i,pitch2:n*r,height:5}}return e.prototype.bypass=function(r){var n=r.staffGroup.voices;return!!(n.length>0&&n[0].isPercussion)},e.prototype.setRelative=function(r,n,i){switch(r.type){case"bar":n.pitch=this.bar.pitch,n.pitch2=this.bar.pitch2,n.height=this.height;break;case"symbol":var t=this.bar.pitch2/2;if(r.name=="dots.dot")return i?(n.pitch=t,!1):(n.pitch=t+this.lineSpace,!0);break}return i},$a=e,$a}var xa,Kl;function ub(){if(Kl)return xa;Kl=1;var e=function(n,i){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=n,this.voicetotal=i,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return e.prototype.addChild=function(r){if(r.type==="bar"){for(var n=!0,i=0;n&&i<this.children.length;i++)this.children[i].type.indexOf("staff-extra")<0&&this.children[i].type!=="tempo"&&(n=!1);n||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=r,this.setRange(r)},e.prototype.setLimit=function(r,n){var i=n.specialY;i||(i=n),i[r]&&(this.specialY[r]?this.specialY[r]=Math.max(this.specialY[r],i[r]):this.specialY[r]=i[r])},e.prototype.adjustRange=function(r){r.bottom!==void 0&&(this.bottom=Math.min(this.bottom,r.bottom)),r.top!==void 0&&(this.top=Math.max(this.top,r.top))},e.prototype.setRange=function(r){this.adjustRange(r),this.setLimit("tempoHeightAbove",r),this.setLimit("partHeightAbove",r),this.setLimit("volumeHeightAbove",r),this.setLimit("dynamicHeightAbove",r),this.setLimit("endingHeightAbove",r),this.setLimit("chordHeightAbove",r),this.setLimit("lyricHeightAbove",r),this.setLimit("lyricHeightBelow",r),this.setLimit("chordHeightBelow",r),this.setLimit("volumeHeightBelow",r),this.setLimit("dynamicHeightBelow",r)},e.prototype.addOther=function(r){this.otherchildren.push(r),this.setRange(r)},e.prototype.addBeam=function(r){this.beams.push(r)},e.prototype.setWidth=function(r){this.w=r},xa=e,xa}var Sa,Ql;function xu(){if(Ql)return Sa;Ql=1;var e=function(r,n,i,t){if(r)for(var a=0;a<r.length;a++){var o=r[a],s=o.getAttribute("highlight");s||(s="fill"),o.setAttribute(s,t);var l=o.getAttribute("class");l||(l=""),l=l.replace(i,""),l=l.replace(n,""),n.length>0&&(l.length>0&&l[l.length-1]!==" "&&(l+=" "),l+=n),o.setAttribute("class",l)}};return Sa=e,Sa}var Ia,ef;function lb(){if(ef)return Ia;ef=1;var e=xu(),r=function(n,i){n===void 0&&(n="abcjs-note_selected"),i===void 0&&(i="#ff0000"),e(this.elemset,n,"",i)};return Ia=r,Ia}var Ta,tf;function fb(){if(tf)return Ta;tf=1;var e=xu(),r=function(n,i){n===void 0&&(n="abcjs-note_selected"),i===void 0&&(i="#000000"),e(this.elemset,"",n,i)};return Ta=r,Ta}var Ca,rf;function Nr(){if(rf)return Ca;rf=1;var e=lb(),r=fb(),n=function(t,a,o,s,l,d){d||(d={}),this.tuneNumber=l,this.abcelem=t,this.duration=a,this.durationClass=d.durationClassOveride?d.durationClassOveride:this.duration,this.minspacing=o||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=s,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};return n.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},n.prototype.addExtra=function(i){this.fixed.w=Math.max(this.fixed.w,i.dx+i.w),this.fixed.t===void 0?this.fixed.t=i.top:this.fixed.t=Math.max(this.fixed.t,i.top),this.fixed.b===void 0?this.fixed.b=i.bottom:this.fixed.b=Math.min(this.fixed.b,i.bottom),i.dx<this.extraw&&(this.extraw=i.dx),this.extra[this.extra.length]=i,this._addChild(i)},n.prototype.addHead=function(i){i.dx<this.extraw&&(this.extraw=i.dx),this.heads[this.heads.length]=i,this.addRight(i)},n.prototype.addRight=function(i){this.fixed.w=Math.max(this.fixed.w,i.dx+i.w),i.top!==void 0&&(this.fixed.t===void 0?this.fixed.t=i.top:this.fixed.t=Math.max(this.fixed.t,i.top)),i.bottom!==void 0&&(this.fixed.b===void 0?this.fixed.b=i.bottom:this.fixed.b=Math.min(this.fixed.b,i.bottom)),i.dx+i.w>this.w&&(this.w=i.dx+i.w),this.right[this.right.length]=i,this._addChild(i)},n.prototype.addFixed=function(i){this._addChild(i)},n.prototype.addFixedX=function(i){this._addChild(i)},n.prototype.addCentered=function(i){var t=i.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=i,i.dx+t>this.w&&(this.w=i.dx+t),this.right[this.right.length]=i,this._addChild(i)},n.prototype.setLimit=function(i,t){t[i]&&(this.specialY[i]?this.specialY[i]=Math.max(this.specialY[i],t[i]):this.specialY[i]=t[i])},n.prototype._addChild=function(i){var t=!0;this.abcelem.el_type=="clef"&&i.type=="barNumber"&&(t=!1),i.parent=this,this.children[this.children.length]=i,t&&this.pushTop(i.top),this.pushBottom(i.bottom),this.setLimit("tempoHeightAbove",i),this.setLimit("partHeightAbove",i),this.setLimit("volumeHeightAbove",i),this.setLimit("dynamicHeightAbove",i),this.setLimit("endingHeightAbove",i),this.setLimit("chordHeightAbove",i),this.setLimit("lyricHeightAbove",i),this.setLimit("lyricHeightBelow",i),this.setLimit("chordHeightBelow",i),this.setLimit("volumeHeightBelow",i),this.setLimit("dynamicHeightBelow",i)},n.prototype.pushTop=function(i){i!==void 0&&(this.top===void 0?this.top=i:this.top=Math.max(i,this.top))},n.prototype.pushBottom=function(i){i!==void 0&&(this.bottom===void 0?this.bottom=i:this.bottom=Math.min(i,this.bottom))},n.prototype.setX=function(i){this.x=i;for(var t=0;t<this.children.length;t++)this.children[t].setX(i)},n.prototype.center=function(i,t){var a=(t.x-i.x)/2+i.x;this.x=a-this.w/2;for(var o=0;o<this.children.length;o++)this.children[o].setX(this.x)},n.prototype.setHint=function(){this.hint=!0},n.prototype.highlight=function(i,t){e.bind(this)(i,t)},n.prototype.unhighlight=function(i,t){r.bind(this)(i,t)},Ca=n,Ca}var za,nf;function Nt(){if(nf)return za;nf=1;var e=function(n,i,t,a,o){switch(o=o||{},this.x=0,this.c=n,this.dx=i,this.w=t,this.pitch=a,this.scalex=o.scalex||1,this.scaley=o.scaley||1,this.type=o.type||"symbol",this.pitch2=o.pitch2,this.linewidth=o.linewidth,this.klass=o.klass,this.anchor=o.anchor?o.anchor:"middle",this.top=a,this.pitch2!==void 0&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=a,this.pitch2!==void 0&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),o.thickness&&(this.top+=o.thickness/2,this.bottom-=o.thickness/2),o.stemHeight&&(o.stemHeight>0?this.top+=o.stemHeight:this.bottom+=o.stemHeight),o.dim&&(this.dim=o.dim),o.position&&(this.position=o.position),this.height=o.height?o.height:4,o.top&&(this.top=o.top),o.bottom&&(this.bottom=o.bottom),o.name?this.name=o.name:this.c?this.name=this.c:this.name=this.type,o.realWidth?this.realWidth=o.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":o.position&&o.position==="below"?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":o.position&&o.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":this.pitch===void 0?o.position&&o.position==="below"?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height;break}};return e.prototype.getChordDim=function(){if(this.type==="debug"||!this.chordHeightAbove&&!this.chordHeightBelow)return null;var r=0,n=this.type==="chord"?this.realWidth/2:0,i=this.x-n-r,t=i+this.realWidth+r;return{left:i,right:t}},e.prototype.invertLane=function(r){this.lane===void 0&&(this.lane=0),this.lane=r-this.lane-1},e.prototype.putChordInLane=function(r){this.lane=r,this.chordHeightAbove?this.chordHeightAbove=this.height*1.25*this.lane:this.chordHeightBelow=this.height*1.25*this.lane},e.prototype.getLane=function(){return this.lane===void 0?0:this.lane},e.prototype.setX=function(r){this.x=r+this.dx},za=e,za}var Ea,af;function I7(){if(af)return Ea;af=1;var e=Nr(),r=Nt();function n(c){return c!=null&&c.constructor===Object}function i(c,v){for(var b in v)v.hasOwnProperty(b)&&(Array.isArray(v[b])||n(v[b])||(c[b]=v[b]))}function t(c){var v=new e("",0,0,"",0);return i(v,c),v.top=0,v.bottom=-1,c.abcelem&&(v.abcelem={},i(v.abcelem,c.abcelem),v.abcelem.el_type==="note"&&(v.abcelem.el_type="tabNumber")),c.cloned=v,v}function a(c,v){var b=t(c);if(v)for(var g=c.children,w=!0,k=0;k<g.length;k++){var $=g[k],O=new r("",0,0,0,"");i(O,$),w=v.tablature.setRelative($,O,w),b.children.push(O)}return b}function o(c,v,b){var g="tab.tiny",w=7.5;c.isTabBig&&(g="tab.big",w=10);var k={el_type:"tab",icon:g,Ypos:w};if(w+=c.tabSymbolOffset,!c.hideTabSymbol){var $=new e(k,0,0,"symbol",0);$.x=v;var O=new r(g,0,0,7.5,"tab");O.x=b,$.children.push(O),$.abcelem.el_type=="tab"&&(O.pitch=w)}return $}function s(c){if(c.extra)for(var v=0;v<c.extra.length;v++){var b=c.extra[v];if(b.type=="lyric")return{bottom:b.bottom,height:b.height}}return null}function l(){this.accidentals=null}function d(c){for(var v=0,b=0;b<c.length;b++)c[b].tabNameInfos||v++;return v}function p(c,v,b,g,w){var k=g.num;g.note.quarter!=null&&(k=k.toString(),k+=g.note.quarter);var $=c.semantics.stringToPitch(g.str);b.notes.push({num:k,str:g.str,pitch:g.note.emit()});var O={type:"tabNumber"},P=new r(k,0,0,$+.3,O);return P.x=v,P.isGrace=w,P.isAltered=g.note.isAltered,P}function m(c,v){var b=0;if(c.extra){for(var g=0;g<c.extra.length;g++)if(c.extra[g].c.indexOf("noteheads")>=0){if(b===v)return c.extra[g].x+c.extra[g].w/2;b++}}return-1}function f(c){if(c.abcelem){var v=c.abcelem;if(v.rest)return v.gracenotes}return null}function u(c,v,b){var g=c.semantics.notesToNumber(v,b);if(g.error)return c.setError(g.error),g;if(g.graces&&g.notes){var w=g.notes.length-1;g.notes[w].graces=g.graces}return g}function h(c,v,b,g,w){for(var k=0;k<g.length;k++){var $={el_type:"note",startChar:b.abcelem.startChar,endChar:b.abcelem.endChar,notes:[],grace:!0},O=m(b,k),P=g[k],y=p(c,O,$,P,!0);v.children.push(y),w.push($)}}return l.prototype.build=function(c,v,b,g,w,k,$){d(v);var O=v[w+g],P=v[$],y=null,C=null;O.children[0].abcelem.el_type!="clef"&&k!="none"&&O.children.splice(0,0,k);for(var E=0;E<O.children.length;E++){var z=O.children[E],A=z.x,R=A;switch(z.isClef&&(P.children.push(o(c,A,R)),z.abcelem.type.indexOf("-8")>=0&&(c.semantics.clefTranspose=-12),z.abcelem.type.indexOf("+8")>=0&&(c.semantics.clefTranspose=12)),z.type){case"staff-extra key-signature":this.accidentals=z.abcelem.accidentals,c.semantics.accidentals=this.accidentals;break;case"bar":c.semantics.measureAccidentals={};var T=!1;E===O.children.length-1&&(T=!0);var I=a(z,c);if(I.abcelem.barNumber){delete I.abcelem.barNumber;for(var N=0;N<I.children.length;N++)if(I.children[N].type==="barNumber"){I.children.splice(N,1);break}}I.abcelem.lastBar=T,P.children.push(I),b.push({el_type:z.abcelem.el_type,type:z.abcelem.type,endChar:z.abcelem.endChar,startChar:z.abcelem.startChar,abselem:I});break;case"rest":var D=f(z);if(D){if(y=u(c,null,D),y.error)return;Z={el_type:"note",startChar:z.abcelem.startChar,endChar:z.abcelem.endChar,notes:[],grace:!0},h(c,L,z,y.graces,b)}break;case"note":var L=t(z);L.x=z.heads[0].x+z.heads[0].w/2,L.lyricDim=s(z);var _=z.abcelem.pitches,x=z.abcelem.gracenotes;if(L.type="tabNumber",y=u(c,_,x),y.error)return;if(y.graces){var S=y.notes.length-1;y.notes[S].graces=y.graces}C={el_type:"note",startChar:z.abcelem.startChar,endChar:z.abcelem.endChar,notes:[]};for(var M=0;M<y.notes.length;M++){var U=y.notes[M];if(U.graces)for(var q=0;q<U.graces.length;q++){var Z={el_type:"note",startChar:z.abcelem.startChar,endChar:z.abcelem.endChar,notes:[],grace:!0},V=m(z,q),ne=U.graces[q],Y=p(c,V,Z,ne,!0);L.children.push(Y),b.push(Z)}var ce=p(c,L.x+z.heads[M].dx,C,U,!1);L.children.push(ce)}C.notes.length>0&&(C.abselem=L,b.push(C),P.children.push(L));break}}},Ea=l,Ea}var Na,of;function T7(){if(of)return Na;of=1;var e=ub(),r=I7(),n=pt();function i(){return{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}}function t(c){for(var v=0,b=0;b<c.children.length;b++){var g=c.children[b];g.specialY&&g.specialY.lyricHeightBelow>v&&(v=g.specialY.lyricHeightBelow)}return v}function a(c,v,b){var g=c.semantics,w=v.controller.getTextSize,k=g.tabInfos(c),$=g.suppress(c),O=!0;if($&&(O=!1),O){var P=w.calc(k,"tablabelfont","text instrumentname");return b.tabNameInfos={textSize:{height:P.height,width:P.width},name:k},P.height}return 0}function o(c,v){return v[c].isTabStaff?c===v.length-1?!0:!v[c+1].isTabStaff:!1}function s(c){for(var v=0,b=0;b<c.length;b++)c[b].isTabStaff||v++;return v}function l(c,v){for(var b=v;b>=0;b--)if(!c[b].isTabStaff)return b;return-1}function d(c){for(var v=0;v<c.length;v++)if(c[v].isTabStaff){var b=l(c,v);c[v].hasStaff=c[b],c[b].hasTab||(c[b].hasTab=[]),c[b].hasTab.push(c[v])}}function p(c,v){return s(c)===1&&v.voices.length>1}function m(c,v){for(var b=0,g=0,w=!0,k=0;w;){if(!v[b])return-1;if(v[b].isTabStaff||(k=v[b].voices.length),v[b].isTabStaff){if(g++,o(b,v)&&g<k)return b+1}else if(g=0,b>=c&&(b+1==v.length||!v[b+1].isTabStaff))return b+1;if(b++,b>v.length)return-1}}function f(c,v){for(var b=v;b>=0;b--)if(!c[b].isTabStaff)return c[b];return null}function u(c,v){var b=c[v],g=b.children[0].abcelem;return g.el_type==="clef"?null:v==0?"none":c[v-1].children[0]}function h(c,v,b,g){var w=new r,k={clef:{type:"TAB"}},$=c.linePitch*c.nbLines,O=b.staff;if(O){var P=O[0];if(P&&P.clef&&P.clef.stafflines==0){c.setError("No tablatures when stafflines=0");return}O.splice(O.length,0,k)}var y=b.staffGroup,C=y.voices,E=C[0],z=t(E),A=3,R=g,T=y.staffs[R],I=$+A-T.bottom-z;T.isTabStaff&&(I=T.top);var N={bottom:-1,isTabStaff:!0,specialY:i(),lines:c.nbLines,linePitch:c.linePitch,dy:.15,top:I},D=m(g,y.staffs);if(D!==-1){N.parentIndex=D-1,y.staffs.splice(D,0,N),y.height+=$+A;var L=f(y.staffs,D),_=1;p(y.staffs,L)&&(_=L.voices.length),k.voices=[];for(var x=0;x<_;x++){var S=new e(0,0);x>0&&(S.duplicate=!0);var M=a(c,v,S)/n.STEP;M=Math.max(M,1),y.staffs[g].top+=1,y.height+=M,S.staff=N;var U=C.length;C.splice(C.length,0,S);var q=u(C,x+g);k.voices[x]=[],w.build(c,C,k.voices[x],x,g,q,U)}d(y.staffs)}}return Na=h,Na}var Aa,sf;function db(){if(sf)return Aa;sf=1;var e={__:-2,_:-1,"_/":-.5,"=":0,"":0,"^/":.5,"^":1,"^^":2},r=["C","-","D","-","E","F","-","G","-","A","-","B","c","-","d","-","e","f","-","g","-","a","-","b"];function n(t){var a=t.match(/([_^\/]*)([ABCDEFGabcdefg])(,*)('*)/);if(a&&a.length===5){var o=e[a[1]],s=r.indexOf(a[2]),l=a[4].length-a[3].length;return 48+s+o+l*12}return 0}function i(t){t=parseInt(t,10);var a=Math.floor(t/12),o=t%12,s=r[o];if(s==="-"&&(s="^"+r[o-1]),a>4)for(s=s.toLowerCase(),a-=5;a>0;)s+="'",a--;else for(;a<4;)s+=",",a++;return s}return Aa={noteToMidi:n,midiToNote:i},Aa}var Pa,cf;function hb(){if(cf)return Pa;cf=1;var{noteToMidi:e,midiToNote:r}=db();function n(t,a){var o=e(t);a&&(o+=a);var s=r(o),l=!1,d=!1,p=!1,m=null,f=null,u=!1,h=0;t.startsWith("_")?(l=!0,h=-1,t[1]=="/"?(l=!1,f="v",h=0):t[1]=="_"&&(u=!0,h-=1)):t.startsWith("^")?(d=!0,h=1,t[1]=="/"?(d=!1,f="^",h=0):t[1]=="^"&&(u=!0,h+=1)):t.startsWith("=")&&(m=!0,h=0),p=l||d||f!=null,(p||m)&&(f!=null||u?s=t.slice(2):s=t.slice(1));var c=(s.match(/,/g)||[]).length,v=(s.match(/'/g)||[]).length;this.pitch=o,this.pitchAltered=0,this.name=s,this.acc=h,this.isSharp=d,this.isKeySharp=!1,this.isDouble=u,this.isAltered=p,this.isFlat=l,this.isKeyFlat=!1,this.natural=m,this.quarter=f,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=c,this.isQuoted=v}function i(t){var a=t.name,o=new n(a);return o.pitch=t.pitch,o.hasComma=t.hasComma,o.isLower=t.isLower,o.isQuoted=t.isQuoted,o.isSharp=t.isSharp,o.isKeySharp=t.isKeySharp,o.isFlat=t.isFlat,o.isKeyFlat=t.isKeyFlat,o}return n.prototype.sameNoteAs=function(t){return t.pitch===this.pitch},n.prototype.isLowerThan=function(t){return t.pitch>this.pitch},n.prototype.checkKeyAccidentals=function(t,a){if(!(this.isAltered||this.natural)){if(a[this.name.toUpperCase()])switch(a[this.name.toUpperCase()]){case"__":this.acc=-2,this.pitchAltered=-2;return;case"_":this.acc=-1,this.pitchAltered=-1;return;case"=":this.acc=0,this.pitchAltered=0;return;case"^":this.acc=1,this.pitchAltered=1;return;case"^^":this.acc=2,this.pitchAltered=2;return}else if(t)for(var o=this.name,s=0;s<t.length;s++){var l=t[s];o==l.note.toUpperCase()&&(l.acc=="flat"&&(this.acc=-1,this.isKeyFlat=!0,this.pitchAltered=-1),l.acc=="sharp"&&(this.acc=1,this.isKeySharp=!0,this.pitchAltered=1))}}},n.prototype.getAccidentalEquiv=function(){var t=i(this);return t.isSharp||t.isKeySharp?(t=t.nextNote(),t.isFlat=!0,t.isSharp=!1,t.isKeySharp=!1):(t.isFlat||t.isKeyFlat)&&(t=t.prevNote(),t.isSharp=!0,t.isFlat=!1,t.isKeyFlat=!1),t},n.prototype.nextNote=function(){var t=r(this.pitch+1+this.pitchAltered);return new n(t)},n.prototype.prevNote=function(){var t=r(this.pitch-1+this.pitchAltered);return new n(t)},n.prototype.emitNoAccidentals=function(){var t=this.name;this.isLower&&(t=t.toLowerCase());for(var a=0;a<this.isQuoted;a++)t+="'";for(var o=0;o<this.hasComma;o++)t+=",";return t},n.prototype.emit=function(){var t=this.name;(this.isSharp||this.isKeySharp)&&(t="^"+t,this.isDouble&&(t="^"+t)),(this.isFlat||this.isKeyFlat)&&(t="_"+t,this.isDouble&&(t="_"+t)),this.quarter&&(this.quarter=="^"?t="^/"+t:t="_/"+t),this.natural&&(t="="+t);for(var a=1;a<=this.hasComma;a++)t+=",";if(this.isLower){t=t.toLowerCase();for(var o=1;o<=this.isQuoted;o++)t+="'"}return t},Pa=n,Pa}var Oa,uf;function C7(){if(uf)return Oa;uf=1;var e=hb(),r=["A","B","C","D","E","F","G"];function n(i,t){var a=new e(i),o=new e(t);if(o.isLowerThan(a)){var s=a.emit(),l=o.emit();return{error:"Invalid string Instrument tuning : "+l+" string lower than "+s+" string"}}var d=[],p=r.indexOf(a.name),m=r.indexOf(o.name);if(p==-1||m==-1)return d;for(var f=!1;!f;)d.push(a.emit()),a=a.nextNote(),a.sameNoteAs(o)&&(f=!0);return d}return Oa=n,Oa}var Ma,lf;function z7(){if(lf)return Ma;lf=1;const{noteToMidi:e}=db();var r=hb(),n=C7();function i(f){var u=null,h=f.tuning;if(f.capo>0){u=[];for(var c=0;c<h.length;c++){for(var v=new r(h[c]),b=0;b<f.capo;b++)v=v.nextNote();u[c]=v.emit()}}return u}function t(f){var u=[],h=f.tuning;f.capo>0&&(h=f.capoTuning);for(var c=h.length-1,v=0;v<h.length;v++){var b=f.highestNote;v!=h.length-1&&(b=h[v+1]);var g=n(h[v],b);if(g.error)return g;u[c--]=g}return u}function a(f){var u=[];u[0]=[];for(var h=f.strings,c=1;c<h.length;c++)u[c]=h[c-1];return u}function o(f,u){for(var h=0;h<u.length-1;h++){var c=u[h],v=u[h+1];if(c.str==v.str){if(c.str==f.strings.length-1){c.num="?",v.num="?";return}v.num<c.num?(v.str++,v=l(f,v.note,v.str,f.secondPos,f.strings[v.str].length)):(c.str++,c=l(f,c.note,c.str,f.secondPos,f.strings[c.str].length)),u[h]=c,u[h+1]=v}}return null}function s(f,u){for(var h=[],c=0;c<u.length;c++)if(!u[c].endTie){var v=new r(u[c].name,f.clefTranspose);v.checkKeyAccidentals(f.accidentals,f.measureAccidentals);var b=d(f,v);h.push(b)}return o(f,h),h}function l(f,u,h,c,v){var b=f.strings;u.checkKeyAccidentals(f.accidentals,f.measureAccidentals),c&&(b=c);var g=u.emitNoAccidentals(),w=b[h].indexOf(g),k=u.acc;if(w!=-1){if(c&&(w+=v),(u.isFlat||u.acc==-1)&&w==0){var $=u.getAccidentalEquiv();h++,w=b[h].indexOf($.emit()),k=0}return{num:w+k,str:h,note:u}}return null}function d(f,u){if(u.isAltered||u.natural){var h;u.isFlat?u.isDouble?h="__":h="_":u.isSharp?u.isDouble?h="^^":h="^":u.natural&&(h="="),f.measureAccidentals[u.name.toUpperCase()]=h}for(var c=f.stringPitches.length-1;c>=0;c--)if(u.pitch+u.pitchAltered>=f.stringPitches[c]){var v=u.pitch+u.pitchAltered-f.stringPitches[c];return u.quarter==="^"?v-=.5:u.quarter==="v"&&(v+=.5),{num:Math.round(v),str:f.stringPitches.length-1-c,note:u}}return{num:"?",str:f.stringPitches.length-1,note:u}}m.prototype.stringToPitch=function(f){var u=5.3,h=this.strings.length-1;return u+(h-f)*this.linePitch};function p(f,u){var h={num:"?",str:0,note:u};f.push(h),f.error=u.emit()+": unexpected note for instrument"}m.prototype.notesToNumber=function(f,u){var h,c,v=null,b=null;if(f&&(b=[],f.length>1?(b=s(this,f),b.error&&(v=b.error)):f[0].endTie||(h=new r(f[0].name,this.clefTranspose),h.checkKeyAccidentals(this.accidentals,this.measureAccidentals),c=d(this,h),c?b.push(c):(p(b,h),v=b.error))),v)return b;var g=null;if(u){g=[];for(var w=0;w<u.length;w++)h=new r(u[w].name,this.clefTranspose),h.checkKeyAccidentals(this.accidentals,this.measureAccidentals),c=d(this,h),c?g.push(c):(p(g,h),v=b.error)}return{notes:b,graces:g,error:v}},m.prototype.toString=function(){for(var f=[],u=0;u<this.tuning.length;u++){var h=this.tuning[u].replaceAll(",","").replaceAll("'","").toUpperCase();h[0]==="_"?h=h[1]+"b ":h[0]==="^"&&(h=h[1]+"# "),f.push(h)}return f.join("")},m.prototype.tabInfos=function(f){var u=f.params.label;if(u){var h=u.indexOf("%T"),c="";return h!=-1&&(c=this.toString(),f.capo>0&&(c+=" capo:"+f.capo),u=u.replace("%T",c)),u}return""},m.prototype.suppress=function(f){var u=f.params.suppress;return!!u};function m(f){var u=f.tuning,h=f.capo,c=f.params.highestNote;this.linePitch=f.linePitch,this.highestNote="a'",c&&(this.highestNote=c),this.measureAccidentals={},this.capo=0,h&&(this.capo=parseInt(h,10)),this.transpose=f.transpose?f.transpose:0,this.tuning=u,this.stringPitches=[];for(var v=0;v<this.tuning.length;v++){var b=e(this.tuning[v])+this.capo;this.stringPitches.push(b)}if(this.capo>0&&(this.capoTuning=i(this)),this.strings=t(this),this.strings.error){f.setError(this.strings.error),f.inError=!0;return}this.secondPos=a(this)}return Ma=m,Ma}var Da,ff;function E7(){if(ff)return Da;ff=1;var e=S7(),r=T7(),n=z7();i.prototype.init=function(a,o,s,l){this.tune=a,this.params=s,this.tuneNumber=o,this.inError=!1,this.abcTune=a,this.linePitch=3,this.nbLines=l.defaultTuning.length,this.isTabBig=l.isTabBig,this.tabSymbolOffset=l.tabSymbolOffset,this.capo=s.capo,this.transpose=s.visualTranspose,this.hideTabSymbol=s.hideTabSymbol,this.tablature=new e(this.nbLines,this.linePitch);var d=s.tuning;d||(d=l.defaultTuning),this.tuning=d,this.semantics=new n(this)},i.prototype.setError=function(a){a&&(this.error=a,this.inError=!0,this.tune.warnings?this.tune.warnings.push(a):this.tune.warnings=[a])},i.prototype.render=function(a,o,s){this.inError||this.tablature.bypass(o)||r(this,a,o,s)};function i(){}var t=function(){return{name:"StringTab",tablature:i}};return Da=t,Da}var Ra,df;function pb(){if(df)return Ra;df=1;var e=E7(),r={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},n={inited:!1,plugins:{},register:function(i){var t=i.name,a=i.tablature;this.plugins[t]=a},setError:function(i,t){i.warnings?i.warning.push(t):i.warnings=[t]},preparePlugins:function(i,t,a){this.inited||(this.register(new e),this.inited=!0);var o=null;if(a.tablature){var s=a.tablature;o=[];for(var l=0;l<s.length;l++){var d=s[l],p=d.instrument;if(p==null)return this.setError(i,"tablature 'instrument' is missing"),o;var m=r[p],f=null;if(m&&(f=this.plugins[m.name]),f){a.visualTranspose!=0&&(d.visualTranspose=a.visualTranspose),d.abcSrc=a.tablature.abcSrc;var u={classz:f,tuneNumber:t,params:d,instance:null,tabType:m};o.push(u)}else if(p==="")o.push(null);else return this.setError(i,"Undefined tablature plugin: "+p),o}}return o},layoutTablatures:function(t,a){var o=a.tablatures,s=0;if(o&&o.length>0)for(var l=o.length,d=0;d<l;++d)o[d]&&o[d].params.firstStaffOnly&&(o[d].params.suppress=!1);for(var p=0;p<a.lines.length;p++){var m=a.lines[p];if(m.staff&&s++,s>1&&o&&o.length>0)for(var l=o.length,d=0;d<l;++d)o[d].params.firstStaffOnly&&(o[d].params.suppress=!0);var f=m.staff;if(f){for(var u=f.length,h=0;h<f.length;h++)if(o[h]&&h<u){var c=o[h];c.instance==null&&(c.instance=new c.classz,c.instance.init(a,c.tuneNumber,c.params,c.tabType)),c.instance.render(t,m,h)}}}}};return Ra=n,Ra}var La,hf;function Hi(){if(hf)return La;hf=1;var e=cb(),r=x7(),n=pb(),i={};return(function(){i.numberOfTunes=function(a){var o=a.split(`
|
|
129
|
+
X:`),s=o.length;return s===0&&(s=1),s};var t=i.TuneBook=function(a){var o=r(a);this.header=o.header,this.tunes=o.tunes};t.prototype.getTuneById=function(a){for(var o=0;o<this.tunes.length;o++)if(this.tunes[o].id===""+a)return this.tunes[o];return null},t.prototype.getTuneByTitle=function(a){for(var o=0;o<this.tunes.length;o++)if(this.tunes[o].title===a)return this.tunes[o];return null},i.parseOnly=function(a,o){for(var s=i.numberOfTunes(a),l=[],d=0;d<s;d++)l.push(1);function p(){}return i.renderEngine(p,l,a,o)},i.renderEngine=function(a,o,s,l){var d=[],p=function(w){return w&&!w.propertyIsEnumerable("length")&&typeof w=="object"&&typeof w.length=="number"};if(!(o===void 0||s===void 0)){p(o)||(o=[o]),l===void 0&&(l={});for(var m=l.startingTune?parseInt(l.startingTune,10):0,f=new t(s),u=new e,h=0;h<o.length;h++){var c=o[h];if(c==="*"||typeof c=="string"&&(c=document.getElementById(c)),c)if(m>=0&&m<f.tunes.length){u.parse(f.tunes[m].abc,l,f.tunes[m].startPos-f.header.length);var v=u.getTune();l.tablature&&(v.tablatures=n.preparePlugins(v,m,l));var b=u.getWarnings();b&&(v.warnings=b);var g=a(c,v,h,f.tunes[m].abc);d.push(g||v)}else c.innerHTML&&(c.innerHTML="");m++}return d}},i.extractMeasures=function(a){for(var o=[],s=new t(a),l=0;l<s.tunes.length;l++){for(var d=s.tunes[l],p=d.abc.split("K:"),m=p[1].split(`
|
|
130
|
+
`),f=p[0]+"K:"+m[0]+`
|
|
131
|
+
`,u=null,h=null,c=null,v=[],b=!1,g=i.parseOnly(d.abc)[0],w=g.getPickupLength()>0,k=0;k<g.lines.length;k++){var $=g.lines[k];if($.staff)for(var O=0;O<1;O++)for(var P=$.staff[O],y=0;y<1;y++)for(var C=P.voices[y],E=0;E<C.length;E++){var z=C[E];if(c===null&&z.startChar>=0&&(c=z.startChar,z.chord===void 0?h=u:h=null),z.chord&&(u=z),z.el_type==="bar"){if(b){var A=d.abc.substring(c,z.endChar),R={abc:A};u=h&&h.chord&&h.chord.length>0?h.chord[0].name:null,u&&(R.lastChord=u),z.startEnding&&(R.startEnding=z.startEnding),z.endEnding&&(R.endEnding=z.endEnding),v.push(R),c=null,b=!1}}else z.el_type==="note"&&(b=!0)}}o.push({header:f,measures:v,hasPickup:w})}return o}})(),La=i,La}var Ua,pf;function N7(){if(pf)return Ua;pf=1;var e=rb(),{relativeMajor:r,transposeKey:n,relativeMode:i,isLegalMode:t}=tb(),a=eb(),o;return(function(){o=function(y,C,E){if(C==="TEST")return{keyAccidentals:e,relativeMajor:r,transposeKey:n,relativeMode:i,transposeChordName:a};E=parseInt(E,10);var z=[],A;for(A=0;A<C.length;A++)z=z.concat(s(y,C[A],E));z=z.sort(function(I,N){return N.start-I.start});var R=y.split("");for(A=0;A<z.length;A++){var T=z[A];R.splice(T.start,T.end-T.start,T.note)}return R.join("")};function s(y,C,E){var z=[],A=C.getKeySignature();if(A.root==="Hp"||A.root==="HP")return z;z=z.concat(l(y,E));for(var R=0;R<C.lines.length;R++){var T=C.lines[R].staff;if(T)for(var I=0;I<T.length;I++){var N=T[I];N.clef.type!=="perc"&&(z=z.concat(d(y,N.voices,N.key,E)))}}return z}function l(y,C){for(var E=[],z=y.split("K:"),A=z[0].length,R=1;R<z.length;R++){var T=z[R],I=T.match(/^( *)([A-G])([#b]?)( ?)(\w*)/);if(I){var N=A+2+I[1].length,D=t(I[5])?I[5]:"",L=I[2]+I[3]+I[4]+D,_=c({root:I[2],acc:I[3],mode:D},C),x=_.root+_.acc+I[4]+_.mode;E.push({start:N,end:N+L.length,note:x})}A+=T.length+2}return E}function d(y,C,E,z){for(var A=[],R=c(E,z),T=0;T<C.length;T++)A=A.concat(f(y,C[T],E.root,p(E),R,z));return A}function p(y){for(var C={},E=0;E<y.accidentals.length;E++){var z=y.accidentals[E];z.acc==="flat"?C[z.note.toUpperCase()]="_":z.acc==="sharp"&&(C[z.note.toUpperCase()]="^")}return C}function m(y,C,E){var z=u.indexOf(y.root)-u.indexOf(C);return C==="none"&&(z=u.indexOf(y.root)),z===0?E>2?z+=7:E===-12&&(z-=7):E>0&&z<0?z+=7:E<0&&z>0&&(z-=7),E>12?z+=7:E<-12&&(z-=7),z}function f(y,C,E,z,A,R){for(var T=[],I=m(A,E,R),N={},D={},L=0;L<C.length;L++){var _=C[L];if(_.chord)for(var x=0;x<_.chord.length;x++){var S=_.chord[x];if(S.position==="default"){var M=A.accidentals.length&&A.accidentals[0].acc==="flat",U=a(S.name,R,M,!0);U=U.replace(/♭/g,"b").replace(/♯/g,"#"),U!==S.name&&T.push(O(y,_.startChar,_.endChar,U))}}if(_.el_type==="note"&&_.pitches){for(var q=k(y,_.startChar,_.endChar),Z=0;Z<q.length;Z++){var V=w(q[Z].note,E,z,N);V.acc&&(N[V.name.toUpperCase()]=V.acc);var ne=v(V,A,I,D);ne.acc&&(D[ne.upper]=ne.acc),T.push({note:ne.acc+ne.name,start:q[Z].index,end:q[Z].index+q[Z].note.length})}if(_.gracenotes)for(var Y=0;Y<_.gracenotes.length;Y++){var ce=w(_.gracenotes[Y].name,E,z,N);ce.acc&&(N[ce.name.toUpperCase()]=ce.acc);var fe=v(ce,A,I,N);fe.acc&&(D[fe.upper]=fe.acc),T.push($(y,_.startChar,_.endChar,fe.acc+fe.name,Y))}}else _.el_type==="bar"?(N={},D={}):_.el_type==="keySignature"&&(E=_.root,z=p(_),A=c(_,R),I=m(A,E,R))}return T}var u="CDEFGAB",h=[",,,,",",,,",",,",",","","'","''","'''","''''"];function c(y,C){if(y.root==="none")return{root:n("C",C),mode:"",acc:"",accidentals:[]};var E=r(y.root+y.acc+y.mode),z=n(E,C),A=i(z,y.mode),R=e(z);return{root:A[0],mode:y.mode,acc:A.length>1?A[1]:"",accidentals:R}}function v(y,C,E,z){for(var A=y.pitch,R=u.indexOf(y.name),T=u.indexOf(C.root),I=(T+A)%7,N=R+E,D=y.oct;N>6;)D++,N-=7;for(;N<0;)D--,N+=7;for(var L=u[I],_="",x=y.adj,S="=",M=0;M<C.accidentals.length;M++)if(C.accidentals[M].note.toLowerCase()===L.toLowerCase()){x=x+(C.accidentals[M].acc==="flat"?-1:1),S=C.accidentals[M].acc==="flat"?"_":"^";break}var U;switch(x){case-2:_="__";break;case-1:_="_";break;case 0:_="=";break;case 1:_="^";break;case 2:_="^^";break;case-3:return U={},U.pitch=y.pitch-1,U.oct=y.oct,U.name=u[u.indexOf(y.name)-1],U.name||(U.name="B",U.oct--),U.name==="B"||U.name==="E"?U.adj=y.adj+1:U.adj=y.adj+2,v(U,C,E+1,z);case 3:return U={},U.pitch=y.pitch+1,U.oct=y.oct,U.name=u[u.indexOf(y.name)+1],U.name||(U.name="C",U.oct++),U.name==="C"||U.name==="F"?U.adj=y.adj-1:U.adj=y.adj-2,v(U,C,E+1,z)}switch((z[L]===_||!z[L]&&_===S)&&!y.courtesy&&(_=""),D){case 0:L=L+",,,";break;case 1:L=L+",,";break;case 2:L=L+",";break;case 4:L=L.toLowerCase();break;case 5:L=L.toLowerCase()+"'";break;case 6:L=L.toLowerCase()+"''";break;case 7:L=L.toLowerCase()+"'''";break;case 8:L=L.toLowerCase()+"''''";break}return D>4&&(L=L.toLowerCase()),{acc:_,name:L,upper:L.toUpperCase()}}var b=/([_^=]*)([A-Ga-g])([,']*)/,g=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/;function w(y,C,E,z){var A=C==="none"?0:u.indexOf(C),R=y.match(b),T=R[2].toUpperCase(),I=u.indexOf(T)-A;I<0&&(I+=7);var N=h.indexOf(R[3]);T===R[2]&&N--;var D=z[T]||E[T]||"=";return{acc:R[1],name:T,pitch:I,oct:N,adj:P(R[1],E[T],z[T]),courtesy:R[1]===D}}function k(y,C,E){for(var z=y.substring(C,E),A,R=[],T=/("[^"]+")+/g;(A=T.exec(z))!==null;)R.push({start:T.lastIndex-A[0].length,end:T.lastIndex});for(var I=/(![^!]+!)+/g;(A=I.exec(z))!==null;)R.push({start:I.lastIndex-A[0].length,end:I.lastIndex});for(var N=[],D=/([_^=]*)([A-Ga-g])([,']*)/g;(A=D.exec(z))!==null;){for(var L=!1,_=0;_<R.length;_++)D.lastIndex>=R[_].start&&D.lastIndex<=R[_].end&&(L=!0);L||N.push({note:A[0],index:C+D.lastIndex-A[0].length})}return N}function $(y,C,E,z,A){var R=y.substring(C,E),T=/\{/,I=/\}/,N=/([^\{]*)/,D=/(\/*)/,L=R.match(new RegExp(N.source+T.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+D.source+g.source+I.source));if(L){for(var _=1+L[1].length,x=0;x<A;x++)L[x*3+2]&&(_+=L[x*3+2].length),L[x*3+3]&&(_+=L[x*3+3].length),L[x*3+4]&&(_+=L[x*3+4].length),L[x*3+5]&&(_+=L[x*3+5].length);L[A*3+2]&&(_+=L[x*3+2].length),C+=_;var S=L[A*3+3]?L[A*3+3].length:0;S+=L[A*3+4]?L[A*3+4].length:0,S+=L[A*3+5]?L[A*3+5].length:0,E=C+S}return{start:C,end:E,note:z}}function O(y,C,E,z){var A=y.substring(C,E).match(/([^"]+)?(".+")+/);return A[1]&&(C+=A[1].length),E=C+A[2].length,{start:C+1,end:E-1,note:z}}function P(y,C,E){if(!y&&E&&(y=E),!y)return 0;switch(C){case void 0:switch(y){case"__":return-2;case"_":return-1;case"=":return 0;case"^":return 1;case"^^":return 2;default:return 0}case"_":switch(y){case"__":return-1;case"_":return 0;case"=":return 1;case"^":return 2;case"^^":return 3;default:return 0}case"^":switch(y){case"__":return-3;case"_":return-2;case"=":return-1;case"^":return 0;case"^^":return 1;default:return 0}}return 0}})(),Ua=o,Ua}var Za,mf;function A7(){if(mf)return Za;mf=1;var e=function(i,t,a,o){this.type="BeamElem",this.isflat=!!a,this.isgrace=!!(t&&t==="grace"),this.forceup=!!(this.isgrace||t&&t==="up"),this.forcedown=!!(t&&t==="down"),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=i,this.beams=[],o&&o.duration?(this.duration=o.duration,o.startTriplet&&(this.duration*=o.tripletMultiplier),this.duration=Math.round(this.duration*1e3)/1e3):this.duration=0};e.prototype.setHint=function(){this.hint=!0},e.prototype.runningDirection=function(n){var i=n.averagepitch;i!==void 0&&(this.total=Math.round(this.total+i),this.count||(this.count=0),this.count++)},e.prototype.add=function(n){var i=n.abcelem.averagepitch;i!==void 0&&(n.abcelem.rest||(this.allrests=!1),n.beam=this,this.elems.push(n),this.total=Math.round(this.total+i),(this.min===void 0||n.abcelem.minpitch<this.min)&&(this.min=n.abcelem.minpitch),(this.max===void 0||n.abcelem.maxpitch>this.max)&&(this.max=n.abcelem.maxpitch))},e.prototype.addBeam=function(n){this.beams.push(n)},e.prototype.setStemDirection=function(){if(this.average=r(this.total,this.count),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var n=6;this.stemsUp=this.average<n}delete this.count,this.total=0},e.prototype.calcDir=function(){if(this.average=r(this.total,this.elems.length),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{var n=6;this.stemsUp=this.average<n}for(var i=this.stemsUp?"up":"down",t=0;t<this.elems.length;t++)for(var a=0;a<this.elems[t].heads.length;a++)this.elems[t].heads[a].stemDir=i};function r(n,i){return i?n/i:0}return Za=e,Za}var ja,vf;function P7(){if(vf)return ja;vf=1;var e=function(n,i){this.startVoice=n,this.type=i};return e.prototype.setBottomStaff=function(r){this.endVoice=r,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},e.prototype.continuing=function(r){this.lastContinuedVoice=r},e.prototype.getWidth=function(){return 10},e.prototype.isStartVoice=function(r){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===r)},ja=e,ja}var Ba,gf;function Yt(){if(gf)return Ba;gf=1;var e=pt(),r={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"tab.big":{d:[["M",20.16,-21.66],["c",.24,-.09,.66,.09,.78,.36],["c",.09,.21,.09,.24,-.18,.54],["c",-.78,.81,-1.86,1.44,-2.94,1.71],["c",-.87,.24,-1.71,.24,-2.55,.03],["l",-.06,-.03],["l",-.18,.99],["c",-.33,1.98,-.75,4.26,-.96,5.04],["c",-.42,1.65,-1.26,3.18,-2.28,4.14],["c",-.57,.57,-1.17,.9,-1.86,1.08],["c",-.18,.06,-.33,.06,-.66,.06],["c",-.54,0,-.78,-.03,-1.23,-.27],["c",-.39,-.18,-.66,-.39,-1.38,-.99],["c",-.3,-.24,-.66,-.51,-.75,-.57],["c",-.21,-.15,-.27,-.24,-.24,-.45],["c",.06,-.27,.36,-.6,.6,-.66],["c",.18,-.03,.33,.06,.9,.57],["c",.48,.42,.72,.57,.93,.69],["c",.66,.33,1.38,.21,1.95,-.36],["c",.63,-.6,1.05,-1.62,1.23,-3],["c",.03,-.18,.09,-.66,.09,-1.11],["c",.09,-1.56,.33,-3.81,.57,-5.49],["c",.06,-.33,.09,-.63,.09,-.63],["c",-.03,-.03,-.81,-.12,-1.02,-.12],["c",-.57,0,-1.32,.12,-1.8,.33],["c",-.87,.3,-1.35,.78,-1.5,1.41],["c",-.18,.63,.09,1.26,.66,1.65],["c",.12,.06,.15,.12,.18,.24],["c",.09,.27,.06,.57,-.09,.75],["c",-.03,.06,-.12,.09,-.27,.15],["c",-.72,.21,-1.44,.15,-2.1,-.18],["c",-.54,-.27,-.96,-.66,-1.2,-1.14],["c",-.39,-.75,-.33,-1.74,.15,-2.52],["c",.27,-.42,.84,-.93,1.41,-1.23],["c",1.17,-.57,2.88,-.9,4.8,-.9],["c",.69,0,.78,0,1.08,.06],["c",.45,.09,1.11,.3,2.07,.6],["c",1.47,.48,1.83,.57,2.55,.54],["c",1.02,-.06,2.04,-.45,2.94,-1.11],["c",.12,-.09,.24,-.18,.27,-.18],["z"],["m",-5.88,13.05],["c",.21,-.03,.81,0,1.08,.06],["c",.48,.12,.9,.42,.99,.69],["c",.03,.09,.03,.15,0,.27],["c",0,.09,-.03,.57,-.06,1.08],["c",-.09,2.19,-.24,5.76,-.39,8.28],["c",-.06,1.53,-.06,1.77,.03,2.01],["c",.09,.18,.15,.24,.3,.3],["c",.24,.12,.54,.06,1.23,-.27],["c",.57,-.27,.66,-.3,.75,-.24],["c",.09,.06,.18,.3,.18,.45],["c",0,.33,-.15,.51,-.45,.63],["c",-.12,.03,-.39,.15,-.6,.27],["c",-1.17,.6,-1.38,.69,-1.8,.72],["c",-.45,.03,-.78,-.09,-1.08,-.39],["c",-.39,-.42,-.66,-1.2,-1.02,-3.12],["c",-.24,-1.23,-.36,-2.07,-.54,-3.75],["l",0,-.18],["l",-.36,.45],["c",-.6,.75,-1.32,1.59,-1.95,2.25],["c",-.15,.18,-.27,.3,-.27,.33],["c",0,0,.06,.09,.15,.18],["c",.24,.33,.6,.57,1.05,.69],["c",.18,.06,.3,.06,.69,.06],["l",.48,.03],["l",.06,.12],["c",.15,.27,.03,.72,-.21,.9],["c",-.18,.12,-.93,.27,-1.41,.27],["c",-.84,0,-1.59,-.3,-1.98,-.84],["l",-.12,-.15],["l",-.45,.42],["c",-.99,.87,-1.53,1.32,-2.16,1.74],["c",-.78,.51,-1.5,.84,-2.1,.93],["c",-.69,.12,-1.2,.03,-1.95,-.42],["c",-.21,-.12,-.51,-.27,-.66,-.36],["c",-.24,-.12,-.3,-.18,-.33,-.24],["c",-.12,-.27,.15,-.78,.45,-.93],["c",.24,-.12,.33,-.09,.9,.18],["c",.6,.3,.84,.39,1.2,.36],["c",.87,-.09,1.77,-.69,3.24,-2.31],["c",2.67,-2.85,4.59,-5.94,5.7,-9.15],["c",.15,-.45,.24,-.63,.42,-.81],["c",.21,-.24,.6,-.45,.99,-.51],["z"],["m",-3.99,16.05],["c",.18,0,.69,-.03,1.17,0],["c",3.27,.03,5.37,.75,6,2.07],["c",.45,.99,.12,2.4,-.81,3.42],["c",-.24,.27,-.57,.57,-.84,.75],["c",-.09,.06,-.18,.09,-.18,.12],["c",0,0,.18,.03,.42,.09],["c",1.23,.3,2.01,.81,2.37,1.59],["c",.27,.54,.3,1.32,.09,2.1],["c",-.12,.36,-.45,1.05,-.69,1.35],["c",-.87,1.17,-2.1,1.92,-3.54,2.25],["c",-.36,.06,-.48,.06,-.96,.06],["c",-.45,0,-.66,0,-.84,-.03],["c",-.84,-.18,-1.47,-.51,-2.07,-1.11],["c",-.33,-.33,-.45,-.51,-.45,-.63],["c",0,-.06,.03,-.15,.06,-.24],["c",.18,-.33,.69,-.6,.93,-.48],["c",.03,.03,.15,.12,.27,.24],["c",.39,.42,.99,.57,1.62,.45],["c",1.05,-.21,1.98,-1.02,2.31,-2.01],["c",.48,-1.53,-.48,-2.55,-2.58,-2.67],["c",-.21,0,-.36,-.03,-.42,-.06],["c",-.15,-.09,-.21,-.51,-.06,-.78],["c",.12,-.27,.24,-.33,.6,-.36],["c",.57,-.06,1.11,-.42,1.5,-.99],["c",.48,-.72,.54,-1.59,.18,-2.31],["c",-.12,-.21,-.45,-.54,-.69,-.69],["c",-.33,-.21,-.93,-.45,-1.35,-.51],["l",-.12,-.03],["l",-.06,.48],["c",-.54,2.94,-1.14,6.24,-1.29,6.75],["c",-.33,1.35,-.93,2.61,-1.65,3.6],["c",-.3,.36,-.81,.9,-1.14,1.14],["c",-.3,.24,-.84,.48,-1.14,.57],["c",-.33,.09,-.96,.09,-1.26,.03],["c",-.45,-.12,-.87,-.39,-1.53,-.96],["c",-.24,-.15,-.51,-.39,-.63,-.48],["c",-.3,-.21,-.33,-.33,-.21,-.63],["c",.12,-.18,.27,-.36,.42,-.45],["c",.27,-.12,.36,-.09,.87,.33],["c",.78,.6,1.08,.75,1.65,.72],["c",.45,-.03,.81,-.21,1.17,-.54],["c",.87,-.9,1.38,-2.85,1.38,-5.37],["c",0,-.6,.03,-1.11,.12,-2.04],["c",.06,-.69,.24,-2.01,.33,-2.58],["c",.06,-.24,.06,-.42,.06,-.42],["c",0,0,-.12,.03,-.21,.09],["c",-1.44,.57,-2.16,1.65,-1.74,2.55],["c",.09,.15,.18,.24,.27,.33],["c",.24,.21,.3,.27,.33,.39],["c",.06,.24,0,.63,-.15,.78],["c",-.09,.12,-.54,.21,-.96,.24],["c",-1.02,.03,-2.01,-.48,-2.43,-1.32],["c",-.21,-.45,-.27,-.9,-.15,-1.44],["c",.06,-.27,.21,-.66,.39,-.93],["c",.87,-1.29,3,-2.22,5.64,-2.43],["z"]],w:19.643,h:43.325},"tab.tiny":{d:[["M",16.02,-17.25],["c",.12,-.09,.15,-.09,.27,-.09],["c",.21,.03,.51,.3,.51,.45],["c",0,.06,-.12,.18,-.3,.36],["c",-1.11,1.08,-2.55,1.59,-3.84,1.41],["c",-.15,-.03,-.33,-.06,-.39,-.09],["c",-.06,-.03,-.09,-.03,-.12,-.03],["c",0,0,-.06,.42,-.15,.93],["c",-.33,2.01,-.66,3.69,-.84,4.26],["c",-.42,1.41,-1.23,2.67,-2.16,3.33],["c",-.27,.18,-.75,.42,-.99,.48],["c",-.3,.09,-.72,.09,-1.02,.06],["c",-.45,-.09,-.84,-.33,-1.53,-.9],["c",-.21,-.18,-.51,-.39,-.63,-.48],["c",-.27,-.21,-.3,-.24,-.3,-.36],["c",0,-.12,.09,-.36,.18,-.45],["c",.09,-.09,.27,-.18,.36,-.18],["c",.12,0,.3,.12,.66,.45],["c",.57,.51,.87,.69,1.23,.72],["c",.93,.06,1.68,-.78,1.98,-2.37],["c",.09,-.39,.15,-.75,.18,-1.53],["c",.06,-.99,.24,-2.79,.42,-4.05],["c",.03,-.3,.06,-.57,.06,-.6],["c",0,-.06,-.03,-.09,-.15,-.12],["c",-.9,-.18,-2.13,.06,-2.76,.57],["c",-.36,.3,-.51,.6,-.51,1.02],["c",0,.45,.15,.75,.48,.99],["c",.06,.06,.15,.18,.18,.24],["c",.12,.24,.03,.63,-.15,.69],["c",-.24,.12,-.6,.15,-.9,.15],["c",-.36,-.03,-.57,-.09,-.87,-.24],["c",-.78,-.36,-1.23,-1.11,-1.2,-1.92],["c",.12,-1.53,1.74,-2.49,4.62,-2.7],["c",1.2,-.09,1.47,-.03,3.33,.57],["c",.9,.3,1.14,.36,1.56,.39],["c",.45,0,.93,-.06,1.38,-.21],["c",.51,-.18,.81,-.33,1.41,-.75],["z"],["m",-4.68,10.38],["c",.39,-.06,.84,0,1.2,.15],["c",.24,.12,.36,.21,.45,.36],["l",.09,.09],["l",-.06,1.41],["c",-.09,2.19,-.18,3.96,-.27,5.49],["c",-.03,.78,-.06,1.59,-.06,1.86],["c",0,.42,0,.48,.06,.57],["c",.06,.18,.18,.24,.36,.27],["c",.18,0,.39,-.06,.84,-.27],["c",.45,-.21,.54,-.24,.63,-.18],["c",.12,.12,.15,.54,.03,.69],["c",-.03,.03,-.15,.12,-.27,.18],["c",-.15,.03,-.3,.12,-.36,.15],["c",-.87,.45,-1.02,.51,-1.26,.57],["c",-.33,.09,-.6,.06,-.84,-.06],["c",-.42,-.18,-.63,-.6,-.87,-1.44],["c",-.3,-1.23,-.57,-2.97,-.66,-4.08],["c",0,-.18,-.03,-.3,-.03,-.33],["l",-.06,.06],["c",-.18,.27,-1.11,1.38,-1.68,2.01],["l",-.33,.33],["l",.06,.09],["c",.06,.15,.27,.33,.48,.42],["c",.27,.18,.51,.24,.96,.27],["l",.39,0],["l",.03,.12],["c",.12,.21,.03,.57,-.15,.69],["c",-.03,.03,-.21,.09,-.36,.15],["c",-.27,.06,-.39,.06,-.75,.06],["c",-.48,0,-.75,-.03,-1.08,-.21],["c",-.21,-.12,-.51,-.36,-.57,-.48],["l",-.03,-.09],["l",-.39,.36],["c",-1.47,1.35,-2.49,1.98,-3.42,2.13],["c",-.54,.09,-.96,-.03,-1.62,-.39],["c",-.21,-.15,-.45,-.27,-.54,-.3],["c",-.18,-.09,-.21,-.21,-.12,-.45],["c",.06,-.27,.33,-.48,.54,-.48],["c",.03,0,.27,.09,.48,.21],["c",.48,.24,.69,.27,.99,.27],["c",.6,-.06,1.17,-.42,2.1,-1.35],["c",2.22,-2.22,4.02,-4.98,4.95,-7.59],["c",.21,-.57,.3,-.78,.48,-.93],["c",.15,-.15,.42,-.27,.66,-.33],["z"],["m",-3.06,12.84],["c",.27,-.03,1.68,0,2.01,.03],["c",1.92,.18,3.15,.69,3.63,1.5],["c",.18,.33,.24,.51,.21,.93],["c",0,.45,-.06,.72,-.24,1.11],["c",-.24,.51,-.69,1.02,-1.17,1.35],["c",-.21,.15,-.21,.15,-.12,.18],["c",.72,.15,1.11,.3,1.5,.57],["c",.39,.24,.63,.57,.75,.96],["c",.09,.3,.09,.96,0,1.29],["c",-.15,.57,-.39,1.05,-.78,1.5],["c",-.66,.75,-1.62,1.32,-2.61,1.53],["c",-.27,.06,-.42,.06,-.84,.06],["c",-.48,0,-.57,0,-.81,-.06],["c",-.6,-.18,-1.05,-.42,-1.47,-.81],["c",-.36,-.39,-.42,-.51,-.3,-.75],["c",.12,-.21,.39,-.39,.6,-.39],["c",.09,0,.15,.03,.33,.18],["c",.12,.12,.27,.24,.36,.27],["c",.96,.48,2.46,-.33,2.82,-1.5],["c",.24,-.81,-.03,-1.44,-.69,-1.77],["c",-.39,-.21,-1.02,-.33,-1.53,-.33],["c",-.18,0,-.21,0,-.27,-.09],["c",-.06,-.09,-.06,-.3,-.03,-.48],["c",.06,-.18,.18,-.36,.33,-.36],["c",.39,-.06,.51,-.09,.72,-.18],["c",.69,-.36,1.11,-1.23,.99,-2.01],["c",-.09,-.51,-.42,-.9,-.93,-1.17],["c",-.24,-.12,-.6,-.27,-.87,-.3],["c",-.09,-.03,-.09,-.03,-.12,.12],["c",0,.09,-.21,1.11,-.42,2.25],["c",-.66,3.75,-.72,3.99,-1.26,5.07],["c",-.9,1.89,-2.25,2.85,-3.48,2.61],["c",-.39,-.09,-.69,-.27,-1.38,-.84],["c",-.63,-.51,-.63,-.48,-.63,-.6],["c",0,-.18,.18,-.48,.39,-.57],["c",.21,-.12,.3,-.09,.81,.33],["c",.15,.15,.39,.3,.54,.36],["c",.18,.12,.27,.12,.48,.15],["c",.99,.06,1.71,-.78,2.04,-2.46],["c",.12,-.66,.18,-1.14,.21,-2.22],["c",.03,-1.23,.12,-2.25,.36,-3.63],["c",.03,-.24,.06,-.45,.06,-.48],["c",-.06,-.03,-.66,.27,-.9,.42],["c",-.06,.06,-.21,.18,-.33,.3],["c",-.57,.57,-.6,1.35,-.06,1.74],["c",.18,.12,.24,.24,.21,.51],["c",-.03,.3,-.15,.42,-.57,.48],["c",-1.11,.24,-2.22,-.42,-2.43,-1.38],["c",-.09,-.45,.03,-1.02,.3,-1.47],["c",.18,-.24,.6,-.63,.9,-.84],["c",.9,-.6,2.28,-1.02,3.69,-1.11],["z"]],w:15.709,h:34.656},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.85,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84}};r["noteheads.slash.whole"]={d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},r["noteheads.slash.quarter"]={d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},r["noteheads.harmonic.quarter"]={d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165},r["noteheads.triangle.quarter"]={d:[["M",0,4],["l",9,0],["l",-4.5,-9],["z"]],w:9,h:9};var n=function(a){for(var o=[],s=0,l=a.length;s<l;s++){o[s]=[];for(var d=0,p=a[s].length;d<p;d++)o[s][d]=a[s][d]}return o},i=function(a,o,s){for(var l=0,d=a.length;l<d;l++){var p=a[l],m,f;for(m=1,f=p.length;m<f;m++)p[m]*=m%2?o:s}},t={printSymbol:function(a,o,s,l,d){if(!r[s])return null;var p=n(r[s].d);p[0][1]+=a,p[0][2]+=o;for(var m="",f=0;f<p.length;f++)m+=p[f].join(" ");return d.path=m,l.path(d)},getPathForSymbol:function(a,o,s,l,d){if(l=l||1,d=d||1,!r[s])return null;var p=n(r[s].d);return(l!==1||d!==1)&&i(p,l,d),p[0][1]+=a,p[0][2]+=o,p},getSymbolWidth:function(a){return r[a]?r[a].w:0},symbolHeightInPitches:function(a){var o=r[a]?r[a].h:0;return o/e.STEP},getSymbolAlign:function(a){return a.substring(0,7)==="scripts"&&a!=="scripts.roll"?"center":"left"},getYCorr:function(a){switch(a){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":return-1;case"rests.8th":return-1;case"rests.quarter":return-1;case"rests.16th":return-1;case"rests.32nd":return-1;case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(a,o){r[a]=o}};return Ba=t,Ba}var qa,bf;function O7(){if(bf)return qa;bf=1;var e=Nr(),r=Yt(),n=Nt(),i=function(a,o){var s,l=0;a.el_type="clef";var d=new e(a,0,10,"staff-extra clef",o);switch(d.isClef=!0,a.type){case"treble":s="clefs.G";break;case"tenor":s="clefs.C";break;case"alto":s="clefs.C";break;case"bass":s="clefs.F";break;case"treble+8":s="clefs.G",l=1;break;case"tenor+8":s="clefs.C",l=1;break;case"bass+8":s="clefs.F",l=1;break;case"alto+8":s="clefs.C",l=1;break;case"treble-8":s="clefs.G",l=-1;break;case"tenor-8":s="clefs.C",l=-1;break;case"bass-8":s="clefs.F",l=-1;break;case"alto-8":s="clefs.C",l=-1;break;case"none":return null;case"perc":s="clefs.perc";break;default:d.addFixed(new n("clef="+a.type,0,0,void 0,{type:"debug"}))}var p=5;if(s){var m=r.symbolHeightInPitches(s),f=t(s);if(d.addRight(new n(s,p,r.getSymbolWidth(s),a.clefPos,{top:m+a.clefPos+f,bottom:a.clefPos+f})),l!==0){var u=.6666666666666666,h=(r.getSymbolWidth(s)-r.getSymbolWidth("8")*u)/2,c=l>0?d.top+3:d.bottom-1,v=l>0?d.top+3:d.bottom-3,b=v-2;a.type==="bass-8"&&(c=3,h=0),d.addRight(new n("8",p+h,r.getSymbolWidth("8")*u,c,{scalex:u,scaley:u,top:v,bottom:b}))}}return d};function t(a){switch(a){case"clefs.G":return-5;case"clefs.C":return-4;case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}return qa=i,qa}var Fa,yf;function M7(){if(yf)return Fa;yf=1;var e=Nr(),r=Yt(),n=Nt(),i=function(t,a){if(t.el_type="keySignature",!t.accidentals||t.accidentals.length===0)return null;var o=new e(t,0,10,"staff-extra key-signature",a);o.isKeySig=!0;var s=0;return t.accidentals.forEach(function(l){var d,p=0;switch(l.acc){case"sharp":d="accidentals.sharp",p=-3;break;case"natural":d="accidentals.nat";break;case"flat":d="accidentals.flat",p=-1.2;break;case"quartersharp":d="accidentals.halfsharp",p=-2.5;break;case"quarterflat":d="accidentals.halfflat",p=-1.2;break;default:d="accidentals.flat"}o.addRight(new n(d,s,r.getSymbolWidth(d),l.verticalPos,{thickness:r.symbolHeightInPitches(d),top:l.verticalPos+r.symbolHeightInPitches(d)+p,bottom:l.verticalPos+p})),s+=r.getSymbolWidth(d)+2},this),o};return Fa=i,Fa}var Ha,_f;function D7(){if(_f)return Ha;_f=1;var e=Yt(),r=Nt(),n=function(i,t,a,o){o||(o={});var s=o.dir!==void 0?o.dir:null,l=o.headx!==void 0?o.headx:0,d=o.extrax!==void 0?o.extrax:0,p=o.flag!==void 0?o.flag:null,m=o.dot!==void 0?o.dot:0,f=o.dotshiftx!==void 0?o.dotshiftx:0,u=o.scale!==void 0?o.scale:1,h=o.accidentalSlot!==void 0?o.accidentalSlot:[],c=o.shouldExtendStem!==void 0?o.shouldExtendStem:!1,v=o.printAccidentals!==void 0?o.printAccidentals:!0,b=a.verticalPos,g,w=0,k=0,$=0;if(t===void 0)i.addFixed(new r("pitch is undefined",0,0,0,{type:"debug"}));else if(t==="")g=new r(null,0,0,b);else{var O=l;if(a.printer_shift){var P=a.printer_shift==="same"?1:0;O=s==="down"?-e.getSymbolWidth(t)*u+P:e.getSymbolWidth(t)*u-P}var y={scalex:u,scaley:u,thickness:e.symbolHeightInPitches(t)*u,name:a.name};if(g=new r(t,O,e.getSymbolWidth(t)*u,b,y),g.stemDir=s,p){var C=b+(s==="down"?-7:7)*u;c&&(s==="down"&&C>6&&(C=6),s==="up"&&C<6&&(C=6));var E=s==="down"?l:l+g.w-.6;i.addRight(new r(p,E,e.getSymbolWidth(p)*u,C,{scalex:u,scaley:u}))}for(k=g.w+f-2+5*m;m>0;m--){var z=1-Math.abs(b)%2;i.addRight(new r("dots.dot",g.w+f-2+5*m,e.getSymbolWidth("dots.dot"),b+z))}}if(g&&(g.highestVert=a.highestVert),v&&a.accidental){var A;switch(a.accidental){case"quartersharp":A="accidentals.halfsharp";break;case"dblsharp":A="accidentals.dblsharp";break;case"sharp":A="accidentals.sharp";break;case"quarterflat":A="accidentals.halfflat";break;case"flat":A="accidentals.flat";break;case"dblflat":A="accidentals.dblflat";break;case"natural":A="accidentals.nat"}for(var R=!1,T=d,I=0;I<h.length;I++)if(b-h[I][0]>=6){h[I][0]=b,T=h[I][1],R=!0;break}R===!1&&(T-=e.getSymbolWidth(A)*u+2,h.push([b,T]),w=e.getSymbolWidth(A)*u+2);var N=e.symbolHeightInPitches(A);i.addExtra(new r(A,T,e.getSymbolWidth(A),b,{scalex:u,scaley:u,top:b+N/2,bottom:b-N/2})),$=e.getSymbolWidth(A)/2}return{notehead:g,accidentalshiftx:w,dotshiftx:k,extraLeft:$}};return Ha=n,Ha}var Ga,wf;function R7(){if(wf)return Ga;wf=1;var e=Nr(),r=Yt(),n=Nt(),i=function(t,a){t.el_type="timeSignature";var o=new e(t,0,10,"staff-extra time-signature",a);if(t.type==="specified")for(var s=0,l=0;l<t.value.length;l++)if(l!==0&&(o.addRight(new n("+",s+1,r.getSymbolWidth("+"),6,{thickness:r.symbolHeightInPitches("+")})),s+=r.getSymbolWidth("+")+2),t.value[l].den){for(var d=0,p=0;p<t.value[l].num.length;p++)d+=r.getSymbolWidth(t.value[l].num[p]);var m=0;for(p=0;p<t.value[l].num.length;p++)m+=r.getSymbolWidth(t.value[l].den[p]);var f=Math.max(d,m);o.addRight(new n(t.value[l].num,s+(f-d)/2,d,8,{thickness:r.symbolHeightInPitches(t.value[l].num[0])})),o.addRight(new n(t.value[l].den,s+(f-m)/2,m,4,{thickness:r.symbolHeightInPitches(t.value[l].den[0])})),s+=f}else{for(var u=0,h=0;h<t.value[l].num.length;h++)u+=r.getSymbolWidth(t.value[l].num[h]);o.addRight(new n(t.value[l].num,s,u,6,{thickness:r.symbolHeightInPitches(t.value[l].num[0])})),s+=u}else t.type==="common_time"?o.addRight(new n("timesig.common",0,r.getSymbolWidth("timesig.common"),6,{thickness:r.symbolHeightInPitches("timesig.common")})):t.type==="cut_time"?o.addRight(new n("timesig.cut",0,r.getSymbolWidth("timesig.cut"),6,{thickness:r.symbolHeightInPitches("timesig.cut")})):t.type==="tempus_imperfectum"?o.addRight(new n("timesig.imperfectum",0,r.getSymbolWidth("timesig.imperfectum"),6,{thickness:r.symbolHeightInPitches("timesig.imperfectum")})):t.type==="tempus_imperfectum_prolatio"?o.addRight(new n("timesig.imperfectum2",0,r.getSymbolWidth("timesig.imperfectum2"),6,{thickness:r.symbolHeightInPitches("timesig.imperfectum2")})):t.type==="tempus_perfectum"?o.addRight(new n("timesig.perfectum",0,r.getSymbolWidth("timesig.perfectum"),6,{thickness:r.symbolHeightInPitches("timesig.perfectum")})):t.type==="tempus_perfectum_prolatio"?o.addRight(new n("timesig.perfectum2",0,r.getSymbolWidth("timesig.perfectum2"),6,{thickness:r.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",t);return o};return Ga=i,Ga}var Ja,kf;function L7(){if(kf)return Ja;kf=1;var e=function(n,i,t){this.type="DynamicDecoration",this.anchor=n,this.dec=i,t==="below"?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0};return Ja=e,Ja}var Wa,$f;function U7(){if($f)return Wa;$f=1;var e=function(n,i,t,a){this.type="CrescendoElem",this.anchor1=n,this.anchor2=i,this.dir=t,a==="above"?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0};return Wa=e,Wa}var Ya,xf;function Z7(){if(xf)return Ya;xf=1;var e=function(n,i){this.type="GlissandoElem",this.anchor1=n,this.anchor2=i};return Ya=e,Ya}var Va,Sf;function mb(){if(Sf)return Va;Sf=1;var e=function(n){this.type="TieElem",this.anchor1=n.anchor1,this.anchor2=n.anchor2,n.isGrace&&(this.isGrace=!0),n.fixedY&&(this.fixedY=!0),n.stemDir&&(this.stemDir=n.stemDir),n.voiceNumber!==void 0&&(this.voiceNumber=n.voiceNumber),n.style!==void 0&&(this.dotted=!0),this.internalNotes=[]};return e.prototype.addInternalNote=function(r){this.internalNotes.push(r)},e.prototype.setEndAnchor=function(r){this.anchor2=r,this.anchor1?(this.top=Math.max(this.anchor1.pitch,this.anchor2.pitch)+4,this.bottom=Math.min(this.anchor1.pitch,this.anchor2.pitch)-4):(this.top=this.anchor2.pitch+4,this.bottom=this.anchor2.pitch-4)},e.prototype.setStartX=function(r){this.startLimitX=r},e.prototype.setEndX=function(r){this.endLimitX=r},e.prototype.setHint=function(){this.hint=!0},e.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var r;this.anchor1?r=this.anchor1.pitch:this.anchor2?r=this.anchor2.pitch:r=14,this.anchor1&&this.anchor1.stemDir==="down"&&this.anchor2&&this.anchor2.stemDir==="down"?this.above=!0:this.anchor1&&this.anchor1.stemDir==="up"&&this.anchor2&&this.anchor2.stemDir==="up"?this.above=!1:this.anchor1&&this.anchor2?this.above=r>=6:this.anchor1?this.above=this.anchor1.stemDir==="down":this.anchor2?this.above=this.anchor2.stemDir==="down":this.above=r>=6}},e.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(this.voiceNumber===0)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var r=!1;this.anchor1&&this.anchor1.stemDir==="down"&&(r=!0),this.anchor2&&this.anchor2.stemDir==="down"&&(r=!0);for(var n=0;n<this.internalNotes.length;n++){var i=this.internalNotes[n];i.stemDir==="down"&&(r=!0)}this.above=r}},e.prototype.calcX=function(r,n){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.anchor2?this.startX=this.anchor2.x-20:this.startX=r,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=n},e.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},e.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&this.anchor1.stemDir==="up"&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var r=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,n=(this.anchor2.highestVert+this.anchor2.pitch)/2;if(this.above&&this.anchor2.stemDir==="up"&&!this.fixedY&&!r&&n<this.startY?(this.endY=n,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&r?this.anchor2.highestVert:this.anchor2.pitch,this.anchor1.scalex===1){var i=!!this.anchor1.parent.beam,t=!!this.anchor2.parent.beam;if(i){var a=this.anchor1.parent===this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1];a||(this.above?this.startY=this.anchor1.parent.fixed.t:this.startY=this.anchor1.parent.fixed.b)}if(t){var o=this.anchor2.parent===this.anchor2.parent.beam.elems[0];o||(this.above?this.endY=this.anchor2.parent.fixed.t:this.endY=this.anchor2.parent.fixed.b)}}}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},e.prototype.avoidCollisionAbove=function(){if(this.above){for(var r=-50,n=0;n<this.internalNotes.length;n++)this.internalNotes[n].highestVert>r&&(r=this.internalNotes[n].highestVert);r>this.startY&&r>this.endY&&(this.startY=this.endY=r-1)}},e.prototype.getYBounds=function(){var r=10,n=1e3;this.isTie?(this.calcTieDirection(),this.calcX(r,n),this.calcTieY()):(this.calcSlurDirection(),this.calcX(r,n),this.calcSlurY());var i,t;return this.above?(t=Math.min(this.startY,this.endY),i=t+3):(i=Math.min(this.startY,this.endY),t=i-3),[i,t]},Va=e,Va}var Xa,If;function j7(){if(If)return Xa;If=1;var e=L7(),r=U7(),n=Z7(),i=Yt(),t=Nt(),a=mb(),o=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0},s=function(f,u,h,c,v,b,g,w,k){for(var $,O=0;O<u.length;O++){if(u[O]==="staccato"||u[O]==="tenuto"||u[O]==="accent"&&!k){var P="scripts."+u[O];if(u[O]==="accent"&&(P="scripts.sforzato"),$===void 0?$=g==="down"?h+2:w-2:$=g==="down"?$+2:$-2,u[O]==="accent")g==="up"?$--:$++;else switch($){case 2:case 4:case 6:case 8:case 10:g==="up"?$--:$++;break}h>9&&$++;var y=c/2;i.getSymbolAlign(P)!=="center"&&(y-=i.getSymbolWidth(P)/2),v.addFixedX(new t(P,y,i.getSymbolWidth(P),$))}if(u[O]==="slide"&&v.heads[0]){var C=v.heads[0].pitch;C-=2;var E=new t("",-b-15,0,C-1),z=new t("",-b-5,0,C+1);v.addFixedX(E),v.addFixedX(z),f.addOther(new a({anchor1:E,anchor2:z,fixedY:!0}))}}return $===void 0&&($=h),{above:$,below:v.bottom}},l=function(f,u,h,c){for(var v=0;v<u.length;v++)switch(u[v]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var b=new e(h,u[v],c);f.addOther(b)}},d=function(f,u,h,c,v){function b(){if(c.heads.length===0)return 10;for(var $=c.heads[0].pitch,O=1;O<c.heads.length;O++)$=Math.max($,c.heads[O].pitch);return $}function g(){if(c.heads.length===0)return 2;for(var $=c.heads[0].pitch,O=1;O<c.heads.length;O++)$=Math.min($,c.heads[O].pitch);return $}function w($,O){var P=v==="down"?g()+1:b()+9;v!=="down"&&O===1&&P--;var y=h/2;y+=v==="down"?-5:3;for(var C=0;C<O;C++)P-=1,c.addFixedX(new t($,y,i.getSymbolWidth($),P))}for(var k=0;k<f.length;k++)switch(f[k]){case"/":w("flags.ugrace",1);break;case"//":w("flags.ugrace",2);break;case"///":w("flags.ugrace",3);break;case"////":w("flags.ugrace",4);break}},p=function(f,u,h,c,v,b,g,w){function k(z,A){z==="above"?c.above+=A:c.below-=A}function $(z){var A;return z==="above"?(A=c.above,A<b&&(A=b)):(A=c.below,A>g&&(A=g)),A}function O(z,A,R){var T=$(A),I=2,N=5;h.addFixedX(new t(z,u/2,0,T+I,{type:"decoration",klass:"ornament",thickness:3,anchor:R})),k(A,N)}function P(z,A){var R=u/2;i.getSymbolAlign(z)!=="center"&&(R-=i.getSymbolWidth(z)/2);var T=i.symbolHeightInPitches(z)+1,I=$(A);I=A==="above"?I+T/2:I-T/2,h.addFixedX(new t(z,R,i.getSymbolWidth(z),I,{klass:"ornament",thickness:i.symbolHeightInPitches(z),position:A})),k(A,T)}for(var y={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",trillh:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},C=!1,E=0;E<f.length;E++)switch(f[E]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":O(f[E],v,"middle"),C=!0;break;case"D.C.alcoda":O("D.C. al coda",v,"end"),C=!0;break;case"D.C.alfine":O("D.C. al fine",v,"end"),C=!0;break;case"D.S.alcoda":O("D.S. al coda",v,"end"),C=!0;break;case"D.S.alfine":O("D.S. al fine",v,"end"),C=!0;break;case"fine":O("FINE",v,"middle"),C=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"trillh":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":P(y[f[E]],v),C=!0;break;case"invertedfermata":P(y[f[E]],"below"),C=!0;break;case"mark":h.klass="mark";break;case"accent":w&&(P("scripts.sforzato",v),C=!0);break}return C};function m(f,u,h){for(var c=0;c<f.length;c++)switch(f[c]){case"arpeggio":for(var v=u.abcelem.minpitch-1;v<=u.abcelem.maxpitch;v+=2)u.addExtra(new t("scripts.arpeggio",-i.getSymbolWidth("scripts.arpeggio")*2-h,0,v+2,{klass:"ornament",thickness:i.symbolHeightInPitches("scripts.arpeggio")}));break}}return o.prototype.dynamicDecoration=function(f,u,h,c){for(var v,b,g,w=0;w<u.length;w++)switch(u[w]){case"diminuendo(":this.startDiminuendoX=h,v=void 0;break;case"diminuendo)":v={start:this.startDiminuendoX,stop:h},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=h,b=void 0;break;case"crescendo)":b={start:this.startCrescendoX,stop:h},this.startCrescendoX=void 0;break;case"~(":case"glissando(":this.startGlissandoX=h,g=void 0;break;case"~)":case"glissando)":g={start:this.startGlissandoX,stop:h},this.startGlissandoX=void 0;break}v&&f.addOther(new r(v.start,v.stop,">",c)),b&&f.addOther(new r(b.start,b.stop,"<",c)),g&&f.addOther(new n(g.start,g.stop))},o.prototype.createDecoration=function(f,u,h,c,v,b,g,w,k,$,O){k||(k={ornamentPosition:"above",volumePosition:$?"above":"below",dynamicPosition:$?"above":"below"}),l(f,u,v,k.volumePosition),this.dynamicDecoration(f,u,v,k.dynamicPosition),d(u,h,c,v,g);var P=s(f,u,h,c,v,b,g,w,O);P.above=Math.max(P.above,this.minTop),P.below=Math.min(P.below,w),p(u,c,v,P,k.ornamentPosition,this.minTop,w,O),m(u,v,b)},Xa=o,Xa}var Ka,Tf;function B7(){if(Tf)return Ka;Tf=1;var e=function(n,i,t){this.type="EndingElem",this.text=n,this.anchor1=i,this.anchor2=t,this.endingHeightAbove=5,this.pitch=void 0};return Ka=e,Ka}var Qa,Cf;function q7(){if(Cf)return Qa;Cf=1;var e=function(r){for(var n=0,i=0;i<r.voices.length;i++){var t=r.voices[i].staff;r.voices[i].duplicate||(n+=t.top,n+=-t.bottom)}return n};return Qa=e,Qa}var eo,zf;function F7(){if(zf)return eo;zf=1;var e=q7(),r=function(n){this.getTextSize=n,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};return r.prototype.setLimit=function(n,i){i.specialY[n]&&(i.staff.specialY[n]?i.staff.specialY[n]=Math.max(i.staff.specialY[n],i.specialY[n]):i.staff.specialY[n]=i.specialY[n])},r.prototype.addVoice=function(n,i,t){var a=this.voices.length;this.voices[a]=n,this.staffs[i]?this.staffs[i].voices.push(a):this.staffs[this.staffs.length]={top:10,bottom:2,lines:t,voices:[a],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},n.staff=this.staffs[i]},r.prototype.setHeight=function(){this.height=e(this)},r.prototype.setWidth=function(n){this.w=n;for(var i=0;i<this.voices.length;i++)this.voices[i].setWidth(n)},r.prototype.setStaffLimits=function(n){n.staff.top=Math.max(n.staff.top,n.top),n.staff.bottom=Math.min(n.staff.bottom,n.bottom),this.setLimit("tempoHeightAbove",n),this.setLimit("partHeightAbove",n),this.setLimit("volumeHeightAbove",n),this.setLimit("dynamicHeightAbove",n),this.setLimit("endingHeightAbove",n),this.setLimit("chordHeightAbove",n),this.setLimit("lyricHeightAbove",n),this.setLimit("lyricHeightBelow",n),this.setLimit("chordHeightBelow",n),this.setLimit("volumeHeightBelow",n),this.setLimit("dynamicHeightBelow",n)},eo=r,eo}var to,Ef;function H7(){if(Ef)return to;Ef=1;var e=Nr(),r=Nt(),n=function(t,a,o){this.type="TempoElement",this.tempo=t,this.tempo.type="tempo",this.tuneNumber=a,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(o,t,a))};return n.prototype.setX=function(i){this.x=i},n.prototype.createNote=function(i,t,a){var o=.75,s=t.duration[0],l=new e(t,s,1,"tempo",a),d,p,m;s<=1/32?(m="noteheads.quarter",p="flags.u32nd",d=0):s<=1/16?(m="noteheads.quarter",p="flags.u16th",d=0):s<=3/32?(m="noteheads.quarter",p="flags.u16nd",d=1):s<=1/8?(m="noteheads.quarter",p="flags.u8th",d=0):s<=3/16?(m="noteheads.quarter",p="flags.u8th",d=1):s<=1/4?(m="noteheads.quarter",d=0):s<=3/8?(m="noteheads.quarter",d=1):s<=1/2?(m="noteheads.half",d=0):s<=3/4?(m="noteheads.half",d=1):s<=1?(m="noteheads.whole",d=0):s<=1.5?(m="noteheads.whole",d=1):s<=2?(m="noteheads.dbl",d=0):(m="noteheads.dbl",d=1);var f=i(l,m,{verticalPos:0},{dir:"up",flag:p,dot:d,scale:o}),u=f.notehead;l.addHead(u);var h;if(m!=="noteheads.whole"&&m!=="noteheads.dbl"){var c=.3333333333333333*o,v=5*o,b=u.dx+u.w,g=-.6;h=new r(null,b,0,c,{type:"stem",pitch2:v,linewidth:g}),l.addRight(h)}return l},to=n,to}var ro,Nf;function G7(){if(Nf)return ro;Nf=1;var e=function(n,i,t){this.type="TripletElem",this.anchor1=i,this.number=n,this.durationClass=("d"+Math.round(i.parent.durationClass*1e3)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=t.flatBeams};return e.prototype.isClosed=function(){return!!this.anchor2},e.prototype.middleNote=function(r){this.middleElems.push(r)},e.prototype.setCloseAnchor=function(r){this.anchor2=r,(!this.anchor1.parent.beam||this.anchor1.stemDir==="up")&&(this.endingHeightAbove=4)},ro=e,ro}var no,Af;function J7(){if(Af)return no;Af=1;function e(n){switch(n){case"B#":return"H#";case"B♯":return"H♯";case"B":return"H";case"Bb":return"B";case"B♭":return"B"}return n}function r(n,i,t){var a=n.split(`
|
|
132
|
+
`);for(let o=0;o<a.length;o++){let l=a[o].match(/^([ABCDEFG][♯♭]?)?([^\/]+)?(\/([ABCDEFG][#b♯♭]?))?/);if(!l)continue;let d=l[1]||"",p=l[2]||"",m=l[4]||"";t&&(d=e(d),m=e(m));const f=i?"":"",u=m?"/"+m:"";a[o]=[d,p,u].join(f)}return a.join(`
|
|
133
|
+
`)}return no=r,no}var io,Pf;function W7(){if(Pf)return io;Pf=1;var e=Nt(),r=pt();const n=J7();var i=function(a,o,s,l,d,p,m,f){for(var u=0;u<s.chord.length;u++){var h=s.chord[u].position,c=s.chord[u].rel_position,v=h==="left"||h==="right"||h==="below"||h==="above"||!!c,b,g;v?(b="annotationfont",g="abcjs-annotation"):(b="gchordfont",g="abcjs-chord");var w=a.attr(b,g),k=s.chord[u].name,$;if(typeof k=="string")$=t(k,h,c,v,b,g,w,a,o,s,l,d,p,m,f),l=$.roomTaken,d=$.roomTakenRight;else for(var O=0;O<k.length;O++)$=t(k[O].text,h,c,v,b,g,w,a,o,s,l,d,p,m,f),l=$.roomTaken,d=$.roomTakenRight}return{roomTaken:l,roomTakenRight:d}};function t(a,o,s,l,d,p,m,f,u,h,c,v,b,g,w){for(var k=a.split(`
|
|
134
|
+
`),$=k.length-1;$>=0;$--){var O=k[$],P=0,y;l||(O=n(O,g,w));var C=f.calc(O,d,p),E=C.width,z=C.height/r.STEP;switch(o){case"left":c+=E+7,P=-c,y=h.averagepitch,u.addExtra(new e(O,P,E+4,y,{type:"text",height:z,dim:m,position:"left"}));break;case"right":v+=4,P=v,y=h.averagepitch,u.addRight(new e(O,P,E+4,y,{type:"text",height:z,dim:m,position:"right"}));break;case"below":u.addRight(new e(O,0,0,void 0,{type:"text",position:"below",height:z,dim:m,realWidth:E}));break;case"above":u.addRight(new e(O,0,0,void 0,{type:"text",position:"above",height:z,dim:m,realWidth:E}));break;default:if(s){var A=s.y+3*r.STEP;u.addRight(new e(O,P+s.x,0,h.minpitch+A/r.STEP,{position:"relative",type:"text",height:z,dim:m}))}else{var R="above";h.positioning&&h.positioning.chordPosition&&(R=h.positioning.chordPosition),R!=="hidden"&&u.addCentered(new e(O,b/2,E,void 0,{type:"chord",position:R,height:z,dim:m,realWidth:E}))}}}return{roomTaken:c,roomTakenRight:v}}return io=i,io}var ao,Of;function Y7(){if(Of)return ao;Of=1;var e=Nr(),r=A7(),n=P7(),i=O7(),t=M7(),a=D7(),o=R7(),s=j7(),l=B7(),d=Yt(),p=Nt(),m=pt(),f=F7(),u=H7(),h=mb(),c=G7(),v=ub(),b=W7(),g=ob(),w=Et(),k=function(T){var I=0;return T.duration&&(I=T.duration),I},$=!1,O={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},triangle:{"-1":"noteheads.triangle.quarter",0:"noteheads.triangle.quarter",1:"noteheads.triangle.quarter",2:"noteheads.triangle.quarter",3:"noteheads.triangle.quarter",4:"noteheads.triangle.quarter",5:"noteheads.triangle.quarter",6:"noteheads.triangle.quarter",7:"noteheads.triangle.quarter",nostem:"noteheads.triangle.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}},P=function(T,I,N){this.decoration=new s,this.getTextSize=T,this.tuneNumber=I,this.isBagpipes=N.bagpipes,this.flatBeams=N.flatbeams,this.graceSlurs=N.graceSlurs,this.percmap=N.percmap,this.initialClef=N.initialClef,this.jazzchords=!!N.jazzchords,this.accentAbove=!!N.accentAbove,this.germanAlphabet=!!N.germanAlphabet,this.reset()};P.prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.voiceColor=void 0,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.colorByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},P.prototype.setStemHeight=function(T){this.stemHeight=Math.round(T*10/m.STEP)/10},P.prototype.getCurrentVoiceId=function(T,I){return"s"+T+"v"+I},P.prototype.pushCrossLineElems=function(T,I){this.slursbyvoice[this.getCurrentVoiceId(T,I)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(T,I)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(T,I)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(T,I)]=this.voiceScale,this.voiceColor&&(this.colorByVoice[this.getCurrentVoiceId(T,I)]=this.voiceColor)},P.prototype.popCrossLineElems=function(T,I){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(T,I)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(T,I)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(T,I)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(T,I)],this.voiceScale===void 0&&(this.voiceScale=1),this.voiceColor=this.colorByVoice[this.getCurrentVoiceId(T,I)]},P.prototype.containsLyrics=function(T){for(var I=0;I<T.length;I++)for(var N=0;N<T[I].voices.length;N++)for(var D=0;D<T[I].voices[N].length;D++){var L=T[I].voices[N][D];if(L.lyric){(!L.positioning||L.positioning.vocalPosition==="below")&&(this.hasVocals=!0);return}}},P.prototype.createABCLine=function(T,I,N){this.minY=2,this.containsLyrics(T);var D=new f(this.getTextSize);this.tempoSet=!1;for(var L=0;L<T.length;L++)$&&this.restoreState(),$=!1,this.createABCStaff(D,T[L],I,L,N);return D},P.prototype.createABCStaff=function(T,I,N,D,L){T.getTextSize.updateFonts(I);for(var _=0;_<I.voices.length;_++){var x=new v(_,I.voices.length);_===0?(x.barfrom=I.connectBarLines==="start"||I.connectBarLines==="continue",x.barto=I.connectBarLines==="continue"||I.connectBarLines==="end"):x.duplicate=!0,I.title&&I.title[_]&&(x.header=I.title[_].replace(/\\n/g,`
|
|
135
|
+
`),x.headerPosition=6+T.getTextSize.baselineToCenter(x.header,"voicefont","staff-extra voice-name",_,I.voices.length)/m.STEP),I.clef&&I.clef.type==="perc"&&(x.isPercussion=!0);var S=(!this.initialClef||L===0)&&i(I.clef,this.tuneNumber);S&&(_===0&&I.barNumber&&this.addMeasureNumber(I.barNumber,S),x.addChild(S),this.startlimitelem=S);var M=t(I.key,this.tuneNumber);if(M&&(x.addChild(M),this.startlimitelem=M),I.meter){I.meter.type==="specified"?this.measureLength=I.meter.value[0].num/I.meter.value[0].den:this.measureLength=1;var U=o(I.meter,this.tuneNumber);x.addChild(U),this.startlimitelem=U}x.duplicate&&(x.children=[]);var q=I.clef.stafflines||I.clef.stafflines===0?I.clef.stafflines:5;T.addVoice(x,D,q);var Z=q===1;this.createABCVoice(I.voices[_],N,D,_,Z,x),T.setStaffLimits(x),_===0&&(I.brace==="start"||!T.brace&&I.brace?(T.brace||(T.brace=[]),T.brace.push(new n(x,"brace"))):I.brace==="end"&&T.brace?T.brace[T.brace.length-1].setBottomStaff(x):I.brace==="continue"&&T.brace&&T.brace[T.brace.length-1].continuing(x),I.bracket==="start"||!T.bracket&&I.bracket?(T.bracket||(T.bracket=[]),T.bracket.push(new n(x,"bracket"))):I.bracket==="end"&&T.bracket?T.bracket[T.bracket.length-1].setBottomStaff(x):I.bracket==="continue"&&T.bracket&&T.bracket[T.bracket.length-1].continuing(x))}};function y(T,I){var N=T[I];if(N.el_type!=="note"||!N.startBeam||N.endBeam)return{count:1,elem:N};for(var D=[];I<T.length&&T[I].el_type==="note"&&(D.push(T[I]),!T[I].endBeam);)I++;return{count:D.length,elem:D}}P.prototype.createABCVoice=function(T,I,N,D,L,_){this.popCrossLineElems(N,D),this.stemdir=this.isBagpipes?"down":null,this.abcline=T,this.partstartelem&&(this.partstartelem=new l("",null,null),_.addOther(this.partstartelem));var x=_.voicetotal<2?-1:_.voicenumber;for(var S in this.slurs)this.slurs.hasOwnProperty(S)&&(this.slurs[S]=new h({force:this.slurs[S].force,voiceNumber:x,stemDir:this.slurs[S].stemDir,style:this.slurs[S].dotted}),$&&this.slurs[S].setHint(),_.addOther(this.slurs[S]));for(var M=0;M<this.ties.length;M++)this.ties[M]=new h({force:this.ties[M].force,stemDir:this.ties[M].stemDir,voiceNumber:x,style:this.ties[M].dotted}),$&&this.ties[M].setHint(),_.addOther(this.ties[M]);for(var U=0;U<this.abcline.length;U++)C(this.abcline[U]),this.minY=Math.min(this.abcline[U].minpitch,this.minY);for(var q=N===0,Z=0;Z<this.abcline.length;){var V=y(this.abcline,Z),ne=this.createABCElement(q,L,_,V.elem);if(ne)for(M=0;M<ne.length;M++){if(!this.tempoSet&&I&&!I.suppress){this.tempoSet=!0;var Y=new e(I,0,0,"tempo",this.tuneNumber,{});Y.addFixedX(new u(I,this.tuneNumber,a)),_.addChild(Y)}_.addChild(ne[M])}Z+=V.count}this.pushCrossLineElems(N,D)},P.prototype.saveState=function(){this.tiesSave=w.cloneArray(this.ties),this.slursSave=w.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=w.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=w.cloneHashOfArrayOfHash(this.tiesbyvoice)},P.prototype.restoreState=function(){this.ties=w.cloneArray(this.tiesSave),this.slurs=w.cloneHashOfHash(this.slursSave),this.slursbyvoice=w.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=w.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},P.prototype.createABCElement=function(T,I,N,D){var L=[];switch(D.el_type){case void 0:L=this.createBeam(I,N,D);break;case"note":L[0]=this.createNote(D,!1,I,N),this.triplet&&this.triplet.isClosed()&&(N.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":L[0]=this.createBarLine(N,D,T),N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"meter":L[0]=o(D,this.tuneNumber),this.startlimitelem=L[0],N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"clef":if(L[0]=i(D,this.tuneNumber),!L[0])return null;N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"key":var _=t(D,this.tuneNumber);_&&(L[0]=_,this.startlimitelem=L[0]),N.duplicate&&L.length>0&&(L[0].invisible=!0);break;case"stem":this.stemdir=D.direction==="auto"?void 0:D.direction;break;case"part":var x=new e(D,0,0,"part",this.tuneNumber),S=this.getTextSize.calc(D.title,"partsfont","part");x.addFixedX(new p(D.title,0,0,void 0,{type:"part",height:S.height/m.STEP})),L[0]=x;break;case"tempo":var M=new e(D,0,0,"tempo",this.tuneNumber);D.suppress||M.addFixedX(new u(D,this.tuneNumber,a)),L[0]=M;break;case"style":D.head==="normal"?delete this.style:this.style=D.head;break;case"hint":$=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=D.size;break;case"color":this.voiceColor=D.color,N.color=this.voiceColor;break;default:var U=new e(D,0,0,"unsupported",this.tuneNumber);U.addFixed(new p("element type "+D.el_type,0,0,void 0,{type:"debug"})),L[0]=U}return L};function C(T){if(T.pitches){E(T);for(var I=0,N=0;N<T.pitches.length;N++)I+=T.pitches[N].verticalPos;T.averagepitch=I/T.pitches.length,T.minpitch=T.pitches[0].verticalPos,T.maxpitch=T.pitches[T.pitches.length-1].verticalPos}}P.prototype.createBeam=function(T,I,N){var D=[],L=new r(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,N[0]);$&&L.setHint();for(var _=0;_<N.length;_++)L.runningDirection(N[_]);L.setStemDirection();var x=this.stemdir;for(this.stemdir=L.stemsUp?"up":"down",_=0;_<N.length;_++){var S=N[_],M=this.createNote(S,!0,T,I);D.push(M),L.add(M),this.triplet&&this.triplet.isClosed()&&(I.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return L.calcDir(),I.addBeam(L),this.stemdir=x,D};var E=function(T){var I;do{I=!0;for(var N=0;N<T.pitches.length-1;N++)if(T.pitches[N].pitch>T.pitches[N+1].pitch){I=!1;var D=T.pitches[N];T.pitches[N]=T.pitches[N+1],T.pitches[N+1]=D}}while(!I)},z=function(T,I,N,D,L,_,x,S,M){for(var U=N;U>11;U--)U%2===0&&!D&&T.addFixed(new p(null,S,(L+4)*M,U,{type:"ledger"}));for(U=I;U<1;U++)U%2===0&&!D&&T.addFixed(new p(null,S,(L+4)*M,U,{type:"ledger"}));for(U=0;U<_.length;U++){var q=L;x==="down"&&(q=-q),T.addFixed(new p(null,q+S,(L+4)*M,_[U],{type:"ledger"}))}};P.prototype.addGraceNotes=function(T,I,N,D,L,_,x){var S=.6,M=3.5/5;L=Math.round(L*M);var U=null,q;T.gracenotes.length>1&&(U=new r(L,"grace",_),$&&U.setHint(),U.mainNote=N);var Z,V=[];for(Z=T.gracenotes.length-1;Z>=0;Z--)x+=10,V[Z]=x,T.gracenotes[Z].accidental&&(x+=7);for(Z=0;Z<T.gracenotes.length;Z++){var ne=T.gracenotes[Z].verticalPos;q=U?null:O.uflags[_?5:3];var Y=[],ce=a(N,"noteheads.quarter",T.gracenotes[Z],{dir:"up",headx:-V[Z],extrax:-V[Z],flag:q,scale:S*this.voiceScale,accidentalSlot:Y});ce.notehead.highestVert=ce.notehead.pitch+L;var fe=ce.notehead;if(this.addSlursAndTies(N,T.gracenotes[Z],fe,I,"up",!0),N.addExtra(fe),T.gracenotes[Z].acciaccatura){var pe=T.gracenotes[Z].verticalPos+7*S,K=U?5:6;N.addRight(new p("flags.ugrace",-V[Z]+K,0,pe,{scalex:S,scaley:S}))}if(U){var he=T.gracenotes[Z].duration/2;_&&(he/=2);var ee={heads:[fe],abcelem:{averagepitch:ne,minpitch:ne,maxpitch:ne,duration:he}};U.add(ee)}else{var be=ne+.3333333333333333*S,_e=ne+7*S,Me=fe.dx+fe.w,Ce=-.6;N.addExtra(new p(null,Me,0,be,{type:"stem",pitch2:_e,linewidth:Ce}))}z(N,ne,ne,!1,d.getSymbolWidth("noteheads.quarter"),[],!0,fe.dx-1,.6);var We=T.rest&&(T.rest.type==="spacer"||T.rest.type==="invisible");Z===0&&!_&&this.graceSlurs&&!We&&I.addOther(new h({anchor1:fe,anchor2:D,isGrace:!0}))}return U&&(U.calcDir(),I.addBeam(U)),x};function A(T,I,N,D,L,_,x,S,M){var U,q=7,Z,V,ne;switch(L&&(_==="down"&&(q=3),_==="up"&&(q=11)),x&&(N<.5||N<1?q=7:q=5),I.rest.type){case"whole":U=O.rest[0],I.averagepitch=q,I.minpitch=q,I.maxpitch=q,D=0;break;case"rest":I.style==="rhythm"?U=O.rhythm[-S]:U=O.rest[-S],I.averagepitch=q,I.minpitch=q,I.maxpitch=q;break;case"invisible":case"invisible-multimeasure":case"spacer":U="",I.averagepitch=q,I.minpitch=q,I.maxpitch=q;break;case"multimeasure":U=O.rest.multi,I.averagepitch=q,I.minpitch=q,I.maxpitch=q,D=0;var Y=d.getSymbolWidth(U);T.addHead(new p(U,Y,Y*2,7));var ce=new p(""+I.rest.text,Y,Y,16,{type:"multimeasure-text"});T.addExtra(ce)}if(I.rest.type.indexOf("multimeasure")<0&&I.rest.type!=="invisible"){var fe=a(T,U,{verticalPos:q},{dot:D,scale:M});Z=fe.notehead,Z&&(T.addHead(Z),V=fe.accidentalshiftx,ne=fe.dotshiftx)}return{noteHead:Z,roomTaken:V,roomTakenRight:ne}}function R(T,I){for(var N=0;N<T.length;N++)if(JSON.stringify(T[N])===JSON.stringify(I))return;T.push(I)}return P.prototype.addNoteToAbcElement=function(T,I,N,D,L,_,x,S,M){var U=0,q,Z=0,V=0,ne,Y,ce=[],fe=[],pe=0,K=I.averagepitch>=6?"down":"up";D&&(K=D),L=I.style?I.style:L,(!L||L==="normal")&&(L="note");var he;_?he=O[L].nostem:he=O[L][-x],he||console.log("noteSymbol:",L,x,_);var ee;for(ee=K==="down"?I.pitches.length-2:1;K==="down"?ee>=0:ee<I.pitches.length;ee=K==="down"?ee-1:ee+1){var be=I.pitches[K==="down"?ee+1:ee-1],_e=I.pitches[ee],Me=K==="down"?be.pitch-_e.pitch:_e.pitch-be.pitch;Me<=1&&!be.printer_shift&&(_e.printer_shift=Me?"different":"same",(_e.verticalPos>11||_e.verticalPos<1)&&ce.push(_e.verticalPos-_e.verticalPos%2),K==="down"?Z=d.getSymbolWidth(he)+2:U=d.getSymbolWidth(he)+2)}var Ce=I.pitches.length;for(ee=0;ee<I.pitches.length;ee++){if(!S){var We;K==="down"&&ee!==0||K==="up"&&ee!==Ce-1?We=null:We=O[K==="down"?"dflags":"uflags"][-x]}var Fe;if(I.pitches[ee].style)Fe=O[I.pitches[ee].style][-x];else if(M.isPercussion&&this.percmap){Fe=he;var Ke=this.percmap[g(I.pitches[ee])];Ke&&Ke.noteHead&&O[Ke.noteHead]&&(Fe=O[Ke.noteHead][-x])}else Fe=he;I.pitches[ee].highestVert=I.pitches[ee].verticalPos;var H=(D==="up"||K==="up")&&ee===0,W=(D==="down"||K==="down")&&ee===Ce-1;if(H||W){if((I.startSlur||Ce===1)&&(I.pitches[ee].highestVert=I.pitches[Ce-1].verticalPos,k(I)<1&&(D==="up"||K==="up")&&(I.pitches[ee].highestVert+=6)),I.startSlur)for(I.pitches[ee].startSlur||(I.pitches[ee].startSlur=[]),Y=0;Y<I.startSlur.length;Y++)R(I.pitches[ee].startSlur,I.startSlur[Y]);if(I.endSlur)for(I.pitches[ee].highestVert=I.pitches[Ce-1].verticalPos,k(I)<1&&(D==="up"||K==="up")&&(I.pitches[ee].highestVert+=6),I.pitches[ee].endSlur||(I.pitches[ee].endSlur=[]),Y=0;Y<I.endSlur.length;Y++)R(I.pitches[ee].endSlur,I.endSlur[Y])}var B=!S&&x<=-1,G=a(T,Fe,I.pitches[ee],{dir:K,extrax:-Z,flag:We,dot:N,dotshiftx:U,scale:this.voiceScale,accidentalSlot:fe,shouldExtendStem:!D,printAccidentals:!M.isPercussion});pe=Math.max(d.getSymbolWidth(Fe),pe),T.extraw-=G.extraLeft,q=G.notehead,q&&(this.addSlursAndTies(T,I.pitches[ee],q,M,B?K:null,!1),I.gracenotes&&I.gracenotes.length>0&&(q.bottom=q.bottom-1),T.addHead(q)),Z+=G.accidentalshiftx,V=Math.max(V,G.dotshiftx)}if(B){var Q=Math.round(70*this.voiceScale)/10,ae=K==="down"?I.minpitch-Q:I.minpitch+1/3;ae>6&&!D&&(ae=6);var ue=K==="down"?I.maxpitch-1/3:I.maxpitch+Q;ue<6&&!D&&(ue=6);var xe=K==="down"||T.heads.length===0?0:T.heads[0].w,oe=K==="down"?1:-1;q&&q.c==="noteheads.slash.quarter"&&(K==="down"?ue-=1:ae+=1),q&&q.c==="noteheads.triangle.quarter"&&(K==="down"?ue-=.7:ae-=1.2),T.addRight(new p(null,xe,0,ae,{type:"stem",pitch2:ue,linewidth:oe,bottom:ae-1})),ne=Math.min(ae,ue)}return{noteHead:q,roomTaken:Z,roomTakenRight:V,min:ne,additionalLedgers:ce,dir:K,symbolWidth:pe}},P.prototype.addLyric=function(T,I){var N="";I.lyric.forEach(function(_){var x=_.divider===" "?"":_.divider;N+=_.syllable+x+`
|
|
136
|
+
`});var D=this.getTextSize.calc(N,"vocalfont","lyric"),L=I.positioning?I.positioning.vocalPosition:"below";T.addCentered(new p(N,0,D.width,void 0,{type:"lyric",position:L,height:D.height/m.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},P.prototype.createNote=function(T,I,N,D){var L=null,_=0,x=0,S=0,M=[],U,q=k(T),Z=!1;q===0&&(Z=!0,q=.25,I=!0);for(var V=Math.floor(Math.log(q)/Math.log(2)),ne=0,Y=Math.pow(2,V),ce=Y/2;Y<q;ne++,Y+=ce,ce/=2);T.startTriplet&&(this.tripletmultiplier=T.tripletMultiplier);var fe=q*this.tripletmultiplier;T.rest&&T.rest.type==="multimeasure"&&(fe=1),T.rest&&T.rest.type==="invisible-multimeasure"&&(fe=this.measureLength*T.rest.text);var pe=T.rest?"rest":"note",K=new e(T,fe,1,pe,this.tuneNumber,{durationClassOveride:T.duration*this.tripletmultiplier});if($&&K.setHint(),T.rest){this.measureLength===q&&T.rest.type!=="invisible"&&T.rest.type!=="spacer"&&T.rest.type.indexOf("multimeasure")<0&&(T.rest.type="whole");var he=A(K,T,q,ne,D.voicetotal>1,this.stemdir,N,V,this.voiceScale);L=he.noteHead,_=he.roomTaken,x=he.roomTakenRight}else{var ee=this.addNoteToAbcElement(K,T,ne,this.stemdir,this.style,Z,V,I,D);ee.min!==void 0&&(this.minY=Math.min(ee.min,this.minY)),L=ee.noteHead,_=ee.roomTaken,x=ee.roomTakenRight,M=ee.additionalLedgers,U=ee.dir,S=ee.symbolWidth}if(T.lyric!==void 0&&this.addLyric(K,T),T.gracenotes!==void 0&&(_+=this.addGraceNotes(T,D,K,L,this.stemHeight*this.voiceScale,this.isBagpipes,_)),T.decoration){var be=I&&U!=="up"?Math.min(-3,K.bottom-6):K.bottom;this.decoration.createDecoration(D,T.decoration,K.top,L?L.w:0,K,_,U,be,T.positioning,this.hasVocals,this.accentAbove)}if(T.barNumber&&K.addFixed(new p(T.barNumber,-10,0,0,{type:"barNumber"})),z(K,T.minpitch,T.maxpitch,T.rest,S,M,U,-2,1),T.chord!==void 0){var _e=b(this.getTextSize,K,T,_,x,S,this.jazzchords,this.germanAlphabet);_=_e.roomTaken,x=_e.roomTakenRight}return T.startTriplet&&(this.triplet=new c(T.startTriplet,L,{flatBeams:this.flatBeams})),T.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(L),this.triplet&&!T.startTriplet&&!T.endTriplet&&!(T.rest&&T.rest.type==="spacer")&&this.triplet.middleNote(L),K},P.prototype.addSlursAndTies=function(T,I,N,D,L,_){if(I.endTie&&this.ties.length>0){for(var x=!1,S=0;S<this.ties.length;S++)if(this.ties[S].anchor1&&this.ties[S].anchor1.pitch===N.pitch){this.ties[S].setEndAnchor(N),D.setRange(this.ties[S]),this.ties.splice(S,1),x=!0;break}x||(this.ties[0].setEndAnchor(N),D.setRange(this.ties[0]),this.ties.splice(0,1))}var M=D.voicetotal<2?-1:D.voicenumber;if(I.startTie){var U=new h({anchor1:N,force:this.stemdir==="down"||this.stemdir==="up",stemDir:this.stemdir,isGrace:_,voiceNumber:M,style:I.startTie.style});$&&U.setHint(),this.ties[this.ties.length]=U,D.addOther(U),T.startTie=!0}var q,Z;if(I.endSlur)for(var V=0;V<I.endSlur.length;V++)Z=I.endSlur[V],this.slurs[Z]?(q=this.slurs[Z],q.setEndAnchor(N),D.setRange(q),delete this.slurs[Z]):(q=new h({anchor2:N,stemDir:this.stemdir,voiceNumber:M}),$&&q.setHint(),D.addOther(q)),this.startlimitelem&&q.setStartX(this.startlimitelem);else if(!_)for(var ne in this.slurs)this.slurs.hasOwnProperty(ne)&&this.slurs[ne].addInternalNote(N);if(I.startSlur)for(V=0;V<I.startSlur.length;V++)Z=I.startSlur[V].label,q=new h({anchor1:N,stemDir:this.stemdir,voiceNumber:M,style:I.startSlur[V].style}),$&&q.setHint(),this.slurs[Z]=q,D.addOther(q)},P.prototype.addMeasureNumber=function(T,I){var N=this.getTextSize.calc(T,"measurefont","bar-number"),D=0;I.isClef&&(D+=N.width/2);var L=N.width>10&&I.abcelem.type==="treble"?13.5:11;I.addFixed(new p(T,D,N.width,L+N.height/m.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},P.prototype.createBarLine=function(T,I,N){var D=new e(I,0,10,"bar",this.tuneNumber),L=null,_=0;I.barNumber&&this.addMeasureNumber(I.barNumber,D);var x=I.type==="bar_right_repeat"||I.type==="bar_dbl_repeat",S=I.type!=="bar_left_repeat"&&I.type!=="bar_thick_thin"&&I.type!=="bar_invisible",M=I.type==="bar_right_repeat"||I.type==="bar_dbl_repeat"||I.type==="bar_left_repeat"||I.type==="bar_thin_thick"||I.type==="bar_thick_thin",U=I.type==="bar_left_repeat"||I.type==="bar_thick_thin"||I.type==="bar_thin_thin"||I.type==="bar_dbl_repeat",q=I.type==="bar_left_repeat"||I.type==="bar_dbl_repeat";if(x||q){for(var Z in this.slurs)this.slurs.hasOwnProperty(Z)&&this.slurs[Z].setEndX(D);this.startlimitelem=D}if(x&&(D.addRight(new p("dots.dot",_,1,7)),D.addRight(new p("dots.dot",_,1,5)),_+=6),S&&(L=new p(null,_,1,2,{type:"bar",pitch2:10,linewidth:.6}),D.addRight(L)),I.type==="bar_invisible"&&(L=new p(null,_,1,2,{type:"none",pitch2:10,linewidth:.6}),D.addRight(L)),I.decoration&&this.decoration.createDecoration(T,I.decoration,12,M?3:1,D,0,"down",2,I.positioning,this.hasVocals,this.accentAbove),M&&(_+=4,L=new p(null,_,4,2,{type:"bar",pitch2:10,linewidth:4}),D.addRight(L),_+=5),this.partstartelem&&I.endEnding&&(this.partstartelem.anchor2=L,this.partstartelem=null),U&&(_+=3,L=new p(null,_,1,2,{type:"bar",pitch2:10,linewidth:.6}),D.addRight(L)),q&&(_+=3,D.addRight(new p("dots.dot",_,1,7)),D.addRight(new p("dots.dot",_,1,5))),I.startEnding&&N&&T.voicenumber===0){var V=this.getTextSize.calc(I.startEnding,"repeatfont","").width;D.minspacing+=V+10,this.partstartelem=new l(I.startEnding,L,null),T.addOther(this.partstartelem)}return D.extraw-=5,I.chord!==void 0&&b(this.getTextSize,D,I,0,0,0,!1,this.germanAlphabet),D},ao=P,ao}var oo,Mf;function V7(){if(Mf)return oo;Mf=1;var e="http://www.w3.org/2000/svg";function r(o){this.svg=a(),this.currentGroup=[],o.appendChild(this.svg)}r.prototype.clear=function(){if(this.svg){var o=this.svg.parentNode;this.svg=a(),this.currentGroup=[],o&&(o.innerHTML="",o.appendChild(this.svg))}},r.prototype.setTitle=function(o){var s=document.createElement("title"),l=document.createTextNode(o);s.appendChild(l),this.svg.insertBefore(s,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(o,s){if(this.svg.setAttribute("viewBox","0 0 "+o+" "+s),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var l=this.svg.parentNode.getAttribute("class");l?l.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",l+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var d=s/o*100;this.svg.parentNode.style["padding-bottom"]=d+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(o,s){this.svg.setAttribute("width",o),this.svg.setAttribute("height",s)},r.prototype.setAttribute=function(o,s){this.svg.setAttribute(o,s)},r.prototype.setScale=function(o){o!==1?(this.svg.style.transform="scale("+o+","+o+")",this.svg.style["-ms-transform"]="scale("+o+","+o+")",this.svg.style["-webkit-transform"]="scale("+o+","+o+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(o){var s=document.createElementNS(e,"style");s.textContent=o,this.svg.insertBefore(s,this.svg.firstChild)},r.prototype.setParentStyles=function(o){for(var s in o)o.hasOwnProperty(s)&&this.svg.parentNode&&(this.svg.parentNode.style[s]=o[s]);if(this.dummySvg){var l=document.querySelector("body");l.removeChild(this.dummySvg),this.dummySvg=null}};function n(o,s,l){var d=l-o;return"M "+o+" "+s+" l "+d+" 0 l 0 1 l "+-d+" 0 z "}function i(o,s,l){var d=l-s;return"M "+o+" "+s+" l 0 "+d+" l 1 0 l 0 "+-d+" z "}r.prototype.rect=function(o){var s=[],l=o.x,d=o.y,p=o.x+o.width,m=o.y+o.height;return s.push(n(l,d,p)),s.push(n(l,m,p)),s.push(i(p,d,m)),s.push(i(l,m,d)),this.path({path:s.join(" "),stroke:"none","data-name":o["data-name"]})},r.prototype.dottedLine=function(o){var s=document.createElementNS(e,"line");s.setAttribute("x1",o.x1),s.setAttribute("x2",o.x2),s.setAttribute("y1",o.y1),s.setAttribute("y2",o.y2),s.setAttribute("stroke",o.stroke),s.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(s,this.svg.firstChild)},r.prototype.rectBeneath=function(o){var s=document.createElementNS(e,"rect");s.setAttribute("x",o.x),s.setAttribute("width",o.width),s.setAttribute("y",o.y),s.setAttribute("height",o.height),o.stroke&&s.setAttribute("stroke",o.stroke),o["stroke-opacity"]&&s.setAttribute("stroke-opacity",o["stroke-opacity"]),o.fill&&s.setAttribute("fill",o.fill),o["fill-opacity"]&&s.setAttribute("fill-opacity",o["fill-opacity"]),this.svg.insertBefore(s,this.svg.firstChild)},r.prototype.text=function(o,s,l,d){var p=document.createElementNS(e,"text");p.setAttribute("stroke","none");for(var m in s)s.hasOwnProperty(m)&&p.setAttribute(m,s[m]);for(var f=s["data-name"]=="free-text",u=(""+o).split(`
|
|
137
|
+
`),h=0;h<u.length;h++)if(!(f&&u[h]=="")){var c=document.createElementNS(e,"tspan");if(d)for(var v in d)d.hasOwnProperty(v)&&c.setAttribute(v,d[v]);if(c.setAttribute("x",s.x?s.x:0),h!==0&&c.setAttribute("dy","1.2em"),u[h].indexOf("")!==-1){var b=u[h].split("");if(c.textContent=b[0],b[1]){var g=document.createElementNS(e,"tspan");g.setAttribute("dy","-0.3em"),g.setAttribute("style","font-size:0.7em"),g.textContent=b[1],c.appendChild(g)}if(b[2]){var w=b[1]?"0.4em":"0.1em",k=document.createElementNS(e,"tspan");k.setAttribute("dy",w),k.setAttribute("style","font-size:0.7em"),k.textContent=b[2],c.appendChild(k)}}else f&&u[h].trim()==""?c.innerHTML=" ":c.textContent=u[h];p.appendChild(c)}return l?l.appendChild(p):this.append(p),p},r.prototype.richTextLine=function(o,s,l,d,p,m){var f=document.createElementNS(e,"text");f.setAttribute("stroke","none"),f.setAttribute("class",d),f.setAttribute("x",s),f.setAttribute("y",l),f.setAttribute("text-anchor",p),f.setAttribute("dominant-baseline","middle");for(var u=0;u<o.length;u++){for(var h=o[u],c=document.createElementNS(e,"tspan"),v=Object.keys(h.attrs),b=0;b<v.length;b++){var g=h.attrs[v[b]];g!==""&&c.setAttribute(v[b],g)}c.textContent=h.content,f.appendChild(c)}return m?m.appendChild(f):this.append(f),f},r.prototype.guessWidth=function(o,s){var l=this.createDummySvg(),d=this.text(o,s,l),p;try{p=d.getBBox(),isNaN(p.height)||!p.height?p={width:s["font-size"]/2,height:s["font-size"]+2}:p={width:p.width,height:p.height}}catch{p={width:s["font-size"]/2,height:s["font-size"]+2}}return l.removeChild(d),p},r.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=a();var o=["display: block !important;","height: 1px;","width: 1px;","position: absolute;"];this.dummySvg.setAttribute("style",o.join(""));var s=document.querySelector("body");s.appendChild(this.dummySvg)}return this.dummySvg};var t={};r.prototype.getTextSize=function(o,s,l){if(typeof o=="number"&&(o=""+o),!o||o.match(/^\s+$/))return{width:0,height:0};var d;if(o.length<20&&(d=o+JSON.stringify(s),t[d]))return t[d];var p=!l;l||(l=this.text(o,s));var m;try{m=l.getBBox(),isNaN(m.height)||!m.height?m=this.guessWidth(o,s):m={width:m.width,height:m.height}}catch{m=this.guessWidth(o,s)}return p&&(this.currentGroup.length>0?this.currentGroup[0].removeChild(l):this.svg.removeChild(l)),d&&(t[d]=m),m},r.prototype.openGroup=function(o){o=o||{};var s=document.createElementNS(e,"g");return o.klass&&s.setAttribute("class",o.klass),o.fill&&s.setAttribute("fill",o.fill),o.stroke&&s.setAttribute("stroke",o.stroke),o["data-name"]&&s.setAttribute("data-name",o["data-name"]),o.prepend?this.prepend(s):this.append(s),this.currentGroup.unshift(s),s},r.prototype.closeGroup=function(){var o=this.currentGroup.shift();return o&&o.children.length===0?(o.parentElement.removeChild(o),null):o},r.prototype.path=function(o){var s=document.createElementNS(e,"path");for(var l in o)o.hasOwnProperty(l)&&(l==="path"?s.setAttributeNS(null,"d",o.path):l==="klass"?s.setAttributeNS(null,"class",o[l]):o[l]!==void 0&&s.setAttributeNS(null,l,o[l]));return this.append(s),s},r.prototype.pathToBack=function(o){var s=document.createElementNS(e,"path");for(var l in o)o.hasOwnProperty(l)&&(l==="path"?s.setAttributeNS(null,"d",o.path):l==="klass"?s.setAttributeNS(null,"class",o[l]):s.setAttributeNS(null,l,o[l]));return this.prepend(s),s},r.prototype.lineToBack=function(o){for(var s=document.createElementNS(e,"line"),l=Object.keys(o),d=0;d<l.length;d++)s.setAttribute(l[d],o[l[d]]);return this.prepend(s),s},r.prototype.append=function(o){this.currentGroup.length>0?this.currentGroup[0].appendChild(o):this.svg.appendChild(o)},r.prototype.prepend=function(o){this.currentGroup.length>0?this.currentGroup[0].appendChild(o):this.svg.insertBefore(o,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(o,s){for(var l in s)s.hasOwnProperty(l)&&o.setAttributeNS(null,l,s[l])},r.prototype.moveElementToChild=function(o,s){o.appendChild(s)};function a(){var o=document.createElementNS(e,"svg");return o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.setAttribute("role","img"),o.setAttribute("fill","currentColor"),o.setAttribute("stroke","currentColor"),o}return oo=r,oo}var so,Df;function X7(){if(Df)return so;Df=1;var e=pt(),r=V7(),n=function(i){this.paper=new r(i),this.controller=null,this.space=3*e.SPACE,this.padding={},this.reset(),this.firefox112=navigator.userAgent.indexOf("Firefox/112.0")>=0};return n.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},n.prototype.newTune=function(i){this.abctune=i,this.setVerticalSpace(i.formatting),this.isPrint=i.media==="print",this.setPadding(i)},n.prototype.setLineThickness=function(i){this.lineThickness=i},n.prototype.setPaddingOverride=function(i){this.paddingOverride={top:i.paddingtop,bottom:i.paddingbottom,right:i.paddingright,left:i.paddingleft}},n.prototype.setPadding=function(i){function t(a,o,s,l,d){i.formatting[s]!==void 0?a.padding[o]=i.formatting[s]:a.paddingOverride[o]!==void 0?a.padding[o]=a.paddingOverride[o]:a.isPrint?a.padding[o]=l:a.padding[o]=d}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},n.prototype.adjustNonScaledItems=function(i){this.padding.top/=i,this.padding.bottom/=i,this.padding.left/=i,this.padding.right/=i,this.abctune.formatting.headerfont.size/=i,this.abctune.formatting.footerfont.size/=i},n.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:26.67+10,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},n.prototype.setVerticalSpace=function(i){i.staffsep!==void 0&&(this.spacing.staffSeparation=i.staffsep*4/3),i.composerspace!==void 0&&(this.spacing.composer=i.composerspace*4/3),i.partsspace!==void 0&&(this.spacing.parts=i.partsspace*4/3),i.textspace!==void 0&&(this.spacing.text=i.textspace*4/3),i.musicspace!==void 0&&(this.spacing.music=i.musicspace*4/3),i.titlespace!==void 0&&(this.spacing.title=i.titlespace*4/3),i.sysstaffsep!==void 0&&(this.spacing.systemStaffSeparation=i.sysstaffsep*4/3),i.stafftopmargin!==void 0&&(this.spacing.staffTopMargin=i.stafftopmargin*4/3),i.subtitlespace!==void 0&&(this.spacing.subtitle=i.subtitlespace*4/3),i.topspace!==void 0&&(this.spacing.top=i.topspace*4/3),i.vocalspace!==void 0&&(this.spacing.vocal=i.vocalspace*4/3),i.wordsspace!==void 0&&(this.spacing.words=i.wordsspace*4/3)},n.prototype.calcY=function(i){return this.y-i*e.STEP},n.prototype.yToPitch=function(i){return i/e.STEP},n.prototype.moveY=function(i,t){t===void 0&&(t=1),this.y+=i*t},n.prototype.absolutemoveY=function(i){this.y=i},so=n,so}var co,Rf;function K7(){if(Rf)return co;Rf=1;function e(r,n,i,t,a,o){var s=r.text;this.rows=[];var l;n&&this.rows.push({move:n});var d=i.calc("textfont","defined-text");if(s==="")this.rows.push({move:d.attr["font-size"]*2});else if(typeof s=="string"){let b=function(g){return g.replace(/^[ \t]*\n/gm,`X
|
|
138
|
+
`)};var v=b;this.rows.push({move:d.attr["font-size"]/2}),this.rows.push({left:t,text:s,font:"textfont",klass:"defined-text",anchor:"start",startChar:r.startChar,endChar:r.endChar,absElemType:"freeText",name:"free-text"});var p=b(s);l=o.calc(p,"textfont","defined-text"),this.rows.push({move:l.height})}else if(s){for(var m=0,f=t,u="textfont",h=0;h<s.length;h++)s[h].font?u=s[h].font:u="textfont",this.rows.push({left:f,text:s[h].text,font:u,klass:"defined-text",anchor:"start",startChar:r.startChar,endChar:r.endChar,absElemType:"freeText",name:"free-text"}),l=o.calc(s[h].text,i.calc(u,"defined-text").font,"defined-text"),f+=l.width+l.height/2,m=Math.max(m,l.height);this.rows.push({move:m})}else if(r.length===1){var c=a/2;this.rows.push({left:c,text:r[0].text,font:"textfont",klass:"defined-text",anchor:"middle",startChar:r.startChar,endChar:r.endChar,absElemType:"freeText",name:"free-text"}),l=o.calc(r[0].text,"textfont","defined-text"),this.rows.push({move:l.height})}}return co=e,co}var uo,Lf;function Q7(){if(Lf)return uo;Lf=1;function e(r,n,i){this.rows=[],r&&this.rows.push({move:r}),this.rows.push({separator:n,absElemType:"separator"}),i&&this.rows.push({move:i})}return uo=e,uo}var lo,Uf;function e$(){if(Uf)return lo;Uf=1;function e(r,n,i,t,a,o){this.rows=[],r&&this.rows.push({move:r});var s=n.titleleft?"start":"middle",l=n.titleleft?a:t;this.rows.push({left:l,text:i.text,font:"subtitlefont",klass:"text subtitle",anchor:s,startChar:i.startChar,endChar:i.endChar,absElemType:"subtitle",name:"subtitle"});var d=o.calc(i.text,"subtitlefont","text subtitle");this.rows.push({move:d.height})}return lo=e,lo}var fo,Zf;function Su(){if(Zf)return fo;Zf=1;function e(r,n,i){if(n.text){n.marginLeft||(n.marginLeft=0),n.klass||(n.klass=""),n.anchor||(n.anchor="start"),n.info||(n.info={startChar:-2,endChar:-2}),n.marginTop&&r.push({move:n.marginTop});var t={left:n.marginLeft,text:n.text,font:n.font,anchor:n.anchor,startChar:n.info.startChar,endChar:n.info.endChar,"dominant-baseline":n["dominant-baseline"]};n.absElemType&&(t.absElemType=n.absElemType),!n.inGroup&&n.klass&&(t.klass=n.klass),n.name&&(t.name=n.name),r.push(t);var a=i.calc("A",n.font,n.klass),o=n.text.split(`
|
|
139
|
+
`).length;if(n.text[n.text.length-1]===`
|
|
140
|
+
`&&o--,!n.noMove){var s=a.height*1.1*o;r.push({move:Math.round(s)}),n.marginBottom&&r.push({move:n.marginBottom})}}}return fo=e,fo}var ho,jf;function vb(){if(jf)return ho;jf=1;const e=Su();function r(n,i,t,a,o,s,l,d){var p=d.calc("i",t,a);if(i==="")n.push({move:p.height});else{if(typeof i=="string"){e(n,{marginLeft:s,text:i,font:t,klass:a,marginTop:l.marginTop,anchor:l.anchor,absElemType:l.absElemType,info:l.info,name:o},d);return}l.marginTop&&n.push({move:l.marginTop});var m=0,f={left:s,anchor:l.anchor,phrases:[]};a&&(f.klass=a),n.push(f);for(var u=0;u<i.length;u++){var h=i[u],c=h.font?h.font:d.attr(t,a).font,v={content:h.text};c&&(v.attrs={"font-family":d.getFamily(c.face),"font-size":c.size,"font-weight":c.weight,"font-style":c.style,"font-decoration":c.decoration}),f.phrases.push(v);var b=d.calc(h.text,c,a);m=Math.max(m,b.height),h.text[h.text.length-1]===" "&&p.width}n.push({move:m})}}return ho=r,ho}var po,Bf;function t$(){if(Bf)return po;Bf=1;const e=Su(),r=vb();function n(i,t,a,o,s,l,d,p,m,f){if(this.rows=[],i.header&&l){var u=f.calc("X","headerfont","abcjs-header abcjs-meta-top").height;e(this.rows,{marginLeft:d,text:i.header.left,font:"headerfont",klass:"header meta-top",marginTop:-u,info:t.header,name:"header"},f),e(this.rows,{marginLeft:d+s/2,text:i.header.center,font:"headerfont",klass:"header meta-top",marginTop:-u,anchor:"middle",info:t.header,name:"header"},f),e(this.rows,{marginLeft:d+s,text:i.header.right,font:"headerfont",klass:"header meta-top",marginTop:-u,anchor:"end",info:t.header,name:"header"},f)}l&&this.rows.push({move:p.top});var h=a.titleleft?"start":"middle",c=a.titleleft?d:d+s/2;if(i.title){var v=m?"abcjs-title":"";r(this.rows,i.title,"titlefont",v,"title",c,{marginTop:p.title,anchor:h,absElemType:"title",info:t.title},f)}if(o.length)for(var b=0;b<o.length&&o[b].subtitle;){var v=m?"abcjs-text abcjs-subtitle":"";r(this.rows,o[b].subtitle.text,"subtitlefont",v,"subtitle",c,{marginTop:p.subtitle,anchor:h,absElemType:"subtitle",info:o[b].subtitle},f),b++}if(i.rhythm||i.origin||i.composer){if(this.rows.push({move:p.composer}),i.rhythm&&i.rhythm.length>0){var g=!!(i.composer||i.origin),v=m?"abcjs-rhythm":"";e(this.rows,{marginLeft:d,text:i.rhythm,font:"infofont",klass:v,absElemType:"rhythm",noMove:g,info:t.rhythm,name:"rhythm"},f)}i.composer&&i.composer,i.origin&&i.origin;var w=i.composer?i.composer:"";if(i.origin&&(typeof w=="string"&&typeof i.origin=="string"?w+=" ("+i.origin+")":typeof w=="string"&&typeof i.origin!="string"?(w=[{text:w}],w.push({text:" ("}),w=w.concat(i.origin),w.push({text:")"})):(w.push({text:" ("}),w=w.concat(i.origin),w.push({text:")"}))),w){var v=m?"abcjs-composer":"";r(this.rows,w,"composerfont",v,"composer",d+s,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},f)}}if(i.author&&i.author.length>0){var v=m?"abcjs-author":"";r(this.rows,i.author,"composerfont",v,"author",d+s,{anchor:"end",absElemType:"author",info:t.author},f)}if(i.partOrder&&i.partOrder.length>0){var v=m?"abcjs-part-order":"";r(this.rows,i.partOrder,"partsfont",v,"part-order",d,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},f)}}return po=n,po}var mo,qf;function r$(){if(qf)return mo;qf=1;const e=Su(),r=vb();function n(a,o,s,l,d,p,m){this.rows=[],a.unalignedWords&&a.unalignedWords.length>0&&this.unalignedWords(a.unalignedWords,l,d,p,m),this.extraText(a,l,d,p,m),a.footer&&s&&this.footer(a.footer,o,l,m)}n.prototype.unalignedWords=function(a,o,s,l,d){var p=l?"abcjs-unaligned-words":"",m="wordsfont",f=d.calc("i",m,p);this.rows.push({move:s.words}),t(this.rows,"",a,o,m,"unalignedWords","unalignedWords",p,"unalignedWords",s,l,d),this.rows.push({move:f.height})};function i(a,o,s,l,d,p,m){s&&(o&&(typeof s=="string"?s=o+s:s=[{text:o}].concat(s)),d=p?"abcjs-extra-text "+d:"",r(a,s,"historyfont",d,"description",l,{absElemType:"extraText",anchor:"start"},m))}function t(a,o,s,l,d,p,m,f,u,h,c,v){if(s){f=c?"abcjs-extra-text "+f:"";var b=v.calc("A",d,f);if(typeof s=="string")o&&(s=o+`
|
|
141
|
+
`+s),e(a,{marginLeft:l,text:s,font:d,absElemType:"extraText",name:u,"dominant-baseline":"middle",klass:f},v);else{a.push({startGroup:m,klass:f,name:u}),a.push({move:h.info}),o&&(e(a,{marginLeft:l,text:o,font:d,absElemType:"extraText",name:u,"dominant-baseline":"middle"},v),a.push({move:b.height*3/4}));for(var g=0;g<s.length;g++)r(a,s[g],d,"",u,l,{anchor:"start"},v),g<s.length-1&&typeof s[g]=="string"&&typeof s[g+1]!="string"&&a.push({move:b.height*3/4});a.push({endGroup:m,absElemType:p,startChar:-1,endChar:-1,name:u}),a.push({move:b.height})}}}return n.prototype.extraText=function(a,o,s,l,d){i(this.rows,"Book: ",a.book,o,"abcjs-book",l,d),i(this.rows,"Source: ",a.source,o,"abcjs-source",l,d),i(this.rows,"Discography: ",a.discography,o,"abcjs-discography",l,d),t(this.rows,"Notes:",a.notes,o,"historyfont","extraText","notes","abcjs-notes","description",s,l,d),i(this.rows,"Transcription: ",a.transcription,o,"abcjs-transcription",l,d),t(this.rows,"History:",a.history,o,"historyfont","extraText","history","abcjs-history","description",s,l,d),i(this.rows,"Copyright: ",a["abc-copyright"],o,"abcjs-copyright",l,d),i(this.rows,"Creator: ",a["abc-creator"],o,"abcjs-creator",l,d),i(this.rows,"Edited By: ",a["abc-edited-by"],o,"abcjs-edited-by",l,d)},n.prototype.footer=function(a,o,s,l){var d="header meta-bottom",p="footerfont";this.rows.push({startGroup:"footer",klass:d}),e(this.rows,{marginLeft:s,text:a.left,font:p,klass:d,name:"footer"},l),e(this.rows,{marginLeft:s+o/2,text:a.center,font:p,klass:d,anchor:"middle",name:"footer"},l),e(this.rows,{marginLeft:s+o,text:a.right,font:p,klass:d,anchor:"end",name:"footer"},l)},mo=n,mo}var vo,Ff;function gb(){if(Ff)return vo;Ff=1;function e(n,i,t,a){if(n.indexOf(i)===0){var o=n.replace(i,""),s=parseInt(o,10);""+s===o&&(t[a]=s)}}function r(n,i){var t=[];if(n.absEl.elemset){for(var a={},o=0;o<n.absEl.elemset.length;o++){var s=n.absEl.elemset[o];if(s)for(var l=s.getAttribute("class").split(" "),d=0;d<l.length;d++)a[l[d]]=!0}for(var p=0;p<Object.keys(a).length;p++)t.push(Object.keys(a)[p])}for(var m={},f=0;f<t.length;f++)e(t[f],"abcjs-v",m,"voice"),e(t[f],"abcjs-l",m,"line"),e(t[f],"abcjs-m",m,"measure");n.staffPos&&(m.staffPos=n.staffPos);for(var u=i.target;u&&u.dataset&&!u.dataset.name&&u.tagName.toLowerCase()!=="svg";)u=u.parentNode;for(var h=i.target;h&&h.dataset&&!h.dataset.index&&h.tagName.toLowerCase()!=="svg";)h=h.parentNode;return h&&h.dataset&&(m.name=h.dataset.name,m.clickedName=u.dataset.name,m.parentClasses=h.classList),u&&u.classList&&(m.clickedClasses=u.classList),m.selectableElement=n.svgEl,{classes:t,analysis:m}}return vo=r,vo}var go,Hf;function n$(){if(Hf)return go;Hf=1;var e=pt(),r=gb();function n(y,C){if(y.rangeHighlight=w,y.dragging)for(var E=0;E<y.selectables.length;E++){var z=y.selectables[E];z.svgEl.getAttribute("selectable")==="true"&&(z.svgEl.setAttribute("tabindex",0),z.svgEl.setAttribute("data-index",E),z.svgEl.addEventListener("keydown",a.bind(y)),z.svgEl.addEventListener("keyup",o.bind(y)),z.svgEl.addEventListener("focus",t.bind(y)))}for(var A=0;A<C.length;A++)C[A].addEventListener("touchstart",u.bind(y),{passive:!0}),C[A].addEventListener("touchmove",h.bind(y),{passive:!0}),C[A].addEventListener("touchend",c.bind(y),{passive:!0}),C[A].addEventListener("mousedown",u.bind(y)),C[A].addEventListener("mousemove",h.bind(y)),C[A].addEventListener("mouseup",c.bind(y))}function i(y){var C=1,E=1,z=y.target.closest("svg"),A=0;z&&z.viewBox&&z.viewBox.baseVal&&(z.viewBox.baseVal.width!==0&&(C=z.viewBox.baseVal.width/z.clientWidth),z.viewBox.baseVal.height!==0&&(E=z.viewBox.baseVal.height/z.clientHeight),A=z.viewBox.baseVal.y);var R=y.target&&y.target.tagName==="svg",T,I;return R?(T=y.offsetX,I=y.offsetY):(T=y.layerX,I=y.layerY),T=T*C,I=I*E,[T,I+A]}function t(y){this.dragMechanism==="keyboard"&&this.dragYStep!==0&&this.dragTarget&&b.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,y),this.dragYStep=0}function a(y){switch(y.keyCode){case 38:case 40:y.preventDefault()}}function o(y){var C=!1,E=y.target.dataset.index;switch(y.keyCode){case 13:case 32:C=!0,this.dragTarget=this.selectables[E],this.dragIndex=E,this.dragMechanism="keyboard",c.bind(this)(y);break;case 38:C=!0,this.dragTarget=this.selectables[E],this.dragIndex=E,this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 40:C=!0,this.dragTarget=this.selectables[E],this.dragIndex=E,this.dragMechanism="keyboard",this.dragTarget&&this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*e.STEP+")"));break;case 9:this.dragYStep!==0&&c.bind(this)(y);break}C&&y.preventDefault()}function s(y,C){if(!C)return-1;var E=C.dataset;if(!E)return-1;for(var z=E.index,A=0;A<y.length;A++){var R=y[A].svgEl.dataset;if(R&&z===R.index)return A}return-1}function l(y,C,E){for(var z=9999999,A=-1,R=0;R<y.selectables.length&&z>0;R++){var T=y.selectables[R];if(y.getDim(T),T.dim.left<C&&T.dim.right>C&&T.dim.top<E&&T.dim.bottom>E)A=R,z=0;else if(T.dim.top<E&&T.dim.bottom>E){var I=Math.min(Math.abs(T.dim.left-C),Math.abs(T.dim.right-C));I<z&&(z=I,A=R)}else if(T.dim.left<C&&T.dim.right>C){var N=Math.min(Math.abs(T.dim.top-E),Math.abs(T.dim.bottom-E));N<z&&(z=N,A=R)}else{var D=Math.abs(C-T.dim.left)>Math.abs(C-T.dim.right)?Math.abs(C-T.dim.right):Math.abs(C-T.dim.left),L=Math.abs(E-T.dim.top)>Math.abs(E-T.dim.bottom)?Math.abs(E-T.dim.bottom):Math.abs(E-T.dim.top),_=Math.sqrt(D*D+L*L);_<z&&(z=_,A=R)}}return A>=0&&z<=12?A:-1}function d(y,C,E){if(y.x<=C.offsetX&&y.x+y.width>=C.offsetX&&y.y<=C.offsetY&&y.y+y.height>=C.offsetY)return[C.offsetX,C.offsetY];var z=Math.abs(C.layerY/E-C.offsetY);return z<3?[C.offsetX,C.offsetY]:[C.layerX,C.layerY]}function p(y){if(!y)return null;if(y.tagName==="svg")return y;if(!y.getAttribute)return null;for(var C=y.getAttribute("selectable");!C;)y.parentElement?(y=y.parentElement,y.tagName==="svg"?C=!0:C=y.getAttribute("selectable")):C=!0;return y}function m(y,C){var E,z,A,R=s(y.selectables,p(C.target));return R>=0?(A=d(y.selectables[R].svgEl.getBBox(),C,y.scale),E=A[0],z=A[1]):(A=i(C),E=A[0],z=A[1],R=l(y,E,z)),{x:E,y:z,clickedOn:R}}function f(y){if(!(!y||!y.target||!y.touches||y.touches.length<1)){var C=y.target.getBoundingClientRect(),E=y.touches[0].pageX-C.left,z=y.touches[0].pageY-C.top;y.touches[0].offsetX=E,y.touches[0].offsetY=z,y.touches[0].layerX=y.touches[0].pageX,y.touches[0].layerY=y.touches[0].pageY}}function u(y){var C=y;y.type==="touchstart"&&(f(y),y.touches.length>0&&(C=y.touches[0]));var E=m(this,C);E.clickedOn>=0&&(y.type==="touchstart"||y.button===0)&&this.selectables[E.clickedOn]&&(this.dragTarget=this.selectables[E.clickedOn],this.dragIndex=E.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:E.x,y:E.y},this.dragging&&this.dragTarget.isDraggable&&(O(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function h(y){var C=y;if(y.type==="touchmove"&&(f(y),y.touches.length>0&&(C=y.touches[0])),this.lastTouchMove=y,!(!this.dragTarget||!this.dragging||!this.dragTarget.isDraggable||this.dragMechanism!=="mouse"||!this.dragMouseStart)){var E=m(this,C),z=Math.round((E.y-this.dragMouseStart.y)/e.STEP);z!==this.dragYStep&&(this.dragYStep=z,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+z*e.STEP+")"))}}function c(y){var C=y;y.type==="touchend"&&this.lastTouchMove&&(f(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(C=this.lastTouchMove.touches[0])),this.dragTarget&&(g.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),b.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,C),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),P(this.renderer.svg,"abcjs-dragging-in-progress"))}function v(y){y>=0&&y<this.selectables.length&&(this.dragTarget=this.selectables[y],this.dragIndex=y,this.dragMechanism="keyboard",c.bind(this)({target:this.dragTarget.svgEl}))}function b(y,C,E,z,A){for(var R=r(y,A),T=R.classes,I=R.analysis,N=0;N<this.listeners.length;N++)this.listeners[N](y.absEl.abcelem,y.absEl.tuneNumber,T.join(" "),I,{step:C,max:E,index:z,setSelection:v.bind(this)},A)}function g(){for(var y=0;y<this.selected.length;y++)this.selected[y].unhighlight(void 0,this.renderer.foregroundColor);this.selected=[]}function w(y,C){g.bind(this)();for(var E=0;E<this.staffgroups.length;E++)for(var z=this.staffgroups[E].voices,A=0;A<z.length;A++)for(var R=z[A].children,T=0;T<R.length;T++){var I=R[T].abcelem.startChar,N=R[T].abcelem.endChar;(C>I&&y<N||C===y&&C===N)&&(this.selected[this.selected.length]=R[T],R[T].highlight(void 0,this.selectionColor))}}function k(y){var C=y.getAttribute("class");C||(C="");for(var E=C.split(" "),z={},A=0;A<E.length;A++)z[E[A]]=!0;return z}function $(y,C){var E=[];for(var z in C)C.hasOwnProperty(z)&&E.push(z);y.setAttribute("class",E.join(" "))}function O(y,C){if(y){var E=k(y.svg);E[C]=!0,$(y.svg,E)}}function P(y,C){if(y){var E=k(y.svg);delete E[C],$(y.svg,E)}}return go=n,go}var bo,Gf;function Iu(){if(Gf)return bo;Gf=1;function e(r,n,i,t,a){return n+(t-n)/(i-r)*(a-r)}return bo=e,bo}var yo,Jf;function i$(){if(Jf)return yo;Jf=1;var e=Nt(),r=pt(),n=Iu(),i=function(f){if(!(f.elems.length===0||f.allrests)){var u=s(f.stemsUp,f.isgrace),h=f.elems[0],c=f.elems[f.elems.length-1],v=0,b=f.stemsUp?h.abcelem.maxpitch:h.abcelem.minpitch;v=a(h,f.stemsUp,b,v),v=a(c,f.stemsUp,b,v),v=Math.max(f.stemHeight,v+3);var g=d(f.average,f.elems.length,v,f.stemsUp,h.abcelem.averagepitch,c.abcelem.averagepitch,f.isflat,f.min,f.max,f.isgrace),w=l(f.stemsUp,h,c);f.addBeam({startX:w[0],endX:w[1],startY:g[0],endY:g[1],dy:u});for(var k=m(f.elems,f.stemsUp,f.beams[0],f.isgrace,u),$=0;$<k.length;$++)f.addBeam(k[$]);p(f.elems,f.stemsUp,f.beams[0],u,f.mainNote)}},t=function(f){return f===void 0?0:Math.floor(Math.log(f)/Math.log(2))};function a(f,u,h,c){if(!f.children)return c;for(var v=0;v<f.children.length;v++){var b=f.children[v];u&&b.top!==void 0&&b.c==="flags.ugrace"?c=Math.max(c,b.top-h):!u&&b.bottom!==void 0&&b.c==="flags.ugrace"&&(c=Math.max(c,h-b.bottom+7))}return c}function o(f,u,h,c){if(c)return 0;var v=f-u,b=h/2;return v>b&&(v=b),v<-b&&(v=-b),v}function s(f,u){var h=f?r.STEP:-r.STEP;return u&&(h=h*.4),h}function l(f,u,h){var c=u.heads[f?0:u.heads.length-1],v=h.heads[f?0:h.heads.length-1],b=c.x;f&&(b+=c.w-.6);var g=v.x;return g+=f?v.w:.6,[b,g]}function d(f,u,h,c,v,b,g,w,k,$){var O=h-2,P=h-2,y=Math.round(c?Math.max(f+O,k+P):Math.min(f-O,w-P)),C=o(v,b,u,g),E=y+Math.floor(C/2),z=y+Math.floor(-C/2);return $||(c&&y<6||!c&&y>6)&&(E=6,z=6),[E,z]}function p(f,u,h,c,v){for(var b=0;b<f.length;b++){var g=f[b];if(!g.abcelem.rest){var w=!g.addExtra,k=w?v:g,$=g.heads[u?0:g.heads.length-1],O=1/5,P=$.pitch+(u?O:-O),y=u?$.w:0;w||(y+=$.dx);var C=$.x+y,E=n(h.startX,h.startY,h.endX,h.endY,C),z=u?-.6:.6;u||(E-=c/2/r.STEP),w&&(y+=g.heads[0].dx),$.c==="noteheads.slash.quarter"&&(u?P+=1:P-=1);var A=new e(null,y,0,P,{type:"stem",pitch2:E,linewidth:z});A.setX(k.x),k.addRight(A)}}}function m(f,u,h,c,v){for(var b=[],g=[],w=0;w<f.length;w++){var k=f[w];if(!k.abcelem.rest){var $=k.heads[u?0:k.heads.length-1],O=$.x+(u?$.w:0),P=n(h.startX,h.startY,h.endX,h.endY,O),y=u?-1.5:1.5;c&&(y=y*2/3);var C=k.abcelem.duration;C===0&&(C=.25);for(var E=t(C);E<-3;E++){var z=-4-E;if(g[z]?g[z].single=!1:g[z]={x:O+(u?-.6:0),y:P+y*(z+1),durlog:E,single:!0},w>0&&k.abcelem.beambr&&k.abcelem.beambr<=z+1){g[z].split||(g[z].split=[g[z].x]);var A=l(u,f[w-1],k);g[z].split[g[z].split.length-1]>=A[0]&&(A[0]+=k.w),g[z].split.push(A[0]),g[z].split.push(A[1])}}for(var R=g.length-1;R>=0;R--)if(w===f.length-1||t(f[w+1].abcelem.duration)>-R-4){var T=O,I=P+y*(R+1);g[R].single&&(w===0?T=O+5:w===f.length-1?T=O-5:f[w-1].duration===f[w+1].duration?T=w%2===0?O+5:O-5:T=f[w-1].duration>f[w+1].duration?O+5:O-5,I=n(h.startX,h.startY,h.endX,h.endY,T)+y*(R+1));var N={startX:g[R].x,endX:T,startY:g[R].y,endY:I,dy:v};if(g[R].split!==void 0){var D=g[R].split;N.endX<=D[D.length-1]&&(D[D.length-1]-=k.w),D.push(N.endX),N.split=g[R].split}b.push(N),g=g.slice(0,R)}}}return b}return yo=i,yo}var _o,Wf;function a$(){if(Wf)return _o;Wf=1;var e=Iu();function r(a){if(a.anchor1&&a.anchor2){a.hasBeam=!!a.anchor1.parent.beam&&a.anchor1.parent.beam===a.anchor2.parent.beam;var o=a.anchor1.parent.beam;if(a.hasBeam&&(o.elems[0]!==a.anchor1.parent||o.elems[o.elems.length-1]!==a.anchor2.parent)&&(a.hasBeam=!1),a.hasBeam){var s=n(o)?a.anchor1.x+a.anchor1.w:a.anchor1.x;a.yTextPos=i(s,a.anchor2.x,o),a.yTextPos+=n(o)?3:-2,a.xTextPos=t(s,a.anchor2.x),a.top=a.yTextPos+1,a.bottom=a.yTextPos-2,n(o)&&(a.endingHeightAbove=4)}else{a.startNote=Math.max(a.anchor1.parent.top,9)+4,a.endNote=Math.max(a.anchor2.parent.top,9)+4,a.anchor1.parent.type==="rest"&&a.anchor2.parent.type!=="rest"?a.startNote=a.endNote:a.anchor2.parent.type==="rest"&&a.anchor1.parent.type!=="rest"&&(a.endNote=a.startNote);for(var l=0,d=0;d<a.middleElems.length;d++)l=Math.max(l,a.middleElems[d].top);l+=4,(l>a.startNote||l>a.endNote)&&(a.startNote=l,a.endNote=l),a.flatBeams&&(a.startNote=Math.max(a.startNote,a.endNote),a.endNote=Math.max(a.startNote,a.endNote)),a.yTextPos=a.startNote+(a.endNote-a.startNote)/2,a.xTextPos=a.anchor1.x+(a.anchor2.x+a.anchor2.w-a.anchor1.x)/2,a.top=a.yTextPos+1}}delete a.middleElems,delete a.flatBeams}function n(a){return a.stemsUp}function i(a,o,s){if(s.beams.length===0)return 0;s=s.beams[0];var l=a+(o-a)/2;return e(s.startX,s.startY,s.endX,s.endY,l)}function t(a,o){return a+(o-a)/2}return _o=r,_o}var wo,Yf;function o$(){if(Yf)return wo;Yf=1;var e=i$(),r=Iu(),n=a$(),i=function(p){for(var m=0;m<p.beams.length;m++)if(p.beams[m].type==="BeamElem"){e(p.beams[m]),t(p.beams[m]);for(var f=0;f<p.beams[m].elems.length;f++)p.adjustRange(p.beams[m].elems[f])}for(p.staff.specialY.chordLines=o(p.children),m=0;m<p.otherchildren.length;m++){var u=p.otherchildren[m];u.type==="TripletElem"&&(n(u),p.adjustRange(u))}p.staff.top=Math.max(p.staff.top,p.top),p.staff.bottom=Math.min(p.staff.bottom,p.bottom)};function t(p){for(var m=1.5,f=0;f<p.elems.length;f++){var u=p.elems[f];if(u.top)for(var h=d(u,p),c=0;c<u.children.length;c++){var v=u.children[c];if(v.klass==="ornament"&&v.position!=="below"&&v.bottom-m<h){var b=h-v.bottom+m;v.bottom+=b,v.top+=b,v.pitch+=b,h=u.top=v.top}}}}function a(p,m){var f=m.getChordDim();if(f){for(var u=0;u<p.length;u++){var h=p[u]<f.left;if(h){u>0&&m.putChordInLane(u),p[u]=f.right;return}}p.push(f.right),m.putChordInLane(p.length-1)}}function o(p){var m=[0],f=[0],u,h,c;for(u=0;u<p.length;u++){for(h=0;h<p[u].children.length;h++)c=p[u].children[h],c.chordHeightAbove&&a(m,c);for(h=p[u].children.length-1;h>=0;h--)c=p[u].children[h],c.chordHeightBelow&&a(f,c)}return(m.length>1||f.length>1)&&l(p,m.length,f.length),{above:m.length,below:f.length}}function s(p){for(var m=0,f=0;f<p.children.length;f++){var u=p.children[f];u.chordHeightBelow&&m++}return m}function l(p,m,f){for(var u=0;u<p.length;u++){s(p[u]);for(var h=0;h<p[u].children.length;h++){var c=p[u].children[h];c.chordHeightAbove&&c.invertLane(m)}}}function d(p,m){return m=m.beams[0],r(m.startX,m.startY,m.endX,m.endY,p.x)}return wo=i,wo}var ko,Vf;function s$(){if(Vf)return ko;Vf=1;var e=pt(),r=function(m,f){for(var u,h=0;h<f.staffs.length;h++){var c=f.staffs[h],v={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(m.showDebug&&m.showDebug.indexOf("box")>=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),i(c,v,"lyricHeightAbove"),i(c,v,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+n,v.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+n,v.dynamicHeightAbove=c.top,v.volumeHeightAbove=c.top):(i(c,v,"dynamicHeightAbove"),i(c,v,"volumeHeightAbove")),i(c,v,"partHeightAbove"),i(c,v,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=m.spacing.vocal/e.STEP,v.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+n),c.specialY.chordHeightBelow){v.chordHeightBelow=c.bottom;var b=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(b*=c.specialY.chordLines.below),c.bottom-=b+n}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(v.volumeHeightBelow=c.bottom,v.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+n):c.specialY.volumeHeightBelow?(v.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+n):c.specialY.dynamicHeightBelow&&(v.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+n),m.showDebug&&m.showDebug.indexOf("box")>=0&&(c.positionY=v);for(var g=0;g<c.voices.length;g++){var w=f.voices[c.voices[g]];t(v,w,m.spacing)}if(u!==void 0){var k=c.top-10,$=u+k,O=m.spacing.systemStaffSeparation/e.STEP,P=O-$;P>0&&(c.top+=P)}c.top+=m.spacing.staffTopMargin/e.STEP,u=2-c.bottom}},n=1;function i(m,f,u,h){if(m.specialY[u]){var c=m.specialY[u];h&&(c*=h),m.top+=c+n,f[u]=m.top}}function t(m,f,u){var h,c;for(h=0;h<f.children.length;h++)c=f.children[h],a(m,c,u);for(h=0;h<f.otherchildren.length;h++)switch(c=f.otherchildren[h],c.type){case"CrescendoElem":o(m,c);break;case"DynamicDecoration":s(m,c);break;case"EndingElem":l(m,c);break;case"TieElem":var v=c.getYBounds();f.staff.top=Math.max(f.staff.top,v[0]),f.staff.top=Math.max(f.staff.top,v[1]),f.staff.bottom=Math.min(f.staff.bottom,v[0]),f.staff.bottom=Math.min(f.staff.bottom,v[1]);break}}function a(m,f,u){for(var h=0;h<f.children.length;h++){var c=f.children[h];for(var v in f.specialY)f.specialY.hasOwnProperty(v)&&c[v]&&(c.pitch=m[v],c.top===void 0&&(c.type==="TempoElement"?d(m,c):p(m,c,u),f.pushTop(c.top),f.pushBottom(c.bottom)))}}function o(m,f){f.dynamicHeightAbove?f.pitch=m.dynamicHeightAbove:f.pitch=m.dynamicHeightBelow}function s(m,f){f.volumeHeightAbove?f.pitch=m.volumeHeightAbove:f.pitch=m.volumeHeightBelow}function l(m,f){f.pitch=m.endingHeightAbove-2}function d(m,f){if(f.pitch=m.tempoHeightAbove,f.top=m.tempoHeightAbove,f.bottom=m.tempoHeightAbove,f.note){var u=f.pitch-f.totalHeightInPitches+1;f.note.top=u,f.note.bottom=u;for(var h=0;h<f.note.children.length;h++){var c=f.note.children[h];c.top+=u,c.bottom+=u,c.pitch+=u,c.pitch2!==void 0&&(c.pitch2+=u)}}}function p(m,f,u){switch(f.type){case"part":f.top=m.partHeightAbove+f.height,f.bottom=m.partHeightAbove;break;case"text":case"chord":f.chordHeightAbove?(f.top=m.chordHeightAbove,f.bottom=m.chordHeightAbove):(f.top=m.chordHeightBelow,f.bottom=m.chordHeightBelow);break;case"lyric":f.lyricHeightAbove?(f.top=m.lyricHeightAbove,f.bottom=m.lyricHeightAbove):(f.top=m.lyricHeightBelow+u.vocal/e.STEP,f.bottom=m.lyricHeightBelow+u.vocal/e.STEP,f.pitch-=u.vocal/e.STEP);break;case"debug":f.top=m.chordHeightAbove,f.bottom=m.chordHeightAbove;break}(f.pitch===void 0||f.top===void 0)&&console.error("RelativeElement position not set.",f.type,f.pitch,f.top,m)}return ko=r,ko}var $o,Xf;function c$(){if(Xf)return $o;Xf=1;var e=function(){};e.beginLayout=function(i,t){t.i=0,t.durationindex=0,t.startx=i,t.minx=i,t.nextx=i,t.spacingduration=0},e.layoutEnded=function(i){return i.i>=i.children.length},e.getNextX=function(i){return Math.max(i.minx,i.nextx)},e.getSpacingUnits=function(i){return Math.sqrt(i.spacingduration*8)},e.layoutOneItem=function(i,t,a,o,s){var l=a.children[a.i];if(!l)return 0;var d=i-a.minx,p=a.durationindex+l.duration>0?o:0;if(l.abcelem.el_type==="note"&&!l.abcelem.rest&&a.voicenumber!==0&&s){var m=s.children[s.i],f=m&&(l.abcelem.maxpitch<=m.abcelem.maxpitch+1&&l.abcelem.maxpitch>=m.abcelem.minpitch-1||l.abcelem.minpitch<=m.abcelem.maxpitch+1&&l.abcelem.minpitch>=m.abcelem.minpitch-1);if(f&&l.abcelem.minpitch===m.abcelem.minpitch&&l.abcelem.maxpitch===m.abcelem.maxpitch&&m.heads&&m.heads.length>0&&l.heads&&l.heads.length>0&&m.heads[0].c===l.heads[0].c&&(f=!1),f){var u=m.heads&&m.heads.length>0?m.heads[0].realWidth:m.fixed.w;l.adjustedWidth||(l.adjustedWidth=u+l.w),l.w=l.adjustedWidth;for(var h=0;h<l.children.length;h++){var c=l.children[h];c.name.indexOf("accidental")<0&&(c.adjustedWidth||(c.adjustedWidth=c.dx+u),c.dx=c.adjustedWidth)}}}var v=r(l,p);return d<v&&(a.i===0||l.type!=="bar"||a.children[a.i-1].type!=="part"&&a.children[a.i-1].type!=="tempo")&&(i+=v-d),l.setX(i),a.spacingduration=l.duration,a.minx=i+n(l),a.i!==a.children.length-1&&(a.minx+=l.minspacing),this.updateNextX(i,t,a),i},e.shiftRight=function(i,t){var a=t.children[t.i];a&&(a.setX(a.x+i),t.minx+=i,t.nextx+=i)},e.updateNextX=function(i,t,a){a.nextx=i+t*this.getSpacingUnits(a)},e.updateIndices=function(i){this.layoutEnded(i)||(i.durationindex+=i.children[i.i].duration,i.children[i.i].type==="bar"&&(i.durationindex=Math.round(i.durationindex*64)/64),i.i++)};function r(i,t){var a=0;return(i.type==="note"||i.type==="bar")&&(a=t),-i.extraw+a}function n(i){return i.w}return $o=e,$o}var xo,Kf;function u$(){if(Kf)return xo;Kf=1;var e=c$();function r(o){for(var s=0,l=0;l<o.length;l++){var d=o[l];if(d.children.length>0){var p=d.children.length-1,m=d.children[p];if(m.abcelem.el_type==="bar"){var f=m.children[0].x;f>s?s=f:m.children[0].x=s}}}}var n=function(o,s,l,d,p){var m=1e-7,f=0,u=1e3,h=p;d.startx=h;var c,v=0;for(l&&console.log("init layout",o),c=0;c<d.voices.length;c++)e.beginLayout(h,d.voices[c]);for(var b=0;!i(d.voices);){for(v=null,c=0;c<d.voices.length;c++)!e.layoutEnded(d.voices[c])&&(!v||t(d.voices[c])<v)&&(v=t(d.voices[c]));var g=[],w=[];for(c=0;c<d.voices.length;c++){var k=t(d.voices[c]);k-v>m?w.push(d.voices[c]):g.push(d.voices[c])}b=0;var $=0;for(c=0;c<g.length;c++)e.getNextX(g[c])>h&&(h=e.getNextX(g[c]),b=e.getSpacingUnits(g[c]),$=g[c].spacingduration);f+=b,u=Math.min(u,b),l&&console.log("currentduration: ",v,f,u);var O=void 0;for(c=0;c<g.length;c++){var P=g[c];P.voicenumber===0&&(O=c);var y=O!==void 0&&g[O].voicenumber!==P.voicenumber?g[O]:void 0;a(P,y)||(y=void 0);var C=e.layoutOneItem(h,o,P,s,y),E=C-h;if(E>0){h=C;for(var z=0;z<c;z++)e.shiftRight(E,g[z])}}for(c=0;c<w.length;c++)w[c].spacingduration-=$,e.updateNextX(h,o,w[c]);for(c=0;c<g.length;c++){var A=g[c];e.updateIndices(A)}}for(c=0;c<d.voices.length;c++)e.getNextX(d.voices[c])>h&&(h=e.getNextX(d.voices[c]),b=e.getSpacingUnits(d.voices[c]));return r(d.voices),f+=b,d.setWidth(h),{spacingUnits:f,minSpace:u}};function i(o){for(var s=0;s<o.length;s++)if(!e.layoutEnded(o[s]))return!1;return!0}function t(o){return o.durationindex-(o.children[o.i]&&o.children[o.i].duration>0?0:5e-7)}function a(o,s){return!o||!o.staff||!o.staff.voices||o.staff.voices.length===0||!s||!s.staff||!s.staff.voices||s.staff.voices.length===0?!1:o.staff.voices[0]===s.staff.voices[0]}return xo=n,xo}var So,Qf;function bb(){if(Qf)return So;Qf=1;function e(t,a,o,s,l){var d=t.padding.left,p=0,m,f;for(m=0;m<o.length;m++)o[m].header&&(f=a.calc(o[m].header,"voicefont",""),p=Math.max(p,f.width));if(p=r(p,s,a),p=r(p,l,a),p){var u=a.calc("A","voicefont","");p+=u.width}d+=p;var h=0;return h=n(s,d,h),h=n(l,d,h),d+h}function r(t,a,o){if(a){for(var s=0;s<a.length;s++)if(a[s].header){var l=o.calc(a[s].header,"voicefont","");t=Math.max(t,l.width)}}return t}function n(t,a,o){if(t)for(var s=0;s<t.length;s++)i(a,t[s]),o=Math.max(o,t[s].getWidth());return o}function i(t,a){a.x=t}return So=e,So}var Io,ed;function l$(){if(ed)return Io;ed=1;var e=bb();function r(i,t,a){var o=e(i,t.getTextSize,t.voices,t.brace,t.bracket),s=n(t,a.minPadding),l=s.totalDuration,d=s.minSpacing,p=d*l;a.minWidth&&(p=Math.max(p,a.minWidth));var m=a.minPadding?a.minPadding/2:2;t.startx=o,t.w=p+o;for(var f=0;f<t.voices.length;f++){var u=t.voices[f];u.startx=o,u.w=p+o;for(var h=o,c=!1,v=0,b=0;b<u.children.length;b++){var g=u.children[b];c||(g.duration!==0?(c=!0,v=(p+o-h)/l,t.gridStart=h):(g.x=h,h+=g.w+g.minspacing)),c&&(a.align==="center"?g.x=h+g.duration*v/2-g.w/2:g.duration===0?g.x=h+1-g.w:g.x=h+m-g.extraw,h+=g.duration*v);for(var w=0;w<g.children.length;w++){var k=g.children[w],$=k.dx?k.dx:0;k.x=g.x+$}}t.gridEnd=h}return p}function n(i,t){for(var a=0,o=0,s=0;s<i.voices.length;s++){for(var l=0,d=i.voices[s],p=0;p<d.children.length;p++){var m=d.children[p];if(l+=m.duration,m.duration){var f=(m.w+t)/m.duration;a=Math.max(a,f)}}o=Math.max(o,l)}return{totalDuration:o,minSpacing:a}}return Io=r,Io}var To,td;function f$(){if(td)return To;td=1;var e=o$(),r=s$(),n=u$(),i=bb(),t=l$(),a=function(d,p,m,f,u,h){var c,v,b=m;for(c=0;c<p.lines.length;c++)if(v=p.lines[c],v.staff){var g;h!==void 0?g=t(d,v.staffGroup,h):g=o(d,b,f,v.staffGroup,p.formatting,c===p.lines.length-1,!1),Math.round(g)>Math.round(b)&&(b=g,u&&(c=-1))}for(c=0;c<p.lines.length;c++)if(v=p.lines[c],v.staffGroup&&v.staffGroup.voices){for(var w=0;w<v.staffGroup.voices.length;w++)e(v.staffGroup.voices[w]);r(d,v.staffGroup)}for(c=0;c<p.lines.length;c++)v=p.lines[c],v.staffGroup&&v.staffGroup.setHeight();return b},o=function(d,p,m,f,u,h,c){for(var v=i(d,f.getTextSize,f.voices,f.brace,f.bracket),b=m,g=0;g<8;g++){var w=n(b,d.minPadding,c,f,v);if(b=s(h,u.stretchlast,p+d.padding.left,f.w,b,w.spacingUnits,w.minSpace,d.padding.left+d.padding.right),b===null)break}return l(f.voices),f.w-v};function s(d,p,m,f,u,h,c,v){if(d)if(p===void 0){if(f/m<.66)return null}else{var b=1-(f+v)/m,g=b<p;if(!g)return null}if(Math.abs(m-f)<2)return null;var w=h*u,k=f-w;return h>0?(u=(m-k)/h,u*c>50&&(u=50/c),u):null}function l(d){for(var p=0;p<d.length;p++)for(var m=d[p],f=1;f<m.children.length-1;f++){var u=m.children[f];if(u.abcelem.rest&&(u.abcelem.rest.type==="whole"||u.abcelem.rest.type==="multimeasure")){var h=m.children[f-1],c=m.children[f+1];u.center(h,c)}}}return To=a,To}var Co,rd;function d$(){if(rd)return Co;rd=1;var e=function(n){this.shouldAddClasses=n.shouldAddClasses,this.reset()};return e.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},e.prototype.incrLine=function(){this.lineNumber===null?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},e.prototype.incrVoice=function(){this.voiceNumber===null?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},e.prototype.isInMeasure=function(){return this.measureNumber!==null},e.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},e.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},e.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},e.prototype.incrNote=function(){this.noteNumber++},e.prototype.measureTotal=function(){for(var r=0,n=0;n<this.lineNumber;n++)r+=this.measureTotalPerLine[n]?this.measureTotalPerLine[n]:0;return this.measureNumber&&(r+=this.measureNumber),r},e.prototype.getCurrent=function(r){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},e.prototype.generate=function(r){if(!this.shouldAddClasses)return"";var n=[];if(r&&r.length>0&&n.push(r),r==="abcjs-tab-number")return n.join(" ");if(r==="text instrument-name")return"abcjs-text abcjs-instrument-name";if(this.lineNumber!==null&&n.push("l"+this.lineNumber),this.measureNumber!==null&&n.push("m"+this.measureNumber),this.measureNumber!==null&&n.push("mm"+this.measureTotal()),this.voiceNumber!==null&&n.push("v"+this.voiceNumber),r&&(r.indexOf("note")>=0||r.indexOf("rest")>=0||r.indexOf("lyric")>=0)&&this.noteNumber!==null&&n.push("n"+this.noteNumber),n.length>0){n=n.join(" "),n=n.split(" ");for(var i=0;i<n.length;i++)n[i].indexOf("abcjs-")!==0&&n[i].length>0&&(n[i]="abcjs-"+n[i])}return n.join(" ")},Co=e,Co}var zo,nd;function h$(){if(nd)return zo;nd=1;var e=function(n,i){this.formatting=n,this.classes=i};return e.prototype.updateFonts=function(r){r.gchordfont&&(this.formatting.gchordfont=r.gchordfont),r.tripletfont&&(this.formatting.tripletfont=r.tripletfont),r.annotationfont&&(this.formatting.annotationfont=r.annotationfont),r.vocalfont&&(this.formatting.vocalfont=r.vocalfont)},e.prototype.getFamily=function(r){return r[0]==='"'&&r[r.length-1]==='"'?r.substring(1,r.length-1):r},e.prototype.calc=function(r,n){var i;typeof r=="string"?(i=this.formatting[r],i?i={face:i.face,size:Math.round(i.size*4/3),decoration:i.decoration,style:i.style,weight:i.weight,box:i.box}:i={face:"Arial",size:Math.round(48/3),decoration:"underline",style:"normal",weight:"normal"}):i={face:r.face,size:Math.round(r.size*4/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box};var t=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;i.padding=i.size*t;var a={"font-size":i.size,"font-style":i.style,"font-family":this.getFamily(i.face),"font-weight":i.weight,"text-decoration":i.decoration,class:this.classes.generate(n)};return{font:i,attr:a}},zo=e,zo}var Eo,id;function p$(){if(id)return Eo;id=1;var e=function(n,i){this.getFontAndAttr=n,this.svg=i};return e.prototype.updateFonts=function(r){this.getFontAndAttr.updateFonts(r)},e.prototype.attr=function(r,n){return this.getFontAndAttr.calc(r,n)},e.prototype.getFamily=function(r){return r[0]==='"'&&r[r.length-1]==='"'?r.substring(1,r.length-1):r},e.prototype.calc=function(r,n,i,t){var a;typeof n=="string"?a=this.attr(n,i):a={font:{face:n.face,size:n.size,decoration:n.decoration,style:n.style,weight:n.weight},attr:{"font-size":n.size,"font-style":n.style,"font-family":this.getFamily(n.face),"font-weight":n.weight,"text-decoration":n.decoration,class:this.getFontAndAttr.classes.generate(i)}};var o=this.svg.getTextSize(r,a.attr,t);return a.font.box?{height:o.height+a.font.padding*4,width:o.width+a.font.padding*4}:o},e.prototype.baselineToCenter=function(r,n,i,t,a){var o=this.calc(r,n,i).height,s=this.attr(n,i).font.size;return o*.5+(a-t-2)*s},Eo=e,Eo}var No,ad;function lr(){if(ad)return No;ad=1;var e=function(){for(var r=0,n,i=arguments[r++],t=[],a,o,s,l;i;){if(a=/^[^\x25]+/.exec(i))t.push(a[0]);else if(a=/^\x25{2}/.exec(i))t.push("%");else if(a=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(i)){if((n=arguments[a[1]||r++])==null||n==null)throw"Too few arguments.";if(/[^s]/.test(a[7])&&typeof n!="number")throw"Expecting number but found "+typeof n;switch(a[7]){case"b":n=n.toString(2);break;case"c":n=String.fromCharCode(n);break;case"d":n=parseInt(n);break;case"e":n=a[6]?n.toExponential(a[6]):n.toExponential();break;case"f":n=a[6]?parseFloat(n).toFixed(a[6]):parseFloat(n);break;case"o":n=n.toString(8);break;case"s":n=(n=String(n))&&a[6]?n.substring(0,a[6]):n;break;case"u":n=Math.abs(n);break;case"x":n=n.toString(16);break;case"X":n=n.toString(16).toUpperCase();break}n=/[def]/.test(a[7])&&a[2]&&n>0?"+"+n:n,s=a[3]?a[3]=="0"?"0":a[3][1]:" ",l=a[5]-String(n).length,o=a[5]?str_repeat(s,l):"",t.push(a[4]?n+o:o+n)}else throw"Huh ?!";i=i.substring(a[0].length)}return t.join("")};return No=e,No}var Ao,od;function At(){if(od)return Ao;od=1;function e(r){return parseFloat(r.toFixed(2))}return Ao=e,Ao}var Po,sd;function Vt(){if(sd)return Po;sd=1;var e=At();function r(n,i,t){var a=i.y;if(i.phrases){var d=n.paper.richTextLine(i.phrases,i.x,i.y,i.klass,i.anchor);return d}if(i.lane){var o=i.dim.font.size*.25;a+=(i.dim.font.size+o)*i.lane}var s;i.dim?(s=i.dim,s.attr.class=i.klass):s=n.controller.getFontAndAttr.calc(i.type,i.klass),i.anchor&&(s.attr["text-anchor"]=i.anchor),i["dominant-baseline"]&&(s.attr["dominant-baseline"]=i["dominant-baseline"]),s.attr.x=i.x,s.attr.y=a,i.centerVertically||(s.attr.y+=s.font.size),i.type==="debugfont"&&(console.log("Debug msg: "+i.text),s.attr.stroke="#ff0000"),i.cursor&&(s.attr.cursor=i.cursor);var l;i.name==="free-text"?l=i.text.replace(/^[ \t]*\n/gm,`
|
|
142
|
+
`):l=i.text.replace(/\n\n/g,`
|
|
143
|
+
|
|
144
|
+
`),l=l.replace(/^\n/,`
|
|
145
|
+
`),s.font.box&&(t||n.paper.openGroup({klass:s.attr.class,fill:n.foregroundColor,"data-name":i.name}),s.attr["text-anchor"]==="end"?s.attr.x-=s.font.padding:s.attr["text-anchor"]==="start"&&(s.attr.x+=s.font.padding),s.attr.y+=s.font.padding,delete s.attr.class),i.noClass&&delete s.attr.class,s.attr.x=e(s.attr.x),s.attr.y=e(s.attr.y),i.name&&(s.attr["data-name"]=i.name);var d=n.paper.text(l,s.attr);if(s.font.box){var p=d.getBBox(),m=0;s.attr["text-anchor"]==="middle"?m=p.width/2+s.font.padding:s.attr["text-anchor"]==="end"&&(m=p.width+s.font.padding*2);var f=0;i.centerVertically&&(f=p.height-s.font.padding),n.paper.rect({"data-name":"box",x:Math.round(i.x-m),y:Math.round(a-f),width:Math.round(p.width+s.font.padding*2),height:Math.round(p.height+s.font.padding*2)}),t||(d=n.paper.closeGroup())}return d}return Po=r,Po}var Oo,cd;function m$(){if(cd)return Oo;cd=1;var e=lr(),r=pt(),n=Vt();function i(l,d,p){var m=d.startVoice.staff.absoluteY-r.STEP*10;return d.endVoice&&d.endVoice.staff?d.endY=d.endVoice.staff.absoluteY-r.STEP*2:d.lastContinuedVoice&&d.lastContinuedVoice.staff?d.endY=d.lastContinuedVoice.staff.absoluteY-r.STEP*2:d.endY=d.startVoice.staff.absoluteY-r.STEP*2,s(l,d.x,m,d.endY,d.type,d.header,p)}function t(l,d,p,m,f){d+=r.STEP;var u=r.STEP*.75,h=r.STEP*.75,c=m-p,v=e("M %f %f l %f %f l %f %f l %f %f z",d,p-h,0,c+h*2,u,0,0,-(c+h*2)),b=r.STEP*2,g=r.STEP;return v+=e("M %f %f q %f %f %f %f q %f %f %f %f z",d+u,p-h,b*.6,g*.2,b,-g,-b*.1,g*.3,-b,g+r.STEP),v+=e("M %f %f q %f %f %f %f q %f %f %f %f z",d+u,p+h+c,b*.6,-g*.2,b,g,-b*.1,-g*.3,-b,-g-r.STEP),l.paper.path({path:v,stroke:l.foregroundColor,fill:l.foregroundColor,class:l.controller.classes.generate(f),"data-name":f})}function a(l,d,p,m,f){var u=m-p,h=o(d,p,[7.5,-8,21,0,18.5,-10.5,7.5],[0,u/5.5,u/3.14,u/2,u/2.93,u/4.88,0]);return h+=o(d,p,[0,17.5,-7.5,6.6,-5,20,0],[u/2,u/1.46,u/1.22,u,u/1.19,u/1.42,u/2]),l.paper.path({path:h,stroke:l.foregroundColor,fill:l.foregroundColor,class:l.controller.classes.generate(f),"data-name":f})}function o(l,d,p,m){return e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",l+p[0],d+m[0],l+p[1],d+m[1],l+p[2],d+m[2],l+p[3],d+m[3],l+p[4],d+m[4],l+p[5],d+m[5],l+p[6],d+m[6])}var s=function(l,d,p,m,f,u,h){var c;if(u){l.paper.openGroup({klass:l.controller.classes.generate("staff-extra voice-name"),"data-name":f});var v=p+(m-p)/2;v=v-l.controller.getTextSize.baselineToCenter(u,"voicefont","staff-extra voice-name",0,1),n(l,{x:l.padding.left,y:v,text:u,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return f==="brace"?c=a(l,d,p,m,f):f==="bracket"&&(c=t(l,d,p,m,f)),u&&(c=l.paper.closeGroup()),h.wrapSvgEl({el_type:f,startChar:-1,endChar:-1},c),c};return Oo=i,Oo}var Mo,ud;function wn(){if(ud)return Mo;ud=1;function e(r,n,i){var t=r.paper.path(n);return t}return Mo=e,Mo}var Do,ld;function v$(){if(ld)return Do;ld=1;var e=lr(),r=wn(),n=At();function i(c,v,b){(!v.anchor1||!v.anchor2||!v.anchor1.heads||!v.anchor2.heads||v.anchor1.heads.length===0||v.anchor2.heads.length===0)&&window.console.error("Glissando Element not set.");var g=4,w=c.calcY(v.anchor1.heads[0].pitch),k=c.calcY(v.anchor2.heads[0].pitch),$=v.anchor1.x+v.anchor1.w/2,O=v.anchor2.x+v.anchor2.w/2,P=t($,w,O,k),y=v.anchor1.w/2+g,C=v.anchor2.w/2+g,E=a($,w,O,k),z=o(w,E,y);o(k,E,-C);var A=s(P-y-C),R=h(c,$+y,z,A,E);return b.wrapSvgEl({el_type:"glissando",startChar:-1,endChar:-1},R),[R]}function t(c,v,b,g){var w=b-c,k=g-v;return Math.sqrt(w*w+k*k)}function a(c,v,b,g){return(g-v)/(b-c)}function o(c,v,b){return n(c+b*v)}function s(c){var v=5;return Math.max(2,Math.floor((c-v*2)/6))}var l=[[3.5,-4.8]],d=[[1.5,-1],[.3,-.3],[-3.5,3.8]],p=[[-1.5,2]],m=[[3,4],[3,-4]],f=[[-3,4],[-3,-4]];function u(c,v){for(var b="",g=0;g<c.length;g++)b+="l"+c[g][0]+" "+o(c[g][1],v,c[g][0]);return b}var h=function(c,v,b,g,w){var k=e("M %f %f",v,b);k+=u(l,w);var $;for($=0;$<g;$++)k+=u(m,w);for(k+=u(d,w),$=0;$<g;$++)k+=u(f,w);return k+=u(p,w)+"z",r(c,{path:k,highlight:"stroke",stroke:c.foregroundColor,class:c.controller.classes.generate("decoration"),"data-name":"glissando"})};return Do=i,Do}var Ro,fd;function g$(){if(fd)return Ro;fd=1;var e=lr(),r=wn(),n=At();function i(a,o,s){o.pitch===void 0&&window.console.error("Crescendo Element y-coordinate not set.");var l=a.calcY(o.pitch)+4,d=8,p=o.anchor1?o.anchor1.x:0,m=o.anchor2?o.anchor2.x:800,f;return o.dir==="<"?f=t(a,l+d/2,l,l+d/2,l+d,p,m):f=t(a,l,l+d/2,l+d,l+d/2,p,m),s.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},f),[f]}var t=function(a,o,s,l,d,p,m){o=n(o),s=n(s),l=n(l),d=n(d),p=n(p),m=n(m);var f=e("M %f %f L %f %f M %f %f L %f %f",p,o,m,s,p,l,m,d);return r(a,{path:f,highlight:"stroke",stroke:a.foregroundColor,class:a.controller.classes.generate("dynamics decoration"),"data-name":"dynamics"})};return Ro=i,Ro}var Lo,dd;function Tu(){if(dd)return Lo;dd=1;var e=At();function r(){this.ingroup=!1}r.prototype.beginGroup=function(i,t){this.paper=i,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0,this.paper.openGroup()},r.prototype.isInGroup=function(){return this.ingroup},r.prototype.addPath=function(i){if(i=i||[],i.length!==0){i[0][0]="m",i[0][1]=e(i[0][1]-this.lastM[0]),i[0][2]=e(i[0][2]-this.lastM[1]),this.lastM[0]+=i[0][1],this.lastM[1]+=i[0][2],this.path.push(i[0]);for(var t=1,a=i.length;t<a;t++)i[t][0]==="m"&&(this.lastM[0]+=i[t][1],this.lastM[1]+=i[t][2]),this.path.push(i[t])}},r.prototype.endGroup=function(i,t){this.ingroup=!1;for(var a="",o=0;o<this.path.length;o++)a+=this.path[o].join(" ");this.path=[];var s=this.paper.closeGroup();return s&&(s.setAttribute("class",this.controller.classes.generate(i)),s.setAttribute("fill",this.controller.renderer.foregroundColor),s.setAttribute("stroke","none"),s.setAttribute("data-name",t)),s};var n=new r;return Lo=n,Lo}var Uo,hd;function Cu(){if(hd)return Uo;hd=1;var e=Vt(),r=Yt(),n=Tu();function i(a,o,s,l,d){var p,m;if(!l)return null;if(l.length>1&&l.indexOf(".")<0){var f=n.isInGroup()?"":d.klass;a.paper.openGroup({"data-name":d.name,klass:f});for(var u=0,h=0;h<l.length;h++){var c=l[h];m=r.getYCorr(c),p=r.printSymbol(o+u,a.calcY(s+m),c,a.paper,{stroke:d.stroke,fill:d.fill}),p?h<l.length-1&&(u+=t(c,l[h+1],r.getSymbolWidth(c))):e(a,{x:o,y:a.y,text:"no symbol:"+l,type:"debugfont",klass:"debug-msg",anchor:"start"},!1)}var v=a.paper.closeGroup();return v}else return m=r.getYCorr(l),n.isInGroup()?p=r.printSymbol(o,a.calcY(s+m),l,a.paper,{"data-name":d.name}):p=r.printSymbol(o,a.calcY(s+m),l,a.paper,{klass:d.klass,stroke:d.stroke,fill:d.fill,"data-name":d.name}),p||(e(a,{x:o,y:a.y,text:"no symbol:"+l,type:"debugfont",klass:"debug-msg",anchor:"start"},!1),null)}function t(a,o,s){var l=s;return a==="f"&&o==="f"&&(l=l*2/3),a==="p"&&o==="p"&&(l=l*5/6),a==="f"&&o==="z"&&(l=l*5/8),l}return Uo=i,Uo}var Zo,pd;function b$(){if(pd)return Zo;pd=1;var e=Cu();function r(n,i,t){i.pitch===void 0&&window.console.error("Dynamic Element y-coordinate not set.");var a=1,o=1,s=e(n,i.anchor.x,i.pitch,i.dec,{scalex:a,scaley:o,klass:n.controller.classes.generate("decoration dynamics"),fill:n.foregroundColor,stroke:"none",name:"dynamics"});return t.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:i.dec},s),[s]}return Zo=r,Zo}var jo,md;function y$(){if(md)return jo;md=1;var e=lr(),r=Vt(),n=wn(),i=At();function t(s,l,d){s.paper.openGroup({klass:s.controller.classes.generate("triplet "+l.durationClass),"data-name":"triplet"}),l.hasBeam||o(s,l.anchor1.x,l.startNote,l.anchor2.x+l.anchor2.w,l.endNote),r(s,{x:l.xTextPos,y:s.calcY(l.yTextPos-1),text:""+l.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0,name:""+l.number},!0);var p=s.paper.closeGroup();return d.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},p),p}function a(s,l,d,p){return e("M %f %f L %f %f",i(s),i(l),i(d),i(p))}function o(s,l,d,p,m){d=s.calcY(d),m=s.calcY(m);var f=5,u="";u+=a(l,d,l,d+f),u+=a(p,m,p,m+f);var h=l+(p-l)/2,c=8,v=(m-d)/(p-l),b=h-c,g=d+(b-l)*v;u+=a(l,d,b,g);var w=h+c,k=d+(w-l)*v;u+=a(w,k,p,m),n(s,{path:u,stroke:s.foregroundColor,"data-name":"triplet-bracket"})}return jo=t,jo}var Bo,vd;function _$(){if(vd)return Bo;vd=1;var e=lr(),r=Vt(),n=wn(),i=At();function t(a,o,s,l,d){o.pitch===void 0&&window.console.error("Ending Element y-coordinate not set.");var p=i(a.calcY(o.pitch)),m=20,f="";o.anchor1&&(s=i(o.anchor1.x+o.anchor1.w),f+=e("M %f %f L %f %f ",s,p,s,i(p+m))),o.anchor2&&(l=i(o.anchor2.x),f+=e("M %f %f L %f %f ",l,p,l,i(p+m))),f+=e("M %f %f L %f %f ",s,p,l,p),a.paper.openGroup({klass:a.controller.classes.generate("ending"),fill:a.foregroundColor,"data-name":"ending"}),n(a,{path:f,stroke:a.foregroundColor,fill:a.foregroundColor,"data-name":"line"}),o.anchor1&&r(a,{x:i(s+5),y:i(a.calcY(o.pitch-.5)),text:o.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:o.text});var u=a.paper.closeGroup();return d.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}return Bo=t,Bo}var qo,gd;function w$(){if(gd)return qo;gd=1;var e=lr(),r=At();function n(a,o,s,l,d){i(o,s,l);var p="";o.anchor1?p+="abcjs-start-m"+o.anchor1.parent.counters.measure+"-n"+o.anchor1.parent.counters.note:p+="abcjs-start-edge",o.anchor2?p+=" abcjs-end-m"+o.anchor2.parent.counters.measure+"-n"+o.anchor2.parent.counters.note:p+=" abcjs-end-edge",o.hint&&(p="abcjs-hint");var m=o.fixedY?1.5:0,f=t(a,o.startX,o.endX,o.startY+m,o.endY+m,o.above,p,o.isTie,o.dotted),u=-1;o.anchor1&&!o.isTie&&(u=o.anchor1.parent.abcelem.startChar-1);var h=-1;return o.anchor2&&!o.isTie&&(h=o.anchor2.parent.abcelem.endChar+1),d.wrapSvgEl({el_type:"slur",startChar:u,endChar:h},f),[f]}var i=function(a,o,s){!a.anchor1||!a.anchor2||a.anchor1.pitch===a.anchor2.pitch&&a.internalNotes.length===0?a.isTie=!0:a.isTie=!1,a.isTie?(a.calcTieDirection(),a.calcX(o,s),a.calcTieY()):(a.calcSlurDirection(),a.calcX(o,s),a.calcSlurY()),a.avoidCollisionAbove()},t=function(a,o,s,l,d,p,m,f,u){var h=f?1.2:1.5;o=r(o+6),s=r(s+4),l=l+(p?h:-h),d=d+(p?h:-h);var c=r(a.calcY(l)),v=r(a.calcY(d)),b=s-o,g=v-c,w=Math.sqrt(b*b+g*g),k=b/w,$=g/w,O=w/3.5,P=f?10:25,y=(p?-1:1)*Math.min(P,Math.max(4,O)),C=r(o+O*k-y*$),E=r(c+O*$+y*k),z=r(s-O*k-y*$),A=r(v-O*$+y*k),R=2;m?m+=" slur":m="slur",m+=f?" tie":" legato";var T;if(u){m+=" dotted";var I=e("M %f %f C %f %f %f %f %f %f",o,c,C,E,z,A,s,v);T=a.paper.path({path:I,stroke:a.foregroundColor,fill:"none","stroke-dasharray":"5 5",class:a.controller.classes.generate(m),"data-name":f?"tie":"slur"})}else{var N=e("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",o,c,C,E,z,A,s,v,r(z-R*$),r(A+R*k),r(C-R*$),r(E+R*k),o,c);T=a.paper.path({path:N,stroke:"none",fill:a.foregroundColor,class:a.controller.classes.generate(m),"data-name":f?"tie":"slur"})}return T};return qo=n,qo}var Fo,bd;function k$(){if(bd)return Fo;bd=1;var e=wn(),r=At();function n(o,s){if(s.beams.length!==0){for(var l="",d=0;d<s.beams.length;d++){var p=s.beams[d];if(p.split){for(var m=t(o,p.startX,p.startY,p.endX,p.endY),f=[],u=0;u<p.split.length;u+=2)f.push([p.split[u],p.split[u+1]]);for(u=0;u<f.length;u++){var h=a(p.startX,p.startY,m,f[u][0]),c=a(p.startX,p.startY,m,f[u][1]);l+=i(o,f[u][0],h,f[u][1],c,p.dy)}}else l+=i(o,p.startX,p.startY,p.endX,p.endY,p.dy)}var v=("abcjs-d"+s.duration).replace(/\./g,"-"),b=o.controller.classes.generate("beam-elem "+v),g=e(o,{path:l,stroke:"none",fill:o.foregroundColor,class:b});return[g]}}function i(o,s,l,d,p,m){l=r(o.calcY(l)),p=r(o.calcY(p)),s=r(s),d=r(d);var f=r(l+m),u=r(p+m);return"M"+s+" "+l+" L"+d+" "+p+"L"+d+" "+u+" L"+s+" "+f+"z"}function t(o,s,l,d,p){return(p-l)/(d-s)}function a(o,s,l,d){var p=d-o;return s+p*l}return Fo=n,Fo}var Ho,yd;function zu(){if(yd)return Ho;yd=1;var e=Tu(),r=At();function n(i,t,a,o,s,l,d){if(a<0||o<s){var p=r(s);s=r(o),o=p}else o=r(o),s=r(s);t=r(t);var m=r(t+a);if(i.firefox112){t+=a/2;var u={x1:t,x2:t,y1:o,y2:s,stroke:i.foregroundColor,"stroke-width":Math.abs(a)};return l&&(u.class=l),d&&(u["data-name"]=d),i.paper.lineToBack(u)}for(var f=[["M",t,o],["L",t,s],["L",m,s],["L",m,o],["z"]],u={path:""},h=0;h<f.length;h++)u.path+=f[h].join(" ");return l&&(u.class=l),d&&(u["data-name"]=d),e.isInGroup()||(u.stroke="none",u.fill=i.foregroundColor),i.paper.pathToBack(u)}return Ho=n,Ho}var Go,_d;function $$(){if(_d)return Go;_d=1;var e=lr(),r=At();function n(i,t,a,o,s,l,d){var p=i.foregroundColor;t=r(t),a=r(a);var m=r(o-d),f=r(o+d);if(i.firefox112){o+=d/2;var u={x1:t,x2:a,y1:o,y2:o,stroke:i.foregroundColor,"stroke-width":Math.abs(d*2)};return s&&(u.class=s),l&&(u["data-name"]=l),i.paper.lineToBack(u)}var h=e("M %f %f L %f %f L %f %f L %f %f z",t,m,a,m,a,f,t,f),c={path:h,stroke:"none",fill:p};l&&(c["data-name"]=l),s&&(c.class=s);var v=i.paper.pathToBack(c);return v}return Go=n,Go}var Jo,wd;function yb(){if(wd)return Jo;wd=1;var e=$$();function r(n,i,t,a,o,s,l){var d=n.calcY(a);return e(n,i,t,d,o,s,l)}return Jo=r,Jo}var Wo,kd;function _b(){if(kd)return Wo;kd=1;var e=Vt(),r=zu(),n=yb(),i=Cu();function t(o,s,l){s.pitch===void 0&&window.console.error(s.type+" Relative Element y-coordinate not set.");var d=o.calcY(s.pitch);switch(s.type){case"symbol":if(s.c===null)return null;var p="symbol";s.klass&&(p+=" "+s.klass),s.graphelem=i(o,s.x,s.pitch,s.c,{scalex:s.scalex,scaley:s.scaley,klass:o.controller.classes.generate(p),name:s.name});break;case"debug":s.graphelem=e(o,{x:s.x,y:o.calcY(15),text:""+s.c,type:"debugfont",klass:o.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:s.dim},!1);break;case"tabNumber":var m="middle",f="tabnumberfont",u="abcjs-tab-number";s.isGrace&&(f="tabgracefont",d+=2.5,u="tab-grace"),s.graphelem=e(o,{x:s.x,y:d,text:""+s.c,type:f,klass:o.controller.classes.generate(u),anchor:m,centerVertically:!1,dim:s.dim,cursor:"default"},!1);break;case"barNumber":s.graphelem=e(o,{x:s.x,y:d,text:""+s.c,type:"measurefont",klass:o.controller.classes.generate("bar-number"),anchor:"middle",dim:s.dim,name:"bar-number"},!0);break;case"lyric":s.graphelem=e(o,{x:s.x,y:d,text:s.c,type:"vocalfont",klass:o.controller.classes.generate("lyric"),anchor:"middle",dim:s.dim,name:"lyric"},!1);break;case"chord":s.graphelem=e(o,{x:s.x,y:d,text:s.c,type:"gchordfont",klass:o.controller.classes.generate("chord"),anchor:"middle",dim:s.dim,lane:s.getLane(),name:"chord"},!1);break;case"decoration":s.graphelem=e(o,{x:s.x,y:d+6,text:s.c,type:"annotationfont",klass:o.controller.classes.generate("annotation"),anchor:s.anchor,centerVertically:!0,dim:s.dim},!1);break;case"text":s.graphelem=e(o,{x:s.x,y:d,text:s.c,type:"annotationfont",klass:o.controller.classes.generate("annotation"),anchor:"start",centerVertically:s.centerVertically,dim:s.dim,lane:s.getLane(),name:"annotation"},!1);break;case"multimeasure-text":s.graphelem=e(o,{x:s.x+s.w/2,y:d,text:s.c,type:"tempofont",klass:o.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:s.dim},!1);break;case"part":s.graphelem=e(o,{x:s.x,y:d,text:s.c,type:"partsfont",klass:o.controller.classes.generate("part"),anchor:"start",dim:s.dim,name:s.c},!0);break;case"bar":s.graphelem=r(o,s.x,s.linewidth+o.lineThickness,d,l||o.calcY(s.pitch2),null,"bar");break;case"stem":var h=s.linewidth>0?s.linewidth+o.lineThickness:s.linewidth-o.lineThickness;s.graphelem=r(o,s.x,h,d,o.calcY(s.pitch2),"abcjs-stem","stem");break;case"ledger":s.graphelem=n(o,s.x,s.x+s.w,s.pitch,"abcjs-ledger","ledger",.35+o.lineThickness);break}return s.scalex!==1&&s.graphelem&&a(o.paper,s.graphelem,s.scalex,s.scaley,s.x,d),s.graphelem}function a(o,s,l,d,p,m){o.setAttributeOnElement(s,{style:"transform:scale("+l+","+d+");transform-origin:"+p+"px "+m+"px;"})}return Wo=t,Wo}var Yo,$d;function x$(){if($d)return Yo;$d=1;var e=_b(),r=Vt();function n(i,t){var a=t.x;t.pitch===void 0&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var o=i.calcY(t.pitch)+2,s,l;if(t.tempo.preString){s=r(i,{x:a,y:o,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0),l=i.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",s);var d=l.width,p=d/t.tempo.preString.length;a+=d+p}if(t.note){t.note.setX(a);for(var m=0;m<t.note.children.length;m++)e(i,t.note.children[m],a);a+=t.note.w+5;var f="= "+t.tempo.bpm;s=r(i,{x:a,y:o,text:f,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"beats"}),l=i.controller.getTextSize.calc(f,"tempofont","tempo",s);var u=l.width,h=u/f.length;a+=u+h}t.tempo.postString&&r(i,{x:a,y:o,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"post"},!0)}return Yo=n,Yo}var Vo,xd;function S$(){if(xd)return Vo;xd=1;var e=x$(),r=_b(),n=pt(),i=xu(),t=Tu();function a(o,s,l,d,p){if(!s.invisible){var m=s.children.length>0&&s.children[0].type==="TempoElement";s.elemset=[],t.beginGroup(o.paper,o.controller);for(var f=0;f<s.children.length;f++){var u=s.children[f];switch(u.type){case"TempoElement":e(o,u);break;default:var h=r(o,u,l);u.type==="symbol"&&u.c&&u.c.indexOf("notehead")>=0&&h.setAttribute("class","abcjs-notehead")}}var c=s.type;if((s.type==="note"||s.type==="rest")&&(s.counters=o.controller.classes.getCurrent(),c+=" d"+Math.round(s.durationClass*1e3)/1e3,c=c.replace(/\./g,"-"),s.abcelem.pitches))for(var v=0;v<s.abcelem.pitches.length;v++)c+=" p"+s.abcelem.pitches[v].pitch;var b=t.endGroup(c,s.type);if(b){if(s.cloned&&(s.cloned.overrideClasses=b.className.baseVal),s.overrideClasses){var g=b.classList&&b.classList.length>0?b.classList[0]+" ":"";b.setAttribute("class",g+s.overrideClasses)}if(m)s.startChar=s.abcelem.startChar,s.endChar=s.abcelem.endChar,d.add(s,b,!1,p);else{s.elemset.push(b);var w=!1;(s.type==="note"||s.type==="tabNumber")&&(w=!0),d.add(s,b,w,p)}}else s.elemset.length>0&&d.add(s,s.elemset[0],s.type==="note",p);if(s.klass&&i(s.elemset,"mark","","#00ff00"),s.hint&&i(s.elemset,"abcjs-hint","",null),s.abcelem.abselem=s,s.heads&&s.heads.length>0){s.notePositions=[];for(var k=0;k<s.heads.length;k++)s.notePositions.push({x:s.heads[k].x+s.heads[k].w/2,y:p.zero-s.heads[k].pitch*n.STEP})}}}return Vo=a,Vo}var Xo,Sd;function I$(){if(Sd)return Xo;Sd=1;var e=v$(),r=g$(),n=b$(),i=y$(),t=_$(),a=w$(),o=k$(),s=Vt(),l=S$();function d(m,f,u,h,c){var v=f.w-1;m.staffbottom=f.staff.bottom;var b=m.foregroundColor;if(f.color&&(m.foregroundColor=f.color),f.header){var g=s(m,{x:m.padding.left,y:m.calcY(f.headerPosition),text:f.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0,name:"voice-name"},!0);h.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:f.header},g)}var w,k,$=!1;for(w=0;w<f.children.length;w++){k=f.children[w],(k.type==="note"||k.type==="rest")&&($=!0);var O=!1;k.type!=="staff-extra"&&!m.controller.classes.isInMeasure()&&(m.controller.classes.startMeasure(),O=!0),f.staff.isTabStaff&&(k.invisible=!1,k.type=="bar"&&k.abcelem.lastBar&&(u=f.topLine)),l(m,k,f.barto||w===f.children.length-1?u:0,h,c),(k.type==="note"||p(k))&&m.controller.classes.incrNote(),k.type==="bar"&&!O&&$&&m.controller.classes.incrMeasure()}for(m.controller.classes.startMeasure(),w=0;w<f.beams.length;w++){var P=f.beams[w];P==="bar"?m.controller.classes.incrMeasure():o(m,P,h)}for(m.controller.classes.startMeasure(),w=0;w<f.otherchildren.length;w++)if(k=f.otherchildren[w],k==="bar")m.controller.classes.incrMeasure();else switch(k.type){case"GlissandoElem":k.elemset=e(m,k,h);break;case"CrescendoElem":k.elemset=r(m,k,h);break;case"DynamicDecoration":k.elemset=n(m,k,h);break;case"TripletElem":i(m,k,h);break;case"EndingElem":k.elemset=t(m,k,f.startx+10,v,h);break;case"TieElem":k.elemset=a(m,k,f.startx+10,v,h);break;default:console.log(k),l(m,k,f.startx+10,v,h,c)}m.foregroundColor=b}function p(m){return m.type!=="rest"?!1:!!(m.abcelem&&m.abcelem.rest&&m.abcelem.rest.type!=="spacer")}return Xo=d,Xo}var Ko,Id;function T$(){if(Id)return Ko;Id=1;var e=yb();function r(n,i,t,a,o,s){var l="abcjs-top-line",d=2;o&&(d=o),n.paper.openGroup({prepend:!0,klass:n.controller.classes.generate("abcjs-staff")});var p=0,m=0;if(a===1)e(n,i,t,6,l,null,s+n.lineThickness),p=n.calcY(10),m=n.calcY(2);else for(var f=a-1;f>=0;f--){var u=(f+1)*d;m=n.calcY(u),p===0&&(p=m),e(n,i,t,u,l,null,s+n.lineThickness),l=void 0}return n.paper.closeGroup(),[p,m]}return Ko=r,Ko}var Qo,Td;function C$(){if(Td)return Qo;Td=1;function e(r,n,i){var t=r.paper.rectBeneath(n);return i&&r.paper.text(i,{x:0,y:n.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),t}return Qo=e,Qo}var es,Cd;function z$(){if(Cd)return es;Cd=1;function e(r,n){var i="rgba(0,0,0,255)",t="rgba(0,0,0,0)",a=Math.round(r.y),o=r.controller.width,s=(o-n)/2,l=s+n,d="M "+s+" "+a+" L "+l+" "+a+" L "+l+" "+(a+1)+" L "+s+" "+(a+1)+" L "+s+" "+a+" z";r.paper.pathToBack({path:d,stroke:t,fill:i,class:r.controller.classes.generate("defined-text")})}return es=e,es}var ts,zd;function wb(){if(zd)return ts;zd=1;var e=z$(),r=Vt();function n(i,t,a){for(var o=0;o<t.rows.length;o++){var s=t.rows[o];if(s.absmove)i.absolutemoveY(s.absmove);else if(s.move)i.moveY(s.move);else if(s.text||s.phrases){var l=s.left?s.left:0,d=r(i,{x:l,y:i.y,text:s.text,phrases:s.phrases,"dominant-baseline":s["dominant-baseline"],type:s.font,klass:s.klass,name:s.name,anchor:s.anchor});s.absElemType&&a.wrapSvgEl({el_type:s.absElemType,name:s.name,startChar:s.startChar,endChar:s.endChar,text:s.text},d)}else if(s.separator)e(i,s.separator);else if(s.startGroup)i.paper.openGroup({klass:s.klass,"data-name":s.name});else if(s.endGroup){var p=i.paper.closeGroup();s.absElemType&&a.wrapSvgEl({el_type:s.absElemType,name:s.name,startChar:s.startChar,endChar:s.endChar,text:""},p)}}}return ts=n,ts}var rs,Ed;function E$(){if(Ed)return rs;Ed=1;var e=pt(),r=m$(),n=I$(),i=T$(),t=C$(),a=zu(),o=wb();function s(p,m,f,u){for(var h,c=p.y,v=0;v<m.staffs.length;v++){var b=m.staffs[v];p.moveY(e.STEP,b.top),b.absoluteY=p.y,p.showDebug&&(p.showDebug.indexOf("box")>=0&&b.voices&&d(p,m.voices,b.voices),p.showDebug.indexOf("grid")>=0&&(p.paper.dottedLine({x1:p.padding.left,x2:p.padding.left+p.controller.width,y1:c,y2:c,stroke:"#0000ff"}),t(p,{x:p.padding.left,y:p.calcY(b.originalTop),width:p.controller.width,height:p.calcY(b.originalBottom)-p.calcY(b.originalTop),fill:p.foregroundColor,stroke:p.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),h=0,T(b,"chordHeightAbove"),T(b,"chordHeightBelow"),T(b,"dynamicHeightAbove"),T(b,"dynamicHeightBelow"),T(b,"endingHeightAbove"),T(b,"lyricHeightAbove"),T(b,"lyricHeightBelow"),T(b,"partHeightAbove"),T(b,"tempoHeightAbove"),T(b,"volumeHeightAbove"),T(b,"volumeHeightBelow"))),p.moveY(e.STEP,-b.bottom),p.showDebug&&p.showDebug.indexOf("grid")>=0&&p.paper.dottedLine({x1:p.padding.left,x2:p.padding.left+p.controller.width,y1:p.y,y2:p.y,stroke:"#0000aa"})}for(var g,w,k=2,$=0,O=0;O<m.voices.length;O++){var P=m.voices[O].staff,y=m.voices[O].tabNameInfos;if(p.y=P.absoluteY,p.controller.classes.incrVoice(),!m.voices[O].duplicate){if(g||(g=p.calcY(10)),w=p.calcY(k),P.lines!==0){P.linePitch&&(k=P.linePitch),p.controller.classes.newMeasure();var C=i(p,m.startx,m.w,P.lines,P.linePitch,.35);w=C[1],P.bottomLine=w,P.topLine=C[0],P.hasTab&&($=P.topLine),P.hasStaff&&($=P.hasStaff.topLine,m.voices[O].barto=!0,m.voices[O].topLine=g)}l(p,P.absoluteY,m.brace,O,f),l(p,P.absoluteY,m.bracket,O,f)}n(p,m.voices[O],$,f,{top:c,zero:p.y,height:m.height*e.STEP});var E=0;if(y){var z={rows:[]};z.rows.push({absmove:w+2});var A=8;z.rows.push({left:m.startx+A,text:y.name,font:"tablabelfont",klass:"text instrument-name",anchor:"start"}),z.rows.push({move:y.textSize.height}),o(p,z),E=y.textSize.height}p.controller.classes.newMeasure(),m.voices[O].duplicate||($=p.calcY(2+E))}p.controller.classes.newMeasure();var R=m.staffs.length;R>1&&(g=m.staffs[0].topLine,w=m.staffs[R-1].bottomLine,a(p,m.startx,.6,g,w,null)),p.y=c;function T(I,N){var D=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(I.positionY&&I.positionY[N]){var L=I.specialY[N]*e.STEP;N==="chordHeightAbove"&&I.specialY.chordLines&&I.specialY.chordLines.above&&(L*=I.specialY.chordLines.above),N==="chordHeightBelow"&&I.specialY.chordLines&&I.specialY.chordLines.below&&(L*=I.specialY.chordLines.below),t(p,{x:p.padding.left,y:p.calcY(I.positionY[N]),width:p.controller.width,height:L,fill:D[h],stroke:D[h],"fill-opacity":.4,"stroke-opacity":.4},N.substr(0,4)),h+=1,h>6&&(h=0)}}}function l(p,m,f,u,h){if(f)for(var c=0;c<f.length;c++)f[c].isStartVoice(u)&&(f[c].startY=m-e.STEP*10,f[c].elemset=r(p,f[c],h))}function d(p,m,f){for(var u=0;u<f.length;u++)for(var h=m[f[u]].children,c=0;c<h.length;c++){var v=h[c],b=v.getFixedCoords();if(!(v.invisible||b.t===void 0||b.b===void 0)){var g=(b.t-b.b)*e.STEP;t(p,{x:b.x,y:p.calcY(b.t),width:b.w,height:g,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var w=0;w<v.children.length;w++){var k=v.children[w],$=k.getChordDim();if($){var O=p.calcY(k.pitch);O+=k.dim.font.size*k.getLane(),t(p,{x:$.left,y:O,width:$.right-$.left,height:k.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}return rs=s,rs}var ns,Nd;function N$(){if(Nd)return ns;Nd=1;function e(r,n,i,t){var a=(n+r.padding.left+r.padding.right)*i,o=(r.y+r.padding.bottom)*i;if(r.isPrint&&(o=Math.max(o,1056)),r.ariaLabel!==""){var s="Sheet Music";r.abctune&&r.abctune.metaText&&r.abctune.metaText.title&&(s+=' for "'+r.abctune.metaText.title+'"'),r.paper.setTitle(s);var l=r.ariaLabel?r.ariaLabel:s;r.paper.setAttribute("aria-label",l)}var d=["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"];r.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+d.join(" ")+"}");var p={overflow:"hidden"};t==="resize"?r.paper.setResponsiveWidth(a,o):(p.width="",p.height=o+"px",i<1?(p.width=a+"px",r.paper.setSize(a/i,o/i)):r.paper.setSize(a,o)),r.paper.setScale(i),r.paper.setParentStyles(p)}return ns=e,ns}var is,Ad;function A$(){if(Ad)return is;Ad=1;var e=lb(),r=fb();function n(i,t,a){this.elements=[],this.paper=i,this.tuneNumber=a,this.selectTypes=t}return n.prototype.getElements=function(){return this.elements},n.prototype.add=function(i,t,a,o){if(this.canSelect(i)){var s;this.selectTypes===void 0?s={selectable:!1,"data-index":this.elements.length}:s={selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,s);var l={absEl:i,svgEl:t,isDraggable:a};o!==void 0&&(l.staffPos=o),this.elements.push(l)}},n.prototype.canSelect=function(i){return this.selectTypes===!1||!i||!i.abcelem?!1:this.selectTypes===!0?!0:this.selectTypes===void 0?i.abcelem.el_type==="note"||i.abcelem.el_type==="tabNumber":this.selectTypes.indexOf(i.abcelem.el_type)>=0},n.prototype.wrapSvgEl=function(i,t){var a={tuneNumber:this.tuneNumber,abcelem:i,elemset:[t],highlight:e,unhighlight:r};this.add(a,t,!1)},is=n,is}var as,Pd;function P$(){if(Pd)return as;Pd=1;const e=Cu(),r=zu();function n(g,w,k,$,O){const P=O.gchordfont;O.partsfont;const y=O.annotationfont,C=O.repeatfont,E=O.textfont,z=O.subtitlefont,A=50,R=10,T=14,I=10,N=20,D=16;w.forEach(L=>{switch(L.type){case"text":b(g,L.text,k,g.y,16,E,null,null,!1),g.moveY(D);break;case"subtitle":b(g,L.subtitle,k,g.y+I,20,z,null,"abcjs-subtitle",!1),g.moveY(N);break;case"part":if(L.lines.length>0){b(g,L.name,k,g.y+I,20,z,L.name,"abcjs-part",!1),g.moveY(N);const _=L.lines[0].length,x=$/_;L.lines.forEach((S,M)=>{let U=!1,q=!1;S.forEach(V=>{V.ending&&(U=!0),V.annotations&&V.annotations.length>0&&(q=!0)});const Z=q?T:U?R:0;S.forEach((V,ne)=>{if(!V.noBorder){g.paper.rect({x:k+ne*x,y:g.y,width:x,height:Z+A}),g.paper.rect({x:k+ne*x+1,y:g.y+1,width:x-2,height:Z+A-2});let ce=0,fe=0;const pe=g.y,K=k+x*ne;V.hasStartRepeat&&(t(g,K,pe,pe+A+Z,!0,Z),ce=12),V.hasEndRepeat&&(t(g,K+x,pe,pe+A+Z,!1,Z),fe=12);let he=0;V.ending&&(he=b(g,V.ending,k+ne*x+4,pe+10,12,C,null,null,!1).getBBox().width+4),s(g,pe,k+ce,x,M,ne,V.chord,P,ce+fe,A,Z),V.annotations&&V.annotations.length>0&&o(g,pe,k+ne*x+he,V.annotations,y),Z&&g.paper.rectBeneath({x:k+ne*x,y:g.y,width:x,height:Z,fill:"#e8e8e8",stroke:"none"})}}),g.moveY(Z+A)}),g.moveY(N)}break}})}function i(g,w,k,$){var O=w-10,P=w+10,y=k+10,C=k-10,E=w-10,z=-g.yToPitch($)+2,A=w+6.5,R=-g.yToPitch($)-2.3;g.paper.lineToBack({x1:O,x2:P,y1:y,y2:C,"stroke-width":"3px","stroke-linecap":"round"}),e(g,E,z,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e(g,A,R,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"})}function t(g,w,k,$,O,P){const y=O?w+2:w-4,C=O?w+9:w-11;g.paper.openGroup({klass:"abcjs-repeat"}),r(g,y,3+g.lineThickness,k,$,null,"bar"),e(g,C,-g.yToPitch(P)-4,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),e(g,C,-g.yToPitch(P)-8,"dots.dot",{scalex:1,scaley:1,klass:"",name:"dot"}),g.paper.closeGroup()}const a={segno:"scripts.segno",coda:"scripts.coda",fermata:"scripts.ufermata"};function o(g,w,k,$,O){k+=3;let P;for(let y=0;y<$.length;y++)switch($[y]){case"segno":case"coda":case"fermata":{k+=12,P=e(g,k,-3,a[$[y]],{scalex:1,scaley:1,name:a[$[y]]});const C=P.getBBox();k+=C.width}break;default:b(g,$[y],k,w+12,12,O,null,null,!1)}}function s(g,w,k,$,O,P,y,C,E,z,A){const R=k+$*P;!y[1]&&!y[2]&&!y[3]?u(g,R,w+A,$-E,z,y[0],C,A):!y[1]&&!y[3]?h(g,R,w,$-E,z,y[0],y[2],C,A):c(g,R,w,$-E,z,y,C,A)}function l(g,w,k,$,O,P,y){const C=b(g,O,w,k,$,P,null,"abcjs-chord",!0);let E=C.getBBox(),z=$;for(;E.width>y&&z>=14;)z-=2,C.setAttribute("font-size",z),E=C.getBBox()}const d=34,p=26,m=20,f=-3;function u(g,w,k,$,O,P,y,C){P==="%"?i(g,w+$/2,k+O/2,C+O/2):l(g,w+$/2,k+O/2+f,d,P,y,$)}function h(g,w,k,$,O,P,y,C,E){g.paper.lineToBack({x1:w,x2:w+$,y1:k+O+E,y2:k+2}),l(g,w+$/4,k+O/4+5+E+f,p,P,C,$/2),l(g,w+3*$/4,k+3*O/4+E+f,p,y,C,$/2)}function c(g,w,k,$,O,P,y,C){g.paper.lineToBack({x1:w+3,x2:w+$-3,y1:k+O/2+C,y2:k+O/2+C}),g.paper.lineToBack({x1:w+$/2,x2:w+$/2,y1:k+3+C,y2:k+O-3+C}),P[0]&&l(g,w+$/4,k+O/4+2+C+f,m,v(P[0]),y,$/2),P[1]&&l(g,w+3*$/4,k+O/4+2+C+f,m,v(P[1]),y,$/2),P[2]&&l(g,w+$/4,k+3*O/4+C+f,m,v(P[2]),y,$/2),P[3]&&l(g,w+3*$/4,k+3*O/4+C+f,m,v(P[3]),y,$/2)}function v(g){return g==="No Chord"?"N.C.":g}function b(g,w,k,$,O,P,y,C,E){const z={x:k,y:$,stroke:"none","font-size":O,"font-style":P.style,"font-family":P.face,"font-weight":P.weight,"text-decoration":P.decoration};return y&&(z["data-name"]=y),C&&(z.class=C),z["text-anchor"]=E?"middle":"start",g.paper.text(w,z,null,{"alignment-baseline":"middle"})}return as=n,as}var os,Od;function O$(){if(Od)return os;Od=1;var e=E$(),r=N$(),n=wb(),i=pt(),t=A$(),a=P$();function o(d,p,m,f,u,h,c,v,b,g,w){var k=new t(d.paper,v,b),$={};p.shouldAddClasses&&($.klass="abcjs-meta-top"),d.paper.openGroup($),d.moveY(d.padding.top),n(d,m.topText,k),d.paper.closeGroup(),d.moveY(d.spacing.music);let O=!1;w&&m.chordGrid&&(a(d,m.chordGrid,d.padding.left,f,m.formatting),w==="noMusic"&&(O=!0));var P=[],y=0;if(!O)for(var C=0;C<m.lines.length;C++){p.incrLine();var E=m.lines[C];if(E.staff){if(y++,m.formatting.maxStaves&&y>m.formatting.maxStaves)break;p.shouldAddClasses&&($.klass="abcjs-staff-wrapper abcjs-l"+p.lineNumber),d.paper.openGroup($),E.vskip&&d.moveY(E.vskip),P.length>=1&&l(d,d.spacing.staffSeparation,P[P.length-1],E.staffGroup);var z=s(d,E.staffGroup,k,C);z.line=g+C,P.push(z),d.paper.closeGroup()}else E.nonMusic&&(p.shouldAddClasses&&($.klass="abcjs-non-music"),d.paper.openGroup($),n(d,E.nonMusic,k),d.paper.closeGroup())}return p.reset(),O||m.bottomText&&m.bottomText.rows&&m.bottomText.rows.length>0&&(p.shouldAddClasses&&($.klass="abcjs-meta-bottom"),d.paper.openGroup($),d.moveY(24),n(d,m.bottomText,k),d.paper.closeGroup()),r(d,u,c,h),{staffgroups:P,selectables:k.getElements()}}function s(d,p,m,f){e(d,p,m,f);var u=p.height*i.STEP;return d.y+=u,p}function l(d,p,m,f){var u=m.staffs[m.staffs.length-1],h=-(u.bottom-2),c=f.staffs[0].top-10,v=c+h,b=v*i.STEP;b<p&&d.moveY(p-b)}return os=o,os}var ss,Md;function M$(){if(Md)return ss;Md=1;var e=gb();function r(n){for(var i=n;i&&i.attributes&&i.tagName.toLowerCase()!=="svg"&&!i.attributes.selectable;)i=i.parentNode;if(i&&i.attributes&&i.attributes.selectable){var t=i.attributes["data-index"].nodeValue;if(t&&(t=parseInt(t,10),t>=0&&t<this.selectables.length)){var a=this.selectables[t],o=e(a,n);return o.index=t,o.element=a,o}}return null}return ss=r,ss}var cs,Dd;function kb(){if(Dd)return cs;Dd=1;var e=pt(),r=Y7(),n=X7(),i=K7(),t=Q7(),a=e$(),o=t$(),s=r$(),l=n$(),d=f$(),p=d$(),m=h$(),f=p$(),u=O$(),h=pb(),c=M$(),v=function(w,k){k=k||{},this.findSelectableElement=c,this.oneSvgPerLine=k.oneSvgPerLine,this.selectionColor=k.selectionColor,this.dragColor=k.dragColor?k.dragColor:k.selectionColor,this.dragging=!!k.dragging,this.selectTypes=k.selectTypes,this.responsive=k.responsive,this.space=3*e.SPACE,this.initialClef=k.initialClef,this.timeBasedLayout=k.timeBasedLayout,this.expandToWidest=!!k.expandToWidest,this.scale=k.scale?parseFloat(k.scale):0,this.classes=new p({shouldAddClasses:k.add_classes}),this.scale>.1||(this.scale=void 0),k.staffwidth?(this.staffwidthScreen=k.staffwidth,this.staffwidthPrint=k.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],k.clickListener&&this.addSelectListener(k.clickListener),this.renderer=new n(w),this.renderer.setPaddingOverride(k),k.showDebug&&(this.renderer.showDebug=k.showDebug),k.jazzchords&&(this.jazzchords=k.jazzchords),k.accentAbove&&(this.accentAbove=k.accentAbove),k.germanAlphabet&&(this.germanAlphabet=k.germanAlphabet),k.lineThickness&&(this.lineThickness=k.lineThickness),k.chordGrid&&(this.chordGrid=k.chordGrid),this.renderer.controller=this,this.renderer.foregroundColor=k.foregroundColor?k.foregroundColor:"currentColor",k.ariaLabel!==void 0&&(this.renderer.ariaLabel=k.ariaLabel),this.renderer.minPadding=k.minPadding?k.minPadding:0,this.reset()};v.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0,this.lineThickness&&this.renderer.setLineThickness(this.lineThickness)},v.prototype.engraveABC=function(w,k,$){w[0]===void 0&&(w=[w]),this.reset();for(var O=0;O<w.length;O++)k===void 0&&(k=O),this.getFontAndAttr=new m(w[O].formatting,this.classes),this.getTextSize=new f(this.getFontAndAttr,this.renderer.paper),this.engraveTune(w[O],k,$)},v.prototype.adjustNonScaledItems=function(w){this.width/=w,this.renderer.adjustNonScaledItems(w)},v.prototype.getMeasureWidths=function(w){this.reset(),this.getFontAndAttr=new m(w.formatting,this.classes),this.getTextSize=new f(this.getFontAndAttr,this.renderer.paper);var k=this.jazzchords;this.setupTune(w,0),this.constructTuneElements(w),d(this.renderer,w,0,this.space,this.timeBasedLayout);for(var $=[],O,P=!0,y=0;y<w.lines.length;y++){var C=w.lines[y];if(C.staff){if(P&&(O={left:0,measureWidths:[],total:0},$.push(O),P=!1),C.staffGroup.voices.length>0)for(var E=C.staffGroup.voices[0],z=!1,A=0,R=0;R<E.children.length;R++){var T=E.children[R];!z&&!T.isClef&&!T.isKeySig&&(z=!0,O.left=T.x,A=T.x),T.type==="bar"&&(O.measureWidths.push(T.x-A),O.total+=T.x-A,A=T.x)}}else P=!0}return this.jazzchords=k,$},v.prototype.setupTune=function(w,k){this.classes.reset(),w.formatting.jazzchords!==void 0&&(this.jazzchords=w.formatting.jazzchords),w.formatting.accentAbove!==void 0&&(this.accentAbove=w.formatting.accentAbove),this.renderer.newTune(w),this.engraver=new r(this.getTextSize,k,{bagpipes:w.formatting.bagpipes,flatbeams:w.formatting.flatbeams,graceSlurs:w.formatting.graceSlurs!==!1,percmap:w.formatting.percmap,initialClef:this.initialClef,jazzchords:this.jazzchords,timeBasedLayout:this.timeBasedLayout,accentAbove:this.accentAbove,germanAlphabet:this.germanAlphabet}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=w.getMeterFraction().num/w.getMeterFraction().den,w.formatting.staffwidth?this.width=w.formatting.staffwidth*1.33:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var $=w.formatting.scale?w.formatting.scale:this.scale;return this.responsive==="resize"&&($=void 0),$===void 0&&($=this.renderer.isPrint?.75:1),this.adjustNonScaledItems($),$},v.prototype.constructTuneElements=function(w){w.topText=new o(w.metaText,w.metaTextInfo,w.formatting,w.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize);var k,$,O=!1,P=!1;for(k=0;k<w.lines.length;k++)if($=w.lines[k],$.staff)P=!0,$.staffGroup=this.engraver.createABCLine($.staff,O?null:w.metaText.tempo,k),O=!0;else if($.subtitle){if(P){var y=this.width/2+this.renderer.padding.left;$.nonMusic=new a(this.renderer.spacing.subtitle,w.formatting,$.subtitle,y,this.renderer.padding.left,this.getTextSize)}}else $.text!==void 0?(P=!0,$.nonMusic=new i($.text,$.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):$.separator!==void 0&&$.separator.lineLength&&(P=!0,$.nonMusic=new t($.separator.spaceAbove,$.separator.lineLength,$.separator.spaceBelow));w.bottomText=new s(w.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize)},v.prototype.engraveTune=function(w,k,$){var O=this.jazzchords,P=this.setupTune(w,k);this.constructTuneElements(w);var y=d(this.renderer,w,this.width,this.space,this.expandToWidest,this.timeBasedLayout);if(this.expandToWidest&&y>this.width+1&&(w.topText=new o(w.metaText,w.metaTextInfo,w.formatting,w.lines,y,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),w.lines&&w.lines.length>0))for(var C=w.lines.length,E=0;E<C;++E){var z=w.lines[E];if(z.nonMusic&&z.nonMusic.rows&&z.nonMusic.rows.length>0)for(var A=z.nonMusic.rows.length,R=0;R<A;++R){var T=z.nonMusic.rows[R];T.left&&(z.subtitle?T.left=y/2+this.renderer.padding.left:z.text&&z.text.length>0&&z.text[0].center&&(T.left=y/2+this.renderer.padding.left))}}w.tablatures&&h.layoutTablatures(this.renderer,w);var I=u(this.renderer,this.classes,w,this.width,y,this.responsive,P,this.selectTypes,k,$,this.chordGrid);if(this.staffgroups=I.staffgroups,this.selectables=I.selectables,this.oneSvgPerLine){var N=this.renderer.paper.svg.parentNode;this.svgs=b(this.renderer,N,w.metaText.title,this.responsive,P)}else this.svgs=[this.renderer.paper.svg];l(this,this.svgs),this.jazzchords=O};function b(w,k,$,O,P){$||($="Untitled");var y=k.querySelector("svg");O==="resize"&&(k.style.paddingBottom="");for(var C=y.querySelector("style"),E=O==="resize"?y.viewBox.baseVal.width:y.getAttribute("width"),z=k.querySelectorAll("svg > g"),A=0,R=[],T=0;T<z.length;T++){var I=z[T],N=I.getBBox(),D=N.y-A,L=N.height+D,_=document.createElement("div"),x="overflow: hidden;";O!=="resize"&&(x+="height:"+L*P+"px;"),_.setAttribute("style",x);var S=g(y),M='Sheet Music for "'+$+'" section '+(T+1);S.setAttribute("aria-label",M),O!=="resize"&&S.setAttribute("height",L),O==="resize"&&(S.style.position="");var U=w.firefox112?L+1:L;S.setAttribute("viewBox","0 "+A+" "+E+" "+U),S.appendChild(C.cloneNode(!0));var q=document.createElement("title");q.innerText=M,S.appendChild(q),S.appendChild(I),_.appendChild(S),R.push(S),k.appendChild(_),A=N.y+N.height}return k.removeChild(y),R}function g(w){for(var k="http://www.w3.org/2000/svg",$=document.createElementNS(k,"svg"),O=0;O<w.attributes.length;O++){var P=w.attributes[O];P.name!=="height"&&P.name!="aria-label"&&$.setAttribute(P.name,P.value)}return $}return v.prototype.getDim=function(w){if(!w.dim){var k=w.svgEl.getBBox();w.dim={left:Math.round(k.x),top:Math.round(k.y),right:Math.round(k.x+k.width),bottom:Math.round(k.y+k.height)}}return w.dim},v.prototype.addSelectListener=function(w){this.listeners[this.listeners.length]=w},cs=v,cs}var us,Rd;function $b(){if(Rd)return us;Rd=1;var e=Hi();sb();var r=kb(),n=cb(),i=ib(),t={};function a(){var d=window.innerWidth;for(var p in t)if(t.hasOwnProperty(p)){var m=t[p],f=m.offsetLeft;d-=f*2,m.style.width=d+"px"}}try{window.addEventListener("resize",a),window.addEventListener("orientationChange",a)}catch{}function o(d,p,m,f,u){m.viewportHorizontal?(d.innerHTML='<div class="abcjs-inner"></div>',m.scrollHorizontal?(d.style.overflowX="auto",d.style.overflowY="hidden"):d.style.overflow="hidden",t[d.id]=d,d=d.children[0]):m.viewportVertical?(d.innerHTML='<div class="abcjs-inner scroll-amount"></div>',d.style.overflowX="hidden",d.style.overflowY="auto",d=d.children[0]):d.innerHTML="";var h=new r(d,m);if(h.engraveABC(p,f,u),p.engraver=h,m.viewportVertical||m.viewportHorizontal){var c=d.parentNode;c.style.width=d.style.width}}var s=function(d,p,m,f,u){var h={},c;if(m){for(c in m)m.hasOwnProperty(c)&&(h[c]=m[c]);h.warnings_id&&h.tablature&&(h.tablature.warning_id=h.warnings_id)}if(f)for(c in f)f.hasOwnProperty(c)&&(c==="listener"?f[c].highlight&&(h.clickListener=f[c].highlight):h[c]=f[c]);if(u)for(c in u)u.hasOwnProperty(c)&&(h[c]=u[c]);function v(b,g,w,k){var $=!1;return b==="*"&&($=!0,b=document.createElement("div"),b.setAttribute("style","visibility: hidden;"),document.body.appendChild(b)),!$&&h.wrap&&h.staffwidth?(g=l(b,g,w,k,h),g):(h.afterParsing&&h.afterParsing(g,w,k),o(b,g,h,w,0),$&&b.parentNode.removeChild(b),null)}return e.renderEngine(v,d,p,h)};function l(d,p,m,f,u){var h=new r(d,u),c=h.getMeasureWidths(p),v=i.calcLineWraps(p,c,u);if(v.reParse){var b=new n;b.parse(f,v.revisedParams),p=b.getTune();var g=b.getWarnings();g&&(p.warnings=g)}return u.afterParsing&&u.afterParsing(p,m,f),o(d,p,v.revisedParams,m,0),p.explanation=v.explanation,p}return us=s,us}var ls,Ld;function D$(){if(Ld)return ls;Ld=1;var e=Hi(),r=kb(),n=function(i,t){function a(o,s,l,d){o=document.createElement("div"),o.setAttribute("style","visibility: hidden;"),document.body.appendChild(o);var p=new r(o,t),m=p.getMeasureWidths(s);return o.parentNode.removeChild(o),{sections:m}}return e.renderEngine(a,"*",i,t)};return ls=n,ls}var fs,Ud;function Eu(){if(Ud)return fs;Ud=1;var e={};return fs=e,fs}var ds,Zd;function R$(){if(Zd)return ds;Zd=1;var e=Eu(),r=function(n,i,t,a){e[i]||(e[i]={});var o=e[i];return o[t]||(o[t]=new Promise(function(s,l){var d=new XMLHttpRequest;let p=n+i+"-mp3/"+t+".mp3";d.open("GET",p,!0),d.responseType="arraybuffer",d.onload=function(){if(d.status!==200){l(Error("Can't load sound at "+p+" status="+d.status));return}var m=function(u){s({instrument:i,name:t,status:"loaded",audioBuffer:u})},f=a.decodeAudioData(d.response,m,function(){l(Error("Can't decode sound at "+p))});f&&typeof f.catch=="function"&&f.catch(l)},d.onerror=function(){l(Error("Can't load sound at "+p))},d.send()}).catch(s=>{throw console.error("Didn't load note",i,t,":",s.message),s})),o[t]};return ds=r,ds}var hs,jd;function Nu(){if(jd)return hs;jd=1;var e=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honkytonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass_lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_scifi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];return hs=e,hs}var ps,Bd;function L$(){if(Bd)return ps;Bd=1;var e=Nu(),r=function(n){for(var i=[],t=0;t<n.tracks.length;t++)i.push([]);var a=e[0];return n.tracks.forEach(function(o,s){o.forEach(function(l){switch(l.cmd){case"note":var d=l.instrument!==void 0?e[l.instrument]:a;if(l.duration>0){var p=l.gap?l.gap:0,m=l.duration;p=Math.min(p,m*2/3);var f={pitch:l.pitch,instrument:d,start:Math.round(l.start*1e6)/1e6,end:Math.round((l.start+m-p)*1e6)/1e6,volume:l.volume};l.startChar&&(f.startChar=l.startChar),l.endChar&&(f.endChar=l.endChar),l.style&&(f.style=l.style),l.cents&&(f.cents=l.cents),i[s].push(f)}break;case"program":a=e[l.instrument];break;case"text":break;default:console.log("Unhandled midi event",l)}})}),i};return ps=r,ps}var ms,qd;function Gi(){if(qd)return ms;qd=1;function e(r){if(r)window.abcjsAudioContext=r;else if(!window.abcjsAudioContext){var n=window.AudioContext||window.webkitAudioContext;if(n)window.abcjsAudioContext=new n;else return!1}return window.abcjsAudioContext.state!=="suspended"}return ms=e,ms}var vs,Fd;function Ar(){if(Fd)return vs;Fd=1;var e=Gi();function r(){return window.abcjsAudioContext||e(),window.abcjsAudioContext}return vs=r,vs}var gs,Hd;function Ji(){if(Hd)return gs;Hd=1;var e=Ar();function r(){if(!window.Promise||!window.AudioContext&&!window.webkitAudioContext&&!navigator.mozAudioContext&&!navigator.msAudioContext)return!1;var n=e();if(n)return n.resume!==void 0}return gs=r,gs}var bs,Gd;function Au(){if(Gd)return bs;Gd=1;var e={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"};return bs=e,bs}var ys,Jd;function U$(){if(Jd)return ys;Jd=1;var e=function(n){return window.URL.createObjectURL(r(n.audioBuffers))};function r(n){var i=n[0],t=i.numberOfChannels,a=i.length*t*2+44,o=new ArrayBuffer(a),s=new DataView(o),l=[],d,p,m=0,f=0;for(h(1179011410),h(a-8),h(1163280727),h(544501094),h(16),u(1),u(t),h(i.sampleRate),h(i.sampleRate*2*t),u(t*2),u(16),h(1635017060),h(a-f-4),d=0;d<t;d++)l.push(i.getChannelData(d));for(;f<a;){for(d=0;d<l.length;d++)p=Math.max(-1,Math.min(1,l[d][m])),p=(.5+p<0?p*32768:p*32767)|0,s.setInt16(f,p,!0),f+=2;m++}return new Blob([o],{type:"audio/wav"});function u(c){s.setUint16(f,c,!0),f+=2}function h(c){s.setUint32(f,c,!0),f+=4}}return ys=e,ys}var _s,Wd;function xb(){if(Wd)return _s;Wd=1;function e(r){return Math.pow(2,r/1200)}return _s=e,_s}var ws,Yd;function Z$(){if(Yd)return ws;Yd=1;var e=Eu(),r=Au(),n=xb();function i(a,o,s,l,d,p,m,f,u){var h=window.OfflineAudioContext||window.webkitOfflineAudioContext,c=s.len*s.tempoMultiplier;p&&(c+=p/1e3),c-=f,c<0&&(c=.005);var v=new h(2,Math.floor((c+m)*o),o),b=r[s.pitch];if(!e[s.instrument])return u&&u("placeNote skipped (instrument empty): "+s.instrument+":"+b),Promise.resolve();var g=e[s.instrument][b];return g?g.then(function(w){var k=v.createBufferSource();k.buffer=w.audioBuffer;var $=s.volume/96*d;k.gainNode=v.createGain(),s.pan&&v.createStereoPanner&&(k.panNode=v.createStereoPanner(),k.panNode.pan.setValueAtTime(s.pan,0)),k.gainNode.gain.value=$,k.gainNode.gain.linearRampToValueAtTime(k.gainNode.gain.value,c),k.gainNode.gain.linearRampToValueAtTime(0,c+m),s.cents&&(k.playbackRate.value=n(s.cents)),k.panNode?(k.panNode.connect(v.destination),k.gainNode.connect(k.panNode)):k.gainNode.connect(v.destination),k.connect(k.gainNode),k.start(0),k.noteOff?k.noteOff(c+m):k.stop(c+m);var O;return v.oncomplete=function(P){if(P.renderedBuffer&&P.renderedBuffer.getChannelData)for(var y=0;y<l.length;y++){var C=l[y]*s.tempoMultiplier;p&&(C-=p/1e3),C<0&&(C=0),C=Math.floor(C*o),t(a,P.renderedBuffer,C)}u&&u("placeNote: "+s.instrument+":"+b),O()},v.startRendering(),new Promise(function(P){O=P})}).catch(function(w){return u&&u("placeNote catch: "+w.message),Promise.reject(w)}):(u&&u("placeNote skipped: "+s.instrument+":"+b),Promise.resolve())}var t=function(a,o,s){for(var l=0;l<2;l++)for(var d=o.getChannelData(l),p=a.getChannelData(l),m=0;m<d.length;m++)p[m+s]+=d[m]};return ws=i,ws}var ks,Vd;function Pu(){if(Vd)return ks;Vd=1;var e=R$(),r=L$(),n=Gi(),i=Ar(),t=Ji(),a=Au(),o=Nu(),s=U$(),l=Z$(),d=Eu(),p="MIDI is not supported in this browser.",m="https://paulrosen.github.io/midi-js-soundfonts/abcjs/",f="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/",u="https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/";function h(){var c=this;c.audioBufferPossible=void 0,c.directSource=[],c.startTimeSec=void 0,c.pausedTimeSec=void 0,c.audioBuffers=[],c.duration=void 0,c.isRunning=!1,c.options={},c.pickupLength=0,c.init=function(g){g||(g={}),g.options&&(c.options=g.options),n(g.audioContext);var w=i().currentTime;if(c.debugCallback=g.debugCallback,c.debugCallback&&c.debugCallback("init called"),c.audioBufferPossible=c._deviceCapable(),!c.audioBufferPossible)return Promise.reject({status:"NotSupported",message:p});var k=g.options?g.options:{};c.soundFontUrl=k.soundFontUrl?k.soundFontUrl:f,c.soundFontUrl[c.soundFontUrl.length-1]!=="/"&&(c.soundFontUrl+="/"),k.soundFontVolumeMultiplier||k.soundFontVolumeMultiplier===0?c.soundFontVolumeMultiplier=k.soundFontVolumeMultiplier:c.soundFontUrl===f||c.soundFontUrl===u?c.soundFontVolumeMultiplier=3:c.soundFontUrl===m?c.soundFontVolumeMultiplier=.4:c.soundFontVolumeMultiplier=1,k.programOffsets?c.programOffsets=k.programOffsets:c.soundFontUrl===m?c.programOffsets={bright_acoustic_piano:20,honkytonk_piano:20,electric_piano_1:30,electric_piano_2:30,harpsichord:40,clavinet:20,celesta:20,glockenspiel:40,vibraphone:30,marimba:35,xylophone:30,tubular_bells:35,dulcimer:30,drawbar_organ:20,percussive_organ:25,rock_organ:20,church_organ:40,reed_organ:40,accordion:40,harmonica:40,acoustic_guitar_nylon:20,acoustic_guitar_steel:30,electric_guitar_jazz:25,electric_guitar_clean:15,electric_guitar_muted:35,overdriven_guitar:25,distortion_guitar:20,guitar_harmonics:30,electric_bass_finger:15,electric_bass_pick:30,fretless_bass:40,violin:105,viola:50,cello:40,contrabass:60,trumpet:10,trombone:90,alto_sax:20,tenor_sax:20,clarinet:20,flute:50,banjo:50,woodblock:20}:c.programOffsets={};var $=k.fadeLength!==void 0?parseInt(k.fadeLength,10):NaN;if(c.fadeLength=isNaN($)?200:$,$=k.noteEnd!==void 0?parseInt(k.noteEnd,10):NaN,c.noteEnd=isNaN($)?0:$,c.pan=k.pan,c.meterSize=1,g.visualObj){c.flattened=g.visualObj.setUpAudio(k);var O=g.visualObj.getMeterFraction();O.den&&(c.meterSize=O.num/O.den),c.pickupLength=g.visualObj.getPickupLength()}else if(g.sequence)c.flattened=g.sequence;else return Promise.reject(new Error("Must pass in either a visualObj or a sequence"));c.millisecondsPerMeasure=g.millisecondsPerMeasure?g.millisecondsPerMeasure:g.visualObj?g.visualObj.millisecondsPerMeasure(c.flattened.tempo):1e3,c.beatsPerMeasure=g.visualObj?g.visualObj.getBeatsPerMeasure():4,c.sequenceCallback=k.sequenceCallback,c.callbackContext=k.callbackContext,c.onEnded=k.onEnded,c.meterFraction=g.visualObj?g.visualObj.getMeterFraction():{den:1};var P={},y=[],C=[],E=o[0];c.flattened.tracks.forEach(function(I){I.forEach(function(N){if(N.cmd==="program"&&o[N.instrument]&&(E=o[N.instrument]),N.pitch!==void 0){var D=N.pitch,L=a[D],_=N.instrument!==void 0?o[N.instrument]:E;if(L)if(P[_]||(P[_]={}),!d[_]||!d[_][L])P[_][L]=!0;else{var x=_+":"+L;y.indexOf(x)<0&&y.push(x)}else{var S=_+":"+L;console.log("Can't find note: ",D,S),C.indexOf(S)<0&&C.push(S)}}})}),c.debugCallback&&c.debugCallback("note gathering time = "+Math.floor((i().currentTime-w)*1e3)+"ms"),w=i().currentTime;var z=[];Object.keys(P).forEach(function(I){Object.keys(P[I]).forEach(function(N){z.push({instrument:I,note:N})})}),c.debugCallback&&c.debugCallback("notes "+JSON.stringify(z));for(var A=[],R=256,T=0;T<z.length;T+=R)A.push(z.slice(T,T+R));return new Promise(function(I,N){var D={cached:y,error:C,loaded:[]},L=0,_=function(){c.debugCallback&&c.debugCallback("loadBatch idx="+L+" len="+A.length),L<A.length?c._loadBatch(A[L],c.soundFontUrl,w).then(function(x){c.debugCallback&&c.debugCallback("loadBatch then"),w=i().currentTime,x&&(x.error&&(D.error=D.error.concat(x.error)),x.loaded&&(D.loaded=D.loaded.concat(x.loaded))),L++,_()},N):(c.debugCallback&&c.debugCallback("resolve init"),I(D))};_()})},c._loadBatch=(function(g,w,k,$){var O=[];return g.forEach(function(P){c.debugCallback&&c.debugCallback("getNote "+P.instrument+":"+P.note),O.push(e(w,P.instrument,P.note,i()))}),Promise.all(O).then(function(P){c.debugCallback&&c.debugCallback("mp3 load time = "+Math.floor((i().currentTime-k)*1e3)+"ms");for(var y=[],C=[],E=[],z=[],A=0;A<P.length;A++){var R=P[A],T=R.instrument+":"+R.name;R.status==="loaded"?y.push(T):R.status==="pending"?E.push(T):R.status==="cached"?C.push(T):z.push(T+" "+R.message)}if(E.length>0){if(c.debugCallback&&c.debugCallback("pending "+JSON.stringify(E)),$?$=$*2:$=50,$<9e4)return new Promise(function(D,L){setTimeout(function(){var _=[];for(A=0;A<E.length;A++)T=E[A].split(":"),_.push({instrument:T[0],note:T[1]});c.debugCallback&&c.debugCallback("retry "+JSON.stringify(_)),c._loadBatch(_,w,k,$).then(function(x){D(x)}).catch(function(x){L(x)})},$)});for(var I=[],N=0;N<g.length;N++)I.push(g[N].instrument+"/"+g[N].note);return c.debugCallback&&c.debugCallback("loadBatch timeout"),Promise.reject(new Error("timeout attempting to load: "+I.join(", ")))}else return c.debugCallback&&c.debugCallback("loadBatch resolve"),Promise.resolve({loaded:y,cached:C,error:z})}).catch(function(P){c.debugCallback&&c.debugCallback("loadBatch catch "+P.message)})}),c.prime=function(){var g=c.fadeLength/1e3;return c.isRunning=!1,c.audioBufferPossible?(c.debugCallback&&c.debugCallback("prime called"),new Promise(function(w,k){try{let L=function(_){var x=_&&_.audioBuffers&&_.audioBuffers.length>0?_.audioBuffers[0].duration:0;return{status:i().state,duration:x}};var D=L,$=i().currentTime,O=c.millisecondsPerMeasure/1e3/c.meterSize;if(c.duration=c.flattened.totalDuration*O,c.duration<=0)return c.audioBuffers=[],w({status:"empty",seconds:0});c.duration+=g;var P=Math.floor(i().sampleRate*c.duration);c.stop();var y=r(c.flattened);c.options.swing&&b(y,c.options.swing,c.meterFraction,c.pickupLength),c.sequenceCallback&&c.sequenceCallback(y,c.callbackContext);var C=v(y.length,c.pan),E={};y.forEach(function(_,x){var S=C&&C.length>x?C[x]:0;_.forEach(function(M){var U=M.instrument+":"+M.pitch+":"+M.volume+":"+Math.round((M.end-M.start)*1e3)/1e3+":"+S+":"+O+":"+(M.cents?M.cents:0);c.debugCallback&&c.debugCallback("noteMapTrack "+U),E[U]||(E[U]=[]),E[U].push(M.start)})});for(var z=[],A=i().createBuffer(2,P,i().sampleRate),R=0;R<Object.keys(E).length;R++){var T=Object.keys(E)[R],I=T.split(":"),N=I[6]!==void 0?parseFloat(I[6]):0;I={instrument:I[0],pitch:parseInt(I[1],10),volume:parseInt(I[2],10),len:parseFloat(I[3]),pan:parseFloat(I[4]),tempoMultiplier:parseFloat(I[5]),cents:N},z.push(l(A,i().sampleRate,I,E[T],c.soundFontVolumeMultiplier,c.programOffsets[I.instrument],g,c.noteEnd/1e3,c.debugCallback))}c.audioBuffers=[A],c.debugCallback&&(c.debugCallback("sampleRate = "+i().sampleRate),c.debugCallback("totalSamples = "+P),c.debugCallback("creationTime = "+Math.floor((i().currentTime-$)*1e3)+"ms")),Promise.all(z).then(function(){i().state==="suspended"?i().resume().then(function(){w(L(c))}):i().state==="interrupted"?i().suspend().then(function(){i().resume().then(function(){w(L(c))})}):w(L(c))}).catch(function(_){k(_)})}catch(L){k(L)}})):Promise.reject(new Error(p))};function v(g,w){if(w==null)return null;var k=[];if(w.length){for(var $=0;$<g;$++)if($<w.length){var O=parseFloat(w[$]);O<-1?O=-1:O>1&&(O=1),k.push(O)}else k.push(0);return k}else{var P=parseFloat(w);if(P*(g-1)>2)return null;for(var y=g%2===0,C=y?0-P/2:0,E=C+P,z=0;z<g;z++)y=z%2===0,y?(k.push(C),C-=P):(k.push(E),E+=P);return k}}c.start=function(){if(!c.audioBufferPossible)throw new Error(p);c.debugCallback&&c.debugCallback("start called");var g=c.pausedTimeSec?c.pausedTimeSec:0;c._kickOffSound(g),c.startTimeSec=i().currentTime-g,c.pausedTimeSec=void 0,c.debugCallback&&c.debugCallback("MIDI STARTED",c.startTimeSec)},c.pause=function(){if(!c.audioBufferPossible)throw new Error(p);return c.debugCallback&&c.debugCallback("pause called"),c.pausedTimeSec=c.stop(),c.pausedTimeSec},c.resume=function(){c.start()},c.seek=function(g,w){var k;switch(w){case"seconds":k=g;break;case"beats":k=g*c.millisecondsPerMeasure/c.beatsPerMeasure/1e3;break;default:k=(c.duration-c.fadeLength/1e3)*g;break}if(!c.audioBufferPossible)throw new Error(p);c.debugCallback&&c.debugCallback("seek called sec="+k),c.isRunning?(c.stop(),c._kickOffSound(k)):c.pausedTimeSec=k,c.pausedTimeSec=k},c.stop=function(){c.isRunning=!1,c.pausedTimeSec=void 0,c.directSource.forEach(function(w){try{w.stop()}catch(k){console.log("direct source didn't stop:",k)}}),c.directSource=[];var g=i().currentTime-c.startTimeSec;return g},c.finished=function(){c.startTimeSec=void 0,c.pausedTimeSec=void 0,c.isRunning=!1},c.download=function(){return s(c)},c.getAudioBuffer=function(){return c.audioBuffers[0]},c.getIsRunning=function(){return c.isRunning},c._deviceCapable=function(){return t()?!0:(console.warn(p),c.debugCallback&&c.debugCallback(p),!1)},c._kickOffSound=function(g){c.isRunning=!0,c.directSource=[],c.audioBuffers.forEach(function(w,k){c.directSource[k]=i().createBufferSource(),c.directSource[k].buffer=w,c.directSource[k].connect(i().destination)}),c.directSource.forEach(function(w){w.start(0,g)}),c.onEnded&&(c.directSource[0].onended=function(){c.onEnded(c.callbackContext)})};function b(g,w,k,$){if(!(k.den!=4&&k.den!=8)&&(w=parseFloat(w),!(isNaN(w)||w<=50))){w>75&&(w=75),w=w/50-1;var O=0,P=.25;k.den===8&&(P=P/2);for(var y=P/2,C=y*w,E=0;E<g.length;E++)for(var z=g[E],A=0;A<z.length;A++){var R=z[A];if((R.start-$)%y==0&&(R.start-$)%P!=0&&(A==0||z[A-1].start<=z[A].start-y)&&(A==z.length-1||z[A+1].start>=z[A].start+y)){var T=R.start;R.start+=C,R.volume*=1+O,A>0&&z[A-1].end==T&&(z[A-1].end=R.start,z[A-1].volume*=1-O)}}}}}return ks=h,ks}var $s,Xd;function Sb(){if(Xd)return $s;Xd=1;var e=function(){var r=this;r.tracks=[],r.totalDuration=0,r.currentInstrument=[],r.starts=[],r.addTrack=function(){return r.tracks.push([]),r.currentInstrument.push(0),r.starts.push(0),r.tracks.length-1},r.setInstrument=function(n,i){r.tracks[n].push({channel:0,cmd:"program",instrument:i}),r.currentInstrument[n]=i},r.appendNote=function(n,i,t,a,o){var s={cmd:"note",duration:t,gap:0,instrument:r.currentInstrument[n],pitch:i,start:r.starts[n],volume:a};o&&(s.cents=o),r.tracks[n].push(s),r.starts[n]+=t,r.totalDuration=Math.max(r.totalDuration,r.starts[n])}};return $s=e,$s}var xs,Kd;function j$(){if(Kd)return xs;Kd=1;var e=`
|
|
146
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" preserveAspectRatio="xMidYMid meet">
|
|
147
|
+
<g transform="translate(0,700) scale(0.1,-0.1)" >
|
|
148
|
+
<path d="M3111 6981 c-20 -37 -90 -55 -364 -96 -120 -18 -190 -33 -244 -55
|
|
149
|
+
-42 -17 -124 -42 -182 -56 -78 -18 -119 -34 -157 -60 -28 -19 -86 -46 -128
|
|
150
|
+
-60 -43 -13 -107 -42 -144 -64 -37 -23 -84 -46 -106 -52 -21 -7 -56 -29 -79
|
|
151
|
+
-50 -22 -22 -61 -50 -86 -63 -26 -13 -67 -40 -91 -60 -24 -20 -65 -47 -90 -60
|
|
152
|
+
-25 -13 -53 -31 -61 -41 -8 -9 -32 -30 -54 -46 -75 -54 -486 -460 -512 -507
|
|
153
|
+
-15 -25 -48 -69 -75 -98 -26 -28 -48 -57 -48 -63 0 -6 -18 -29 -39 -53 -21
|
|
154
|
+
-23 -56 -71 -77 -107 -20 -36 -50 -80 -65 -97 -16 -18 -33 -52 -40 -75 -12
|
|
155
|
+
-47 -47 -115 -84 -166 -13 -18 -30 -56 -38 -83 -8 -27 -34 -80 -56 -118 -33
|
|
156
|
+
-53 -46 -91 -62 -167 -12 -63 -34 -127 -59 -179 -42 -84 -60 -166 -60 -270 0
|
|
157
|
+
-90 26 -122 125 -154 54 -17 96 -19 430 -20 305 -1 381 2 430 14 82 22 140 51
|
|
158
|
+
153 78 6 12 22 47 37 77 14 30 38 77 54 103 15 27 34 73 40 103 7 30 28 78 48
|
|
159
|
+
107 19 28 44 74 55 101 10 28 34 67 53 87 18 20 49 61 68 90 19 30 44 63 57
|
|
160
|
+
74 13 11 36 40 52 65 59 94 232 270 306 313 20 11 57 37 82 58 25 20 70 52
|
|
161
|
+
100 72 30 19 66 47 79 61 13 14 49 35 80 46 30 12 80 37 111 56 31 19 95 45
|
|
162
|
+
143 58 48 12 110 37 139 55 63 40 127 55 323 76 83 9 208 28 279 41 156 29
|
|
163
|
+
165 29 330 4 453 -71 514 -84 606 -130 31 -16 83 -36 116 -45 32 -9 84 -34
|
|
164
|
+
115 -56 31 -21 82 -48 113 -60 32 -11 72 -33 89 -48 18 -16 59 -45 92 -65 33
|
|
165
|
+
-21 74 -51 90 -66 17 -15 49 -40 73 -54 52 -32 65 -61 50 -113 -8 -31 -61 -90
|
|
166
|
+
-277 -308 -300 -303 -361 -382 -369 -481 -2 -29 0 -66 6 -81 13 -40 88 -138
|
|
167
|
+
115 -151 12 -6 54 -26 92 -44 l70 -33 945 -2 c520 -1 975 2 1012 7 64 8 191
|
|
168
|
+
50 231 76 11 7 33 34 50 60 22 34 42 51 65 58 l32 9 0 1101 0 1102 -32 9 c-21
|
|
169
|
+
7 -44 26 -64 55 -60 84 -77 97 -140 110 -44 9 -76 10 -127 2 -59 -9 -77 -17
|
|
170
|
+
-134 -62 -37 -28 -172 -155 -301 -281 -129 -127 -249 -237 -267 -245 -25 -10
|
|
171
|
+
-41 -11 -71 -2 -58 15 -112 45 -124 69 -6 11 -35 35 -64 54 -28 18 -58 41 -66
|
|
172
|
+
50 -8 9 -41 35 -75 58 -33 22 -77 56 -99 75 -21 18 -64 46 -95 61 -31 14 -73
|
|
173
|
+
39 -93 55 -20 15 -70 40 -110 55 -40 15 -97 44 -127 64 -29 21 -78 44 -107 53
|
|
174
|
+
-30 8 -77 31 -105 51 -42 28 -73 39 -173 60 -68 14 -154 39 -196 58 -95 43
|
|
175
|
+
-131 51 -343 76 -209 24 -242 32 -279 70 l-30 29 -328 0 c-312 0 -330 -1 -339
|
|
176
|
+
-19z"></path>
|
|
177
|
+
<path d="M254 2875 c-89 -16 -107 -26 -145 -78 -32 -44 -62 -66 -91 -67 -17 0
|
|
178
|
+
-18 -61 -18 -1140 l0 -1140 24 0 c16 0 41 -17 72 -50 40 -42 61 -55 117 -72
|
|
179
|
+
l69 -21 82 23 c44 12 96 30 114 39 18 9 148 132 290 272 141 141 267 261 279
|
|
180
|
+
268 51 26 86 14 176 -61 32 -26 62 -48 66 -48 5 0 36 -25 70 -55 34 -30 74
|
|
181
|
+
-61 89 -69 15 -8 37 -28 50 -45 12 -17 50 -45 84 -62 34 -17 78 -44 98 -60 19
|
|
182
|
+
-16 61 -37 93 -48 32 -11 81 -37 107 -56 27 -20 76 -45 109 -56 33 -12 75 -31
|
|
183
|
+
93 -44 62 -45 93 -58 191 -82 54 -12 130 -37 168 -54 68 -29 180 -58 226 -59
|
|
184
|
+
62 0 183 -64 183 -96 0 -12 88 -14 639 -14 l639 0 12 30 c18 44 76 66 233 89
|
|
185
|
+
89 14 160 30 200 47 34 15 106 42 159 60 54 18 112 44 130 57 47 35 85 52 146
|
|
186
|
+
67 29 7 76 28 105 48 29 20 77 48 107 63 30 15 66 39 80 54 14 15 50 40 81 56
|
|
187
|
+
31 15 78 46 104 69 26 22 61 46 79 54 17 7 43 26 56 42 14 16 41 41 60 56 64
|
|
188
|
+
48 380 362 408 405 15 23 40 51 55 63 15 12 36 38 46 58 11 21 37 57 58 82 22
|
|
189
|
+
25 49 62 62 83 13 20 38 56 57 78 19 23 50 74 69 113 19 39 46 86 59 104 14
|
|
190
|
+
18 34 62 46 98 12 36 32 77 45 92 31 38 60 97 80 167 9 33 26 76 37 95 29 50
|
|
191
|
+
47 103 68 206 10 52 32 117 51 155 29 56 33 74 34 140 0 94 -10 108 -101 138
|
|
192
|
+
-61 20 -83 21 -463 21 -226 0 -421 -4 -451 -10 -63 -12 -86 -30 -110 -85 -10
|
|
193
|
+
-22 -33 -63 -52 -92 -21 -31 -42 -80 -53 -123 -11 -44 -32 -93 -56 -128 -20
|
|
194
|
+
-32 -47 -83 -59 -115 -12 -32 -37 -77 -56 -100 -19 -23 -50 -65 -69 -94 -19
|
|
195
|
+
-29 -44 -57 -54 -63 -11 -5 -29 -27 -42 -47 -52 -85 -234 -277 -300 -315 -25
|
|
196
|
+
-15 -53 -38 -62 -51 -9 -14 -42 -39 -74 -57 -32 -18 -75 -48 -95 -66 -21 -18
|
|
197
|
+
-59 -44 -85 -58 -26 -13 -72 -40 -100 -59 -35 -24 -78 -41 -128 -52 -47 -11
|
|
198
|
+
-99 -31 -139 -56 -69 -42 -94 -49 -391 -110 -245 -51 -425 -66 -595 -50 -168
|
|
199
|
+
16 -230 27 -330 61 -47 16 -123 35 -170 44 -98 17 -123 25 -172 58 -20 14 -71
|
|
200
|
+
37 -114 53 -44 15 -95 40 -115 56 -20 16 -70 42 -110 59 -40 16 -88 45 -108
|
|
201
|
+
63 -20 19 -55 46 -78 61 -24 14 -49 35 -55 47 -7 11 -34 33 -60 49 -50 31 -65
|
|
202
|
+
61 -53 102 4 13 130 147 281 298 236 238 277 283 299 335 15 32 35 71 46 86
|
|
203
|
+
12 18 19 44 19 76 0 42 -8 63 -53 138 -92 151 11 139 -1207 141 -798 2 -1030
|
|
204
|
+
0 -1086 -11z"></path>
|
|
205
|
+
</g>
|
|
206
|
+
</svg>
|
|
207
|
+
`;return xs=e,xs}var Ss,Qd;function B$(){if(Qd)return Ss;Qd=1;var e=`
|
|
208
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-play-svg">
|
|
209
|
+
<g>
|
|
210
|
+
<polygon points="4 0 23 12.5 4 25"/>
|
|
211
|
+
</g>
|
|
212
|
+
</svg>
|
|
213
|
+
`;return Ss=e,Ss}var Is,eh;function q$(){if(eh)return Is;eh=1;var e=`
|
|
214
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" class="abcjs-pause-svg">
|
|
215
|
+
<g>
|
|
216
|
+
<rect width="8.23" height="25"/>
|
|
217
|
+
<rect width="8.23" height="25" x="17"/>
|
|
218
|
+
</g>
|
|
219
|
+
</svg>
|
|
220
|
+
`;return Is=e,Is}var Ts,th;function F$(){if(th)return Ts;th=1;var e=`
|
|
221
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="abcjs-loading-svg">
|
|
222
|
+
<circle cx="50" cy="50" fill="none" stroke-width="20" r="35" stroke-dasharray="160 55"></circle>
|
|
223
|
+
</svg>
|
|
224
|
+
`;return Ts=e,Ts}var Cs,rh;function H$(){if(rh)return Cs;rh=1;var e=`
|
|
225
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25">
|
|
226
|
+
<g>
|
|
227
|
+
<polygon points="5 12.5 24 0 24 25"/>
|
|
228
|
+
<rect width="3" height="25" x="0" y="0"/>
|
|
229
|
+
</g>
|
|
230
|
+
</svg>
|
|
231
|
+
`;return Cs=e,Cs}var zs,nh;function Ib(){if(nh)return zs;nh=1;var e=Ji(),r=Gi(),n=Ar(),i=j$(),t=B$(),a=q$(),o=F$(),s=H$();function l(u,h){var c=this;if(typeof u=="string"){var v=u;if(u=document.querySelector(v),!u)throw new Error('Cannot find element "'+v+'" in the DOM.')}else if(!(u instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(c.parent=u,c.options={},h&&(c.options=Object.assign({},h)),c.options.ac&&r(c.options.ac),d(c.parent,c.options),f(c),c.disable=function(g){var w=c.parent.querySelector(".abcjs-inline-audio");g?w.classList.add("abcjs-disabled"):w.classList.remove("abcjs-disabled")},c.setWarp=function(g,w){var k=c.parent.querySelector(".abcjs-midi-tempo");k.value=Math.round(w),c.setTempo(g)},c.setTempo=function(g){var w=c.parent.querySelector(".abcjs-midi-current-tempo");w&&(w.innerHTML=Math.round(g))},c.resetAll=function(){for(var g=c.parent.querySelectorAll(".abcjs-pushed"),w=0;w<g.length;w++){var k=g[w];k.classList.remove("abcjs-pushed")}},c.pushPlay=function(g){var w=c.parent.querySelector(".abcjs-midi-start");w&&(g?w.classList.add("abcjs-pushed"):w.classList.remove("abcjs-pushed"))},c.pushLoop=function(g){var w=c.parent.querySelector(".abcjs-midi-loop");w&&(g?w.classList.add("abcjs-pushed"):w.classList.remove("abcjs-pushed"))},c.setProgress=function(g,w){var k=c.parent.querySelector(".abcjs-midi-progress-background"),$=c.parent.querySelector(".abcjs-midi-progress-indicator");if(!(!k||!$)){var O=k.clientWidth,P=O*g;$.style.left=P+"px";var y=c.parent.querySelector(".abcjs-midi-clock");if(y){var C=w*g/1e3,E=Math.floor(C/60),z=Math.floor(C%60),A=z<10?"0"+z:z;y.innerHTML=E+":"+A}}},c.options.afterResume){var b=!1;c.options.ac?b=c.options.ac.state!=="suspended":n()&&(b=n().state!=="suspended"),b&&c.options.afterResume()}}function d(u,h){var c=!!h.loopHandler,v=!!h.restartHandler,b=!!h.playHandler||!!h.playPromiseHandler,g=!!h.progressHandler,w=!!h.warpHandler,k=h.hasClock!==!1,$=`<div class="abcjs-inline-audio">
|
|
232
|
+
`;if(c){var O=h.repeatTitle?h.repeatTitle:"Click to toggle play once/repeat.",P=h.repeatAria?h.repeatAria:O;$+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+O+'" aria-label="'+P+'">'+i+`</button>
|
|
233
|
+
`}if(v){var y=h.restartTitle?h.restartTitle:"Click to go to beginning.",C=h.restartAria?h.restartAria:y;$+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+y+'" aria-label="'+C+'">'+s+`</button>
|
|
234
|
+
`}if(b){var E=h.playTitle?h.playTitle:"Click to play/pause.",z=h.playAria?h.playAria:E;$+='<button type="button" class="abcjs-midi-start abcjs-btn" title="'+E+'" aria-label="'+z+'">'+t+a+o+`</button>
|
|
235
|
+
`}if(g){var A=h.randomTitle?h.randomTitle:"Click to change the playback position.",R=h.randomAria?h.randomAria:A;$+='<button type="button" class="abcjs-midi-progress-background" title="'+A+'" aria-label="'+R+`"><span class="abcjs-midi-progress-indicator"></span></button>
|
|
236
|
+
`}if(k&&($+=`<span class="abcjs-midi-clock"></span>
|
|
237
|
+
`),w){var T=h.warpTitle?h.warpTitle:"Change the playback speed.",I=h.warpAria?h.warpAria:T,N=h.bpm?h.bpm:"BPM";$+='<span class="abcjs-tempo-wrapper"><label><input class="abcjs-midi-tempo" type="number" min="1" max="300" value="100" title="'+T+'" aria-label="'+I+'">%</label><span> (<span class="abcjs-midi-current-tempo"></span> '+N+`)</span></span>
|
|
238
|
+
`}$+='<div class="abcjs-css-warning" style="font-size: 12px;color:red;border: 1px solid red;text-align: center;width: 300px;margin-top: 4px;font-weight: bold;border-radius: 4px;">CSS required: load abcjs-audio.css</div>',$+=`</div>
|
|
239
|
+
`,u.innerHTML=$}function p(u,h,c,v,b){var g=!0;if(n()?g=n().state==="suspended":r(),!e())throw{status:"NotSupported",message:"This browser does not support audio."};(g||b)&&c&&c.classList.add("abcjs-loading"),g?n().resume().then(function(){v?v().then(function(w){m(u,h,c,b)}):m(u,h,c,b)}):m(u,h,c,b)}function m(u,h,c,v){v?u(h).then(function(){c&&c.classList.remove("abcjs-loading")}):(u(h),c&&c.classList.remove("abcjs-loading"))}function f(u){var h=!!u.options.loopHandler,c=!!u.options.restartHandler,v=!!u.options.playHandler||!!u.options.playPromiseHandler,b=!!u.options.progressHandler,g=!!u.options.warpHandler,w=u.parent.querySelector(".abcjs-midi-start");h&&u.parent.querySelector(".abcjs-midi-loop").addEventListener("click",function(k){p(u.options.loopHandler,k,w,u.options.afterResume)}),c&&u.parent.querySelector(".abcjs-midi-reset").addEventListener("click",function(k){p(u.options.restartHandler,k,w,u.options.afterResume)}),v&&w.addEventListener("click",function(k){p(u.options.playPromiseHandler||u.options.playHandler,k,w,u.options.afterResume,!!u.options.playPromiseHandler)}),b&&u.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",function(k){p(u.options.progressHandler,k,w,u.options.afterResume)}),g&&u.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",function(k){p(u.options.warpHandler,k,w,u.options.afterResume)})}return zs=l,zs}var Es,ih;function G$(){if(ih)return Es;ih=1;var e=Sb(),r=Pu(),n=Ar();function i(a,o,s,l,d){for(var p=new e,m=0;m<a.length;m++){var f=a[m],u=p.addTrack();if(p.setInstrument(u,f.instrument),m===0&&o)for(var h=0;h<o.length;h++){var c=o[h];p.appendNote(u,c.pitch,1/64,c.volume,c.cents)}p.appendNote(u,f.pitch,f.duration,f.volume,f.cents)}var v=n();return v.state==="suspended"?v.resume().then(function(){return t(p,s,l,d)}):t(p,s,l,d)}function t(a,o,s,l){var d=new r;return d.init({sequence:a,millisecondsPerMeasure:o,options:{soundFontUrl:s},debugCallback:l}).then(function(){return d.prime()}).then(function(){return d.start(),Promise.resolve()})}return Es=i,Es}var Ns,ah;function Tb(){if(ah)return Ns;ah=1;var e=Ib(),r=Pu(),n=wu(),i=Ar();function t(){var a=this;a.warp=100,a.cursorControl=null,a.visualObj=null,a.timer=null,a.midiBuffer=null,a.options=null,a.currentTempo=null,a.control=null,a.isLooping=!1,a.isStarted=!1,a.isLoaded=!1,a.isLoading=!1,a.load=function(s,l,d){d||(d={}),d.displayPlay===void 0&&(d.displayPlay=!0),d.displayProgress===void 0&&(d.displayProgress=!0),a.control=new e(s,{loopHandler:d.displayLoop?a.toggleLoop:void 0,restartHandler:d.displayRestart?a.restart:void 0,playPromiseHandler:d.displayPlay?a.play:void 0,progressHandler:d.displayProgress?a.randomAccess:void 0,warpHandler:d.displayWarp?a.onWarp:void 0,afterResume:a.init}),a.cursorControl=l,a.disable(!0)},a.disable=function(s){a.control&&a.control.disable(s)},a.setTune=function(s,l,d){return a.visualObj=s,a.disable(!1),a.options=d||{},a.control&&(a.pause(),a.setProgress(0,1),a.control.resetAll(),a.restart(),a.isStarted=!1),a.isLooping=!1,l?a.go():Promise.resolve({status:"no-audio-context"})},a.go=function(){a.isLoading=!0;var s=a.visualObj.millisecondsPerMeasure()*100/a.warp;a.currentTempo=Math.round(a.visualObj.getBeatsPerMeasure()/s*6e4),a.control&&a.control.setTempo(a.currentTempo),a.percent=0;var l;return a.midiBuffer||(a.midiBuffer=new r),i().resume().then(function(d){return a.midiBuffer.init({visualObj:a.visualObj,options:a.options,millisecondsPerMeasure:s})}).then(function(d){return l=d,a.midiBuffer.prime()}).then(function(){var d=16;return a.cursorControl&&a.cursorControl.beatSubdivisions!==void 0&&parseInt(a.cursorControl.beatSubdivisions,10)>=1&&parseInt(a.cursorControl.beatSubdivisions,10)<=64&&(d=parseInt(a.cursorControl.beatSubdivisions,10)),a.timer=new n(a.visualObj,{beatCallback:a.beatCallback,eventCallback:a.eventCallback,lineEndCallback:a.lineEndCallback,qpm:a.currentTempo,extraMeasuresAtBeginning:a.cursorControl?a.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:a.cursorControl?a.cursorControl.lineEndAnticipation:0,beatSubdivisions:d}),a.cursorControl&&a.cursorControl.onReady&&typeof a.cursorControl.onReady=="function"&&a.cursorControl.onReady(a),a.isLoaded=!0,a.isLoading=!1,Promise.resolve({status:"created",notesStatus:l})})},a.destroy=function(){a.timer&&(a.timer.reset(),a.timer.stop(),a.timer=null),a.midiBuffer&&(a.midiBuffer.stop(),a.midiBuffer=null),a.setProgress(0,1),a.control&&a.control.resetAll()},a.play=function(){return a.runWhenReady(a._play,void 0)};function o(s){return new Promise(function(l){setTimeout(l,s)})}a.runWhenReady=function(s,l){return a.visualObj?a.isLoading?o(500).then(function(){return a.isLoading?a.runWhenReady(s,l):s(l)}):a.isLoaded?s(l):a.go().then(function(){return s(l)}):Promise.resolve({status:"loading"})},a._play=function(){return i().resume().then(function(){return a.isStarted=!a.isStarted,a.isStarted?(a.cursorControl&&a.cursorControl.onStart&&typeof a.cursorControl.onStart=="function"&&a.cursorControl.onStart(),a.midiBuffer.start(),a.timer.start(a.percent),a.control&&a.control.pushPlay(!0)):a.pause(),Promise.resolve({status:"ok"})})},a.pause=function(){a.timer&&(a.timer.pause(),a.midiBuffer.pause(),a.control&&a.control.pushPlay(!1))},a.toggleLoop=function(){a.isLooping=!a.isLooping,a.control&&a.control.pushLoop(a.isLooping)},a.restart=function(){a.timer&&(a.timer.setProgress(0),a.midiBuffer.seek(0))},a.randomAccess=function(s){return a.runWhenReady(a._randomAccess,s)},a._randomAccess=function(s){var l=s.target.classList.contains("abcjs-midi-progress-indicator")?s.target.parentNode:s.target,d=(s.x-l.getBoundingClientRect().left)/l.offsetWidth;return d<0&&(d=0),d>1&&(d=1),a.seek(d),Promise.resolve({status:"ok"})},a.seek=function(s,l){a.timer&&a.midiBuffer&&(a.timer.setProgress(s,l),a.midiBuffer.seek(s,l))},a.setWarp=function(s){if(parseInt(s,10)>0){a.warp=parseInt(s,10);var l=a.isStarted,d=a.percent;return a.destroy(),a.isStarted=!1,a.go().then(function(){return a.setProgress(d,a.midiBuffer.duration*1e3),a.control&&a.control.setWarp(a.currentTempo,a.warp),l?a.play().then(function(){return a.seek(d),Promise.resolve()}):(a.seek(d),Promise.resolve())})}return Promise.resolve()},a.onWarp=function(s){var l=s.target.value;return a.setWarp(l)},a.setProgress=function(s,l){a.percent=s,a.control&&a.control.setProgress(s,l)},a.finished=function(){if(a.timer.reset(),a.isLooping)return a.timer.start(0),a.midiBuffer.finished(),a.midiBuffer.start(),"continue";a.timer.stop(),a.isStarted&&(a.control&&a.control.pushPlay(!1),a.isStarted=!1,a.midiBuffer.finished(),a.cursorControl&&a.cursorControl.onFinished&&typeof a.cursorControl.onFinished=="function"&&a.cursorControl.onFinished(),a.setProgress(0,1))},a.beatCallback=function(s,l,d,p){var m=s/l;a.setProgress(m,d),a.cursorControl&&a.cursorControl.onBeat&&typeof a.cursorControl.onBeat=="function"&&a.cursorControl.onBeat(s,l,d,p)},a.eventCallback=function(s){if(s)a.cursorControl&&a.cursorControl.onEvent&&typeof a.cursorControl.onEvent=="function"&&a.cursorControl.onEvent(s);else return a.finished()},a.lineEndCallback=function(s,l){a.cursorControl&&a.cursorControl.onLineEnd&&typeof a.cursorControl.onLineEnd=="function"&&a.cursorControl.onLineEnd(s,l)},a.getUrl=function(){return a.midiBuffer.download()},a.download=function(s){var l=a.getUrl(),d=document.createElement("a");document.body.appendChild(d),d.setAttribute("style","display: none;"),d.href=l,d.download=s||"output.wav",d.click(),window.URL.revokeObjectURL(l),document.body.removeChild(d)}}return Ns=t,Ns}var As,oh;function Cb(){if(oh)return As;oh=1;var e=xb(),r;return(function(){function n(f,u){for(var h in u)u.hasOwnProperty(h)&&f.setAttribute(h,u[h]);return f}function i(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}i.prototype.setTempo=function(f){this.trackcount===0&&(this.startTrack(),this.track+="%00%FF%51%03"+d(Math.round(6e7/f),6),this.endTrack())},i.prototype.setGlobalInfo=function(f,u,h,c){if(this.trackcount===0){this.startTrack();var v=Math.round(6e7/f);this.track+="%00%FF%51%03"+d(v,6),h&&(this.track+=o(h)),c&&(this.track+=s(c)),u&&(this.track+=a(u,"%01")),this.endTrack()}},i.prototype.startTrack=function(){this.noteWarped={},this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},i.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var f=d(this.track.length/3+4,8);this.track="MTrk"+f+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},i.prototype.setText=function(f,u){switch(f){case"name":this.trackName=a(u,"%03");break}},i.prototype.setInstrument=function(f){this.trackInstrument="%00%C0"+d(f,2),this.instrument=f},i.prototype.setChannel=function(f,u){this.channel=f;var h="%00%B"+this.channel.toString(16);this.track+=h+"%79%00",this.track+=h+"%40%00",this.track+=h+"%5B%30",u||(u=0),u=Math.round((u+1)*64),this.track+=h+"%0A"+d(u,2),this.track+=h+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)};var t=4096;i.prototype.startNote=function(f,u,h){if(this.track+=m(this.silencelength),this.silencelength=0,h){this.track+="%e"+this.channel.toString(16);var c=Math.round(e(h)*t);this.track+=p(8192+c),this.track+=m(0),this.noteWarped[f]=!0}this.track+=this.noteOnAndChannel,this.track+="%"+f.toString(16)+d(u,2)},i.prototype.endNote=function(f){this.track+=m(this.silencelength),this.silencelength=0,this.noteWarped[f]&&(this.track+="%e"+this.channel.toString(16),this.track+=p(8192),this.track+=m(0),this.noteWarped[f]=!1),this.track+=this.noteOffAndChannel,this.track+="%"+f.toString(16)+"%00"},i.prototype.addRest=function(f){this.silencelength+=f,this.silencelength<0&&(this.silencelength=0)},i.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+d(this.trackcount,4)+"%01%e0"+this.trackstrings},i.prototype.embed=function(f,u){var h=this.getData(),c=n(document.createElement("a"),{href:h});if(c.innerHTML="download midi",f.insertBefore(c,f.firstChild),!u){var v=n(document.createElement("embed"),{src:h,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});f.insertBefore(v,f.firstChild)}};function a(f,u){for(var h="",c=0;c<f.length;c++)h+=d(f.charCodeAt(c),2);return"%00%FF"+u+d(h.length/3,2)+h}function o(f){if(!f||!f.accidentals)return"";for(var u="%00%FF%59%02",h=0,c=256,v=0;v<f.accidentals.length;v++)f.accidentals[v].acc==="sharp"?h++:f.accidentals[v].acc==="flat"&&c--;var b=d(c!==256?c:h,2),g=f.mode==="m"?"%01":"%00";return u+b+g}function s(f){var u="%00%FF%58%04"+d(f.num,2),h={1:0,2:1,4:2,8:3,16:4,32:5},c=h[f.den];if(!c)return"";u+=d(c,2);var v;switch(f.num+"/"+f.den){case"2/4":case"3/4":case"4/4":case"5/4":v=24;break;case"6/4":v=72;break;case"2/2":case"3/2":case"4/2":v=48;break;case"3/8":case"6/8":case"9/8":case"12/8":v=36;break}return v?(u+=d(v,2),u+"%08"):""}function l(f){for(var u="",h=0;h<f.length;h+=2)u+="%",u+=f.substr(h,2);return u}function d(f,u){var h=f.toString(16);for(h=h.split(".")[0];h.length<u;)h="0"+h;return h.length>u&&(h=h.substring(0,u)),l(h)}function p(f){f=Math.round(f);var u=f%128,h=f-u;return d(h*2+u,4)}function m(f){var u=0,h=[];for(f=Math.round(f);f!==0;)h.push(f&127),f=f>>7;for(var c=h.length-1;c>=0;c--){u=u<<8;var v=h[c];c!==0&&(v=v|128),u=u|v}var b=u.toString(16).length;return b+=b%2,d(u,b)}r=function(){return new i}})(),As=r,As}var Ps,sh;function J$(){if(sh)return Ps;sh=1;var e=Cb(),r;return(function(){var n=1920;r=function(a,o){o===void 0&&(o={});var s=a.setUpAudio(o),l=e(),d=a.metaText?a.metaText.title:void 0;d&&d.length>128&&(d=d.substring(0,124)+"...");var p=a.getKeySignature(),m=a.getMeterFraction(),f=s.tempo,u=f/60;if(m.den===8&&m.num!==5&&m.num!==7){var h=a.millisecondsPerMeasure();f=6e4/(h/m.num)/2,u=f/60}l.setGlobalInfo(f,d,p,m);for(var c=0;c<s.tracks.length;c++){l.startTrack();for(var v={},b=0;b<s.tracks[c].length;b++){var g=s.tracks[c][b];switch(g.cmd){case"text":l.setText(g.type,g.text);break;case"program":var w=0;o.pan&&o.pan.length>c&&(w=o.pan[c]),g.instrument===128?(l.setChannel(9,w),l.setInstrument(0)):(l.setChannel(g.channel,w),l.setInstrument(g.instrument));break;case"note":var k=g.gap*u,$=g.start,O=$+g.duration-k;v[$]||(v[$]=[]),v[$].push({pitch:g.pitch,volume:g.volume,cents:g.cents}),v[O]||(v[O]=[]),v[O].push({pitch:g.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+g.cmd)}}i(l,v,n),l.endTrack()}return l.getData()};function i(t,a,o){for(var s=Object.keys(a),l=0;l<s.length;l++)s[l]=parseFloat(s[l]);s.sort(function(c,v){return c-v});for(var d=0,p=0;p<s.length;p++){var m=a[s[p]];if(s[p]>d){var f=(s[p]-d)*o;t.addRest(f),d=s[p]}for(var u=0;u<m.length;u++){var h=m[u];h.volume?t.startNote(h.pitch,h.volume,h.cents):t.endNote(h.pitch)}}}})(),Ps=r,Ps}var Os,ch;function W$(){if(ch)return Os;ch=1;var e=Hi(),r=J$(),n=function(a,o){var s={};if(o)for(var l in o)o.hasOwnProperty(l)&&(s[l]=o[l]);s.generateInline=!1;function d(p,m,f){var u=r(m,s);switch(s.midiOutputType){case"encoded":return u;case"binary":var h=u.replace("data:audio/midi,","");h=h.replace(/MThd/g,"%4d%54%68%64"),h=h.replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(h.length/3),v=new Uint8Array(c),b=0;b<h.length/3;b++){var g=b*3+1,w=parseInt(h.substring(g,g+2),16);v[b]=w}return v;case"link":default:return t(m,s,u,f)}}return typeof a=="string"?e.renderEngine(d,"*",a,s):d(null,a,0)};function i(a){var o={};return a&&o.toString.call(a)==="[object Function]"}var t=function(a,o,s,l){var d=["abcjs-download-midi","abcjs-midi-"+l];o.downloadClass&&d.push(o.downloadClass);var p='<div class="'+d.join(" ")+'">';o.preTextDownload&&(p+=o.preTextDownload);var m=a.metaText&&a.metaText.title?a.metaText.title:"Untitled",f;o.downloadLabel&&i(o.downloadLabel)?f=o.downloadLabel(a,l):o.downloadLabel?f=o.downloadLabel.replace(/%T/,m):f='Download MIDI for "'+m+'"',m=m.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_");var u=o.fileName?o.fileName:m+".midi";return p+='<a download="'+u+'" href="'+s+'">'+f+"</a>",o.postTextDownload&&(p+=o.postTextDownload),p+"</div>"};return Os=n,Os}var Ms,uh;function zb(){if(uh)return Ms;uh=1;try{if(typeof window.CustomEvent!="function"){var e=function(n,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var t=document.createEvent("CustomEvent");return t.initCustomEvent(n,i.bubbles,i.cancelable,i.detail),t};e.prototype=window.Event.prototype,window.CustomEvent=e}}catch{}var r=function(n){this.isEditArea=!0,typeof n=="string"?(this.textarea=document.getElementById(n),this.textarea||(this.textarea=document.querySelector(n))):this.textarea=n,this.initialText=this.textarea.value,this.isDragging=!1};return r.prototype.addSelectionListener=function(n){this.textarea.onmousemove=function(i){this.isDragging&&n.fireSelectionChanged()}},r.prototype.addChangeListener=function(n){this.changelistener=n,this.textarea.onkeyup=function(){n.fireChanged()},this.textarea.onmousedown=function(){this.isDragging=!0,n.fireSelectionChanged()},this.textarea.onmouseup=function(){this.isDragging=!1,n.fireChanged()},this.textarea.onchange=function(){n.fireChanged()}},r.prototype.getSelection=function(){return{start:this.textarea.selectionStart,end:this.textarea.selectionEnd}},r.prototype.setSelection=function(n,i){if(this.textarea.setSelectionRange)this.textarea.setSelectionRange(n,i);else if(this.textarea.createTextRange){var t=this.textarea.createTextRange();t.collapse(!0),t.moveEnd("character",i),t.moveStart("character",n),t.select()}this.textarea.focus()},r.prototype.getString=function(){return this.textarea.value},r.prototype.setString=function(n){this.textarea.value=n,this.initialText=this.getString(),this.changelistener&&this.changelistener.fireChanged()},r.prototype.getElem=function(){return this.textarea},Ms=r,Ms}var Ds,lh;function Y$(){if(lh)return Ds;lh=1;var e=Et(),r=Tb(),n=Ji(),i=$b(),t=zb();function a(s){var l={},d;if(s.abcjsParams)for(d in s.abcjsParams)s.abcjsParams.hasOwnProperty(d)&&(l[d]=s.abcjsParams[d]);if(s.midi_options)for(d in s.midi_options)s.midi_options.hasOwnProperty(d)&&(l[d]=s.midi_options[d]);if(s.parser_options)for(d in s.parser_options)s.parser_options.hasOwnProperty(d)&&(l[d]=s.parser_options[d]);if(s.render_options)for(d in s.render_options)s.render_options.hasOwnProperty(d)&&(l[d]=s.render_options[d]);return l.tablature&&s.warnings_id&&(l.tablature.warnings_id=s.warnings_id),l}var o=function(s,l){this.abcjsParams=a(l),l.indicate_changed&&(this.indicate_changed=!0),typeof s=="string"?this.editarea=new t(s):s.isEditArea?this.editarea=s:this.editarea=new t(s),this.editarea.addSelectionListener(this),this.editarea.addChangeListener(this),l.canvas_id?this.div=l.canvas_id:l.paper_id?this.div=l.paper_id:(this.div=document.createElement("DIV"),this.editarea.getElem().parentNode.insertBefore(this.div,this.editarea.getElem())),typeof this.div=="string"&&(this.div=document.getElementById(this.div)),l.selectionChangeCallback&&(this.selectionChangeCallback=l.selectionChangeCallback),this.clientClickListener=this.abcjsParams.clickListener,this.abcjsParams.clickListener=this.highlight.bind(this),l.synth&&n()&&(this.synth={el:l.synth.el,cursorControl:l.synth.cursorControl,options:l.synth.options}),l.generate_midi&&(this.generate_midi=l.generate_midi,this.abcjsParams.generateDownload&&(typeof l.midi_download_id=="string"?this.downloadMidi=document.getElementById(l.midi_download_id):l.midi_download_id&&(this.downloadMidi=l.midi_download_id)),this.abcjsParams.generateInline!==!1&&(typeof l.midi_id=="string"?this.inlineMidi=document.getElementById(l.midi_id):l.midi_id&&(this.inlineMidi=l.midi_id))),l.warnings_id?typeof l.warnings_id=="string"?this.warningsdiv=document.getElementById(l.warnings_id):this.warningsdiv=l.warnings_id:l.generate_warnings&&(this.warningsdiv=document.createElement("div"),this.div.parentNode.insertBefore(this.warningsdiv,this.div)),this.onchangeCallback=l.onchange,this.redrawCallback=l.redrawCallback,this.currentAbc="",this.tunes=[],this.bReentry=!1,this.parseABC(),this.modelChanged(),this.addClassName=function(d,p){var m=function(f,u){var h=f.className;return h.length>0&&(h===u||new RegExp("(^|\\s)"+u+"(\\s|$)").test(h))};return m(d,p)||(d.className+=(d.className?" ":"")+p),d},this.removeClassName=function(d,p){return d.className=e.strip(d.className.replace(new RegExp("(^|\\s+)"+p+"(\\s+|$)")," ")),d},this.setReadOnly=function(d){var p="abc_textarea_readonly",m=this.editarea.getElem();d?(m.setAttribute("readonly","yes"),this.addClassName(m,p)):(m.removeAttribute("readonly"),this.removeClassName(m,p))}};return o.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var s=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(s)}if(this.synth){var l=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new r,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],l,this.synth.options)}},o.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.redrawCallback&&this.redrawCallback(!0),this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=i(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi(),this.redrawCallback&&this.redrawCallback(!1)}catch(s){console.error("ABCJS error: ",s),this.warnings||(this.warnings=[]),this.warnings.push(s.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("<br />"):"No errors"),this.updateSelection(),this.bReentry=!1}},o.prototype.paramChanged=function(s){if(s)for(var l in s)s.hasOwnProperty(l)&&(this.abcjsParams[l]=s[l]);this.currentAbc="",this.fireChanged()},o.prototype.getTunes=function(){return this.tunes},o.prototype.synthParamChanged=function(s){if(this.synth){if(this.synth.options={},s)for(var l in s)s.hasOwnProperty(l)&&(this.synth.options[l]=s[l]);this.currentAbc="",this.fireChanged()}},o.prototype.parseABC=function(){var s=this.editarea.getString();return s===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=s,!0)},o.prototype.updateSelection=function(){var s=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(s.start,s.end)}catch{}this.selectionChangeCallback&&this.selectionChangeCallback(s.start,s.end)},o.prototype.fireSelectionChanged=function(){this.updateSelection()},o.prototype.setDirtyStyle=function(s){if(this.indicate_changed!==void 0){var l=function(f,u){var h=function(c,v){var b=c.className;return b.length>0&&(b===v||new RegExp("(^|\\s)"+v+"(\\s|$)").test(b))};return h(f,u)||(f.className+=(f.className?" ":"")+u),f},d=function(f,u){return f.className=e.strip(f.className.replace(new RegExp("(^|\\s+)"+u+"(\\s+|$)")," ")),f},p="abc_textarea_dirty",m=this.editarea.getElem();s?l(m,p):d(m,p)}},o.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var s=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(function(){s.modelChanged()},300);var l=this.isDirty();this.wasDirty!==l&&(this.wasDirty=l,this.setDirtyStyle(l)),this.onchangeCallback&&this.onchangeCallback(this)}},o.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},o.prototype.isDirty=function(){return this.indicate_changed===void 0?!1:this.editarea.initialText!==this.editarea.getString()},o.prototype.highlight=function(s,l,d,p,m,f){this.editarea.setSelection(s.startChar,s.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(s.startChar,s.endChar),this.clientClickListener&&this.clientClickListener(s,l,d,p,m,f)},o.prototype.pause=function(s){this.bIsPaused=s,s||this.fireChanged()},o.prototype.millisecondsPerMeasure=function(){return!this.synth||!this.synth.synthControl||!this.synth.synthControl.visualObj?0:this.synth.synthControl.visualObj.millisecondsPerMeasure()},o.prototype.pauseMidi=function(s){this.midiPause=s,s||this.redrawMidi()},Ds=o,Ds}var Rs,fh;function V$(){if(fh)return Rs;fh=1;var e=f7(),r=d7(),n=Hi(),i=ab(),t=N7(),a={};a.signature="abcjs-basic v"+e,Object.keys(r).forEach(function(w){a[w]=r[w]}),Object.keys(n).forEach(function(w){a[w]=n[w]}),a.renderAbc=$b(),a.tuneMetrics=D$(),a.TimingCallbacks=wu();var o=Yt();a.setGlyph=o.setSymbol,a.strTranspose=t;var s=Pu(),l=Nu(),d=Au(),p=Sb(),m=Ib(),f=Gi(),u=Ar(),h=Ji(),c=G$(),v=Tb(),b=W$(),g=Cb();return a.synth={CreateSynth:s,instrumentIndexToName:l,pitchToNoteName:d,SynthController:v,SynthSequence:p,CreateSynthControl:m,registerAudioContext:f,activeAudioContext:u,supportsAudio:h,playEvent:c,getMidiFile:b,sequence:i,midiRenderer:g},a.Editor=Y$(),a.EditArea=zb(),Rs=a,Rs}var X$=V$();const Ls=l7(X$),Qt={visualObj:null,synthControl:null},En=document.querySelector(".main"),dh=document.getElementById("status"),hh=document.getElementById("sheet-music"),Us=document.getElementById("audio-controls");function Nn(e,r=!1){dh.textContent=e,dh.classList.toggle("error",r)}async function K$(e){try{if(Nn("Rendering..."),hh.innerHTML="",Us.innerHTML="",Qt.visualObj=Ls.renderAbc(hh,e,{responsive:"resize",add_classes:!0}),!Qt.visualObj||Qt.visualObj.length===0)throw new Error("Failed to parse music notation");if(!Ls.synth.supportsAudio())throw new Error("Audio not supported in this browser");Qt.synthControl=new Ls.synth.SynthController,Qt.synthControl.load(Us,null,{displayLoop:!0,displayPlay:!0,displayProgress:!0}),await Qt.synthControl.setTune(Qt.visualObj[0],!1,{}),Nn("Ready to play!")}catch(r){console.error("Render error:",r),Nn(`Error: ${r.message}`,!0),Us.innerHTML=""}}const vr=new u7({name:"Sheet Music App",version:"1.0.0"});vr.ontoolinput=e=>{var n;console.info("Received tool input:",e);const r=(n=e.arguments)==null?void 0:n.abcNotation;r?K$(r):Nn("No ABC notation provided",!0)};vr.onerror=console.error;vr.onhostcontextchanged=e=>{e.safeAreaInsets&&(En.style.paddingTop=`${e.safeAreaInsets.top}px`,En.style.paddingRight=`${e.safeAreaInsets.right}px`,En.style.paddingBottom=`${e.safeAreaInsets.bottom}px`,En.style.paddingLeft=`${e.safeAreaInsets.left}px`)};vr.connect().then(()=>{const e=vr.getHostContext();e&&vr.onhostcontextchanged(e)});</script>
|
|
240
|
+
<style rel="stylesheet" crossorigin>.abcjs-inline-audio{height:26px;padding:0 5px;border-radius:3px;background-color:#424242;display:flex;align-items:center;box-sizing:border-box}.abcjs-inline-audio.abcjs-disabled{opacity:.5}.abcjs-inline-audio .abcjs-btn{display:block;width:28px;height:34px;margin-right:2px;padding:7px 4px;background:none!important;border:1px solid transparent;box-sizing:border-box;line-height:1}.abcjs-btn g{fill:#f4f4f4;stroke:#f4f4f4}.abcjs-inline-audio .abcjs-btn:hover g{fill:#ccc;stroke:#ccc}.abcjs-inline-audio .abcjs-midi-selection.abcjs-pushed,.abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed,.abcjs-inline-audio .abcjs-midi-reset.abcjs-pushed{border:1px solid #cccccc;background-color:#666;box-sizing:border-box}.abcjs-inline-audio .abcjs-midi-start .abcjs-pause-svg,.abcjs-inline-audio .abcjs-midi-start .abcjs-loading-svg,.abcjs-inline-audio .abcjs-midi-start.abcjs-pushed .abcjs-play-svg,.abcjs-inline-audio .abcjs-midi-start.abcjs-loading .abcjs-play-svg{display:none}.abcjs-inline-audio .abcjs-midi-start.abcjs-pushed .abcjs-pause-svg{display:block}.abcjs-inline-audio .abcjs-midi-progress-background{background-color:#424242;height:10px;border-radius:5px;border:2px solid #cccccc;margin:0 8px 0 15px;position:relative;flex:1;padding:0;box-sizing:border-box}.abcjs-inline-audio .abcjs-midi-progress-indicator{width:20px;margin-left:-10px;height:14px;background-color:#f4f4f4;position:absolute;display:inline-block;border-radius:6px;top:-4px;left:0;box-sizing:border-box}.abcjs-inline-audio .abcjs-midi-clock{margin-left:4px;margin-top:1px;margin-right:2px;display:inline-block;font-family:sans-serif;font-size:16px;box-sizing:border-box;color:#f4f4f4}.abcjs-inline-audio .abcjs-tempo-wrapper{font-size:10px;color:#f4f4f4;box-sizing:border-box;display:flex;align-items:center}.abcjs-inline-audio .abcjs-midi-tempo{border-radius:2px;border:none;margin:0 2px 0 4px;width:42px;padding-left:2px;box-sizing:border-box}.abcjs-inline-audio .abcjs-loading .abcjs-loading-svg{display:inherit}.abcjs-inline-audio .abcjs-loading{outline:none;animation-name:abcjs-spin;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}.abcjs-inline-audio .abcjs-loading-svg circle{stroke:#f4f4f4}@keyframes abcjs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.abcjs-large .abcjs-inline-audio{height:52px}.abcjs-large .abcjs-btn{width:56px;height:52px;font-size:28px;padding:6px 8px}.abcjs-large .abcjs-midi-progress-background{height:20px;border:4px solid #cccccc}.abcjs-large .abcjs-midi-progress-indicator{height:28px;top:-8px;width:40px}.abcjs-large .abcjs-midi-clock{font-size:32px;margin-right:10px;margin-left:10px;margin-top:-1px}.abcjs-large .abcjs-midi-tempo{font-size:20px;width:50px}.abcjs-large .abcjs-tempo-wrapper{font-size:20px}.abcjs-css-warning{display:none}*{box-sizing:border-box}html,body{font-family:system-ui,-apple-system,sans-serif;font-size:1rem}code{font-size:1em}:root{--color-bg: #ffffff;--color-text: #1f2937;--color-text-muted: #6b7280;--color-primary: #2563eb;--color-success: #10b981;--color-danger: #ef4444;--color-card-bg: #f9fafb;--color-border: #e5e7eb}@media(prefers-color-scheme:dark){:root{--color-bg: #111827;--color-text: #f9fafb;--color-text-muted: #9ca3af;--color-primary: #3b82f6;--color-success: #34d399;--color-danger: #f87171;--color-card-bg: #1f2937;--color-border: #374151}}html,body{margin:0;padding:0;background:var(--color-bg);color:var(--color-text)}.main{width:100%;margin:0 auto;padding:8px;display:flex;flex-direction:column;gap:8px}#audio-controls:empty{display:none}#audio-controls:not(:empty)~#status{display:none}.audio-controls{width:100%}.audio-controls .abcjs-inline-audio{border-radius:8px}.audio-controls .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed{background-color:var(--color-success)!important;border-color:var(--color-success)!important}.status{font-size:.875rem;color:var(--color-text-muted)}.status.error{color:var(--color-danger)}.sheet-section{background:var(--color-card-bg);border-radius:8px;padding:16px;border:1px solid var(--color-border);min-height:500px}.sheet-section .sheet-music-container{width:100%;overflow-x:auto}</style>
|
|
241
|
+
</head>
|
|
242
|
+
<body>
|
|
243
|
+
<main class="main">
|
|
244
|
+
<header class="header">
|
|
245
|
+
<div id="audio-controls" class="audio-controls abcjs-large">
|
|
246
|
+
<!-- SynthController will inject audio controls here -->
|
|
247
|
+
</div>
|
|
248
|
+
<span id="status" class="status">Waiting for notation...</span>
|
|
249
|
+
</header>
|
|
250
|
+
|
|
251
|
+
<section class="sheet-section">
|
|
252
|
+
<div id="sheet-music" class="sheet-music-container">
|
|
253
|
+
<!-- ABC notation will be rendered here by abcjs -->
|
|
254
|
+
</div>
|
|
255
|
+
</section>
|
|
256
|
+
</main>
|
|
257
|
+
|
|
258
|
+
</body>
|
|
259
|
+
</html>
|