1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4861],{6933:(e,t,a)=>{a.d(t,{A:()=>y});var s=a(95155),r=a(12115),o=a(66695),i=a(88539),n=a(30285),d=a(26126),l=a(40133),c=a(24357),h=a(91788),m=a(15273),u=a(41335),p=a(381),x=a(87481),f=a(38164),v=a(66516);class g{static encode(e){let t=new TextEncoder().encode(e),a=0,s=0,r="";for(let e of t)if(a|=e<<s,(s+=8)>13){let e=8191&a;e>88?(a>>=13,s-=13):(e=16383&a,a>>=14,s-=14),r+=this.encode_table[e%91]+this.encode_table[Math.floor(e/91)]}return s>0&&(r+=this.encode_table[a%91],(s>7||a>90)&&(r+=this.encode_table[Math.floor(a/91)])),r}static decode(e){let t=0,a=0,s=-1,r=[];for(let o of e)if(o in this.decode_table){if(-1===s){s=this.decode_table[o];continue}for(s+=91*this.decode_table[o],t|=s<<a,s>88?a+=13:a+=14,s=-1;a>7;)r.push(255&t),t>>=8,a-=8}return -1!==s&&r.push((t|s<<a)&255),new TextDecoder().decode(new Uint8Array(r))}}function w(e){let{input:t,mode:a,onShare:o}=e,{toast:i}=(0,x.d)(),[d,l]=(0,r.useState)(!1),c=async()=>{if(!t.trim())return void i({title:"Nothing to share",description:"Please enter some text or morse code first.",variant:"destructive"});l(!0);try{let e=t.trim(),a=btoa(encodeURIComponent(e)),s="".concat(window.location.origin,"#translate-").concat(a);await navigator.clipboard.writeText(s),i({title:"Link copied!",description:"Share link has been copied to your clipboard."}),null==o||o()}catch(e){i({title:"Share failed",description:"Failed to create share link. Please try again.",variant:"destructive"})}finally{l(!1)}};return(0,s.jsxs)(n.$,{variant:"outline",onClick:c,disabled:!t.trim()||d,children:[d?(0,s.jsx)(f.A,{className:"h-4 w-4 mr-2 animate-spin"}):(0,s.jsx)(v.A,{className:"h-4 w-4 mr-2"}),"Share"]})}g.encode_table='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~"'.split(""),g.decode_table={},(()=>{for(let e=0;e<g.encode_table.length;e++)g.decode_table[g.encode_table[e]]=e})();var b=a(72797),T=a(59434),j=a(31394);function y(e){let{defaultText:t="",translations:a}=e,[f,v]=(0,r.useState)(t),[g,y]=(0,r.useState)(""),[N,C]=(0,r.useState)("text-to-morse"),[S,k]=(0,r.useState)(!1),[A,_]=(0,r.useState)(!1),[M,E]=(0,r.useState)(null),[I,D]=(0,r.useState)(!1),{hasSharedContent:U,sharedContent:O,sharedMode:q,clearSharedContent:G}=function(){let[e,t]=(0,r.useState)(!1),[a,s]=(0,r.useState)(null),[o,i]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=()=>{let e=window.location.hash;if(e.startsWith("#translate-")){let a=e.substring(11);try{let e=decodeURIComponent(atob(a));if(e){let a=function(e){let t=e.trim();if(!t)return!1;let a=(t.match(/[·â.\-\s/]/g)||[]).length,s=t.length,r=/[·â.\-]{2,}/.test(t);return a/s>.7||r}(e);s(e),i(a?"morse-to-text":"text-to-morse"),t(!0),setTimeout(()=>{let e=document.getElementById("morse-code-translator");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}}catch(e){window.history.replaceState(null,"",window.location.pathname)}}};return e(),window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}},[]),{hasSharedContent:e,sharedContent:a,sharedMode:o,clearSharedContent:()=>{t(!1),s(null),i(null),window.location.hash.startsWith("#translate-")&&window.history.replaceState(null,"",window.location.pathname)}}}();(0,b.Ym)();let V=a||(0,b.ot)(),X=e=>{let t=e.split("."),a=V;for(let e of t)a=null==a?void 0:a[e];return"string"==typeof a?a:(0,T.q)(e)},[R,B]=(0,r.useState)(()=>localStorage.getItem("morseXpress_soundType")||"cw-radio"),[P,F]=(0,r.useState)(()=>{{let e=localStorage.getItem("morseXpress_pitch");return e?parseInt(e):550}}),[$,L]=(0,r.useState)(()=>{{let e=localStorage.getItem("morseXpress_volume");return e?parseInt(e):50}}),[z,W]=(0,r.useState)(()=>{{let e=localStorage.getItem("morseXpress_characterSpeed");return e?parseInt(e):20}}),[Z,K]=(0,r.useState)(()=>{{let e=localStorage.getItem("morseXpress_farnsworthSpeed");return e?parseInt(e):15}}),[Y,H]=(0,r.useState)(()=>localStorage.getItem("morseXpress_alphabet")||"latin"),{toast:J}=(0,x.d)();(0,r.useEffect)(()=>{t&&y(Q(t))},[t]),(0,r.useEffect)(()=>{U&&O&&q&&(v(O),C(q),setTimeout(()=>G(),100))},[U,O,q,G]),(0,r.useEffect)(()=>{f.trim()?"text-to-morse"===N?y(Q(f)):y(ee(f)):y(""),es()},[f,N]),(0,r.useEffect)(()=>{localStorage.setItem("morseXpress_soundType",R)},[R]),(0,r.useEffect)(()=>{localStorage.setItem("morseXpress_pitch",P.toString())},[P]),(0,r.useEffect)(()=>{localStorage.setItem("morseXpress_volume",$.toString())},[$]),(0,r.useEffect)(()=>{localStorage.setItem("morseXpress_characterSpeed",z.toString())},[z]),(0,r.useEffect)(()=>{localStorage.setItem("morseXpress_farnsworthSpeed",Z.toString())},[Z]),(0,r.useEffect)(()=>{localStorage.setItem("morseXpress_alphabet",Y)},[Y]);let Q=e=>e.toUpperCase().split("").map(e=>" "===e?"/":j.h.getCharacterMorse(e)||e).join(" ").replace(/\s+/g," ").trim(),ee=e=>e.trim().replace(/\./g,"\xb7").replace(/-/g,"â").split(/\s+/).map(e=>"/"===e||""===e?" ":j.h.getCharacterByMorse(e)||e).join("").replace(/\s+/g," ").trim(),et=async()=>{g&&(await navigator.clipboard.writeText(g),J({title:X("morseTranslator.buttons.copy")+"!",description:X("popularPhrases.copyToast.description")}))},ea=()=>{let e="text-to-morse"===N?g:f.trim();if(e){k(!0);let t=new(window.AudioContext||window.webkitAudioContext),a=1200/z,s=3*a,r=1200/Z,o=3*r,i=7*r,n=t.currentTime,d=[],l=[];
1e.split("").forEach(e=>{if("\xb7"===e){if("cw-radio"===R){let e=t.createOscillator(),s=t.createGain();e.connect(s),s.connect(t.destination),e.frequency.value=P,s.gain.setValueAtTime($/100,t.currentTime),e.start(n),e.stop(n+a/1e3),d.push(e),l.push(s)}else{let e=t.createOscillator(),s=t.createGain(),r=t.createBiquadFilter();e.connect(r),r.connect(s),s.connect(t.destination),e.frequency.value=P,e.type="square",r.type="lowpass",r.frequency.value=2*P,s.gain.setValueAtTime($/100,t.currentTime),e.start(n),e.stop(n+a/1e3),d.push(e),l.push(s)}n+=(a+a)/1e3}else if("â"===e){if("cw-radio"===R){let e=t.createOscillator(),a=t.createGain();e.connect(a),a.connect(t.destination),e.frequency.value=P,a.gain.setValueAtTime($/100,t.currentTime),e.start(n),e.stop(n+s/1e3),d.push(e),l.push(a)}else{let e=t.createOscillator(),a=t.createGain(),r=t.createBiquadFilter();e.connect(r),r.connect(a),a.connect(t.destination),e.frequency.value=P,e.type="square",r.type="lowpass",r.frequency.value=2*P,a.gain.setValueAtTime($/100,t.currentTime),e.start(n),e.stop(n+s/1e3),d.push(e),l.push(a)}n+=(s+a)/1e3}else" "===e?n+=o/1e3:"/"===e&&(n+=i/1e3)}),window.currentOscillators=d,window.currentGainNodes=l,setTimeout(()=>{window.currentOscillators=null,window.currentGainNodes=null,A?E(setTimeout(()=>{ea()},500)):k(!1)},(n-t.currentTime)*1e3)}},es=()=>{k(!1),_(!1),M&&(clearTimeout(M),E(null)),window.currentOscillators&&(window.currentOscillators.forEach(e=>{try{e.stop()}catch(e){}}),window.currentOscillators=null),window.currentGainNodes&&(window.currentGainNodes.forEach(e=>{try{e.gain.setValueAtTime(0,e.context.currentTime)}catch(e){}}),window.currentGainNodes=null)},er=e=>{let t=e.length,a=e.numberOfChannels,s=e.sampleRate,r=new ArrayBuffer(44+t*a*2),o=new DataView(r),i=(e,t)=>{for(let a=0;a<t.length;a++)o.setUint8(e+a,t.charCodeAt(a))};i(0,"RIFF"),o.setUint32(4,36+t*a*2,!0),i(8,"WAVE"),i(12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,a,!0),o.setUint32(24,s,!0),o.setUint32(28,s*a*2,!0),o.setUint16(32,2*a,!0),o.setUint16(34,16,!0),i(36,"data"),o.setUint32(40,t*a*2,!0);let n=e.getChannelData(0),d=44;for(let e=0;e<t;e++){let t=Math.max(-1,Math.min(1,n[e]));o.setInt16(d,t<0?32768*t:32767*t,!0),d+=2}return r};return(0,s.jsxs)(o.Zp,{className:"w-full max-w-4xl mx-auto relative z-40",id:"morse-code-translator",children:[(0,s.jsx)(o.aR,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(o.ZB,{children:X("morseTranslator.card.title")}),(0,s.jsx)(o.BT,{children:X("morseTranslator.card.description")})]}),(0,s.jsx)(d.E,{variant:"outline",children:"text-to-morse"===N?X("morseTranslator.card.badges.textToMorse"):X("morseTranslator.card.badges.morseToText")})]})}),(0,s.jsxs)(o.Wu,{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{htmlFor:"morse-input",className:"text-sm font-medium",children:"text-to-morse"===N?X("morseTranslator.inputs.labels.enterText"):X("morseTranslator.inputs.labels.enterMorseCode")}),(0,s.jsx)(i.T,{id:"morse-input",name:"morse-input",placeholder:"text-to-morse"===N?X("morseTranslator.inputs.placeholders.typeMessage"):X("morseTranslator.inputs.placeholders.enterMorseCode"),value:f,onChange:e=>v(e.target.value),className:"min-h-[120px] font-mono"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{htmlFor:"morse-output",className:"text-sm font-medium",children:"text-to-morse"===N?X("morseTranslator.inputs.labels.morseCodeOutput"):X("morseTranslator.inputs.labels.textOutput")}),(0,s.jsx)(i.T,{id:"morse-output",name:"morse-output",placeholder:X("morseTranslator.inputs.placeholders.translationAppear"),value:g,readOnly:!0,className:"min-h-[120px] font-mono bg-muted"})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)(n.$,{variant:"outline",onClick:()=>{C("text-to-morse"===N?"morse-to-text":"text-to-morse"),v(g),y(f),k(!1),M&&(clearTimeout(M),E(null)),_(!1)},children:[(0,s.jsx)(l.A,{className:"h-4 w-4 mr-2"}),X("morseTranslator.buttons.switchMode")]}),(0,s.jsxs)(n.$,{variant:"outline",onClick:et,disabled:!g,children:[(0,s.jsx)(c.A,{className:"h-4 w-4 mr-2"}),X("morseTranslator.buttons.copy")]}),(0,s.jsx)(w,{input:f,mode:N}),("text-to-morse"===N&&g||"morse-to-text"===N&&f.trim())&&(0,s.jsxs)(n.$,{variant:"outline",onClick:()=>{let e="text-to-morse"===N?g:f.trim();if(e){let t=1200/z,a=3*t,s=1200/Z,r=3*s,o=7*s,i=0;
1e.split("").forEach(e=>{"\xb7"===e?i+=(t+t)/1e3:"â"===e?i+=(a+t)/1e3:" "===e?i+=r/1e3:"/"===e&&(i+=o/1e3)});let n=new OfflineAudioContext(1,Math.ceil(44100*i),44100);i=0,e.split("").forEach(e=>{if("\xb7"===e){if("cw-radio"===R){let e=n.createOscillator(),a=n.createGain();e.connect(a),a.connect(n.destination),e.frequency.value=P,a.gain.setValueAtTime($/100,i),e.start(i),e.stop(i+t/1e3)}else{let e=n.createOscillator(),a=n.createGain(),s=n.createBiquadFilter();e.connect(s),s.connect(a),a.connect(n.destination),e.frequency.value=P,e.type="square",s.type="lowpass",s.frequency.value=2*P,a.gain.setValueAtTime($/100,i),e.start(i),e.stop(i+t/1e3)}i+=(t+t)/1e3}else if("â"===e){if("cw-radio"===R){let e=n.createOscillator(),t=n.createGain();e.connect(t),t.connect(n.destination),e.frequency.value=P,t.gain.setValueAtTime($/100,i),e.start(i),e.stop(i+a/1e3)}else{let e=n.createOscillator(),t=n.createGain(),s=n.createBiquadFilter();e.connect(s),s.connect(t),t.connect(n.destination),e.frequency.value=P,e.type="square",s.type="lowpass",s.frequency.value=2*P,t.gain.setValueAtTime($/100,i),e.start(i),e.stop(i+a/1e3)}i+=(a+t)/1e3}else" "===e?i+=r/1e3:"/"===e&&(i+=o/1e3)}),n.startRendering().then(e=>{let t=new Blob([er(e)],{type:"audio/wav"}),a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download="MorseXpress.com-morse-code-".concat(Date.now(),".wav"),document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a),J({title:X("morseTranslator.buttons.download")+" Complete",description:"Morse code audio file has been downloaded"})})}},children:[(0,s.jsx)(h.A,{className:"h-4 w-4 mr-2"}),X("morseTranslator.buttons.download")]}),("text-to-morse"===N&&g||"morse-to-text"===N&&f.trim())&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.$,{variant:S?"default":"outline",onClick:S?es:ea,children:[(0,s.jsx)(m.A,{className:"h-4 w-4 mr-2"}),S?X("morseTranslator.buttons.stop"):X("morseTranslator.buttons.play")]}),(0,s.jsxs)(n.$,{variant:A?"default":"outline",onClick:()=>{A?_(!1):_(!0)},children:[(0,s.jsx)(u.A,{className:"h-4 w-4 mr-2"}),A?X("morseTranslator.buttons.stopRepeat"):X("morseTranslator.buttons.repeat")]})]}),(0,s.jsx)(n.$,{variant:"outline",onClick:()=>{v(""),y(""),k(!1),M&&(clearTimeout(M),E(null)),_(!1)},children:X("morseTranslator.buttons.clear")}),(0,s.jsxs)(n.$,{variant:"outline",onClick:()=>D(!0),children:[(0,s.jsx)(p.A,{className:"h-4 w-4 mr-2"}),X("morseTranslator.buttons.advanced")]})]}),I&&(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,s.jsxs)("div",{className:"bg-background p-6 rounded-lg max-w-md w-full mx-4 max-h-[80vh] overflow-y-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:X("morseTranslator.advanced.title")}),(0,s.jsx)(n.$,{variant:"ghost",size:"sm",onClick:()=>D(!1),children:"â"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:X("morseTranslator.advanced.soundType")}),(0,s.jsxs)("div",{className:"mt-1 space-y-2",children:[(0,s.jsxs)("label",{className:"flex items-center",children:[(0,s.jsx)("input",{type:"radio",name:"soundType",value:"cw-radio",checked:"cw-radio"===R,onChange:e=>B(e.target.value),className:"mr-2"}),X("morseTranslator.advanced.cwRadioTone")]}),(0,s.jsxs)("label",{className:"flex items-center",children:[(0,s.jsx)("input",{type:"radio",name:"soundType",value:"telegraph",checked:"telegraph"===R,onChange:e=>B(e.target.value),className:"mr-2"}),X("morseTranslator.advanced.telegraphSounder")]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:X("morseTranslator.advanced.pitch")}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("input",{type:"range",min:"200",max:"1000",value:P,onChange:e=>F(Number(e.target.value)),className:"flex-1"}),(0,s.jsx)("span",{className:"text-sm w-12",children:P})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:X("morseTranslator.advanced.volume")}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("input",{type:"range",min:"0",max:"100",value:$,onChange:e=>L(Number(e.target.value)),className:"flex-1"}),(0,s.jsx)("span",{className:"text-sm w-12",children:$})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:X("morseTranslator.advanced.characterSpeed")}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("input",{type:"range",min:"5",max:"100",value:z,onChange:e=>W(Number(e.target.value)),className:"flex-1"}),(0,s.jsx)("span",{className:"text-sm w-12",children:z})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:X("morseTranslator.advanced.farnsworthSpeed")}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("input",{type:"range",min:"5",max:"100",value:Z,onChange:e=>K(Number(e.target.value)),className:"flex-1"}),(0,s.jsx)("span",{className:"text-sm w-12",children:Z})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:X("morseTranslator.advanced.alphabet")}),(0,s.jsxs)("select",{value:Y,onChange:e=>H(e.target.value),className:"w-full mt-1 p-2 border rounded",children:[(0,s.jsx)("option",{value:"latin",children:X("morseTranslator.advanced.latin")}),(0,s.jsx)("option",{value:"cyrillic",children:X("morseTranslator.advanced.cyrillic")}),(0,s.jsx)("option",{value:"greek",children:X("morseTranslator.advanced.greek")}),(0,s.jsx)("option",{value:"arabic",children:X("morseTranslator.advanced.arabic")})]})]})]}),(0,s.jsx)("div",{className:"flex gap-2 mt-6",children:(0,s.jsx)(n.$,{onClick:()=>D(!1),className:"flex-1",children:X("morseTranslator.advanced.close")})})]})}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:X("morseTranslator.tips.title")})," ",X("morseTranslator.tips.description")]})})]})]})}},31394:(e,t,a)=>{a.d(t,{h:()=>r});let s={A:{morse:"\xb7â",phonetic:"di-dah"},B:{morse:"â\xb7\xb7\xb7",phonetic:"dah-di-di-dit"},C:{morse:"â\xb7â\xb7",phonetic:"dah-di-dah-dit"},D:{morse:"â\xb7\xb7",phonetic:"dah-di-dit"},E:{morse:"\xb7",phonetic:"dit"},F:{morse:"\xb7\xb7â\xb7",phonetic:"di-di-dah-dit"},G:{morse:"ââ\xb7",phonetic:"dah-dah-dit"},H:{morse:"\xb7\xb7\xb7\xb7",phonetic:"dit-dit-dit-dit"},I:{morse:"\xb7\xb7",phonetic:"dit-dit"},J:{morse:"\xb7âââ",phonetic:"di-dah-dah-dah"},K:{morse:"â\xb7â",phonetic:"dah-di-dah"},L:{morse:"\xb7â\xb7\xb7",phonetic:"di-dah-dit-dit"},M:{morse:"ââ",phonetic:"dah-dah"},N:{morse:"â\xb7",phonetic:"dah-dit"},O:{morse:"âââ",phonetic:"dah-dah-dah"},P:{morse:"\xb7ââ\xb7",phonetic:"di-dah-dah-dit"},Q:{morse:"ââ\xb7â",phonetic:"dah-dah-di-dah"},R:{morse:"\xb7â\xb7",phonetic:"di-dah-dit"},S:{morse:"\xb7\xb7\xb7",phonetic:"dit-dit-dit"},T:{morse:"â",phonetic:"dah"},U:{morse:"\xb7\xb7â",phonetic:"di-di-dah"},V:{morse:"\xb7\xb7\xb7â",phonetic:"di-di-di-dah"},W:{morse:"\xb7ââ",phonetic:"di-dah-dah"},X:{morse:"â\xb7\xb7â",phonetic:"dah-di-di-dah"},Y:{morse:"â\xb7ââ",phonetic:"dah-di-dah-dah"},Z:{morse:"ââ\xb7\xb7",phonetic:"dah-dah-di-dit"},0:{morse:"âââââ",phonetic:"dah-dah-dah-dah-dah"},1:{morse:"\xb7ââââ",phonetic:"di-dah-dah-dah-dah"},2:{morse:"\xb7\xb7âââ",phonetic:"di-di-dah-dah-dah"},3:{morse:"\xb7\xb7\xb7ââ",phonetic:"di-di-di-dah-dah"},4:{morse:"\xb7\xb7\xb7\xb7â",phonetic:"di-di-di-di-dah"},5:{morse:"\xb7\xb7\xb7\xb7\xb7",phonetic:"dit-dit-dit-dit-dit"},6:{morse:"â\xb7\xb7\xb7\xb7",phonetic:"dah-di-di-di-dit"},7:{morse:"ââ\xb7\xb7\xb7",phonetic:"dah-dah-di-di-dit"},8:{morse:"âââ\xb7\xb7",phonetic:"dah-dah-dah-di-dit"},9:{morse:"ââââ\xb7",phonetic:"dah-dah-dah-dah-dit"},".":{morse:"\xb7â\xb7â\xb7â",phonetic:"di-dah-di-dah-di-dah"},",":{morse:"ââ\xb7\xb7ââ",phonetic:"dah-dah-di-di-dah-dah"},"?":{morse:"\xb7\xb7ââ\xb7\xb7",phonetic:"di-di-dah-dah-di-di"},"'":{morse:"\xb7ââââ\xb7",phonetic:"di-dah-dah-dah-dah-dit"},"!":{morse:"â\xb7â\xb7ââ",phonetic:"dah-di-dah-di-dah-dah"},"/":{morse:"â\xb7\xb7â\xb7",phonetic:"dah-di-di-dah-dit"},"(":{morse:"â\xb7ââ\xb7",phonetic:"dah-di-dah-dah-dit"},")":{morse:"â\xb7ââ\xb7â",phonetic:"dah-di-dah-dah-di-dah"},"&":{morse:"\xb7â\xb7\xb7\xb7",phonetic:"di-dah-di-di-dit"},":":{morse:"âââ\xb7\xb7\xb7",phonetic:"dah-dah-dah-di-di-dit"},";":{morse:"â\xb7â\xb7â\xb7",phonetic:"dah-di-dah-di-dah-dit"},"=":{morse:"â\xb7\xb7\xb7â",phonetic:"dah-di-di-di-dah"},"+":{morse:"\xb7â\xb7â\xb7",phonetic:"di-dah-di-dah-dit"},"-":{morse:"â\xb7\xb7\xb7\xb7â",phonetic:"dah-di-di-di-di-dah"},_:{morse:"\xb7\xb7ââ\xb7â",phonetic:"di-di-dah-dah-di-dah"},'"':{morse:"\xb7â\xb7\xb7â\xb7",phonetic:"di-dah-di-di-dah-dit"},$:{morse:"\xb7\xb7\xb7â\xb7\xb7â",phonetic:"di-di-di-dah-di-di-dah"},"@":{morse:"\xb7ââ\xb7â\xb7",phonetic:"di-dah-dah-dit-dah-dit"},"\xa7":{morse:"\xb7\xb7\xb7â\xb7\xb7",phonetic:"di-di-di-dah-di-di"},"\xbf":{morse:"\xb7\xb7ââ\xb7",phonetic:"di-di-dah-dah-dit"},"\xa1":{morse:"ââ\xb7\xb7ââ",phonetic:"dah-dah-di-di-dah-dah"},Ã:{morse:"â\xb7â\xb7\xb7",phonetic:"dah-di-dah-di-di"},Ä:{morse:"ââ\xb7â\xb7",phonetic:"dah-dah-di-dah-dit"},İ:{morse:"\xb7\xb7",phonetic:"di-di"},Ã:{morse:"âââ\xb7",phonetic:"dah-dah-dah-dit"},Å:{morse:"ââ\xb7\xb7â",phonetic:"dah-dah-di-di-dah"},Ã:{morse:"\xb7\xb7ââ",phonetic:"di-di-dah-dah"},ç:{morse:"â\xb7â\xb7\xb7",phonetic:"dah-di-dah-di-di"},Ä:{morse:"ââ\xb7â\xb7",phonetic:"dah-dah-di-dah-dit"},ı:{morse:"\xb7\xb7",phonetic:"di-di"},ö:{morse:"âââ\xb7",phonetic:"dah-dah-dah-dit"},Å:{morse:"ââ\xb7\xb7â",phonetic:"dah-dah-di-di-dah"},ü:{morse:"\xb7\xb7ââ",phonetic:"di-di-dah-dah"}," ":{morse:"/",phonetic:"word-separator"}};class r{static translate(e){let t=e.toUpperCase(),a=[],r=[];for(let e of t)s[e]?(a.push(s[e].morse),r.push(s[e].phonetic)):" "===e&&(a.push("/"),r.push("/"));return{word:t,morse:a.join(" "),phonetic:r.join(" / ")}}static getCharacterMorse(e){var t;return(null==(t=s[e.toUpperCase()])?void 0:t.morse)||null}static getCharacterPhonetic(e){var t;return(null==(t=s[e.toUpperCase()])?void 0:t.phonetic)||null}static isValidCharacter(e){return void 0!==s[e.toUpperCase()]}static getCharacterByMorse(e){for(let[t,a]of Object.entries(s))if(a.morse===e)return t;return null}}},74649:(e,t,a)=>{a.d(t,{A:()=>
1o});var s=a(95155),r=a(26900);function o(e){var t,a,o,i;let{locale:n="en",translations:d}=e,l=e=>{var t,a;return d&&(null==(a=d.header)||null==(t=a.nav)?void 0:t[e])?d.header.nav[e]:({commonPhrases:"Common Phrases",alphabet:"Alphabet",translator:"Translator",audioDecoder:"Audio Decoder",imageDecoder:"Image Decoder",decodingTree:"Decoding Tree",search:"Search",learnGuide:"Learn Guide"})[e]||e},c=e=>{var t,a;return d&&(null==(a=d.header)||null==(t=a.titles)?void 0:t[e])?d.header.titles[e]:({commonPhrases:"Learn common phrases in Morse code",alphabet:"View Morse code alphabet and numbers",translator:"Interactive Morse code translator tool",audioDecoder:"Decode Morse code from audio files",imageDecoder:"Decode Morse code from images",decodingTree:"Interactive Morse code decoding tree",search:"Search Morse code phrases and learn new expressions",learnGuide:"Complete guide to learning Morse code from scratch"})[e]||""},h={locale:n,brandTitle:(null==d||null==(t=d.header)?void 0:t.brandTitle)||"MorseXpress",nav:{commonPhrases:l("commonPhrases"),alphabet:l("alphabet"),translator:l("translator"),audioDecoder:l("audioDecoder"),imageDecoder:l("imageDecoder"),decodingTree:l("decodingTree")},titles:{commonPhrases:c("commonPhrases"),alphabet:c("alphabet"),translator:c("translator"),audioDecoder:c("audioDecoder"),imageDecoder:c("imageDecoder"),decodingTree:c("decodingTree")},search:{placeholder:(null==d||null==(a=d.search)?void 0:a.placeholder)||"Search phrases...",placeholderMobile:(null==d||null==(o=d.search)?void 0:o.placeholderMobile)||"Search...",shortcut:(null==d||null==(i=d.search)?void 0:i.shortcut)||"K"}};return(0,s.jsx)(r.default,{headerData:h,translations:d})}},87481:(e,t,a)=>{a.d(t,{d:()=>o});var s=a(12115);let r=0;function o(){let[e,t]=(0,s.useState)([]);return{toast:(0,s.useCallback)(e=>{let{title:a,description:s,variant:o="default",duration:i=3e3}=e,n="toast-".concat(++r),d={id:n,title:a,description:s,variant:o,duration:i};t(e=>[...e,d]),setTimeout(()=>{t(e=>e.filter(e=>e.id!==n))},i);let l=s?"".concat(a,": ").concat(s):a;{let e=document.createElement("div");e.style.cssText="\n position: fixed;\n top: 20px;\n right: 20px;\n background: ".concat("destructive"===o?"#ef4444":"#10b981",";\n color: white;\n padding: 12px 16px;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n z-index: 10000;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 14px;\n max-width: 300px;\n word-wrap: break-word;\n transition: opacity 0.3s ease;\n "),e.textContent=l,document.body.appendChild(e),setTimeout(()=>{e.style.opacity="0",setTimeout(()=>{document.body.removeChild(e)},300)},i-300)}},[]),toasts:e,dismiss:(0,s.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[])}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.