From ecea9dc1ecc6e846961b76d1974d6c9c36b5eed8 Mon Sep 17 00:00:00 2001 From: aryanpingle <49340972+aryanpingle@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:02:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20aryanpin?= =?UTF-8?q?gle/Runic@91ddb142b2f9c2b0d9d43c463f33f124775930c9=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bundle/index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bundle/index.js b/bundle/index.js index 73ba8e2..1088494 100644 --- a/bundle/index.js +++ b/bundle/index.js @@ -1,21 +1,21 @@ -var Dt=Object.defineProperty,Bt=Object.defineProperties;var Ht=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var ge=(e,n,t)=>n in e?Dt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,y=(e,n)=>{for(var t in n||(n={}))Me.call(n,t)&&ge(e,t,n[t]);if(q)for(var t of q(n))Ge.call(n,t)&&ge(e,t,n[t]);return e},x=(e,n)=>Bt(e,Ht(n));var De=(e,n)=>{var t={};for(var r in e)Me.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&q)for(var r of q(e))n.indexOf(r)<0&&Ge.call(e,r)&&(t[r]=e[r]);return t};var m=(e,n,t)=>ge(e,typeof n!="symbol"?n+"":n,t);var k=(e,n,t)=>new Promise((r,i)=>{var a=u=>{try{c(t.next(u))}catch(p){i(p)}},l=u=>{try{c(t.throw(u))}catch(p){i(p)}},c=u=>u.done?r(u.value):Promise.resolve(u.value).then(a,l);c((t=t.apply(e,n)).next())});var te,f,We,zt,A,Be,Oe,fe,ye,_e,be,Ut,$={},$e=[],Wt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xe=Array.isArray;function V(e,n){for(var t in n)e[t]=n[t];return e}function Xe(e){var n=e.parentNode;n&&n.removeChild(e)}function Ot(e,n,t){var r,i,a,l={};for(a in n)a=="key"?r=n[a]:a=="ref"?i=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?te.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)l[a]===void 0&&(l[a]=e.defaultProps[a]);return Y(e,l,r,i,null)}function Y(e,n,t,r,i){var a={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i==null?++We:i,__i:-1,__u:0};return i==null&&f.vnode!=null&&f.vnode(a),a}function E(e){return e.children}function _(e,n){this.props=e,this.context=n}function M(e,n){if(n==null)return e.__?M(e.__,e.__i+1):null;for(var t;nn&&A.sort(fe));ee.__r=0}function je(e,n,t,r,i,a,l,c,u,p,h){var s,w,d,v,C,S=r&&r.__k||$e,g=n.length;for(t.__d=u,$t(t,n,S),u=t.__d,s=0;s0?Y(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,c=Xt(i,t,l,h),i.__i=c,a=null,c!==-1&&(h--,(a=t[c])&&(a.__u|=131072)),a==null||a.__v===null?(c==-1&&s--,typeof i.type!="function"&&(i.__u|=65536)):c!==l&&(c==l-1?s--:c==l+1?s++:c>l?h>u-l?s+=c-l:s--:c(u!=null&&!(131072&u.__u)?1:0))for(;l>=0||c=0){if((u=n[l])&&!(131072&u.__u)&&i==u.key&&a===u.type)return l;l--}if(c{let i=r.startsWith("@"),a=r.endsWith("@");if(i&&a)return r;if(i)return n=!0,r;if(a)return n=!1,r;if(n)return r;let l=r.toLowerCase();return l in ne?Zt(l):""})}var Jt=0,En=Array.isArray;function o(e,n,t,r,i,a){n||(n={});var l,c,u=n;if("ref"in u)for(c in u={},n)c=="ref"?l=n[c]:u[c]=n[c];var p={type:e,props:u,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Jt,__i:-1,__u:0,__source:i,__self:a};if(typeof e=="function"&&(l=e.defaultProps))for(c in l)u[c]===void 0&&(u[c]=l[c]);return f.vnode&&f.vnode(p),p}var L=3,Te=8,Ee=1,Ce=[[[0,3],[3,3]],[[1.5,0],[3,1]],[[3,5],[1.5,6]],[[1.5,6],[0,5]],[[0,5],[0,4]],[[0,3],[0,1]],[[0,1],[1.5,0]],[[1.5,0],[1.5,2]],[[3,1],[1.5,2]],[[1.5,4],[3,5]],[[1.5,4],[1.5,6]],[[1.5,4],[0,5]],[[1.5,2],[0,1]],[[1.5,2],[1.5,3]]];function qt(e,n,t){let r=`translate(${n}, ${t})`;return o("g",{className:"rune",transform:r,children:o("text",{class:"rune-segment rune-segment--active rune-segment--fill","font-size":5,"font-family":"Noto Sans Mono, monospace","dominant-baseline":"text-before-edge","text-anchor":"start",children:e})})}function Qe(e,n,t){let r=`translate(${n}, ${t})`;switch(e){case".":return o("g",{className:"rune",transform:r,children:o("circle",{class:"rune-segment rune-segment--active rune-segment--fill",cx:1.5,cy:3,r:.25,fill:"none"})});case"!":return o("g",{className:"rune",transform:r,children:[o("line",{class:"rune-segment rune-segment--active rune-segment--stroke",x1:1.5,y1:1,x2:1.5,y2:3.5}),o("circle",{class:"rune-segment rune-segment--active rune-segment--stroke rune-segment--fill",cx:1.5,cy:5,r:.25,fill:"none"})]});case"!":return o("g",{className:"rune",transform:r,children:[o("line",{class:"rune-segment rune-segment--active rune-segment--stroke",x1:1.5,y1:1,x2:1.5,y2:3.5}),o("circle",{class:"rune-segment rune-segment--active rune-segment--stroke rune-segment--fill",cx:1.5,cy:5,r:.25,fill:"none"})]});case"?":return o("g",{className:"rune",transform:r,children:[o("path",{class:"rune-segment rune-segment--active rune-segment--stroke",d:` +var Dt=Object.defineProperty,Bt=Object.defineProperties;var Ht=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var he=(e,n,t)=>n in e?Dt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,y=(e,n)=>{for(var t in n||(n={}))Me.call(n,t)&&he(e,t,n[t]);if(q)for(var t of q(n))Ge.call(n,t)&&he(e,t,n[t]);return e},x=(e,n)=>Bt(e,Ht(n));var De=(e,n)=>{var t={};for(var r in e)Me.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&q)for(var r of q(e))n.indexOf(r)<0&&Ge.call(e,r)&&(t[r]=e[r]);return t};var m=(e,n,t)=>he(e,typeof n!="symbol"?n+"":n,t);var k=(e,n,t)=>new Promise((r,i)=>{var a=u=>{try{l(t.next(u))}catch(p){i(p)}},c=u=>{try{l(t.throw(u))}catch(p){i(p)}},l=u=>u.done?r(u.value):Promise.resolve(u.value).then(a,c);l((t=t.apply(e,n)).next())});var te,f,Oe,zt,A,Be,We,ge,ve,fe,_e,Ut,$={},$e=[],Ot=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ye=Array.isArray;function V(e,n){for(var t in n)e[t]=n[t];return e}function Xe(e){var n=e.parentNode;n&&n.removeChild(e)}function Wt(e,n,t){var r,i,a,c={};for(a in n)a=="key"?r=n[a]:a=="ref"?i=n[a]:c[a]=n[a];if(arguments.length>2&&(c.children=arguments.length>3?te.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)c[a]===void 0&&(c[a]=e.defaultProps[a]);return Y(e,c,r,i,null)}function Y(e,n,t,r,i){var a={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i==null?++Oe:i,__i:-1,__u:0};return i==null&&f.vnode!=null&&f.vnode(a),a}function E(e){return e.children}function _(e,n){this.props=e,this.context=n}function M(e,n){if(n==null)return e.__?M(e.__,e.__i+1):null;for(var t;nn&&A.sort(ge));ee.__r=0}function je(e,n,t,r,i,a,c,l,u,p,h){var s,w,d,v,C,S=r&&r.__k||$e,g=n.length;for(t.__d=u,$t(t,n,S),u=t.__d,s=0;s0?Y(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,l=Xt(i,t,c,h),i.__i=l,a=null,l!==-1&&(h--,(a=t[l])&&(a.__u|=131072)),a==null||a.__v===null?(l==-1&&s--,typeof i.type!="function"&&(i.__u|=65536)):l!==c&&(l==c-1?s--:l==c+1?s++:l>c?h>u-c?s+=l-c:s--:l(u!=null&&!(131072&u.__u)?1:0))for(;c>=0||l=0){if((u=n[c])&&!(131072&u.__u)&&i==u.key&&a===u.type)return c;c--}if(l{let c=(e&1<<14-l)!==0;return Qt(l,c)}),t=(e&1)!==0,r=Yt(t);return[...n,r]}function Ye(e,n,t,r){let i=`translate(${t}, ${r})`,a=o("g",{className:"rune","data-rune-index":n,transform:i,children:[...ke(0)]}),l=o("g",{className:"rune","data-rune-index":n,transform:i,children:[...ke(e.bitmask)]}),c=ke(0);delete c[13],delete c[0];let u=o("g",{className:"rune","data-rune-bitmask":e.bitmask.toString(2),"data-rune-index":n,transform:i,children:[...c]}),p=o("g",{className:"rune","data-rune-index":n,transform:i,children:o("text",{"font-size":1,className:"rune-segment--active rune-segment--fill",x:1.5,y:8,"dominant-baseline":"middle","text-anchor":"middle",children:e.symbols.map(h=>h.ipaSymbol).join(" ")})});return{guide:[a],real:[l],interactive:[u],text:[p]}}function et(e,n){e.guide.push(...n.guide),e.real.push(...n.real),e.interactive.push(...n.interactive),e.text.push(...n.text)}var re=[{ipaSymbol:"\xE6",mask:26368,pronunciation:"a",english:"a",examples:"has, apple, ash"},{ipaSymbol:"\u0251\u0279",mask:30976,pronunciation:"ah",english:"ahr",examples:"arm, large, far"},{ipaSymbol:"\u0251",mask:18176,pronunciation:"aw",english:"aw",examples:"box, awesome, swan"},{ipaSymbol:"\u0254",mask:18176,pronunciation:"aw",english:"aw",examples:"box, awesome, swan"},{ipaSymbol:"e\u026A",mask:16640,pronunciation:"ay / ei",english:"ay",examples:"maid, break, they"},{ipaSymbol:"\u025B",mask:24064,pronunciation:"eh",english:"eh",examples:"end, bread, said"},{ipaSymbol:"i",mask:24320,pronunciation:"ee",english:"ee",examples:"bee, meat, key"},{ipaSymbol:"\u026A\u0279",mask:22272,pronunciation:"ear",english:"ear",examples:"ear, beer, steer"},{ipaSymbol:"\u0259",mask:24832,pronunciation:"uh",english:"uh",examples:"about, other, uhh"},{ipaSymbol:"\u025B\u0279",mask:22016,pronunciation:"air",english:"air",examples:"air, heir, there"},{ipaSymbol:"\u026A",mask:22528,pronunciation:"ee (sharp)",english:"ee",examples:"it, gym, brim"},{ipaSymbol:"a\u026A",mask:24576,pronunciation:"aye",english:"aye",examples:"ice, spider, pie"},{ipaSymbol:"\u025D",mask:32256,pronunciation:"uhr",english:"uhr",examples:"bird, burn, pearl"},{ipaSymbol:"o\u028A",mask:32512,pronunciation:"oh",english:"oh",examples:"open, boat, moan"},{ipaSymbol:"\u0254\u026A",mask:18432,pronunciation:"oi",english:"oi",examples:"join, boy, coin"},{ipaSymbol:"u",mask:28416,pronunciation:"oo (long)",english:"oo",examples:"who, blue, soon"},{ipaSymbol:"\u028A",mask:19968,pronunciation:"oo (short)",english:"oo",examples:"wolf, bush, would"},{ipaSymbol:"a\u028A",mask:20480,pronunciation:"ow",english:"ow",examples:"now, shout, bow"},{ipaSymbol:"\u0254\u0279",mask:30464,pronunciation:"oar",english:"oar",examples:"tour, cure, sure"},{ipaSymbol:"\u028A\u0279",mask:30464,pronunciation:"our",english:"our",examples:"tour, cure, sure"}],tt=32512,oe=[{ipaSymbol:"b",mask:16546,pronunciation:"b",english:"b",examples:"ball, abe, bird"},{ipaSymbol:"t\u0283",mask:16406,pronunciation:"tch",english:"tch",examples:"watch, chair, future"},{ipaSymbol:"d",mask:16554,pronunciation:"d",english:"d",examples:"doll, damn, deep"},{ipaSymbol:"f",mask:16474,pronunciation:"f",english:"f",examples:"fall, fit, fill"},{ipaSymbol:"\u0261",mask:16498,pronunciation:"g",english:"guh",examples:"gun, egg, ghost"},{ipaSymbol:"h",mask:16562,pronunciation:"h",english:"h",examples:"hop, who, help"},{ipaSymbol:"d\u0292",mask:16522,pronunciation:"juh",english:"j",examples:"jam, giraffe, edge"},{ipaSymbol:"k",mask:16610,pronunciation:"k",english:"k",examples:"mask, cat, rack"},{ipaSymbol:"l",mask:16530,pronunciation:"l",english:"l",examples:"live, well, land"},{ipaSymbol:"\u026B",mask:16530,pronunciation:"l",english:"l",examples:"live, well, land"},{ipaSymbol:"m",mask:16424,pronunciation:"m",english:"m",examples:"man, sum, comb"},{ipaSymbol:"n",mask:16428,pronunciation:"n",english:"n",examples:"no, never, nice"},{ipaSymbol:"\u014B",mask:16638,pronunciation:"ng",english:"ng",examples:"ring, pink, tongue"},{ipaSymbol:"p",mask:16466,pronunciation:"p",english:"p",examples:"pip, pretty, pop"},{ipaSymbol:"\u0279",mask:16594,pronunciation:"r",english:"r",examples:"rice, rune, rim"},{ipaSymbol:"s",mask:16602,pronunciation:"s",english:"s",examples:"sit, less, circle"},{ipaSymbol:"\u0283",mask:16510,pronunciation:"sh",english:"sh",examples:"sham, sure, ocean"},{ipaSymbol:"t",mask:16470,pronunciation:"t",english:"t",examples:"tip, matter, tomato"},{ipaSymbol:"\u03B8",mask:16598,pronunciation:"th (sharp)",english:"th",examples:"theta, theme, thaw"},{ipaSymbol:"\xF0",mask:16570,pronunciation:"th (soft)",english:"th",examples:"leather, the, them"},{ipaSymbol:"v",mask:16550,pronunciation:"v",english:"v",examples:"vine, five, very"},{ipaSymbol:"w",mask:16452,pronunciation:"w",english:"w",examples:"why, where, quick"},{ipaSymbol:"j",mask:16534,pronunciation:"yuh",english:"y",examples:"you, onion, yup"},{ipaSymbol:"z",mask:16566,pronunciation:"z",english:"z",examples:"zed, buzz, his"},{ipaSymbol:"\u0292",mask:16622,pronunciation:"sh",english:"zh",examples:"treasure, azure, division"}],nt=16638,B=16384,ie=[...re,...oe].sort((e,n)=>-(e.ipaSymbol.length-n.ipaSymbol.length)),en=Object.fromEntries(ie.map(e=>[e.ipaSymbol,e])),ae=Object.fromEntries(ie.map(e=>[e.mask,e]));function N(e,n){return e>>n&1}function se(e,n){return N(e,n)===1}function rt(e,...n){let t=e;return n.forEach(r=>{t=Le(t,r)}),t}function Le(e,n){return e|1<{t=Ie(t,r)}),t}function Ie(e,n){return se(e,n)?tn(e,n):e}function it(e){return e&tt}function at(e){return e&nt}function nn(e,n){if(!(N(e,9)^N(e,10)))return e;let a=ot(e,9,10),l=rt(e,9,10),c=N(e,9),u=N(n,9);if(c!==u)return c===1?l:a;let p=N(e,10),h=N(n,10);if(p!==h)return p===1?l:a;throw new Error("Unreachable")}function rn(e){return se(e,7)||se(e,4)?Le(e,1):Ie(e,1)}function st(e,n){return e=rn(e),e=nn(e,n),(e&B)===e?e=0:e|=B,e}function on(e,n,t){let r=ae[e],i=ae[n],a=[];return r&&a.push(r),i&&a.push(i),t||a.reverse(),a}function G(e){let n=it(e),t=n!==0&&n!==B,r=t?n:0,i=at(e),a=i!==0&&i!==B,l=a?i:0,c="mixed";t&&a?c="mixed":t?c="vowel":a&&(c="consonant");let u=(e&1)===1,p=on(r,l,u);return{type:"phoneticSymbol",bitmask:e,vowelBitmask:r,consonantBitmask:l,vowelOrConsonant:c,vowelBeforeConsonant:u,symbols:p}}function H(e){let n=[],t=0,r=!1;for(;t{t.type==="specialChar"&&t.char===` + `,fill:"none"}),o("circle",{class:"rune-segment rune-segment--active rune-segment--stroke rune-segment--fill",cx:1.5,cy:5,r:.25,fill:"none"})]});case"-":return o("g",{className:"rune",transform:r,children:o("line",{class:"rune-segment rune-segment--active rune-segment--stroke",x1:1,y1:3,x2:2,y2:3})})}return Jt(e,n,t)}function qt(e,n){let t=Ce[e][0],r=Ce[e][1];return o("line",{class:`rune-segment rune-segment--stroke ${n?"rune-segment--active":""}`,"data-segment-index":e,x1:t[0],y1:t[1],x2:r[0],y2:r[1]})}function Qt(e){return o("circle",{class:`rune-segment rune-segment--stroke ${e?"rune-segment--active":""}`,"data-segment-index":14,cx:1.5,cy:6.5,r:.5,fill:"none"})}function ke(e){let n=Ce.map((a,c)=>{let l=(e&1<<14-c)!==0;return qt(c,l)}),t=(e&1)!==0,r=Qt(t);return[...n,r]}function Ye(e,n,t,r){let i=`translate(${t}, ${r})`,a=o("g",{className:"rune","data-rune-index":n,transform:i,children:[...ke(0)]}),c=o("g",{className:"rune","data-rune-index":n,transform:i,children:[...ke(e.bitmask)]}),l=ke(0);delete l[13],delete l[0];let u=o("g",{className:"rune","data-rune-bitmask":e.bitmask.toString(2),"data-rune-index":n,transform:i,children:[...l]}),p=o("g",{className:"rune","data-rune-index":n,transform:i,children:o("text",{"font-size":1,className:"rune-segment--active rune-segment--fill",x:1.5,y:8,"dominant-baseline":"middle","text-anchor":"middle",children:e.symbols.map(h=>h.ipaSymbol).join(" ")})});return{guide:[a],real:[c],interactive:[u],text:[p]}}function et(e,n){e.guide.push(...n.guide),e.real.push(...n.real),e.interactive.push(...n.interactive),e.text.push(...n.text)}var ne=[{ipaSymbol:"\xE6",mask:26368,pronunciation:"a",english:"a",examples:"has, apple, ash"},{ipaSymbol:"\u0251\u0279",mask:30976,pronunciation:"ah",english:"ahr",examples:"arm, large, far"},{ipaSymbol:"\u0251",mask:18176,pronunciation:"aw",english:"aw",examples:"box, awesome, swan"},{ipaSymbol:"\u0254",mask:18176,pronunciation:"aw",english:"aw",examples:"box, awesome, swan"},{ipaSymbol:"e\u026A",mask:16640,pronunciation:"ay / ei",english:"ay",examples:"maid, break, they"},{ipaSymbol:"\u025B",mask:24064,pronunciation:"eh",english:"eh",examples:"end, bread, said"},{ipaSymbol:"i",mask:24320,pronunciation:"ee",english:"ee",examples:"bee, meat, key"},{ipaSymbol:"\u026A\u0279",mask:22272,pronunciation:"ear",english:"ear",examples:"ear, beer, steer"},{ipaSymbol:"\u0259",mask:24832,pronunciation:"uh",english:"uh",examples:"about, other, uhh"},{ipaSymbol:"\u025B\u0279",mask:22016,pronunciation:"air",english:"air",examples:"air, heir, there"},{ipaSymbol:"\u026A",mask:22528,pronunciation:"ee (sharp)",english:"ee",examples:"it, gym, brim"},{ipaSymbol:"a\u026A",mask:24576,pronunciation:"aye",english:"aye",examples:"ice, spider, pie"},{ipaSymbol:"\u025D",mask:32256,pronunciation:"uhr",english:"uhr",examples:"bird, burn, pearl"},{ipaSymbol:"o\u028A",mask:32512,pronunciation:"oh",english:"oh",examples:"open, boat, moan"},{ipaSymbol:"\u0254\u026A",mask:18432,pronunciation:"oi",english:"oi",examples:"join, boy, coin"},{ipaSymbol:"u",mask:28416,pronunciation:"oo (long)",english:"oo",examples:"who, blue, soon"},{ipaSymbol:"\u028A",mask:19968,pronunciation:"oo (short)",english:"oo",examples:"wolf, bush, would"},{ipaSymbol:"a\u028A",mask:20480,pronunciation:"ow",english:"ow",examples:"now, shout, bow"},{ipaSymbol:"\u0254\u0279",mask:30464,pronunciation:"oar",english:"oar",examples:"tour, cure, sure"},{ipaSymbol:"\u028A\u0279",mask:30464,pronunciation:"our",english:"our",examples:"tour, cure, sure"}],tt=32512,re=[{ipaSymbol:"b",mask:16546,pronunciation:"b",english:"b",examples:"ball, abe, bird"},{ipaSymbol:"t\u0283",mask:16406,pronunciation:"tch",english:"tch",examples:"watch, chair, future"},{ipaSymbol:"d",mask:16554,pronunciation:"d",english:"d",examples:"doll, damn, deep"},{ipaSymbol:"f",mask:16474,pronunciation:"f",english:"f",examples:"fall, fit, fill"},{ipaSymbol:"\u0261",mask:16498,pronunciation:"g",english:"guh",examples:"gun, egg, ghost"},{ipaSymbol:"h",mask:16562,pronunciation:"h",english:"h",examples:"hop, who, help"},{ipaSymbol:"d\u0292",mask:16522,pronunciation:"juh",english:"j",examples:"jam, giraffe, edge"},{ipaSymbol:"k",mask:16610,pronunciation:"k",english:"k",examples:"mask, cat, rack"},{ipaSymbol:"l",mask:16530,pronunciation:"l",english:"l",examples:"live, well, land"},{ipaSymbol:"\u026B",mask:16530,pronunciation:"l",english:"l",examples:"live, well, land"},{ipaSymbol:"m",mask:16424,pronunciation:"m",english:"m",examples:"man, sum, comb"},{ipaSymbol:"n",mask:16428,pronunciation:"n",english:"n",examples:"no, never, nice"},{ipaSymbol:"\u014B",mask:16638,pronunciation:"ng",english:"ng",examples:"ring, pink, tongue"},{ipaSymbol:"p",mask:16466,pronunciation:"p",english:"p",examples:"pip, pretty, pop"},{ipaSymbol:"\u0279",mask:16594,pronunciation:"r",english:"r",examples:"rice, rune, rim"},{ipaSymbol:"s",mask:16602,pronunciation:"s",english:"s",examples:"sit, less, circle"},{ipaSymbol:"\u0283",mask:16510,pronunciation:"sh",english:"sh",examples:"sham, sure, ocean"},{ipaSymbol:"t",mask:16470,pronunciation:"t",english:"t",examples:"tip, matter, tomato"},{ipaSymbol:"\u03B8",mask:16598,pronunciation:"th (sharp)",english:"th",examples:"theta, theme, thaw"},{ipaSymbol:"\xF0",mask:16570,pronunciation:"th (soft)",english:"th",examples:"leather, the, them"},{ipaSymbol:"v",mask:16550,pronunciation:"v",english:"v",examples:"vine, five, very"},{ipaSymbol:"w",mask:16452,pronunciation:"w",english:"w",examples:"why, where, quick"},{ipaSymbol:"j",mask:16534,pronunciation:"yuh",english:"y",examples:"you, onion, yup"},{ipaSymbol:"z",mask:16566,pronunciation:"z",english:"z",examples:"zed, buzz, his"},{ipaSymbol:"\u0292",mask:16622,pronunciation:"sh",english:"zh",examples:"treasure, azure, division"}],nt=16638,B=16384,oe=[...ne,...re].sort((e,n)=>-(e.ipaSymbol.length-n.ipaSymbol.length)),Yt=Object.fromEntries(oe.map(e=>[e.ipaSymbol,e])),ie=Object.fromEntries(oe.map(e=>[e.mask,e]));function N(e,n){return e>>n&1}function ae(e,n){return N(e,n)===1}function rt(e,...n){let t=e;return n.forEach(r=>{t=Le(t,r)}),t}function Le(e,n){return e|1<{t=Ie(t,r)}),t}function Ie(e,n){return ae(e,n)?en(e,n):e}function it(e){return e&tt}function at(e){return e&nt}function tn(e,n){if(!(N(e,9)^N(e,10)))return e;let a=ot(e,9,10),c=rt(e,9,10),l=N(e,9),u=N(n,9);if(l!==u)return l===1?c:a;let p=N(e,10),h=N(n,10);if(p!==h)return p===1?c:a;throw new Error("Unreachable")}function nn(e){return ae(e,7)||ae(e,4)?Le(e,1):Ie(e,1)}function st(e,n){return e=nn(e),e=tn(e,n),(e&B)===e?e=0:e|=B,e}function rn(e,n,t){let r=ie[e],i=ie[n],a=[];return r&&a.push(r),i&&a.push(i),t||a.reverse(),a}function G(e){let n=it(e),t=n!==0&&n!==B,r=t?n:0,i=at(e),a=i!==0&&i!==B,c=a?i:0,l="mixed";t&&a?l="mixed":t?l="vowel":a&&(l="consonant");let u=(e&1)===1,p=rn(r,c,u);return{type:"phoneticSymbol",bitmask:e,vowelBitmask:r,consonantBitmask:c,vowelOrConsonant:l,vowelBeforeConsonant:u,symbols:p}}function H(e){let n=[],t=0,r=!1;for(;t{t.type==="specialChar"&&t.char===` `?n.push(0):++n[n.length-1]}),n}function ct(e){let n=[[]];return e.forEach(t=>{t.type==="specialChar"&&t.char===` -`?n.push([]):n[n.length-1].push(t)}),n}function ln(e){let n=[];for(let t of e){let r=n[n.length-1];if(n.length===0)n.push(t);else if(an(r,t)){let i=sn(r,t);n[n.length-1]=i}else n.push(t)}return n}var le=2,ut,pt,mt,dt,ht,gt,ft,_t,bt,I=class extends _{constructor(t){super(t);m(this,"svgElement");m(this,"tokens");m(this,"state",{displayPhonemes:(ut=this.props.displayPhonemes)!=null?ut:!1,backgroundColor:(pt=this.props.backgroundColor)!=null?pt:"black",transparentBackground:(mt=this.props.transparentBackground)!=null?mt:!0,runeColor:(dt=this.props.runeColor)!=null?dt:"crimson",runeGuideColor:(ht=this.props.runeGuideColor)!=null?ht:"transparent",runeThickness:(gt=this.props.runeThickness)!=null?gt:.25,shadowSpread:(ft=this.props.shadowSpread)!=null?ft:0,align:(_t=this.props.align)!=null?_t:"left",lineSpacing:(bt=this.props.lineSpacing)!=null?bt:L/2});m(this,"guideLayer");m(this,"realLayer");m(this,"interactiveLayer");m(this,"textLayer");m(this,"postRenderSetup",()=>{this.applyGeneralStylesToSegments(),this.applyStylesToGuideSegments(),this.applyStylesToRealSegments(),this.applyStylesToInteractiveSegments(),this.applyStylesToPhonemeText(),this.applyGeneralSVGStyles()});m(this,"onInteractiveSegmentClick",t=>{let r=t.currentTarget,i=r.parentElement,a=parseInt(i.getAttribute("data-rune-index")),l=parseInt(i.getAttribute("data-rune-bitmask"),2),c=parseInt(r.getAttribute("data-segment-index")),u=l^1<<14-c,p=st(u,l);this.updateRuneTokenMask(a,p)});this.tokens=H(t.phoneticText)}componentWillReceiveProps(t){t.phoneticText!==this.props.phoneticText&&(this.tokens=H(t.phoneticText))}componentDidUpdate(){this.postRenderSetup()}componentDidMount(){this.postRenderSetup()}applyGeneralSVGStyles(){let t=this.state.shadowSpread?`drop-shadow(0 0 ${this.state.shadowSpread}px ${this.state.runeColor})`:"";this.svgElement.style.setProperty("filter",t)}applyGeneralStylesToSegments(){this.svgElement.querySelectorAll(".rune-segment").forEach(t=>{t.setAttribute("stroke","transparent"),t.setAttribute("fill","transparent"),t.setAttribute("stroke-width",`${this.state.runeThickness}`),t.setAttribute("stroke-linecap","round")})}applyStylesToGuideSegments(){var t;(t=this.guideLayer)==null||t.querySelectorAll(".rune-segment").forEach(r=>{r.setAttribute("stroke",this.state.runeGuideColor)})}applyStylesToRealSegments(){var t;(t=this.realLayer)==null||t.querySelectorAll(".rune-segment--active").forEach(r=>{let i=r.classList.contains("rune-segment--stroke");r.setAttribute("stroke",i?this.state.runeColor:"none");let a=r.classList.contains("rune-segment--fill");r.setAttribute("fill",a?this.state.runeColor:"none")})}applyStylesToInteractiveSegments(){var r;let t="CUM";(r=this.interactiveLayer)==null||r.querySelectorAll(".rune-segment").forEach(i=>{i.hasAttribute(t)||(i.addEventListener("click",this.onInteractiveSegmentClick),i.setAttribute(t,"true"))})}applyStylesToPhonemeText(){var t;(t=this.textLayer)==null||t.querySelectorAll("text").forEach(r=>{r.setAttribute("fill",this.state.runeColor)})}updateRuneTokenMask(t,r){let i=G(r);this.tokens[t]=i,this.forceUpdate()}getViewBoxDimensions(){let t=Te-(this.state.displayPhonemes?0:Ee),r=ct(this.tokens),i=Math.max(...r.map(u=>u.length))*L,a=2*le+i,l=r.length,c=2*le+t*l+(l-1)*this.state.lineSpacing;return[a,c]}getAlignmentOffset(t,r){let i=0;return this.state.align==="left"||(this.state.align==="center"?i=(r-t)/2:this.state.align==="right"&&(i=r-t)),i}getTokenLayers(t){let r={guide:[],real:[],interactive:[],text:[]},i=Te-(this.state.displayPhonemes?0:Ee),a=lt(t),l=Math.max(...a.map(p=>p*L)),c=0,u=0;return t.forEach((p,h)=>{let s=c*(i+this.state.lineSpacing),d=this.getAlignmentOffset(a[c]*L,l)+u*L;if(++u,p.type==="specialChar"&&p.char===` -`)++c,u=0;else if(p.type==="specialChar"){let v=Qe(p.char,d,s);r.real.push(v)}else{let v=Ye(p,h,d,s);et(r,v)}}),r}setPhoneticText(t){this.tokens=H(t),this.forceUpdate()}render(t,r){let i=this.getTokenLayers(this.tokens),[a,l]=this.getViewBoxDimensions(),c=[-le,-le,a,l].join(" ");return o("svg",x(y({ref:u=>this.svgElement=u,class:"runic-svg",preserveAspectRatio:"xMidYMid meet",viewBox:c,width:2e3,height:l*2e3/a,version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t.svgProps),{children:[r.runeGuideColor!=="transparent"&&o("g",{ref:u=>this.guideLayer=u,className:"runic-layer runic-layer--guide",children:[...i.guide]}),o("g",{ref:u=>this.realLayer=u,className:"runic-layer runic-layer--real",children:[...i.real]}),t.interactive&&o("g",{ref:u=>this.interactiveLayer=u,className:"runic-layer runic-layer--interactive",children:[...i.interactive]}),r.displayPhonemes&&o("g",{ref:u=>this.textLayer=u,className:"runic-layer runic-layer--text",children:[...i.text]})]}))}};var z=class extends _{constructor(t){super(t);m(this,"onChange",t=>{var r,i;(i=(r=this.props).onChange)==null||i.call(r,t)});m(this,"onInput",t=>{var a,l,c,u;let r=t.currentTarget,i=parseFloat(r.value);this.setState({value:i}),(l=(a=this.props).onInput)==null||l.call(a,t),(u=(c=this.props).bindInput)==null||u.call(c,i)});this.setState({value:t.default})}render(t,r){return o("div",{className:"range-input",children:[o("div",{className:"range-input__info",children:[o("div",{className:"range-input__label",children:t.label}),o("div",{className:"range-input__value",children:r.value})]}),o("input",{className:"range-input__input-element",type:"range",min:t.min,max:t.max,step:t.step,defaultValue:String(t.default),onChange:this.onChange,onInput:this.onInput})]})}};function Pe(e){let n=null,r=new XMLSerializer().serializeToString(e);return r=`\r -`+r,n="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r),n}function Ve(e){return k(this,null,function*(){let n=Pe(e),t=document.createElement("canvas"),r=new Image;r.src=n;let i=2e3,a=e.getAttribute("viewBox").split(/\s+/g),l=parseFloat(a[2]),c=parseFloat(a[3]);return t.width=i,t.height=i/l*c,new Promise((u,p)=>{r.onload=function(){t.getContext("2d").drawImage(r,0,0,t.width,t.height),u(t)}})})}function Ne(e){return k(this,null,function*(){let n=yield Ve(e),t=null;return yield new Promise(r=>{n.toBlob(i=>{t=i,r(0)})}),t})}function Re(e,n="tempfilename"){let t=document.createElement("a");t.download=n,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t),t=null}var ce=()=>o("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("g",{children:o("path",{d:"M6 21H18M12 3V17M12 17L17 12M12 17L7 12",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})})}),vt=e=>o("svg",x(y({fill:"#000000",width:"800px",height:"800px",viewBox:"0 -2.5 29 29",xmlns:"http://www.w3.org/2000/svg"},e),{children:[o("path",{fill:"currentColor",d:"m1.334 2.666h26.665c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m1.334 7.999h19.555c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m27.999 10.667h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 21.333h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m1.334 18.666h19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333h-.002-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333z"})]})),yt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 -2.5 29 29",xmlns:"http://www.w3.org/2000/svg"},e),{children:[o("path",{fill:"currentColor",d:"m1.334 2.666h26.665c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m4.889 5.333c-.011 0-.024-.001-.037-.001-.737 0-1.334.597-1.334 1.334s.597 1.334 1.334 1.334c.013 0 .026 0 .039-.001h-.002 19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333h-.002z"}),o("path",{fill:"currentColor",d:"m27.999 10.667h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 21.333h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m24.444 18.666c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333h-.002-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"})]})),xt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 -2.5 29 29",xmlns:"http://www.w3.org/2000/svg"},e),{children:[o("path",{fill:"currentColor",d:"m27.999 21.333h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 16h-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 10.667h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m1.334 2.666h26.665c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m27.999 5.333h-19.555c-.011 0-.024-.001-.037-.001-.737 0-1.334.597-1.334 1.334s.597 1.334 1.334 1.334c.013 0 .026 0 .039-.001h-.002 19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"})]})),St=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z",fill:"currentColor",stroke:"currentColor"})})),wt=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z",fill:"currentColor",stroke:"currentColor"})})),kt=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M8.75 21V3h2v18h-2zM18 21V8.5h2V21h-2zM4 21l.004-10h2L6 21H4zm9.248 0v-7h2v7h-2z",fill:"currentColor",stroke:"currentColor"})})),Ct=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z",fill:"currentColor",stroke:"currentColor"})}));var Tt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),{children:o("path",{d:"M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"})})),Et=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),{children:o("path",{d:"M21,9a1,1,0,0,0-1,1v3H4V10a1,1,0,0,0-2,0v4a1,1,0,0,0,1,1H21a1,1,0,0,0,1-1V10A1,1,0,0,0,21,9Z"})})),Lt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),{children:o("path",{d:"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,0,1-8-8A7.92,7.92,0,0,1,5.69,7.1L16.9,18.31A7.92,7.92,0,0,1,12,20Zm6.31-3.1L7.1,5.69A7.92,7.92,0,0,1,12,4a8,8,0,0,1,8,8A7.92,7.92,0,0,1,18.31,16.9Z"})})),It=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),{children:o("path",{d:"M13.41,12l6.3-6.29a1,1,0,1,0-1.42-1.42L12,10.59,5.71,4.29A1,1,0,0,0,4.29,5.71L10.59,12l-6.3,6.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l6.29,6.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"})}));var Pt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),{children:o("path",{d:"M18,14a4,4,0,0,0-3.08,1.48l-5.1-2.35a3.64,3.64,0,0,0,0-2.26l5.1-2.35A4,4,0,1,0,14,6a4.17,4.17,0,0,0,.07.71L8.79,9.14a4,4,0,1,0,0,5.72l5.28,2.43A4.17,4.17,0,0,0,14,18a4,4,0,1,0,4-4ZM18,4a2,2,0,1,1-2,2A2,2,0,0,1,18,4ZM6,14a2,2,0,1,1,2-2A2,2,0,0,1,6,14Zm12,6a2,2,0,1,1,2-2A2,2,0,0,1,18,20Z"})})),Vt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),{children:o("path",{d:"M21,8.94a1.31,1.31,0,0,0-.06-.27l0-.09a1.07,1.07,0,0,0-.19-.28h0l-6-6h0a1.07,1.07,0,0,0-.28-.19.32.32,0,0,0-.09,0A.88.88,0,0,0,14.05,2H10A3,3,0,0,0,7,5V6H6A3,3,0,0,0,3,9V19a3,3,0,0,0,3,3h8a3,3,0,0,0,3-3V18h1a3,3,0,0,0,3-3V9S21,9,21,8.94ZM15,5.41,17.59,8H16a1,1,0,0,1-1-1ZM15,19a1,1,0,0,1-1,1H6a1,1,0,0,1-1-1V9A1,1,0,0,1,6,8H7v7a3,3,0,0,0,3,3h5Zm4-4a1,1,0,0,1-1,1H10a1,1,0,0,1-1-1V5a1,1,0,0,1,1-1h3V7a3,3,0,0,0,3,3h3Z"})}));var U=class extends _{constructor(t){super(t);m(this,"id");m(this,"onChange",t=>{let i=t.currentTarget.value;this.props.onChange(i)});this.id=Math.round(Math.random()*1e4)}render(t,r){let i=`input-radio--${this.id}`;return o("div",{class:"chip-select",children:t.chipData.map((a,l)=>{let c=`${i}_${l}`;return o(E,{children:[o("input",{type:"radio",className:"chip-select__input",name:i,value:a.value,id:c,checked:l===0,onChange:this.onChange}),o("label",{className:"chip-select__label",htmlFor:c,children:a.label})]})})})}};var X=class extends _{constructor(){super(...arguments);m(this,"indicatorElement");m(this,"bindInput",t=>{let i=t.currentTarget.value;this.props.bindInput(i),this.indicatorElement.style.backgroundColor=i})}render(t,r){return o("div",{className:"color-input",children:[o("input",{type:"color",onInput:this.bindInput,id:"idk"}),o("label",{className:"color-input__label",htmlFor:"idk",children:t.label}),o("div",{className:"color-input__indicator",style:{backgroundColor:t.defaultColor},ref:i=>this.indicatorElement=i})]})}};var R=class extends _{constructor(){super(...arguments);m(this,"textareaElement");m(this,"onInput",()=>{let t=this.textareaElement.value;this.props.bindInput(t);let r=(t.match(/\n/g)||[]).length+1;this.textareaElement.rows=r+1})}setText(t){this.textareaElement.value=t,this.onInput()}componentDidMount(){let r=(this.textareaElement.value.match(/\n/g)||[]).length+1;this.textareaElement.rows=r+1}render(t,r){let c=t,{label:i,bindInput:a}=c,l=De(c,["label","bindInput"]);return o("div",{className:"text-input",children:[o("label",{className:"text-input__label",children:[i,":"]}),o("textarea",x(y({ref:u=>this.textareaElement=u,className:"text-input__textarea"},l),{onInput:this.onInput,rows:2}))]})}};function cn(e){let n=o(U,{chipData:[{value:"left",label:o(vt,{width:"1.25em",height:"1.25em"})},{value:"center",label:o(yt,{width:"1.25em",height:"1.25em"})},{value:"right",label:o(xt,{width:"1.25em",height:"1.25em"})}],onChange:e.onAlignmentChange}),t=o(U,{chipData:[{value:"false",label:"Hide phonemes"},{value:"true",label:"Show phonemes"}],onChange:e.onPhonemeDisplayChange}),r=o(U,{chipData:[{value:"true",label:"Transparent background"},{value:"false",label:"Opaque background"}],onChange:e.onTransparentBackgroundSelect});return o("div",{className:"runic-editor__settings-container",children:[o(z,{label:"Thickness",min:.05,max:.5,step:.01,default:.25,bindInput:e.onThicknessChange}),o(z,{label:"Glow Effect",min:0,max:20,step:.5,default:0,bindInput:e.onSpreadChange}),o(z,{label:"Line Height",min:-L,max:L,step:.5,default:L/2,bindInput:e.onLineSpacingChange}),n,t,o(X,{defaultColor:"crimson",bindInput:e.onRuneColorChange,label:"Rune Color"}),o(X,{defaultColor:"black",bindInput:e.onBackgroundChange,label:"Background"}),r,o("div",{className:"runic-editor__download-group",children:[o("button",{className:"runic-editor__download-button",onClick:()=>e.download("svg"),children:[o(ce,{})," SVG"]}),o("button",{className:"runic-editor__download-button",onClick:()=>e.download("png"),children:[o(ce,{})," PNG"]}),o("button",{className:"runic-editor__download-button",onClick:()=>e.download("jpeg"),children:[o(ce,{})," JPEG"]})]}),o("div",{className:"runic-editor__download-group",children:[o("button",{className:"runic-editor__download-button",onClick:()=>e.copyAsPNG(),children:[o(Vt,{})," Copy"]}),o("button",{className:"runic-editor__download-button",onClick:()=>e.sharePNG(),children:[o(Pt,{})," Share"]})]})]})}var un=`Tunic +`?n.push([]):n[n.length-1].push(t)}),n}function sn(e){let n=[];for(let t of e){let r=n[n.length-1];if(n.length===0)n.push(t);else if(on(r,t)){let i=an(r,t);n[n.length-1]=i}else n.push(t)}return n}var se=2,ut,pt,mt,dt,ht,gt,ft,_t,bt,I=class extends _{constructor(t){super(t);m(this,"svgElement");m(this,"tokens");m(this,"state",{displayPhonemes:(ut=this.props.displayPhonemes)!=null?ut:!1,backgroundColor:(pt=this.props.backgroundColor)!=null?pt:"black",transparentBackground:(mt=this.props.transparentBackground)!=null?mt:!0,runeColor:(dt=this.props.runeColor)!=null?dt:"crimson",runeGuideColor:(ht=this.props.runeGuideColor)!=null?ht:"transparent",runeThickness:(gt=this.props.runeThickness)!=null?gt:.25,shadowSpread:(ft=this.props.shadowSpread)!=null?ft:0,align:(_t=this.props.align)!=null?_t:"left",lineSpacing:(bt=this.props.lineSpacing)!=null?bt:L/2});m(this,"guideLayer");m(this,"realLayer");m(this,"interactiveLayer");m(this,"textLayer");m(this,"postRenderSetup",()=>{this.applyGeneralStylesToSegments(),this.applyStylesToGuideSegments(),this.applyStylesToRealSegments(),this.applyStylesToInteractiveSegments(),this.applyStylesToPhonemeText(),this.applyGeneralSVGStyles()});m(this,"onInteractiveSegmentClick",t=>{let r=t.currentTarget,i=r.parentElement,a=parseInt(i.getAttribute("data-rune-index")),c=parseInt(i.getAttribute("data-rune-bitmask"),2),l=parseInt(r.getAttribute("data-segment-index")),u=c^1<<14-l,p=st(u,c);this.updateRuneTokenMask(a,p)});this.tokens=H(t.phoneticText)}componentWillReceiveProps(t){t.phoneticText!==this.props.phoneticText&&(this.tokens=H(t.phoneticText))}componentDidUpdate(){this.postRenderSetup()}componentDidMount(){this.postRenderSetup()}applyGeneralSVGStyles(){let t=this.state.shadowSpread?`drop-shadow(0 0 ${this.state.shadowSpread}px ${this.state.runeColor})`:"";this.svgElement.style.setProperty("filter",t)}applyGeneralStylesToSegments(){this.svgElement.querySelectorAll(".rune-segment").forEach(t=>{t.setAttribute("stroke","transparent"),t.setAttribute("fill","transparent"),t.setAttribute("stroke-width",`${this.state.runeThickness}`),t.setAttribute("stroke-linecap","round")})}applyStylesToGuideSegments(){var t;(t=this.guideLayer)==null||t.querySelectorAll(".rune-segment").forEach(r=>{r.setAttribute("stroke",this.state.runeGuideColor)})}applyStylesToRealSegments(){var t;(t=this.realLayer)==null||t.querySelectorAll(".rune-segment--active").forEach(r=>{let i=r.classList.contains("rune-segment--stroke");r.setAttribute("stroke",i?this.state.runeColor:"none");let a=r.classList.contains("rune-segment--fill");r.setAttribute("fill",a?this.state.runeColor:"none")})}applyStylesToInteractiveSegments(){var r;let t="CUM";(r=this.interactiveLayer)==null||r.querySelectorAll(".rune-segment").forEach(i=>{i.hasAttribute(t)||(i.addEventListener("click",this.onInteractiveSegmentClick),i.setAttribute(t,"true"))})}applyStylesToPhonemeText(){var t;(t=this.textLayer)==null||t.querySelectorAll("text").forEach(r=>{r.setAttribute("fill",this.state.runeColor)})}updateRuneTokenMask(t,r){let i=G(r);this.tokens[t]=i,this.forceUpdate()}getViewBoxDimensions(){let t=Te-(this.state.displayPhonemes?0:Ee),r=ct(this.tokens),i=Math.max(...r.map(u=>u.length))*L,a=2*se+i,c=r.length,l=2*se+t*c+(c-1)*this.state.lineSpacing;return[a,l]}getAlignmentOffset(t,r){let i=0;return this.state.align==="left"||(this.state.align==="center"?i=(r-t)/2:this.state.align==="right"&&(i=r-t)),i}getTokenLayers(t){let r={guide:[],real:[],interactive:[],text:[]},i=Te-(this.state.displayPhonemes?0:Ee),a=lt(t),c=Math.max(...a.map(p=>p*L)),l=0,u=0;return t.forEach((p,h)=>{let s=l*(i+this.state.lineSpacing),d=this.getAlignmentOffset(a[l]*L,c)+u*L;if(++u,p.type==="specialChar"&&p.char===` +`)++l,u=0;else if(p.type==="specialChar"){let v=Qe(p.char,d,s);r.real.push(v)}else{let v=Ye(p,h,d,s);et(r,v)}}),r}setPhoneticText(t){this.tokens=H(t),this.forceUpdate()}render(t,r){let i=this.getTokenLayers(this.tokens),[a,c]=this.getViewBoxDimensions(),l=[-se,-se,a,c].join(" ");return o("svg",x(y({ref:u=>this.svgElement=u,class:"runic-svg",preserveAspectRatio:"xMidYMid meet",viewBox:l,width:2e3,height:c*2e3/a,version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},t.svgProps),{children:[r.runeGuideColor!=="transparent"&&o("g",{ref:u=>this.guideLayer=u,className:"runic-layer runic-layer--guide",children:[...i.guide]}),o("g",{ref:u=>this.realLayer=u,className:"runic-layer runic-layer--real",children:[...i.real]}),t.interactive&&o("g",{ref:u=>this.interactiveLayer=u,className:"runic-layer runic-layer--interactive",children:[...i.interactive]}),r.displayPhonemes&&o("g",{ref:u=>this.textLayer=u,className:"runic-layer runic-layer--text",children:[...i.text]})]}))}};var z=class extends _{constructor(t){super(t);m(this,"onChange",t=>{var r,i;(i=(r=this.props).onChange)==null||i.call(r,t)});m(this,"onInput",t=>{var a,c,l,u;let r=t.currentTarget,i=parseFloat(r.value);this.setState({value:i}),(c=(a=this.props).onInput)==null||c.call(a,t),(u=(l=this.props).bindInput)==null||u.call(l,i)});this.setState({value:t.default})}render(t,r){return o("div",{className:"range-input",children:[o("div",{className:"range-input__info",children:[o("div",{className:"range-input__label",children:t.label}),o("div",{className:"range-input__value",children:r.value})]}),o("input",{className:"range-input__input-element",type:"range",min:t.min,max:t.max,step:t.step,defaultValue:String(t.default),onChange:this.onChange,onInput:this.onInput})]})}};function Pe(e){let n=null,r=new XMLSerializer().serializeToString(e);return r=`\r +`+r,n="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r),n}function Ve(e){return k(this,null,function*(){let n=Pe(e),t=document.createElement("canvas"),r=new Image;r.src=n;let i=2e3,a=e.getAttribute("viewBox").split(/\s+/g),c=parseFloat(a[2]),l=parseFloat(a[3]);return t.width=i,t.height=i/c*l,new Promise((u,p)=>{r.onload=function(){t.getContext("2d").drawImage(r,0,0,t.width,t.height),u(t)}})})}function Ne(e){return k(this,null,function*(){let n=yield Ve(e),t=null;return yield new Promise(r=>{n.toBlob(i=>{t=i,r(0)})}),t})}function Re(e,n="tempfilename"){let t=document.createElement("a");t.download=n,t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t),t=null}var le=()=>o("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("g",{children:o("path",{d:"M6 21H18M12 3V17M12 17L17 12M12 17L7 12",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})})}),vt=e=>o("svg",x(y({fill:"#000000",width:"800px",height:"800px",viewBox:"0 -2.5 29 29",xmlns:"http://www.w3.org/2000/svg"},e),{children:[o("path",{fill:"currentColor",d:"m1.334 2.666h26.665c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m1.334 7.999h19.555c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m27.999 10.667h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 21.333h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m1.334 18.666h19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333h-.002-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333z"})]})),yt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 -2.5 29 29",xmlns:"http://www.w3.org/2000/svg"},e),{children:[o("path",{fill:"currentColor",d:"m1.334 2.666h26.665c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m4.889 5.333c-.011 0-.024-.001-.037-.001-.737 0-1.334.597-1.334 1.334s.597 1.334 1.334 1.334c.013 0 .026 0 .039-.001h-.002 19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333h-.002z"}),o("path",{fill:"currentColor",d:"m27.999 10.667h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 21.333h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m24.444 18.666c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333h-.002-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"})]})),xt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 -2.5 29 29",xmlns:"http://www.w3.org/2000/svg"},e),{children:[o("path",{fill:"currentColor",d:"m27.999 21.333h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 16h-19.555c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m27.999 10.667h-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002 26.665c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"}),o("path",{fill:"currentColor",d:"m1.334 2.666h26.665c.011 0 .024.001.037.001.737 0 1.334-.597 1.334-1.334s-.597-1.334-1.334-1.334c-.013 0-.026 0-.039.001h.002-26.665c-.72.021-1.296.61-1.296 1.333s.576 1.312 1.294 1.333h.002z"}),o("path",{fill:"currentColor",d:"m27.999 5.333h-19.555c-.011 0-.024-.001-.037-.001-.737 0-1.334.597-1.334 1.334s.597 1.334 1.334 1.334c.013 0 .026 0 .039-.001h-.002 19.555c.72-.021 1.296-.61 1.296-1.333s-.576-1.312-1.294-1.333z"})]})),St=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z",fill:"currentColor",stroke:"currentColor"})})),wt=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z",fill:"currentColor",stroke:"currentColor"})})),kt=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M8.75 21V3h2v18h-2zM18 21V8.5h2V21h-2zM4 21l.004-10h2L6 21H4zm9.248 0v-7h2v7h-2z",fill:"currentColor",stroke:"currentColor"})})),Ct=e=>o("svg",x(y({viewBox:"0 0 24 24"},e),{children:o("path",{d:"M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z",fill:"currentColor",stroke:"currentColor"})}));var Tt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),{children:o("path",{d:"M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"})})),Et=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),{children:o("path",{d:"M21,9a1,1,0,0,0-1,1v3H4V10a1,1,0,0,0-2,0v4a1,1,0,0,0,1,1H21a1,1,0,0,0,1-1V10A1,1,0,0,0,21,9Z"})})),Lt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),{children:o("path",{d:"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,0,1-8-8A7.92,7.92,0,0,1,5.69,7.1L16.9,18.31A7.92,7.92,0,0,1,12,20Zm6.31-3.1L7.1,5.69A7.92,7.92,0,0,1,12,4a8,8,0,0,1,8,8A7.92,7.92,0,0,1,18.31,16.9Z"})})),It=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),{children:o("path",{d:"M13.41,12l6.3-6.29a1,1,0,1,0-1.42-1.42L12,10.59,5.71,4.29A1,1,0,0,0,4.29,5.71L10.59,12l-6.3,6.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l6.29,6.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"})}));var Pt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),{children:o("path",{d:"M18,14a4,4,0,0,0-3.08,1.48l-5.1-2.35a3.64,3.64,0,0,0,0-2.26l5.1-2.35A4,4,0,1,0,14,6a4.17,4.17,0,0,0,.07.71L8.79,9.14a4,4,0,1,0,0,5.72l5.28,2.43A4.17,4.17,0,0,0,14,18a4,4,0,1,0,4-4ZM18,4a2,2,0,1,1-2,2A2,2,0,0,1,18,4ZM6,14a2,2,0,1,1,2-2A2,2,0,0,1,6,14Zm12,6a2,2,0,1,1,2-2A2,2,0,0,1,18,20Z"})})),Vt=e=>o("svg",x(y({width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),{children:o("path",{d:"M21,8.94a1.31,1.31,0,0,0-.06-.27l0-.09a1.07,1.07,0,0,0-.19-.28h0l-6-6h0a1.07,1.07,0,0,0-.28-.19.32.32,0,0,0-.09,0A.88.88,0,0,0,14.05,2H10A3,3,0,0,0,7,5V6H6A3,3,0,0,0,3,9V19a3,3,0,0,0,3,3h8a3,3,0,0,0,3-3V18h1a3,3,0,0,0,3-3V9S21,9,21,8.94ZM15,5.41,17.59,8H16a1,1,0,0,1-1-1ZM15,19a1,1,0,0,1-1,1H6a1,1,0,0,1-1-1V9A1,1,0,0,1,6,8H7v7a3,3,0,0,0,3,3h5Zm4-4a1,1,0,0,1-1,1H10a1,1,0,0,1-1-1V5a1,1,0,0,1,1-1h3V7a3,3,0,0,0,3,3h3Z"})}));var U=class extends _{constructor(t){super(t);m(this,"id");m(this,"onChange",t=>{let i=t.currentTarget.value;this.props.onChange(i)});this.id=Math.round(Math.random()*1e4)}render(t,r){let i=`input-radio--${this.id}`;return o("div",{class:"chip-select",children:t.chipData.map((a,c)=>{let l=`${i}_${c}`;return o(E,{children:[o("input",{type:"radio",className:"chip-select__input",name:i,value:a.value,id:l,checked:c===0,onChange:this.onChange}),o("label",{className:"chip-select__label",htmlFor:l,children:a.label})]})})})}};var X=class extends _{constructor(){super(...arguments);m(this,"indicatorElement");m(this,"bindInput",t=>{let i=t.currentTarget.value;this.props.bindInput(i),this.indicatorElement.style.backgroundColor=i})}render(t,r){return o("div",{className:"color-input",children:[o("input",{type:"color",onInput:this.bindInput,id:"idk"}),o("label",{className:"color-input__label",htmlFor:"idk",children:t.label}),o("div",{className:"color-input__indicator",style:{backgroundColor:t.defaultColor},ref:i=>this.indicatorElement=i})]})}};var R=class extends _{constructor(){super(...arguments);m(this,"textareaElement");m(this,"onInput",()=>{let t=this.textareaElement.value;this.props.bindInput(t);let r=(t.match(/\n/g)||[]).length+1;this.textareaElement.rows=r+1})}setText(t){this.textareaElement.value=t,this.onInput()}componentDidMount(){let r=(this.textareaElement.value.match(/\n/g)||[]).length+1;this.textareaElement.rows=r+1}render(t,r){let l=t,{label:i,bindInput:a}=l,c=De(l,["label","bindInput"]);return o("div",{className:"text-input",children:[o("label",{className:"text-input__label",children:[i,":"]}),o("textarea",x(y({ref:u=>this.textareaElement=u,className:"text-input__textarea"},c),{onInput:this.onInput,rows:2}))]})}};function ln(e){let n=o(U,{chipData:[{value:"left",label:o(vt,{width:"1.25em",height:"1.25em"})},{value:"center",label:o(yt,{width:"1.25em",height:"1.25em"})},{value:"right",label:o(xt,{width:"1.25em",height:"1.25em"})}],onChange:e.onAlignmentChange}),t=o(U,{chipData:[{value:"false",label:"Hide phonemes"},{value:"true",label:"Show phonemes"}],onChange:e.onPhonemeDisplayChange}),r=o(U,{chipData:[{value:"true",label:"Transparent background"},{value:"false",label:"Opaque background"}],onChange:e.onTransparentBackgroundSelect});return o("div",{className:"runic-editor__settings-container",children:[o(z,{label:"Thickness",min:.05,max:.5,step:.01,default:.25,bindInput:e.onThicknessChange}),o(z,{label:"Glow Effect",min:0,max:20,step:.5,default:0,bindInput:e.onSpreadChange}),o(z,{label:"Line Height",min:-L,max:L,step:.5,default:L/2,bindInput:e.onLineSpacingChange}),n,t,o(X,{defaultColor:"crimson",bindInput:e.onRuneColorChange,label:"Rune Color"}),o(X,{defaultColor:"black",bindInput:e.onBackgroundChange,label:"Background"}),r,o("div",{className:"runic-editor__download-group",children:[o("button",{className:"runic-editor__download-button",onClick:()=>e.download("svg"),children:[o(le,{})," SVG"]}),o("button",{className:"runic-editor__download-button",onClick:()=>e.download("png"),children:[o(le,{})," PNG"]}),o("button",{className:"runic-editor__download-button",onClick:()=>e.download("jpeg"),children:[o(le,{})," JPEG"]})]}),o("div",{className:"runic-editor__download-group",children:[o("button",{className:"runic-editor__download-button",onClick:()=>e.copyAsPNG(),children:[o(Vt,{})," Copy"]}),o("button",{className:"runic-editor__download-button",onClick:()=>e.sharePNG(),children:[o(Pt,{})," Share"]})]})]})}var cn=`Tunic Secret Legend!`,Nt=`tun\u026Ak -sik\u0279\u0259t \u026B\u025Bd\u0292\u0259nd!`,ue=class extends _{constructor(){super(...arguments);m(this,"runeSVGElement");m(this,"svgContainer");m(this,"englishInput");m(this,"phoneticInput");m(this,"onPhoneticChange",t=>{this.runeSVGElement.setPhoneticText(t)});m(this,"onEnglishChange",t=>{let r=qe(t);this.phoneticInput.setText(r)});m(this,"onSpreadChange",t=>{this.runeSVGElement.setState({shadowSpread:t})});m(this,"onThicknessChange",t=>{this.runeSVGElement.setState({runeThickness:t})});m(this,"onLineSpacingChange",t=>{this.runeSVGElement.setState({lineSpacing:t})});m(this,"onAlignmentChange",t=>{this.runeSVGElement.setState({align:t})});m(this,"onPhonemeDisplayChange",t=>{this.runeSVGElement.setState({displayPhonemes:t==="true"})});m(this,"onRuneColorChange",t=>{this.runeSVGElement.setState({runeColor:t})});m(this,"onBackgroundChange",t=>{this.runeSVGElement.setState({backgroundColor:t}),this.svgContainer.style.setProperty("background-color",t)});m(this,"onTransparentBackgroundSelect",t=>{let r=t=="true";this.runeSVGElement.setState({transparentBackground:r}),this.svgContainer.style.setProperty("background-image",r?"":"none")});m(this,"copyAsPNG",()=>k(this,null,function*(){this.usePreparedSVG(t=>k(this,null,function*(){var i,a;let r=yield Ne(t);yield(a=(i=navigator.clipboard).write)==null?void 0:a.call(i,[new ClipboardItem({"image/png":r})])}))}));m(this,"sharePNG",()=>k(this,null,function*(){this.usePreparedSVG(t=>k(this,null,function*(){var l;let r=yield Ne(t),a={files:[new File([r],"rune.png",{lastModified:Date.now(),type:"image/png"})]};(l=navigator.canShare)!=null&&l.call(navigator,a)&&navigator.share(a)}))}));m(this,"usePreparedSVG",t=>{let r=this.runeSVGElement.svgElement;if(!this.runeSVGElement.state.transparentBackground){let i=this.runeSVGElement.state.backgroundColor;r.style.setProperty("background-color",i)}t(r),r.style.removeProperty("background-color")});m(this,"download",t=>k(this,null,function*(){this.usePreparedSVG(r=>k(this,null,function*(){let i="rune";if(t==="svg"){let a=Pe(r);Re(a,`${i}.svg`)}else{let l=(yield Ve(r)).toDataURL(`image/${t}`);Re(l,`${i}.${t}`)}}))}))}componentDidMount(){}render(){return o("div",{className:"runic-editor",children:[o("div",{className:"runic-editor__input-area",children:[o(R,{ref:t=>this.englishInput=t,label:"Input (English)",placeholder:"Type something here",name:"text-input--english",bindInput:this.onEnglishChange,value:un}),o("span",{className:"runic-editor__input-divider",children:"\xA0"}),o(R,{ref:t=>this.phoneticInput=t,label:"Input (Phonetic)",placeholder:"Type something here",name:"text-input--phonetic",bindInput:this.onPhoneticChange,value:Nt,spellcheck:!1})]}),o("div",{className:"runic-editor__preview",children:[o("div",{className:"runic-editor__svg-container",ref:t=>this.svgContainer=t,children:o(I,{ref:t=>this.runeSVGElement=t,interactive:!1,displayPhonemes:!1,phoneticText:Nt})}),o("hr",{}),o("details",{open:!0,children:[o("summary",{children:"Settings"}),cn(this)]})]})]})}};function pn(e){navigator.clipboard.writeText(e.ipaSymbol)}function mn(e){return o("div",{className:"rune-reference-grid-item",children:o("div",{className:"rune-card",onClick:()=>pn(e),title:`Click to copy '${e.ipaSymbol}'`,children:[o("div",{className:"svg-container",children:o(I,{displayPhonemes:!1,interactive:!1,phoneticText:e.ipaSymbol,runeThickness:.3,runeColor:"",runeGuideColor:""})}),o("div",{className:"rune-info",children:[o("span",{class:"rune-info__symbol",children:e.ipaSymbol}),o("span",{class:"rune-info__english",children:[e.pronunciation,o("br",{}),e.examples]})]})]})})}var F=class extends _{render(n){return o(E,{children:o("div",{class:"rune-reference-grid",children:[...n.table.map(mn)]})})}};var pe=class extends _{constructor(){super(...arguments);m(this,"runeSVG");m(this,"phoneticTextInput");m(this,"state",{phoneticText:""});m(this,"addPhoneme",()=>{let t=this.runeSVG.tokens[0];if(t.bitmask===0)return;let r=t.symbols.map(a=>a.ipaSymbol).join(""),i=this.state.phoneticText;this.setState({phoneticText:i+r})});m(this,"addSpace",()=>{let t=this.state.phoneticText;this.setState({phoneticText:t+" "})});m(this,"resetRune",()=>{let t=this.state.phoneticText;this.setState({phoneticText:t})});m(this,"clearResult",()=>{this.setState({phoneticText:""})});m(this,"getPronunciation",()=>{let t=H(this.state.phoneticText),r="",i="\u25E6";for(let a of t)a.type==="specialChar"?r+=" ":r+=a.symbols.map(l=>l.english).join(i)+i;return r=r.replace(new RegExp(i+"(?=\\s|$)","g"),""),r.trim()});m(this,"onPhoneticTextChange",t=>{this.setState({phoneticText:t})})}componentDidUpdate(){this.resetRunicSVG()}componentDidMount(){this.resetRunicSVG()}resetRunicSVG(){this.runeSVG.tokens=[G(0)],this.runeSVG.forceUpdate()}render(t,r){return o("div",{className:"runic-playground",children:[o("div",{className:"runic-playground__svg-container",children:o(I,{ref:i=>this.runeSVG=i,phoneticText:"a\u026A",interactive:!0,displayPhonemes:!0,runeThickness:.5,runeColor:"",runeGuideColor:""})}),o("div",{className:"runic-playground__manuals",children:[o("div",{className:"runic-playground__controls",children:[o("button",{className:"runic-playground__control-button",onClick:this.addPhoneme,children:[o("span",{className:"runic-playground__control-icon",children:o(Tt,{})}),"Add Phoneme"]}),o("button",{className:"runic-playground__control-button",onClick:this.addSpace,children:[o("span",{className:"runic-playground__control-icon",children:o(Et,{})}),"Spacebar"]})]}),o("div",{className:"runic-playground__controls",children:[o("button",{className:"runic-playground__control-button",onClick:this.resetRune,children:[o("span",{className:"runic-playground__control-icon",children:o(It,{})}),"Cancel Rune"]}),o("button",{className:"runic-playground__control-button",onClick:this.clearResult,children:[o("span",{className:"runic-playground__control-icon",children:o(Lt,{})}),"Clear Result"]})]}),o(R,{ref:i=>this.phoneticTextInput=i,label:"Result (Phonetic)",placeholder:"Phonetic text goes here",value:r.phoneticText,bindInput:this.onPhoneticTextChange}),o(R,{label:"Result (Syllables)",placeholder:"Pronunciation of the phonemes",disabled:!0,value:this.getPronunciation()})]})]})}};var me=class extends _{render(n,t){return o("div",{class:"sm-card",children:[o("div",{className:"sm-card__pfp",children:n.pfp}),o("div",{className:"sm-card__header",children:[o("span",{className:"sm-card__display-name",children:n.displayName}),o("span",{className:"sm-card__handle",children:["@",n.handle," \xB7 Sep 23"]})]}),o("div",{className:"sm-card__content",children:o(I,{phoneticText:n.phoneticText,displayPhonemes:!1,interactive:!1,runeColor:"",runeGuideColor:"",svgProps:{preserveAspectRatio:"xMinYMin meet"}})}),o("div",{className:"sm-card__interactions",children:[o("span",{children:[o(wt,{}),n.comments]}),o("span",{children:[o(Ct,{}),n.reposts]}),o("span",{children:[o(St,{}),n.likes]}),o("span",{children:[o(kt,{}),n.views]})]})]})}};var dn=` +sik\u0279\u0259t \u026B\u025Bd\u0292\u0259nd!`,ce=class extends _{constructor(){super(...arguments);m(this,"runeSVGElement");m(this,"svgContainer");m(this,"englishInput");m(this,"phoneticInput");m(this,"onPhoneticChange",t=>{this.runeSVGElement.setPhoneticText(t)});m(this,"onEnglishChange",t=>{let r=qe(t);this.phoneticInput.setText(r)});m(this,"onSpreadChange",t=>{this.runeSVGElement.setState({shadowSpread:t})});m(this,"onThicknessChange",t=>{this.runeSVGElement.setState({runeThickness:t})});m(this,"onLineSpacingChange",t=>{this.runeSVGElement.setState({lineSpacing:t})});m(this,"onAlignmentChange",t=>{this.runeSVGElement.setState({align:t})});m(this,"onPhonemeDisplayChange",t=>{this.runeSVGElement.setState({displayPhonemes:t==="true"})});m(this,"onRuneColorChange",t=>{this.runeSVGElement.setState({runeColor:t})});m(this,"onBackgroundChange",t=>{this.runeSVGElement.setState({backgroundColor:t}),this.svgContainer.style.setProperty("background-color",t)});m(this,"onTransparentBackgroundSelect",t=>{let r=t=="true";this.runeSVGElement.setState({transparentBackground:r}),this.svgContainer.style.setProperty("background-image",r?"":"none")});m(this,"copyAsPNG",()=>k(this,null,function*(){this.usePreparedSVG(t=>k(this,null,function*(){var i,a;let r=yield Ne(t);yield(a=(i=navigator.clipboard).write)==null?void 0:a.call(i,[new ClipboardItem({"image/png":r})])}))}));m(this,"sharePNG",()=>k(this,null,function*(){this.usePreparedSVG(t=>k(this,null,function*(){var c;let r=yield Ne(t),a={files:[new File([r],"rune.png",{lastModified:Date.now(),type:"image/png"})]};(c=navigator.canShare)!=null&&c.call(navigator,a)&&navigator.share(a)}))}));m(this,"usePreparedSVG",t=>{let r=this.runeSVGElement.svgElement;if(!this.runeSVGElement.state.transparentBackground){let i=this.runeSVGElement.state.backgroundColor;r.style.setProperty("background-color",i)}t(r),r.style.removeProperty("background-color")});m(this,"download",t=>k(this,null,function*(){this.usePreparedSVG(r=>k(this,null,function*(){let i="rune";if(t==="svg"){let a=Pe(r);Re(a,`${i}.svg`)}else{let c=(yield Ve(r)).toDataURL(`image/${t}`);Re(c,`${i}.${t}`)}}))}))}componentDidMount(){}render(){return o("div",{className:"runic-editor",children:[o("div",{className:"runic-editor__input-area",children:[o(R,{ref:t=>this.englishInput=t,label:"Input (English)",placeholder:"Type something here",name:"text-input--english",bindInput:this.onEnglishChange,value:cn}),o("span",{className:"runic-editor__input-divider",children:"\xA0"}),o(R,{ref:t=>this.phoneticInput=t,label:"Input (Phonetic)",placeholder:"Type something here",name:"text-input--phonetic",bindInput:this.onPhoneticChange,value:Nt,spellcheck:!1})]}),o("div",{className:"runic-editor__preview",children:[o("div",{className:"runic-editor__svg-container",ref:t=>this.svgContainer=t,children:o(I,{ref:t=>this.runeSVGElement=t,interactive:!1,displayPhonemes:!1,phoneticText:Nt})}),o("hr",{}),o("details",{open:!0,children:[o("summary",{children:"Settings"}),ln(this)]})]})]})}};function un(e){navigator.clipboard.writeText(e.ipaSymbol)}function pn(e){return o("div",{className:"rune-reference-grid-item",children:o("div",{className:"rune-card",onClick:()=>un(e),title:`Click to copy '${e.ipaSymbol}'`,children:[o("div",{className:"svg-container",children:o(I,{displayPhonemes:!1,interactive:!1,phoneticText:e.ipaSymbol,runeThickness:.3,runeColor:"",runeGuideColor:""})}),o("div",{className:"rune-info",children:[o("span",{class:"rune-info__symbol",children:e.ipaSymbol}),o("span",{class:"rune-info__english",children:[e.pronunciation,o("br",{}),e.examples]})]})]})})}var F=class extends _{render(n){return o(E,{children:o("div",{class:"rune-reference-grid",children:[...n.table.map(pn)]})})}};var ue=class extends _{constructor(){super(...arguments);m(this,"runeSVG");m(this,"phoneticTextInput");m(this,"state",{phoneticText:""});m(this,"addPhoneme",()=>{let t=this.runeSVG.tokens[0];if(t.bitmask===0)return;let r=t.symbols.map(a=>a.ipaSymbol).join(""),i=this.state.phoneticText;this.setState({phoneticText:i+r})});m(this,"addSpace",()=>{let t=this.state.phoneticText;this.setState({phoneticText:t+" "})});m(this,"resetRune",()=>{let t=this.state.phoneticText;this.setState({phoneticText:t})});m(this,"clearResult",()=>{this.setState({phoneticText:""})});m(this,"getPronunciation",()=>{let t=H(this.state.phoneticText),r="",i="\u25E6";for(let a of t)a.type==="specialChar"?r+=" ":r+=a.symbols.map(c=>c.english).join(i)+i;return r=r.replace(new RegExp(i+"(?=\\s|$)","g"),""),r.trim()});m(this,"onPhoneticTextChange",t=>{this.setState({phoneticText:t})})}componentDidUpdate(){this.resetRunicSVG()}componentDidMount(){this.resetRunicSVG()}resetRunicSVG(){this.runeSVG.tokens=[G(0)],this.runeSVG.forceUpdate()}render(t,r){return o("div",{className:"runic-playground",children:[o("div",{className:"runic-playground__svg-container",children:o(I,{ref:i=>this.runeSVG=i,phoneticText:"a\u026A",interactive:!0,displayPhonemes:!0,runeThickness:.5,runeColor:"",runeGuideColor:""})}),o("div",{className:"runic-playground__manuals",children:[o("div",{className:"runic-playground__controls",children:[o("button",{className:"runic-playground__control-button",onClick:this.addPhoneme,children:[o("span",{className:"runic-playground__control-icon",children:o(Tt,{})}),"Add Phoneme"]}),o("button",{className:"runic-playground__control-button",onClick:this.addSpace,children:[o("span",{className:"runic-playground__control-icon",children:o(Et,{})}),"Spacebar"]})]}),o("div",{className:"runic-playground__controls",children:[o("button",{className:"runic-playground__control-button",onClick:this.resetRune,children:[o("span",{className:"runic-playground__control-icon",children:o(It,{})}),"Cancel Rune"]}),o("button",{className:"runic-playground__control-button",onClick:this.clearResult,children:[o("span",{className:"runic-playground__control-icon",children:o(Lt,{})}),"Clear Result"]})]}),o(R,{ref:i=>this.phoneticTextInput=i,label:"Result (Phonetic)",placeholder:"Phonetic text goes here",value:r.phoneticText,bindInput:this.onPhoneticTextChange}),o(R,{label:"Result (Syllables)",placeholder:"Pronunciation of the phonemes",disabled:!0,value:this.getPronunciation()})]})]})}};var pe=class extends _{render(n,t){return o("div",{class:"sm-card",children:[o("div",{className:"sm-card__pfp",children:n.pfp}),o("div",{className:"sm-card__header",children:[o("span",{className:"sm-card__display-name",children:n.displayName}),o("span",{className:"sm-card__handle",children:["@",n.handle," \xB7 Sep 23"]})]}),o("div",{className:"sm-card__content",children:o(I,{phoneticText:n.phoneticText,displayPhonemes:!1,interactive:!1,runeColor:"",runeGuideColor:"",svgProps:{preserveAspectRatio:"xMinYMin meet"}})}),o("div",{className:"sm-card__interactions",children:[o("span",{children:[o(wt,{}),n.comments]}),o("span",{children:[o(Ct,{}),n.reposts]}),o("span",{children:[o(St,{}),n.likes]}),o("span",{children:[o(kt,{}),n.views]})]})]})}};var mn=` w\u025B w\u025B w\u025B w\u025B sa\u028A w\u025B is sa\u028A n\u0254\u0279 n\u0254\u0279 w\u025B n\u0254\u0279 n\u0254\u0279 is is is is n\u0254\u0279 -`.trim(),hn=[{pfp:o("img",{loading:"lazy",src:"./images/boss.jpg",alt:"Boss Scavenger"}),displayName:"ScavQueen \u{1F338}",handle:"boss.scavenger642",phoneticText:`\xF0\u026As \u026Az \u0251s\u0259m! +`.trim(),dn=[{pfp:o("img",{loading:"lazy",src:"./images/boss.jpg",alt:"Boss Scavenger"}),displayName:"ScavQueen \u{1F338}",handle:"boss.scavenger642",phoneticText:`\xF0\u026As \u026Az \u0251s\u0259m! @#RUNIC@ \u026Az so\u028A bjut\u0259f\u0259\u026B`,comments:"24",likes:"948",reposts:"31",views:"2.0K"},{pfp:o("img",{loading:"lazy",src:"./images/librarian.jpg",alt:"The Librarian"}),displayName:"Holy Cross \u{1F410}",handle:"the.librarian",phoneticText:`@#RUNIC@ is b\u0254\u0279\u026A\u014B. t\u0279\xE6v\u0259\u026B \xF0\u026As me\u026Az. -${dn}`,comments:"1.7K",likes:"6.1K",reposts:"5.9K",views:"40.1K"},{pfp:o("img",{loading:"lazy",src:"./images/heir.jpg",alt:"The Heir"}),displayName:"Heirhead",handle:"the_only.heir",phoneticText:`@#RUNIC@ \u026Az jus\u026B\u025Bs. +${mn}`,comments:"1.7K",likes:"6.1K",reposts:"5.9K",views:"40.1K"},{pfp:o("img",{loading:"lazy",src:"./images/heir.jpg",alt:"The Heir"}),displayName:"Heirhead",handle:"the_only.heir",phoneticText:`@#RUNIC@ \u026Az jus\u026B\u025Bs. wha\u026A w\u028Ad \u025Bniw\u0259n @love it@?! du s\u0259m\u03B8\u026A\u014B b\u025Bt\u025D w\u026A\xF0 j\u0254\u0279 ta\u026Am.`,comments:"2",likes:"67",reposts:"502",views:"841"},{pfp:o("img",{loading:"lazy",src:"./images/ruinseeker.jpg",alt:"Ruinseeker"}),displayName:"From (Fox) Software",handle:"real.ruinseeker",phoneticText:`\u03B8\u0279ua\u028At h\u025Bv\u0259n \xE6nd \u025D\u03B8, a\u026A \u0259\u026Bo\u028An \xE6m \xF0\u0259 @honoured@ w\u0259n. -\u03B8\xE6\u014Bk ju f\u0254\u0279 @#RUNIC@.`,comments:"785",likes:"32.1K",reposts:"3.6K",views:"3.1M"}],de=class extends _{render(n,t){return o("div",{className:"testimonials",children:[...hn.map(r=>o(me,y({},r)))]})}};var Rt=["North","East","South","East","East","East","East","North","North","West","South","West","North","West","West","West","West"],At={ArrowUp:"North",ArrowDown:"South",ArrowLeft:"West",ArrowRight:"East"},j=0,Mt=!1;function gn(e){let n=e.key;if(n in At){if(Mt)return;let t=At[n];if(Rt[j]!==t){j=0;return}else++j,j===Rt.length&&(Mt=!0,fn())}else{j=0;return}}function fn(){window.location.href="https://www.youtube.com/watch?v=dQw4w9WgXcQ"}function Gt(){document.addEventListener("keydown",gn)}function _n(){Je(),D(o(ue,{}),document.querySelector(".runic-editor-container")),D(o(F,{table:re}),document.querySelector("#rune-vowel-table")),D(o(F,{table:oe}),document.querySelector("#rune-consonant-table")),D(o(pe,{}),document.querySelector(".runic-playground-container")),D(o(de,{}),document.querySelector(".testimonials-container")),Gt()}_n(); +\u03B8\xE6\u014Bk ju f\u0254\u0279 @#RUNIC@.`,comments:"785",likes:"32.1K",reposts:"3.6K",views:"3.1M"}],me=class extends _{render(n,t){return o("div",{className:"testimonials",children:[...dn.map(r=>o(pe,y({},r)))]})}};var Rt=["North","East","South","East","East","East","East","North","North","West","South","West","North","West","West","West","West"],At={ArrowUp:"North",ArrowDown:"South",ArrowLeft:"West",ArrowRight:"East"},j=0,Mt=!1;function hn(e){let n=e.key;if(n in At){if(Mt)return;let t=At[n];if(Rt[j]!==t){j=0;return}else++j,j===Rt.length&&(Mt=!0,gn())}else{j=0;return}}function gn(){window.location.href="https://www.youtube.com/watch?v=dQw4w9WgXcQ"}function Gt(){document.addEventListener("keydown",hn)}function fn(){Je(),D(o(ce,{}),document.querySelector(".runic-editor-container")),D(o(F,{table:ne}),document.querySelector("#rune-vowel-table")),D(o(F,{table:re}),document.querySelector("#rune-consonant-table")),D(o(ue,{}),document.querySelector(".runic-playground-container")),D(o(me,{}),document.querySelector(".testimonials-container")),Gt()}fn();