let states = {"keylayouts":[[""],[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
["0",")","\u0966",")"],
["1","\u090D","\u0967","!"],
["2","\u0945","\u0968","@"],
["3","\u094D\u0930","\u0969","#"],
["4","\u0930\u094D","\u096A","$"],
["5","\u091C\u094D\u091E","\u096B","%"],
["6","\u0924\u094D\u0930","\u096C","^"],
["7","\u0915\u094D\u0937","\u096D","&"],
["8","\u0936\u094D\u0930","\u096E","*"],
["9","(","\u096F","("],
["*"],
["#"],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
["\u094B","\u0913"],
["\u0935","\u0934"],
["\u092E","\u0923","\u0954","\u0923"],
["\u094D","\u0905"],
["\u093E","\u0906"],
["\u093F","\u0907","\u0962","\u090C"],
["\u0941","\u0909"],
["\u092A","\u092B","\u092A","\u095E"],
["\u0917","\u0918","\u095A","\u0918"],
["\u0930","\u0931"],
["\u0915","\u0916","\u0958","\u0959"],
["\u0924","\u0925"],
["\u0938","\u0936"],
["\u0932","\u0933"],
["\u0926","\u0927"],
["\u091C","\u091D","\u095B","\u091D"],
["\u094C","\u0914"],
["\u0940","\u0908","\u0963","\u0961"],
["\u0947","\u090F"],
["\u0942","\u090A"],
["\u0939","\u0919"],
["\u0928","\u0929"],
["\u0948","\u0910"],
["\u0902","\u0901","\u0902","\u0950"],
["\u092C","\u092D"],
["\u0946","\u090E","\u0953","\u090E"],
[",","\u0937","\u0970","\u0970"],
[".","\u0964","\u0965","\u093D"],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[" "],
[undefined],
[undefined],
[undefined],
["\n"],
["\x08"],
["\u094A","\u0912"],
["-","\u0903"],
["\u0943","\u090B","\u0944","\u0960"],
["\u0921","\u0922","\u095C","\u095D"],
["\u093C","\u091E"],
["\u0949","\u0911"],
["\u091A","\u091B","\u0952","\u091B"],
["\u091F","\u0920","\u0951","\u0920"],
["\u092F","\u095F"],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
["0"],
["1"],
["2"],
["3"],
["4"],
["5"],
["6"],
["7"],
["8"],
["9"],
["/"],
["*"],
["-"],
["+"],
["."],
["."],
["\n"],
["="],
["("],
[")"],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined],
[undefined]
],
"code":""} // practically unused as long as there are no diacritics on the keyboard
let reset = () => {
    states.code = 0
}
let inRange = (s,a,b) => (a <= s && s <= b)
return Object.freeze({"n":"इनस्क्रिप्ट","v":"none","c":"CuriousTo\uA75Bvald","m":"rewrite",
"t":states.keylayouts.slice(0,10).concat([["3","\uDBBF\uDE01\u094D\u0930","\u0969","#"], ["4","\u0930\u094D\uDBBF\uDE01","\u096A","$"]], states.keylayouts.slice(12)),
"l":"hiIN",
// return: [delete count, composed output]
"accept":(headkey,shiftin,altgrin)=>{
    let layer = 1*shiftin + 2*altgrin

    let s = (states.keylayouts[headkey][layer] || states.keylayouts[headkey][1*shiftin]) || states.keylayouts[headkey][0]

    return ['0', s]
},
"backspace":()=>{
    reset()
    return ''
},
"end":()=>{
    reset()
    return ''
},
"reset":()=>{ reset() },
"composing":()=>(states.code!='')
})