// Generated by LiveScript 1.3.1
(function(){
  var React, isMoedictDesktop, ref$, p, i, a, b, form, h1, div, main, span, br, h3, h4, button, label, table, nav, tr, td, th, input, hr, meta, ul, ol, li, ruby, small, any, map, createClass, withProperties, divInline, h1Name, cjk, rCjkOne, rCjkG, nbsp, CurrentId, shareButtons, PrefList, UserPref, Links, Nav, Taxonomy, MenuItem, DropDown, Result, Term, Translations, HASHOF, XREFLABELOF, XRefs, Star, Heteronym, decorateRuby, DTTones, DTTonesSandhi, DefinitionList, Definition, CJKRADICALS, RadicalGlyph, RadicalTable, List, httpMap, http, canPlayMp3, canPlayOgg, canPlayOpus, untag, groupBy, Consonants, Vowels, Tones, re, C, V, keyMap, decodeLangPart, PinYinMap, slice$ = [].slice, replace$ = ''.replace, join$ = [].join, split$ = ''.split;
  React = (typeof window != 'undefined' && window !== null ? window.React : void 8) || require('./js/react.js');
  if ((typeof window != 'undefined' && window !== null) && window.moedictDesktop) {
    window.isMoedictDesktop = isMoedictDesktop = true;
  }
  ref$ = React.DOM, p = ref$.p, i = ref$.i, a = ref$.a, b = ref$.b, form = ref$.form, h1 = ref$.h1, div = ref$.div, main = ref$.main, span = ref$.span, br = ref$.br, h3 = ref$.h3, h4 = ref$.h4, button = ref$.button, label = ref$.label, table = ref$.table, nav = ref$.nav, tr = ref$.tr, td = ref$.td, th = ref$.th, input = ref$.input, hr = ref$.hr, meta = ref$.meta, ul = ref$.ul, ol = ref$.ol, li = ref$.li, ruby = ref$.ruby, small = ref$.small;
  ref$ = require('prelude-ls'), any = ref$.any, map = ref$.map;
  createClass = compose$(React.createClass, React.createFactory);
  withProperties = function(tag, defProps){
    defProps == null && (defProps = {});
    return function(props){
      var args;
      props == null && (props = {});
      args = slice$.call(arguments, 1);
      return tag.apply(null, [import$(import$({}, defProps), props)].concat(slice$.call(args)));
    };
  };
  divInline = withProperties(div, {
    style: {
      display: 'inline'
    }
  });
  h1Name = withProperties(h1, {
    itemProp: 'name'
  });
  cjk = '([\uD800-\uDBFF][\uDC00-\uDFFF]|[^，、；。－—<>])';
  rCjkOne = new RegExp("^" + cjk + "$");
  rCjkG = new RegExp(cjk, 'g');
  nbsp = '\u00A0';
  CurrentId = null;
  shareButtons = [
    {
      id: 'f',
      icon: 'facebook',
      label: 'Facebook',
      background: '#3B579D',
      href: 'https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.moedict.tw%2F'
    }, {
      id: 't',
      icon: 'twitter',
      label: 'Twitter',
      background: '#00ACED',
      href: 'https://twitter.com/share?text=__TEXT__&url=https%3A%2F%2Fwww.moedict.tw%2F'
    }, {
      id: 'g',
      icon: 'google-plus',
      label: 'Google+',
      background: '#D95C5C',
      href: 'https://plus.google.com/share?url=https%3A%2F%2Fwww.moedict.tw%2F'
    }
  ];
  PrefList = createClass({
    getInitialState: function(){
      var key, ref$, selected, own$ = {}.hasOwnProperty;
      for (key in ref$ = this.props) if (own$.call(ref$, key)) {
        selected = ref$[key];
        if (key !== 'children') {
          return {
            key: key,
            selected: selected
          };
        }
      }
    },
    componentDidMount: function(){
      return this.phoneticsChanged();
    },
    componentDidUpdate: function(){
      return this.phoneticsChanged();
    },
    pinyin_aChanged: function(){
      return location.reload();
    },
    pinyin_tChanged: function(){
      return location.reload();
    },
    phoneticsChanged: function(){
      var $body;
      $body = $('body');
      switch (this.state.selected) {
      case 'rightangle':
        return $body.attr('data-ruby-pref', 'both');
      case 'bopomofo':
        return $body.attr('data-ruby-pref', 'zhuyin');
      case 'pinyin':
        return $body.attr('data-ruby-pref', 'pinyin');
      case 'none':
        return $body.attr('data-ruby-pref', 'none');
      }
    },
    render: function(){
      var ref$, lbl, items, key, selected, ref1$;
      ref$ = this.props.children, lbl = ref$[0], items = slice$.call(ref$, 1);
      ref$ = this.state, key = ref$.key, selected = (ref1$ = ref$.selected) != null
        ? ref1$
        : items[0][0];
      return li({
        className: 'btn-group'
      }, label({}, lbl), button.apply(null, [{
        className: 'btn btn-default btn-sm dropdown-toggle',
        type: 'button',
        'data-toggle': 'dropdown'
      }].concat(
        (function(){
          var i$, ref$, len$, results$ = [];
          for (i$ = 0, len$ = (ref$ = items).length; i$ < len$; ++i$) {
            results$.push((fn$.call(this, ref$[i$])));
          }
          return results$;
          function fn$(arg$){
            var val, els;
            val = arg$[0], els = slice$.call(arg$, 1);
            if (val === selected) {
              return els;
            } else {
              return '';
            }
          }
        }.call(this)), [
          nbsp, span({
            className: 'caret'
          })
        ]
      )), ul.apply(null, [{
        className: 'dropdown-menu'
      }].concat((function(){
        var i$, ref$, len$, results$ = [];
        for (i$ = 0, len$ = (ref$ = items).length; i$ < len$; ++i$) {
          results$.push((fn$.call(this, ref$[i$])));
        }
        return results$;
        function fn$(arg$){
          var val, els, this$ = this;
          val = arg$[0], els = slice$.call(arg$, 1);
          if (val) {
            return li({}, a.apply(null, [{
              style: {
                cursor: 'pointer'
              },
              className: val === selected ? 'active' : '',
              onClick: function(){
                var key$;
                if (typeof localStorage != 'undefined' && localStorage !== null) {
                  localStorage.setItem(key, val);
                }
                this$.setState({
                  selected: val
                });
                return typeof this$[key$ = key + "Changed"] == 'function' ? this$[key$]() : void 8;
              }
            }].concat(slice$.call(els))));
          } else {
            return li({
              className: 'divider',
              role: 'presentation'
            });
          }
        }
      }.call(this)))));
    }
  });
  UserPref = createClass({
    getDefaultProps: function(){
      return {
        simptrad: typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('simptrad') : void 8,
        phonetics: typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('phonetics') : void 8,
        pinyin_a: (typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_a') : void 8) || 'HanYu',
        pinyin_t: (typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_t') : void 8) || 'TL'
      };
    },
    render: function(){
      var ref$, phonetics, simptrad, pinyin_a, pinyin_t, langPref;
      ref$ = this.props, phonetics = ref$.phonetics, simptrad = ref$.simptrad, pinyin_a = ref$.pinyin_a, pinyin_t = ref$.pinyin_t;
      return div({}, h4({}, '偏好設定'), button({
        className: 'close btn-close',
        type: 'button',
        'aria-hidden': true
      }, '×'), langPref = null, ul({}, typeof $ == 'function' && $('body').hasClass('lang-a') ? PrefList({
        pinyin_a: pinyin_a
      }, '羅馬拼音顯示方式', ['HanYu-TongYong', '漢語華通共同顯示'], ['HanYu', '漢語拼音'], ['TongYong', '華通拼音'], ['WadeGiles', '威妥瑪式'], ['GuoYin', '注音二式']) : void 8, typeof $ == 'function' && $('body').hasClass('lang-t') ? PrefList({
        pinyin_t: pinyin_t
      }, '羅馬拼音顯示方式', ['TL-DT', '臺羅臺通共同顯示'], ['TL', '臺羅拼音'], ['DT', '臺通拼音'], ['POJ', '白話字']) : void 8, PrefList({
        phonetics: phonetics
      }, '條目音標顯示方式', ['rightangle', '注音拼音共同顯示'], ['bopomofo', '注音符號'], ['pinyin', '羅馬拼音'], [], ['none', '關閉'])), button({
        className: 'btn btn-primary btn-block btn-close',
        type: 'button'
      }, '關閉'));
    }
  });
  Links = createClass({
    render: function(){
      var id, icon, label, background, href;
      return div({}, a({
        className: 'visible-xs pull-left ebas btn btn-default',
        href: '#',
        title: '關於本站',
        style: {
          float: 'left',
          marginTop: '-10px',
          marginLeft: '5px',
          marginBottom: '5px'
        },
        onClick: function(){
          return pressAbout();
        }
      }, span({
        className: 'iconic-circle'
      }, i({
        className: 'icon-info'
      })), span({}, nbsp, '萌典')), div.apply(null, [{
        className: 'share',
        style: {
          float: 'right',
          marginTop: '-10px',
          marginRight: '5px',
          marginBottom: '15px'
        }
      }].concat((function(){
        var i$, ref$, len$, ref1$, results$ = [];
        for (i$ = 0, len$ = (ref$ = shareButtons).length; i$ < len$; ++i$) {
          ref1$ = ref$[i$], id = ref1$.id, icon = ref1$.icon, label = ref1$.label, background = ref1$.background, href = ref1$.href;
          results$.push(a({
            id: "share-" + id,
            className: "btn btn-default small",
            title: label + " 分享",
            style: {
              background: background,
              color: 'white'
            },
            'data-href': href,
            target: '_blank'
          }, i({
            className: 'icon-share'
          }, nbsp), i({
            className: "icon-" + icon
          })));
        }
        return results$;
      }()))));
    }
  });
  Nav = createClass({
    render: function(){
      return nav({
        className: 'navbar navbar-inverse navbar-fixed-top',
        role: 'navigation'
      }, div({
        className: 'navbar-header'
      }, a({
        className: 'navbar-brand brand ebas',
        href: './'
      }, '萌典')), ul({
        className: 'nav navbar-nav'
      }, li({
        className: 'dropdown'
      }, a({
        className: 'dropdown-toggle',
        href: '#',
        'data-toggle': 'dropdown'
      }, i({
        className: 'icon-book'
      }, nbsp), span({
        className: 'lang-active',
        style: {
          margin: 0,
          padding: 0
        },
        itemProp: 'articleSection'
      }, '國語辭典'), b({
        className: 'caret'
      })), DropDown({
        STANDALONE: this.props.STANDALONE
      })), li({
        id: 'btn-starred',
        title: '字詞紀錄簿'
      }, a({
        href: '#=*',
        style: {
          paddingLeft: '5px',
          paddingRight: '5px'
        }
      }, i({
        className: 'icon-bookmark-empty'
      }))), li({
        id: 'btn-pref',
        title: '偏好設定'
      }, a({
        href: '#=*',
        style: {
          paddingLeft: '5px',
          paddingRight: '5px'
        }
      }, i({
        className: 'icon-cogs'
      }))), isMoedictDesktop ? li({
        id: 'btn-moedict-desktop-addons'
      }, a({
        href: 'https://racklin.github.io/moedict-desktop/addon.html',
        style: {
          paddingLeft: '5px',
          paddingRight: '5px'
        },
        alt: '下載擴充套件'
      }, i({
        className: 'icon-download-alt'
      }))) : void 8, li({}, form({
        id: 'lookback',
        className: 'back',
        target: '_blank',
        acceptCharset: 'big5',
        action: 'http://dict.revised.moe.edu.tw/cgi-bin/newDict/dict.sh',
        style: {
          display: 'none',
          margin: 0,
          padding: 0
        }
      }, input({
        type: 'hidden',
        name: 'idx',
        value: 'dict.idx'
      }), input({
        type: 'hidden',
        name: 'fld',
        value: '1'
      }), input({
        type: 'hidden',
        name: 'imgFont',
        value: '1'
      }), input({
        type: 'hidden',
        name: 'cat',
        value: ''
      }), input({
        id: 'cond',
        type: 'hidden',
        name: 'cond',
        value: '^萌$'
      }), input({
        className: 'iconic-circle',
        type: 'submit',
        value: '反',
        title: '反查來源（教育部國語辭典）',
        style: {
          fontFamily: 'EBAS',
          marginTop: '12px',
          borderRadius: '20px',
          border: '0px'
        }
      }))), li({
        className: 'resize-btn app-only',
        style: {
          position: 'absolute',
          top: '2px',
          left: '8em',
          padding: '3px'
        }
      }, a({
        style: {
          paddingLeft: '5px',
          paddingRight: '5px',
          marginRight: '30px'
        },
        href: '#',
        onClick: function(){
          return adjustFontSize(-1);
        }
      }, i({
        className: 'icon-resize-small'
      }))), li({
        className: 'resize-btn app-only',
        style: {
          position: 'absolute',
          top: '2px',
          left: '8em',
          padding: '3px',
          marginLeft: '30px'
        }
      }, a({
        style: {
          paddingLeft: '5px',
          paddingRight: '5px'
        },
        href: '#',
        onClick: function(){
          return adjustFontSize(1);
        }
      }, i({
        className: 'icon-resize-full'
      })))), ul({
        className: 'nav pull-right hidden-xs'
      }, li({}, a({
        href: 'about.html',
        title: '關於本站',
        onClick: function(){
          return pressAbout();
        }
      }, span({
        className: 'iconic-circle'
      }, i({
        className: 'icon-info'
      }))))), ul({
        className: 'nav pull-right hidden-xs'
      }, li({
        className: 'web-inline-only',
        style: {
          display: 'inline-block'
        }
      }, a({
        href: 'https://racklin.github.io/moedict-desktop/download.html',
        target: '_blank',
        title: '桌面版下載（可離線使用）',
        style: {
          color: '#ccc'
        }
      }, i({
        className: 'icon-download-alt'
      }))), li({
        className: 'web-inline-only',
        style: {
          display: 'inline-block'
        }
      }, a({
        href: 'https://play.google.com/store/apps/details?id=org.audreyt.dict.moe',
        target: '_blank',
        title: 'Google Play 下載',
        style: {
          color: '#ccc'
        }
      }, i({
        className: 'icon-android'
      }))), li({
        className: 'web-inline-only',
        style: {
          display: 'inline-block'
        }
      }, a({
        href: 'https://itunes.apple.com/tw/app/meng-dian/id599429224',
        target: '_blank',
        title: 'App Store 下載',
        style: {
          color: '#ccc'
        }
      }, i({
        className: 'icon-apple'
      })))));
    }
  });
  Taxonomy = createClass({
    render: function(){
      var lang;
      lang = this.props.lang;
      return li({
        className: 'dropdown-submenu'
      }, a({
        className: lang + " taxonomy"
      }, '…分類索引'));
    }
  });
  MenuItem = createClass({
    render: function(){
      var ref$, lang, href, children, role;
      ref$ = this.props, lang = ref$.lang, href = ref$.href, children = ref$.children;
      if (children[0] === '…') {
        role = 'menuitem';
      }
      return li({
        role: 'presentation'
      }, a({
        className: lang + " lang-option" + (role
          ? ''
          : " " + lang + "-idiom"),
        role: role,
        href: href
      }, children));
    }
  });
  DropDown = createClass({
    render: function(){
      var list;
      list = [];
      if (this.props.STANDALONE !== 'c') {
        list = list.concat([
          MenuItem({
            lang: 'a',
            href: '##'
          }, '國語辭典'), Taxonomy({
            lang: 'a'
          }), MenuItem({
            lang: 'a',
            href: '#@'
          }, '…部首表'), MenuItem({
            lang: 't',
            href: '#!'
          }, '臺灣閩南語'), Taxonomy({
            lang: 't'
          }), MenuItem({
            lang: 't',
            href: '#!=諺語'
          }, '…諺語'), MenuItem({
            lang: 'h',
            href: '#:'
          }, '臺灣客家語'), MenuItem({
            lang: 'h',
            href: '#:=諺語'
          }, '…諺語')
        ]);
      }
      list = list.concat([
        MenuItem({
          lang: 'c',
          href: '#~'
        }, '兩岸詞典'), Taxonomy({
          lang: 'c'
        }), MenuItem({
          lang: 'c',
          href: '#~@'
        }, '…部首表')
      ]);
      return ul.apply(null, [{
        className: 'dropdown-menu',
        role: 'navigation'
      }].concat(slice$.call(list)));
    }
  });
  Result = createClass({
    render: function(){
      var ref$;
      switch ((ref$ = this.props) != null && ref$.type) {
      case 'term':
        return Term(this.props);
      case 'list':
        return List(this.props);
      case 'radical':
        return RadicalTable(this.props);
      case 'spin':
        return divInline({
          id: 'loading',
          style: {
            marginTop: '19px',
            marginLeft: '1px'
          }
        }, h1({}, this.props.id));
      case 'html':
        return divInline({
          dangerouslySetInnerHTML: {
            __html: this.props.html
          }
        });
      default:
        return div({});
      }
    }
  });
  Term = createClass({
    render: function(){
      var ref$, LANG, H, ref1$, title, english, heteronyms, radical, translation, nrsCount, sCount, py, xrefs, aStroke, $char, list, res$, i$, len$, key, props;
      ref$ = this.props, LANG = ref$.LANG, H = (ref1$ = ref$.H) != null
        ? ref1$
        : HASHOF[LANG], title = ref$.title, english = ref$.english, heteronyms = ref$.heteronyms, radical = ref$.radical, translation = ref$.translation, nrsCount = ref$.non_radical_stroke_count, sCount = ref$.stroke_count, py = ref$.pinyin, xrefs = ref$.xrefs;
      CurrentId = this.props.id;
      aStroke = a({
        className: 'iconic-circle stroke icon-pencil',
        title: '筆順動畫',
        style: {
          color: 'white'
        }
      });
      $char = radical
        ? div({
          className: 'radical'
        }, RadicalGlyph({
          H: H,
          char: replace$.call(radical, /<\/?a[^>]*>/g, '')
        }), span({
          className: 'count'
        }, span({
          className: 'sym'
        }, '+'), nrsCount), span({
          className: 'count'
        }, " = " + sCount), nbsp, aStroke)
        : div({
          className: 'radical'
        }, aStroke);
      res$ = [];
      for (i$ = 0, len$ = heteronyms.length; i$ < len$; ++i$) {
        key = i$;
        props = heteronyms[i$];
        res$.push(Heteronym(import$({
          key: key,
          $char: $char,
          H: H,
          LANG: LANG,
          title: title,
          py: py,
          english: english,
          CurrentId: CurrentId
        }, props)));
      }
      list = res$;
      if (xrefs != null && xrefs.length) {
        list = list.concat(XRefs({
          LANG: LANG,
          xrefs: xrefs
        }));
      }
      if (translation) {
        list = list.concat(Translations({
          translation: translation
        }));
      }
      return divInline.apply(null, [{}].concat(slice$.call(list)));
    }
  });
  Translations = createClass({
    render: function(){
      var translation;
      translation = this.props.translation;
      return div({
        className: 'xrefs'
      }, span.apply(null, [{
        className: 'translation'
      }].concat((function(){
        var i$, ref$, results$ = [];
        for (i$ in ref$ = {
          English: '英',
          francais: '法',
          Deutsch: '德'
        }) {
          if (translation[i$]) {
            results$.push((fn$.call(this, i$, ref$[i$])));
          }
        }
        return results$;
        function fn$(key, val){
          var text, this$ = this;
          text = untag((join$.call(translation[key], ', ')).replace(/, CL:.*/g, '').replace(/\|(?:<\/?a[^>*]>|[^[,.(])+/g, ''));
          return div({
            key: key,
            className: 'xref-line'
          }, span({
            className: 'fw_lang'
          }, val), span({
            className: 'fw_def',
            onClick: function(){
              return this$.onClick(val, text);
            }
          }, text));
        }
      }.call(this)))));
    },
    onClick: function(val, text){
      var syn, utt, u;
      try {
        syn = window.speechSynthesis;
        utt = window.SpeechSynthesisUtterance;
        u = new utt(replace$.call(text, /\([A-Z]\)/g, '').replace(/[^\u0000-\u00FF]/g, ''));
        u.lang = (function(){
          switch (val) {
          case '英':
            return 'en-US';
          case '法':
            return 'fr-FR';
          case '德':
            return 'de-DE';
          }
        }());
        u.volume = 1.0;
        u.rate = 1.0;
        return syn.speak(u);
      } catch (e$) {}
    }
  });
  HASHOF = {
    a: '#',
    t: "#'",
    h: '#:',
    c: '#~'
  };
  XREFLABELOF = {
    a: '華',
    t: '閩',
    h: '客',
    c: '陸',
    ca: '臺'
  };
  XRefs = createClass({
    render: function(){
      var ref$, LANG, xrefs, lang, words, H, word;
      ref$ = this.props, LANG = ref$.LANG, xrefs = ref$.xrefs;
      return div.apply(null, [{
        className: 'xrefs'
      }].concat((function(){
        var i$, ref$, len$, ref1$, results$ = [];
        for (i$ = 0, len$ = (ref$ = xrefs).length; i$ < len$; ++i$) {
          ref1$ = ref$[i$], lang = ref1$.lang, words = ref1$.words;
          H = HASHOF[lang];
          results$.push(div({
            key: lang,
            className: 'xref-line'
          }, span({
            className: 'xref part-of-speech'
          }, XREFLABELOF[LANG + "" + lang] || XREFLABELOF[lang]), nbsp, span.apply(null, [{
            className: 'xref',
            itemProp: 'citation'
          }].concat(slice$.call(intersperse('、', (fn$())))))));
        }
        return results$;
        function fn$(){
          var i$, ref$, len$, results$ = [];
          for (i$ = 0, len$ = (ref$ = words).length; i$ < len$; ++i$) {
            word = ref$[i$];
            word = replace$.call(word, /[`~]/g, '');
            results$.push(a({
              key: word,
              className: 'xref',
              href: H + "" + word
            }, word));
          }
          return results$;
        }
      }())));
    }
  });
  Star = createClass({
    getDefaultProps: function(){
      return {
        STARRED: (typeof window != 'undefined' && window !== null ? window.STARRED : void 8) || {}
      };
    },
    render: function(){
      var ref$, CurrentId, STARRED, LANG;
      ref$ = this.props, CurrentId = ref$.CurrentId, STARRED = ref$.STARRED, LANG = ref$.LANG;
      if (STARRED[LANG] == null) {
        return i({});
      }
      if (~STARRED[LANG].indexOf("\"" + CurrentId + "\"")) {
        return i({
          className: "star iconic-color icon-star",
          title: '已加入記錄簿'
        });
      }
      return i({
        className: "star iconic-color icon-star-empty",
        title: '加入字詞記錄簿'
      });
    }
  });
  Heteronym = createClass({
    render: function(){
      var ref$, CurrentId, key, $char, H, LANG, title, english, id, audio_id, ref1$, bopomofo, trs, py, pinyin, definitions, antonyms, synonyms, variants, specific_to, alt, re, pinyinList, t, variant, mp3, __html, titleRuby, youyin, bAlt, pAlt, cnSpecific, list, basename, defs;
      ref$ = this.props, CurrentId = ref$.CurrentId, key = ref$.key, $char = ref$.$char, H = ref$.H, LANG = ref$.LANG, title = ref$.title, english = ref$.english, id = ref$.id, audio_id = (ref1$ = ref$.audio_id) != null ? ref1$ : id, bopomofo = ref$.bopomofo, trs = (ref1$ = ref$.trs) != null ? ref1$ : '', py = ref$.py, pinyin = (ref1$ = ref$.pinyin) != null
        ? ref1$
        : py || trs || '', definitions = (ref1$ = ref$.definitions) != null
        ? ref1$
        : [], antonyms = ref$.antonyms, synonyms = ref$.synonyms, variants = ref$.variants, specific_to = ref$.specific_to, alt = ref$.alt;
      if (audio_id && LANG === 'h') {
        re = /(.)\u20DE(\S+)/g;
        pinyinList = [];
        while (t = re.exec(pinyin)) {
          variant = " 四海大平安".indexOf(t[1]);
          mp3 = http("h.moedict.tw/" + variant + "-" + audio_id + ".ogg");
          if (mp3 && !canPlayOgg()) {
            mp3 = mp3.replace(/ogg$/, 'mp3');
          }
          pinyinList = pinyinList.concat(span({
            className: 'audioBlock'
          }, div({
            className: 'icon-play playAudio part-of-speech'
          }, meta({
            itemProp: 'name',
            content: replace$.call(mp3, /^.*\//, '')
          }), meta({
            itemProp: 'contentURL',
            content: mp3
          }), t[1])));
          __html = t[2].replace(/¹/g, '<sup>1</sup>').replace(/²/g, '<sup>2</sup>').replace(/³/g, '<sup>3</sup>').replace(/⁴/g, '<sup>4</sup>').replace(/⁵/g, '<sup>5</sup>');
          pinyinList = pinyinList.concat(span({
            dangerouslySetInnerHTML: {
              __html: __html
            }
          }));
        }
      }
      if (!/</.test(title)) {
        title = "<div class='stroke' title='筆順動畫'>" + title + "</div>";
      }
      t = untag(h(title));
      if (LANG !== 'h') {
        ref$ = decorateRuby(this.props), titleRuby = ref$.ruby, youyin = ref$.youyin, bAlt = ref$.bAlt, pAlt = ref$.pAlt, cnSpecific = ref$.cnSpecific, bopomofo = ref$.bopomofo, pinyin = ref$.pinyin;
      }
      list = [titleRuby
        ? ruby({
          className: "rightangle",
          dangerouslySetInnerHTML: {
            __html: h(titleRuby)
          }
        })
        : span({
          dangerouslySetInnerHTML: {
            __html: title
          }
        })];
      if (youyin) {
        list = list.concat(small({
          className: 'youyin'
        }, youyin));
      }
      mp3 = '';
      if (audio_id && (canPlayOgg() || canPlayMp3())) {
        if (LANG === 't' && !(20000 < audio_id && audio_id < 50000)) {
          basename = replace$.call(100000 + Number(audio_id), /^1/, '');
          mp3 = http("t.moedict.tw/" + basename + ".ogg");
        } else if (LANG === 'a') {
          mp3 = http("a.moedict.tw/" + audio_id + ".ogg");
        }
        if (/opus$/.exec(mp3) && !canPlayOpus()) {
          mp3 = mp3.replace(/opus$/, 'ogg');
        }
        if (/(opus|ogg)$/.exec(mp3) && !canPlayOgg()) {
          mp3 = mp3.replace(/(opus|ogg)$/, 'mp3');
        }
      }
      if (mp3) {
        list = list.concat(i({
          itemScope: true,
          itemType: 'http://schema.org/AudioObject',
          className: 'icon-play playAudio'
        }, meta({
          itemProp: 'name',
          content: replace$.call(mp3, /^.*\//, '')
        }), meta({
          itemProp: 'contentURL',
          content: mp3
        })));
      }
      if (bAlt) {
        if (/-/.exec(typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem("pinyin_" + LANG) : void 8)) {
          list = list.concat(small({
            className: 'alternative'
          }, span({
            className: 'pinyin'
          }, pAlt), span({
            className: 'bopomofo',
            style: {
              margin: 0,
              padding: 0,
              marginTop: '4px'
            }
          }, bAlt), span({
            className: 'pinyin'
          }, convertPinyin(pAlt))));
        } else {
          list = list.concat(small({
            className: 'alternative'
          }, span({
            className: 'pinyin'
          }, convertPinyin(pAlt)), span({
            className: 'bopomofo'
          }, bAlt)));
        }
      }
      if (english) {
        list = list.concat(span({
          lang: 'en',
          className: 'english'
        }, english));
      }
      if (specific_to) {
        list = list.concat(span({
          className: 'specific_to',
          dangerouslySetInnerHTML: {
            __html: h(specific_to)
          }
        }));
      }
      return divInline({}, meta({
        itemProp: 'image',
        content: encodeURIComponent(t) + ".png"
      }), meta({
        itemProp: 'name',
        content: t
      }), (key != null ? key : 0) === 0 ? Star({
        CurrentId: CurrentId,
        LANG: LANG
      }) : void 8, a({
        style: {
          position: 'absolute',
          right: '41px',
          top: '160px',
          color: 'white',
          cursor: 'pointer',
          display: 'none'
        },
        id: 'historical-scripts',
        className: 'hidden-xs part-of-speech',
        title: "字體e筆書寫：張炳煌教授\n字體選用：郭晉銓博士",
        onClick: function(){
          var i$, ref$, len$, ch, results$ = [];
          $('#strokes iframe').remove();
          for (i$ = 0, len$ = (ref$ = CurrentId).length; i$ < len$; ++i$) {
            ch = ref$[i$];
            results$.push($('#strokes').append($('<iframe />', {
              src: "https://www.moedict.tw/clk/searchclk/srch_history/main/" + encodeURIComponent(ch),
              scrolling: 'no',
              css: {
                width: '1400px',
                clear: 'both',
                transform: 'scale(0.6)',
                marginLeft: '-290px',
                marginRight: '-290px',
                height: '250px',
                marginTop: '-50px',
                marginBottom: '-50px',
                border: '0'
              }
            })));
          }
          return results$;
        }
      }, '歷代書體'), $char, h1.apply(null, [{
        className: 'title',
        'data-title': t
      }].concat(slice$.call(list))), bopomofo || alt || pinyinList ? div({
        className: "bopomofo " + cnSpecific
      }, alt != null ? div({
        lang: 'zh-Hans',
        className: 'cn-specific'
      }, span({
        className: 'xref part-of-speech'
      }, '简'), span({
        className: 'xref'
      }, untag(alt))) : void 8, cnSpecific && pinyin && bopomofo ? small({
        className: 'alternative cn-specific'
      }, span({
        className: 'pinyin'
      }, convertPinyin(pinyin)), span({
        className: 'bopomofo'
      }, bopomofo)) : void 8, pinyinList ? span.apply(null, [{
        className: 'pinyin'
      }].concat(slice$.call(pinyinList))) : void 8) : void 8, div.apply(null, [{
        className: 'entry',
        itemProp: 'articleBody'
      }].concat((function(){
        var i$, ref$, len$, results$ = [];
        for (i$ = 0, len$ = (ref$ = groupBy('type', definitions.slice())).length; i$ < len$; ++i$) {
          key = i$;
          defs = ref$[i$];
          results$.push(DefinitionList({
            key: key,
            LANG: LANG,
            H: H,
            defs: defs,
            synonyms: synonyms,
            antonyms: antonyms,
            variants: variants
          }));
        }
        return results$;
      }()))));
    }
  });
  decorateRuby = function(arg$){
    var LANG, title, ref$, bopomofo, py, pinyin, trs, youyin, bAlt, pAlt, cnSpecific, b, cnSpecificBpmf, ruby, rCjkCi, p, convertedP, pUpper, isParallel, i$, len$, idx, yin, span, cns, tws;
    LANG = arg$.LANG, title = (ref$ = arg$.title) != null ? ref$ : '', bopomofo = arg$.bopomofo, py = arg$.py, pinyin = (ref$ = arg$.pinyin) != null ? ref$ : py, trs = arg$.trs;
    pinyin == null && (pinyin = trs != null ? trs : '');
    if (LANG !== 'c') {
      pinyin = replace$.call(pinyin, /<[^>]*>/g, '').replace(/（.*）/, '');
    }
    pinyin || (pinyin = '');
    bopomofo == null && (bopomofo = (ref$ = trs2bpmf(LANG, pinyin + "")) != null ? ref$ : '');
    if (LANG !== 'c') {
      bopomofo = replace$.call(bopomofo, /<[^>]*>/g, '');
    }
    bopomofo || (bopomofo = '');
    pinyin = pinyin.replace(/ɡ/g, 'g');
    pinyin = pinyin.replace(/ɑ/g, 'a');
    pinyin = pinyin.replace(/，/g, ', ');
    if (/^（[語|讀|又]音）/.exec(bopomofo)) {
      youyin = bopomofo.replace(/（([語|讀|又]音)）.*/, '$1');
    }
    bAlt = /[變|\/]/.exec(bopomofo)
      ? bopomofo.replace(/.*[\(變\)\u200B|\/](.*)/, '$1')
      : /.+（又音）.+/.exec(bopomofo) ? bopomofo.replace(/.+（又音）/, '') : '';
    bAlt = bAlt.replace(/ /g, '\u3000').replace(/([ˇˊˋ])\u3000/g, '$1 ');
    pAlt = /[變|\/]/.exec(pinyin)
      ? pinyin.replace(/.*[\(變\)\u200B|\/](.*)/, '$1')
      : /.+（又音）.+/.exec(bopomofo) ? function(){
        var _py, i$, to$, i;
        _py = pinyin.split(' ');
        for (i$ = 0, to$ = _py.length / 2 - 1; i$ <= to$; ++i$) {
          i = i$;
          _py.shift();
        }
        return _py.join(' ');
      }() : '';
    bopomofo = bopomofo.replace(/([^ ])(ㄦ)/g, '$1 $2').replace(/([ ]?[\u3000][ ]?)/g, ' ');
    bopomofo = bopomofo.replace(/([ˇˊˋ˪˫])[ ]?/g, '$1 ').replace(/([ㆴㆵㆶㆷ][̍͘]?)/g, '$1 ');
    cnSpecific = '';
    if (/陸/.exec(bopomofo)) {
      cnSpecific = 'cn-specific';
    }
    b = bopomofo.replace(/\s?[，、；。－—,\.;]\s?/g, ' ');
    b = b.replace(/（[語|讀|又]音）[\u200B]?/, '');
    b = b.replace(/\(變\)\u200B\/.*/, '');
    b = b.replace(/\/.*/, '');
    if (/<br>陸/.exec(b)) {
      cnSpecificBpmf = replace$.call(b, /.*<br>陸./, '');
    }
    b = b.replace(/<br>(.*)/, '');
    b = replace$.call(b, /.\u20DF/g, '');
    if (rCjkOne.test(title)) {
      ruby = '<div class="stroke" title="筆順動畫"><rb>' + title + '</rb></div>';
    } else {
      rCjkCi = new RegExp("(<a href=\"#[':~]?(" + cjk + "+)\")>\\2</a>", 'g');
      ruby = title.replace(rCjkCi, function(mat, openTag, ci, x, offset){
        var closeTag;
        openTag = "<rb>" + openTag + " word-id=\"" + offset + "\">";
        closeTag = '</a></rb>';
        return ci = ci.replace(rCjkG, openTag + "$1" + closeTag);
      }).replace(new RegExp("</rb>(" + cjk + "+)(<rb>)?", 'g'), function(mat, rareCjk, x, openTag){
        openTag = openTag || '';
        rareCjk = rareCjk.replace(rCjkG, '<rb>$1</rb>');
        return '</rb>' + rareCjk + openTag;
      });
    }
    p = pinyin;
    p = p.replace(/\(變\)\u200B.*/, '');
    p = p.replace(/\/.*/, '');
    p = p.replace(/<br>.*/, '');
    convertedP = convertPinyin(p);
    convertedP = convertedP.replace(/[,\.;，、；。－—]\s?/g, ' ');
    convertedP = convertedP.split(' ');
    p = p.replace(/[,\.;，、；。－—]\s?/g, ' ');
    p = p.split(' ');
    pUpper = [];
    if (typeof $ == 'function' && $('body').hasClass('lang-a')) {
      isParallel = /^HanYu-/.exec(typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_a') : void 8);
    }
    if (typeof $ == 'function' && $('body').hasClass('lang-t')) {
      isParallel = /^TL-/.exec(typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_t') : void 8);
    }
    for (i$ = 0, len$ = p.length; i$ < len$; ++i$) {
      idx = i$;
      yin = p[i$];
      if (yin) {
        yin = convertedP[idx];
        span = LANG === 't' && /[-\u2011]/g.exec(yin)
          ? ' rbspan="' + (yin.match(/[-\u2011]+/g).length + 1) + '"'
          : LANG !== 't' && /^[^eēéěè].*r\d?$/.exec(yin) && !/^(j|ch|sh)r$/.test(yin)
            ? (cnSpecificBpmf && (cns = split$.call(cnSpecificBpmf, /\s+/), tws = split$.call(b, /\s+/), tws[tws.length - 2] = cns[cns.length - 2], bAlt = b.replace(/ /g, '\u3000').replace(/\sㄦ$/, 'ㄦ'), b = join$.call(tws, ' ')), ' rbspan="2"')
            : LANG !== 't' && /[aāáǎàeēéěèiīíǐìoōóǒòuūúǔùüǖǘǚǜ]+/g.exec(yin) ? ' rbspan="' + yin.match(/[aāáǎàeēéěèiīíǐìoōóǒòuūúǔùüǖǘǚǜ]+/g).length + '"' : '';
        pUpper[idx] = isParallel ? "<rt" + span + ">" + p[idx] + "</rt>" : void 8;
        p[idx] = "<rt" + span + ">" + yin + "</rt>";
      }
    }
    ruby += '<rtc hidden class="zhuyin"><rt>' + b.replace(/[ ]+/g, '</rt><rt>') + '</rt></rtc>';
    ruby += '<rtc hidden class="romanization">';
    ruby += p.join('');
    ruby += '</rtc>';
    if (isParallel) {
      ruby += '<rtc hidden class="romanization">';
      ruby += pUpper.join('');
      ruby += '</rtc>';
    }
    if (LANG === 'c') {
      if (/<br>/.exec(bopomofo)) {
        pinyin = pinyin.replace(/.*<br>/, '').replace(/陸./, '').replace(/\s?([,\.;])\s?/g, '$1 ');
        bopomofo = bopomofo.replace(/.*<br>/, '').replace(/陸./, '').replace(/\s?([，。；])\s?/g, '$1');
        bopomofo = bopomofo.replace(/ /g, '\u3000').replace(/([ˇˊˋ])\u3000/g, '$1 ');
      } else {
        pinyin = '';
        bopomofo = '';
      }
    } else if (LANG === 'h') {
      bopomofo = '';
    }
    return {
      ruby: ruby,
      youyin: youyin,
      bAlt: bAlt,
      pAlt: pAlt,
      cnSpecific: cnSpecific,
      pinyin: pinyin,
      bopomofo: bopomofo
    };
  };
  DTTones = {
    "\u0300": "\u0332",
    "\u0301": "\u0300",
    "\u0302": "\u0306",
    "\u0304": "\u0304",
    "\u0305": "\u0305",
    "\u0306": "\u0301",
    "\u0307": "\u200B",
    "\u030d": "\u200B"
  };
  function convertPinyinT(yin, isBody){
    var system, yin2;
    isBody == null && (isBody = true);
    system = (typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_t') : void 8) || 'TL';
    if (system === 'TL') {
      return yin;
    }
    if (/DT$/.exec(system)) {
      yin2 = yin.replace(/-/g, '\u2011').replace(/ph(\w)/g, 'PH$1').replace(/b(\w)/g, 'bh$1').replace(/p(\w)/g, 'b$1').replace(/PH(\w)/g, 'p$1').replace(/tsh/g, 'c').replace(/ts/g, 'z').replace(/th(\w)/g, 'TH$1').replace(/t(\w)/g, 'd$1').replace(/TH(\w)/g, 't$1').replace(/kh(\w)/g, 'KH$1').replace(/g(\w)/g, 'gh$1').replace(/k(\w)/g, 'g$1').replace(/KH(\w)/g, 'k$1').replace(/j/g, 'r').replace(/Ph(\w)/g, 'pH$1').replace(/B(\w)/g, 'Bh$1').replace(/P(\w)/g, 'B$1').replace(/pH(\w)/g, 'P$1').replace(/Tsh/g, 'C').replace(/Ts/g, 'Z').replace(/Th(\w)/g, 'tH$1').replace(/T(\w)/g, 'D$1').replace(/tH(\w)/g, 'T$1').replace(/Kh(\w)/g, 'kH$1').replace(/G(\w)/g, 'Gh$1').replace(/K(\w)/g, 'G$1').replace(/kH(\w)/g, 'K$1').replace(/J/g, 'R').replace(/o([^.!?,\w\s\u2011]*)o/g, 'O$1O').replace(/o([^.!?,\w\s\u2011]*)(?![^\w\s\u2011]*[knm])/g, 'o$1r').replace(/O([^\w\s\u2011]*)O/g, 'o$1').replace(/O([^.!?,\w\s\u2011]*)o([^.!?,\w\s\u2011]*)r?/g, 'O$1$2').replace(/([\u0300-\u0302\u0304\u0307\u030d])/g, function(it){
        return DTTones[it];
      }).replace(/([aeiou])(r?[ptkh])/g, '$1\u0304$2').replace(/\u200B/g, '').replace(/[-\u2011][-\u2011]([aeiou])(?![\u0300\u0332\u0306\u0304])/g, '$1\u030A').replace(/[-\u2011][-\u2011](ā|a\u0304)/g, '\u2011\u2011a\u030A').replace(/[-\u2011][-\u2011](ō|o\u0304)/g, '\u2011\u2011o\u030A').replace(/[-\u2011][-\u2011](ī|i\u0304)/g, '\u2011\u2011i\u030A').replace(/[-\u2011][-\u2011](ē|e\u0304)/g, '\u2011\u2011e\u030A').replace(/[-\u2011][-\u2011](ū|u\u0304)/g, '\u2011\u2011u\u030A').replace(/nn($|[-\s])/g, 'ⁿ$1');
      if (isBody) {
        yin2 = yin2.replace(/((?:[^\.,!?]*(?:\w[^-\.,!?\w\s\u2011]*)[- \u2011])+)(\w)/g, function(_, $1, $2){
          var seg;
          return (function(){
            var i$, ref$, len$, results$ = [];
            for (i$ = 0, len$ = (ref$ = $1.split(/([- \u2011\.,!?])/)).length; i$ < len$; ++i$) {
              seg = ref$[i$];
              results$.push(toneSandhi(seg));
            }
            return results$;
          }()).join("") + $2;
        });
      } else {
        yin2 = yin2.replace(/((?:\S*(?:\w[^\w\s\u2011]*)\u2011)+)(\w)/g, function(_, $1, $2){
          var seg;
          return (function(){
            var i$, ref$, len$, results$ = [];
            for (i$ = 0, len$ = (ref$ = $1.split('\u2011')).length; i$ < len$; ++i$) {
              seg = ref$[i$];
              results$.push(toneSandhi(seg));
            }
            return results$;
          }()).join("\u2011") + $2;
        });
      }
      yin2 = yin2.replace(/\u0332(\w*[ \u2011]a(?:[ -\u2011]|\u0300](?![-\w\u2011])))/g, '\u0304$1');
      yin2 = yin2.replace(/\u0300(\w*[ \u2011]a(?:[ -\u2011]|\u0300](?![-\w\u2011])))/g, '$1');
      return yin2;
    }
    return yin.replace(/oo/g, 'o\u0358').replace(/ts/g, 'ch').replace(/u([^\w\s]*)a/g, 'o$1a').replace(/u([^\w\s]*)e/g, 'o$1e').replace(/i([^\w\s]*)k($|[-\s])/g, 'e$1k$2').replace(/i([^\w\s]*)ng/g, 'e$1ng').replace(/nn($|[-\s])/g, 'ⁿ$1').replace(/([ie])r/g, '$1\u0358').replace(/\u030B/g, "\u0306");
  }
  DTTonesSandhi = {
    "\u0300": "",
    "\u0332": "\u0300",
    "\u0306": "\u0304",
    "\u0304": "\u0332"
  };
  function toneSandhi(seg){
    if (!/\w/.test(seg)) {
      return seg;
    }
    if (/[aeiou]r?[hptk]/i.exec(seg)) {
      return seg.replace(/([aioue])/i, '$1\u0332');
    }
    if (!/[\u0300\u0332\u0306\u0304]/.test(seg)) {
      if (!/[aioue]/i.test(seg)) {
        return seg.replace(/([nm])/, '$1\u0304');
      }
      return seg.replace(/([aioue])/i, '$1\u0304');
    }
    if (/[aeiou]\u0304r?[ptk]/i.exec(seg)) {
      return seg.replace(/\u0304/, '');
    }
    if (/[aeiou]\u0304r?[h]/i.exec(seg)) {
      return seg.replace(/\u0304/, '\u0300');
    }
    return seg.replace(/([\u0300\u0332\u0306\u0304])/g, function(it){
      return DTTonesSandhi[it];
    });
  }
  function convertPinyin(yin, isBody){
    var system, y, tone, r, ref$;
    yin = yin.replace(/-/g, '\u2011');
    if (typeof $ == 'function' && $('body').hasClass('lang-t')) {
      return convertPinyinT(yin, isBody);
    }
    if (!(typeof $ == 'function' && $('body').hasClass('lang-a'))) {
      return yin;
    }
    system = typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_a') : void 8;
    if (!(system && PinYinMap[replace$.call(system, /^HanYu-/, '')])) {
      return yin;
    }
    if (/\s/.exec(yin)) {
      return (function(){
        var i$, ref$, len$, results$ = [];
        for (i$ = 0, len$ = (ref$ = yin.split(/\s+/)).length; i$ < len$; ++i$) {
          y = ref$[i$];
          results$.push(convertPinyin(y, isBody));
        }
        return results$;
      }()).join(' ');
    }
    tone = 5;
    if (/[āōēīūǖ]/.exec(yin)) {
      tone = 1;
    }
    if (/[áóéíúǘ]/.exec(yin)) {
      tone = 2;
    }
    if (/[ǎǒěǐǔǚ]/.exec(yin)) {
      tone = 3;
    }
    if (/[àòèìùǜ]/.exec(yin)) {
      tone = 4;
    }
    yin = yin.replace(/[āáǎà]/g, 'a').replace(/[ōóǒò]/g, 'o').replace(/[ēéěè]/g, 'e').replace(/[īíǐì]/g, 'i').replace(/[ūúǔù]/g, 'u').replace(/[üǖǘǚǜ]/g, 'v');
    r = '';
    if (/^[^eēéěè].*r/.exec(yin)) {
      r = 'r';
      yin = replace$.call(yin, /r$/, '');
    }
    yin = PinYinMap[replace$.call(system, /^HanYu-/, '')][yin] || yin;
    switch (ref$ = [yin], false) {
    case !/a/.test(ref$[0]):
      yin = yin.replace(/a/, "aāáǎàa"[tone]);
      break;
    case !/o/.test(ref$[0]):
      yin = yin.replace(/o/, "oōóǒòo"[tone]);
      break;
    case !/e/.test(ref$[0]):
      yin = yin.replace(/e/, "eēéěèe"[tone]);
      break;
    case !/ui/.test(ref$[0]):
      yin = yin.replace(/i/, "iīíǐìi"[tone]);
      break;
    case !/u/.test(ref$[0]):
      yin = yin.replace(/u/, "uūúǔùu"[tone]);
      break;
    case !/ü/.test(ref$[0]):
      yin = yin.replace(/ü/, "üǖǘǚǜü"[tone]);
      break;
    case !/i/.test(ref$[0]):
      yin = yin.replace(/i/, "iīíǐìi"[tone]);
    }
    return yin + "" + r;
  }
  DefinitionList = createClass({
    render: function(){
      var ref$, H, LANG, defs, list, key, t, d;
      ref$ = this.props, H = ref$.H, LANG = ref$.LANG, defs = ref$.defs;
      list = [];
      if ((ref$ = defs[0]) != null && ref$.type) {
        list = list.concat(intersperse(nbsp, (function(){
          var i$, ref$, len$, results$ = [];
          for (i$ = 0, len$ = (ref$ = defs[0].type.split(',')).length; i$ < len$; ++i$) {
            key = i$;
            t = ref$[i$];
            results$.push(span({
              key: key,
              className: 'part-of-speech'
            }, untag(t)));
          }
          return results$;
        }())));
      }
      list = list.concat(ol.apply(null, [{}].concat((function(){
        var i$, ref$, len$, results$ = [];
        for (i$ = 0, len$ = (ref$ = defs).length; i$ < len$; ++i$) {
          key = i$;
          d = ref$[i$];
          results$.push(Definition(import$({
            key: key,
            H: H,
            LANG: LANG,
            defs: defs
          }, d)));
        }
        return results$;
      }()))));
      list = list.concat(decorateNyms(this.props));
      return div.apply(null, [{
        className: 'entry-item'
      }].concat(slice$.call(list)));
    }
  });
  function decorateNyms(props){
    var list, key, ref$, val, __html;
    list = [];
    for (key in ref$ = {
      synonyms: '似',
      antonyms: '反',
      variants: '異'
    }) {
      val = ref$[key];
      if (props[key]) {
        list = list.concat(span.apply(null, [
          {
            key: key,
            className: key
          }, span({
            className: 'part-of-speech'
          }, val), nbsp
        ].concat(slice$.call(intersperse('、', (fn$()))))));
      }
    }
    return list;
    function fn$(){
      var i$, ref$, len$, results$ = [];
      for (i$ = 0, len$ = (ref$ = split$.call(props[key], ',')).length; i$ < len$; ++i$) {
        __html = ref$[i$];
        results$.push(span({
          dangerouslySetInnerHTML: {
            __html: __html
          }
        }));
      }
      return results$;
    }
  }
  Definition = createClass({
    render: function(it){
      var ref$, LANG, type, def, defs, antonyms, synonyms, $afterDef, isColonDef, defString, list, res$, i$, len$, key, style, wrapper;
      ref$ = this.props, LANG = ref$.LANG, type = ref$.type, def = ref$.def, defs = ref$.defs, antonyms = ref$.antonyms, synonyms = ref$.synonyms;
      if (/∥/.exec(def)) {
        $afterDef = div({
          style: {
            margin: "0 0 22px -44px"
          },
          dangerouslySetInnerHTML: {
            __html: h(replace$.call(def, /^[^∥]+/, ''))
          }
        });
        def = replace$.call(def, /∥.*/, '');
      }
      isColonDef = LANG === 'c' && /[:：]<\/span>$/.exec(def) && !any(function(it){
        return /^\s*\(\d+\)/.exec(it.def);
      }, defs);
      defString = h(expandDef(def)).replace(/([：。」])([\u278A-\u2793\u24eb-\u24f4])/g, '$1\uFFFC$2');
      res$ = [];
      for (i$ = 0, len$ = (ref$ = defString.split('\uFFFC')).length; i$ < len$; ++i$) {
        key = i$;
        it = ref$[i$];
        res$.push(span({
          key: key,
          className: 'def',
          dangerouslySetInnerHTML: {
            __html: h(it)
          }
        }));
      }
      list = res$;
      for (i$ = 0, len$ = (ref$ = ['example', 'quote', 'link']).length; i$ < len$; ++i$) {
        if (this.props[ref$[i$]]) {
          (fn$.call(this, ref$[i$]));
        }
      }
      list = list.concat(decorateNyms(this.props));
      if ($afterDef) {
        list = list.concat($afterDef);
      }
      style = isColonDef
        ? {
          marginLeft: '-28px'
        }
        : {};
      wrapper = /^\s*\(\d+\)/.exec(def) || isColonDef
        ? function(it){
          return it;
        }
        : function(it){
          return li({}, it);
        };
      return wrapper(p.apply(null, [{
        className: 'definition',
        style: style
      }].concat(slice$.call(list))));
      function fn$(key){
        var idx, it;
        list = list.concat((function(){
          var i$, ref$, len$, ref1$, ref2$, results$ = [];
          for (i$ = 0, len$ = (ref$ = this.props[key]).length; i$ < len$; ++i$) {
            idx = i$;
            it = ref$[i$];
            results$.push(span((ref1$ = {}, ref1$[ref2$ = key + "." + idx] = ref2$, ref1$.className = key, ref1$.dangerouslySetInnerHTML = {
              __html: h(it)
            }, ref1$)));
          }
          return results$;
        }.call(this)));
      }
    }
  });
  CJKRADICALS = '⼀一⼁丨⼂丶⼃丿⼄乙⼅亅⼆二⼇亠⼈人⼉儿⼊入⼋八⼌冂⼍冖⼎冫⼏几⼐凵⼑刀⼒力⼓勹⼔匕⼕匚⼖匸⼗十⼘卜⼙卩⼚厂⼛厶⼜又⼝口⼞囗⼟土⼠士⼡夂⼢夊⼣夕⼤大⼥女⼦子⼧宀⼨寸⼩小⼪尢⼫尸⼬屮⼭山⼮巛⼯工⼰己⼱巾⼲干⼳幺⼴广⼵廴⼶廾⼷弋⼸弓⼹彐⼺彡⼻彳⼼心⼽戈⼾戶⼿手⽀支⽁攴⽂文⽃斗⽄斤⽅方⽆无⽇日⽈曰⽉月⽊木⽋欠⽌止⽍歹⽎殳⽏毋⽐比⽑毛⽒氏⽓气⽔水⽕火⽖爪⽗父⽘爻⽙爿⺦丬⽚片⽛牙⽜牛⽝犬⽞玄⽟玉⽠瓜⽡瓦⽢甘⽣生⽤用⽥田⽦疋⽧疒⽨癶⽩白⽪皮⽫皿⽬目⽭矛⽮矢⽯石⽰示⽱禸⽲禾⽳穴⽴立⽵竹⽶米⽷糸⺰纟⽸缶⽹网⽺羊⽻羽⽼老⽽而⽾耒⽿耳⾀聿⾁肉⾂臣⾃自⾄至⾅臼⾆舌⾇舛⾈舟⾉艮⾊色⾋艸⾌虍⾍虫⾎血⾏行⾐衣⾑襾⾒見⻅见⾓角⾔言⻈讠⾕谷⾖豆⾗豕⾘豸⾙貝⻉贝⾚赤⾛走⾜足⾝身⾞車⻋车⾟辛⾠辰⾡辵⻌辶⾢邑⾣酉⾤釆⾥里⾦金⻐钅⾧長⻓长⾨門⻔门⾩阜⾪隶⾫隹⾬雨⾭靑⾮非⾯面⾰革⾱韋⻙韦⾲韭⾳音⾴頁⻚页⾵風⻛风⾶飛⻜飞⾷食⻠饣⾸首⾹香⾺馬⻢马⾻骨⾼高⾽髟⾾鬥⾿鬯⿀鬲⿁鬼⿂魚⻥鱼⻦鸟⿃鳥⿄鹵⻧卤⿅鹿⿆麥⻨麦⿇麻⿈黃⻩黄⿉黍⿊黑⿋黹⿌黽⻪黾⿍鼎⿎鼓⿏鼠⿐鼻⿑齊⻬齐⿒齒⻮齿⿓龍⻰龙⿔龜⻳龟⿕龠';
  RadicalGlyph = createClass({
    render: function(){
      var ref$, char, H, idx;
      ref$ = this.props, char = ref$.char, H = ref$.H;
      idx = CJKRADICALS.indexOf(char);
      if (!(idx % 2)) {
        char = CJKRADICALS[idx + 1];
      }
      return span({
        className: 'glyph'
      }, a({
        title: '部首檢索',
        className: 'xref',
        href: H + "@" + char,
        style: {
          color: 'white'
        }
      }, " " + char));
    }
  });
  RadicalTable = createClass({
    render: function(){
      var ref$, terms, id, H, title, rows, list, i$, len$, strokes, chars, chs, j$, len1$, ch;
      ref$ = this.props, terms = ref$.terms, id = ref$.id, H = ref$.H;
      id = replace$.call(id, /^[@=]/, '');
      if (/\S/.exec(id)) {
        title = h1Name({}, id + " ", a({
          className: 'xref',
          href: '#',
          title: '部首表'
        }, '部'));
      } else {
        H += '@';
        title = h1Name({}, '部首表');
      }
      if (typeof $ != 'undefined' && $ !== null) {
        rows = $.parseJSON(terms);
      } else {
        rows = JSON.parse(terms);
      }
      list = [];
      for (i$ = 0, len$ = rows.length; i$ < len$; ++i$) {
        strokes = i$;
        chars = rows[i$];
        if (chars != null && chars.length) {
          chs = [];
          for (j$ = 0, len1$ = chars.length; j$ < len1$; ++j$) {
            ch = chars[j$];
            chs = chs.concat(a({
              key: ch,
              className: 'stroke-char',
              href: H + "" + ch
            }, ch));
            chs = chs.concat(' ');
          }
          list = list.concat(span({
            className: 'stroke-count'
          }, strokes));
          list = list.concat(span({
            className: 'stroke-list'
          }, chs));
          list = list.concat(hr({
            style: {
              margin: 0,
              padding: 0,
              height: 0
            }
          }));
        }
      }
      return divInline({}, title, div.apply(null, [{
        className: 'list'
      }].concat(slice$.call(list))));
    }
  });
  List = createClass({
    render: function(it){
      var ref$, terms, id, H, LRU, list, btn, re, t;
      ref$ = this.props, terms = ref$.terms, id = ref$.id, H = ref$.H, LRU = ref$.LRU;
      if (!terms) {
        return div({});
      }
      id = replace$.call(id, /^[@=]/, '');
      terms = replace$.call(terms, /^[^"]*/, '');
      list = [h1Name({}, id)];
      if (id === '字詞紀錄簿' && !terms) {
        btn = i({
          className: 'icon-star-empty'
        });
        list = list.concat(p({
          className: 'bg-info'
        }, "（請按詞條右方的 ", btn, " 按鈕，即可將字詞加到這裡。）"));
      }
      function strToList(str){
        var re, t, it, results$ = [];
        re = /"([^"]+)"[^"]*/g;
        while (t = re.exec(str)) {
          it = t[1];
          results$.push(span({
            style: {
              clear: 'both',
              display: 'block'
            }
          }, '\u00B7', a({
            href: H + "" + it
          }, it)));
        }
        return results$;
      }
      if (/^";/.exec(terms)) {
        re = /";([^;"]+);([^;"]+)"[^"]*/g;
        list = list.concat(table.apply(null, [
          {}, tr.apply(null, [{}].concat((function(){
            var i$, ref$, len$, results$ = [];
            for (i$ = 0, len$ = (ref$ = ['臺', '陸']).length; i$ < len$; ++i$) {
              it = ref$[i$];
              results$.push(th({
                width: 200
              }, span({
                className: 'part-of-speech'
              }, it)));
            }
            return results$;
          }())))
        ].concat((function(){
          var results$ = [];
          while (t = re.exec(terms)) {
            results$.push(tr.apply(null, [{
              style: {
                borderTop: '1px solid #ccc'
              }
            }].concat((fn$()))));
          }
          return results$;
          function fn$(){
            var i$, ref$, len$, results$ = [];
            for (i$ = 0, len$ = (ref$ = [t[1], t[2]]).length; i$ < len$; ++i$) {
              it = ref$[i$];
              results$.push(td({}, a({
                href: H + "" + it
              }, it)));
            }
            return results$;
          }
        }()))));
      } else {
        list = list.concat(strToList(terms));
      }
      if (id === '字詞紀錄簿' && LRU) {
        re = /"([^"]+)"[^"]*/g;
        list = list.concat((br({}), h3({
          id: 'lru'
        }, '最近查閱過的字詞', input({
          id: 'btn-clear-lru',
          type: 'button',
          className: 'btn-default btn btn-tiny',
          value: '清除',
          style: {
            marginLeft: '10px'
          }
        }))));
        list = list.concat(strToList(LRU));
      }
      return divInline.apply(null, [{}].concat(slice$.call(list)));
    }
  });
  httpMap = {
    a: '203146b5091e8f0aafda-15d41c68795720c6e932125f5ace0c70.ssl.cf1.rackcdn.com',
    h: 'a7ff62cf9d5b13408e72-351edcddf20c69da65316dd74d25951e.ssl.cf1.rackcdn.com',
    t: '1763c5ee9859e0316ed6-db85b55a6a3fbe33f09b9245992383bd.ssl.cf1.rackcdn.com',
    'stroke-json': '829091573dd46381a321-9e8a43b8d3436eaf4353af683c892840.ssl.cf1.rackcdn.com',
    stroke: '/626a26a628fa127d6a25-47cac8eba79cfb787dbcc3e49a1a65f1.ssl.cf1.rackcdn.com'
  };
  if (isMoedictDesktop) {
    import$(httpMap, window.moedictDesktop.voices);
  }
  http = function(it){
    return "http" + (!isMoedictDesktop || !(it.match(/^([^.]+)\.[^\/]+/)[1] in window.moedictDesktop.voices) ? "s" : "") + "://" + it.replace(/^([^.]+)\.[^\/]+/, function(xs, x){
      return httpMap[x] || xs;
    });
  };
  canPlayMp3 = function(){
    return !isMoedictDesktop;
  };
  canPlayOgg = function(){
    return isMoedictDesktop;
  };
  canPlayOpus = function(){
    return false;
  };
  function h(it){
    var id, res;
    id = CurrentId;
    if (/\uFFF9/.exec(it)) {
      it += '</span></span></span></span>';
    }
    res = it.replace(/[\uFF0E\u2022]/g, '\u00B7').replace(/\u223C/g, '\uFF0D').replace(/\u0358/g, '\u030d').replace(/(.)\u20DD/g, "<span class='regional part-of-speech'>$1</span> ").replace(/(.)\u20DE/g, "</span><span class='part-of-speech'>$1</span><span>").replace(/(.)\u20DF/g, "<span class='specific'>$1</span>").replace(/(.)\u20E3/g, "<span class='variant'>$1</span>").replace(RegExp('<a[^<]+>' + id + '<\\/a>', 'g'), id + "").replace(/<a>([^<]+)<\/a>/g, "<a href=\"" + h + "$1\">$1</a>").replace(RegExp('(>[^<]*)' + id + '(?!</(?:h1|rb)>)', 'g'), "$1<b>" + id + "</b>").replace(/\uFFF9/g, "<span class=\"ruby" + ((typeof $ == 'function' && $('body').hasClass('lang-t')) && (typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_t') : void 8) === "TL-DT" ? " parallel" : "") + "\"><span class=\"rb\"><span class=\"ruby\"><span class=\"rb\">").replace(/\uFFFA/g, '</span><br><span class="rt trs pinyin">').replace(/\uFFFB$/, '').replace(/\uFFFB/g, '</span></span></span></span><br><span class="rt mandarin">').replace(/<span class="rt mandarin">\s*<\//g, '</').replace(/(<span class="rt trs pinyin")>\s*([^<]+)/g, function(_, pre, trs){
      return "" + pre + " title=\"" + trs2bpmf('t', trs) + "\">" + ((typeof $ == 'function' && $('body').hasClass('lang-t')) && (typeof localStorage != 'undefined' && localStorage !== null ? localStorage.getItem('pinyin_t') : void 8) === "TL-DT" ? "<span class='upper'>" + trs.replace(/-/g, "\u2011") + "</span>" : "") + convertPinyinT(trs, true);
    });
    return res;
  }
  untag = (function(it){
    return replace$.call(it, /<[^>]*>/g, '');
  });
  groupBy = function(prop, xs){
    var x, pre, y;
    if (xs.length <= 1) {
      return [xs];
    }
    x = xs.shift();
    x[prop] == null && (x[prop] = '');
    pre = [x];
    while (xs.length) {
      y = xs[0];
      y[prop] == null && (y[prop] = '');
      if (x[prop] !== y[prop]) {
        break;
      }
      pre.push(xs.shift());
    }
    if (!xs.length) {
      return [pre];
    }
    return [pre].concat(slice$.call(groupBy(prop, xs)));
  };
  function expandDef(def){
    return def.replace(/^\s*<(\d)>\s*([介代副助動名歎嘆形連]?)/, function(_, num, char){
      return String.fromCharCode(0x327F + parseInt(num)) + "" + (char ? char + "\u20DE" : '');
    }).replace(/<(\d)>/g, function(_, num){
      return String.fromCharCode(0x327F + parseInt(num));
    }).replace(/\{(\d)\}/g, function(_, num){
      return String.fromCharCode(0x2775 + parseInt(num));
    }).replace(/[（(](\d)[)）]/g, function(_, num){
      return String.fromCharCode(0x2789 + parseInt(num)) + ' ';
    }).replace(/\(/g, '（').replace(/\)/g, '）');
  }
  function intersperse(elm, xs){
    var list, i$, len$, x;
    list = [];
    for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
      x = xs[i$];
      if (list.length) {
        list.push(elm);
      }
      list.push(x);
    }
    return list;
  }
  Consonants = {
    p: 'ㄅ',
    b: 'ㆠ',
    ph: 'ㄆ',
    m: 'ㄇ',
    t: 'ㄉ',
    th: 'ㄊ',
    n: 'ㄋ',
    l: 'ㄌ',
    k: 'ㄍ',
    g: 'ㆣ',
    kh: 'ㄎ',
    ng: 'ㄫ',
    h: 'ㄏ',
    tsi: 'ㄐ',
    ji: 'ㆢ',
    tshi: 'ㄑ',
    si: 'ㄒ',
    ts: 'ㄗ',
    j: 'ㆡ',
    tsh: 'ㄘ',
    s: 'ㄙ'
  };
  Vowels = {
    a: 'ㄚ',
    an: 'ㄢ',
    ang: 'ㄤ',
    ann: 'ㆩ',
    oo: 'ㆦ',
    onn: 'ㆧ',
    o: 'ㄜ',
    e: 'ㆤ',
    enn: 'ㆥ',
    ai: 'ㄞ',
    ainn: 'ㆮ',
    au: 'ㄠ',
    aunn: 'ㆯ',
    am: 'ㆰ',
    om: 'ㆱ',
    m: 'ㆬ',
    ong: 'ㆲ',
    ng: 'ㆭ',
    i: 'ㄧ',
    inn: 'ㆪ',
    u: 'ㄨ',
    unn: 'ㆫ',
    ing: 'ㄧㄥ',
    'in': 'ㄧㄣ',
    un: 'ㄨㄣ'
  };
  Tones = {
    p: 'ㆴ',
    t: 'ㆵ',
    k: 'ㆶ',
    h: 'ㆷ',
    p$: "ㆴ\u0358",
    t$: "ㆵ\u0358",
    k$: "ㆶ\u0358",
    h$: "ㆷ\u0358",
    "\u0300": '˪',
    "\u0301": 'ˋ',
    "\u0302": 'ˊ',
    "\u0304": '˫',
    "\u030d": '$'
  };
  re = function(it){
    var k;
    return (function(){
      var results$ = [];
      for (k in it) {
        results$.push(k);
      }
      return results$;
    }()).sort(function(x, y){
      return y.length - x.length;
    }).join('|');
  };
  C = re(Consonants);
  V = re(Vowels);
  function trs2bpmf(LANG, trs){
    if (LANG === 'h') {
      return ' ';
    }
    if (LANG === 'a') {
      return trs;
    }
    return trs.replace(/[A-Za-z\u0300-\u030d]+/g, function(it){
      var tone;
      tone = '';
      it = it.toLowerCase();
      it = it.replace(/([\u0300-\u0302\u0304\u030d])/, function(it){
        tone = Tones[it];
        return '';
      });
      it = it.replace(/^(tsh?|[sj])i/, '$1ii');
      it = it.replace(/ok$/, 'ook');
      it = it.replace(RegExp('^(' + C + ')((?:' + V + ')+[ptkh]?)$'), function(){
        return Consonants[arguments[1]] + arguments[2];
      });
      it = it.replace(/[ptkh]$/, function(it){
        tone = Tones[it + tone];
        return '';
      });
      it = it.replace(RegExp('(' + V + ')', 'g'), function(it){
        return Vowels[it];
      });
      return it + (tone || '\uFFFD');
    }).replace(/[- ]/g, '').replace(/\uFFFD/g, ' ').replace(/\. ?/g, '。').replace(/\? ?/g, '？').replace(/\! ?/g, '！').replace(/\, ?/g, '，');
  }
  keyMap = {
    h: '"heteronyms"',
    b: '"bopomofo"',
    p: '"pinyin"',
    d: '"definitions"',
    c: '"stroke_count"',
    n: '"non_radical_stroke_count"',
    f: '"def"',
    t: '"title"',
    r: '"radical"',
    e: '"example"',
    l: '"link"',
    s: '"synonyms"',
    a: '"antonyms"',
    q: '"quote"',
    _: '"id"',
    '=': '"audio_id"',
    E: '"english"',
    T: '"trs"',
    A: '"alt"',
    V: '"vernacular"',
    C: '"combined"',
    D: '"dialects"',
    S: '"specific_to"'
  };
  decodeLangPart = function(LANGORH, part){
    var H;
    part == null && (part = '');
    while (/"`辨~\u20DE&nbsp`似~\u20DE"[^}]*},{"f":"([^（]+)[^"]*"/.exec(part)) {
      part = part.replace(/"`辨~\u20DE&nbsp`似~\u20DE"[^}]*},{"f":"([^（]+)[^"]*"/, '"辨\u20DE 似\u20DE $1"');
    }
    part = part.replace(/"`(.)~\u20DE"[^}]*},{"f":"([^（]+)[^"]*"/g, '"$1\u20DE $2"');
    part = part.replace(/"([hbpdcnftrelsaqETAVCDS_=])":/g, function(arg$, k){
      return keyMap[k] + ':';
    });
    H = HASHOF[LANGORH] || LANGORH;
    part = part.replace(/([「【『（《])`([^~]+)~([。，、；：？！─…．·－」』》〉]+)/g, function(arg$, pre, word, post){
      return "<span class='punct'>" + pre + "<a href=\\\"" + H + word + "\\\">" + word + "</a>" + post + "</span>";
    });
    part = part.replace(/([「【『（《])`([^~]+)~/g, function(arg$, pre, word){
      return "<span class='punct'>" + pre + "<a href=\\\"" + H + word + "\\\">" + word + "</a></span>";
    });
    part = part.replace(/`([^~]+)~([。，、；：？！─…．·－」』》〉]+)/g, function(arg$, word, post){
      return "<span class='punct'><a href=\\\"" + H + word + "\\\">" + word + "</a>" + post + "</span>";
    });
    part = part.replace(/`([^~]+)~/g, function(arg$, word){
      return "<a href=\\\"" + H + word + "\\\">" + word + "</a>";
    });
    part = part.replace(/([)）])/g, "$1\u200B");
    return part;
  };
  if (typeof module != 'undefined' && module !== null) {
    module.exports = {
      Result: Result,
      DropDown: DropDown,
      Nav: Nav,
      Links: Links,
      decodeLangPart: decodeLangPart
    };
  } else {
    (React.View || (React.View = {})).Result = Result;
    React.View.Nav = Nav;
    React.View.Links = Links;
    React.View.DropDown = DropDown;
    React.View.UserPref = UserPref;
    React.View.decodeLangPart = decodeLangPart;
    if (!window.PRERENDER_LANG) {
      $(function(){
        return React.View.result = React.render(Result(), $('#result')[0]);
      });
    }
  }
  PinYinMap = {
    "WadeGiles": {
      "zha": "cha",
      "cha": "ch'a",
      "zhai": "chai",
      "chai": "ch'ai",
      "zhan": "chan",
      "chan": "ch'an",
      "zhang": "chang",
      "chang": "ch'ang",
      "zhao": "chao",
      "chao": "ch'ao",
      "zhe": "che",
      "che": "ch'e",
      "zhei": "chei",
      "zhen": "chen",
      "chen": "ch'en",
      "zheng": "cheng",
      "cheng": "ch'eng",
      "ji": "chi",
      "qi": "ch'i",
      "jia": "chia",
      "qia": "ch'ia",
      "jiang": "chiang",
      "qiang": "ch'iang",
      "jiao": "chiao",
      "qiao": "ch'iao",
      "jie": "chieh",
      "qie": "ch'ieh",
      "jian": "chien",
      "qian": "ch'ien",
      "zhi": "chih",
      "chi": "ch'ih",
      "jin": "chin",
      "qin": "ch'in",
      "jing": "ching",
      "qing": "ch'ing",
      "jiu": "chiu",
      "qiu": "ch'iu",
      "jiong": "chiung",
      "qiong": "ch'iung",
      "zhuo": "cho",
      "chuo": "ch'o",
      "zhou": "chou",
      "chou": "ch'ou",
      "zhu": "chu",
      "chu": "ch'u",
      "zhua": "chua",
      "chua": "ch'ua",
      "zhuai": "chuai",
      "chuai": "ch'uai",
      "zhuan": "chuan",
      "chuan": "ch'uan",
      "zhuang": "chuang",
      "chuang": "ch'uang",
      "zhui": "chui",
      "chui": "ch'ui",
      "zhun": "chun",
      "chun": "ch'un",
      "zhong": "chung",
      "chong": "ch'ung",
      "ju": "chü",
      "qu": "ch'ü",
      "juan": "chüan",
      "quan": "ch'üan",
      "jue": "chüeh",
      "que": "ch'üeh",
      "jun": "chün",
      "qun": "ch'ün",
      "er": "erh",
      "he": "ho",
      "xi": "hsi",
      "xia": "hsia",
      "xiang": "hsiang",
      "xiao": "hsiao",
      "xie": "hsieh",
      "xian": "hsien",
      "xin": "hsin",
      "xing": "hsing",
      "xiu": "hsiu",
      "xiong": "hsiung",
      "xu": "hsü",
      "xuan": "hsüan",
      "xue": "hsüeh",
      "xun": "hsün",
      "hong": "hung",
      "ran": "jan",
      "rang": "jang",
      "rao": "jao",
      "re": "je",
      "ren": "jen",
      "reng": "jeng",
      "ri": "jih",
      "ruo": "jo",
      "rou": "jou",
      "ru": "ju",
      "ruan": "juan",
      "rui": "jui",
      "run": "jun",
      "rong": "jung",
      "ga": "ka",
      "ka": "k'a",
      "gai": "kai",
      "kai": "k'ai",
      "gan": "kan",
      "kan": "k'an",
      "gang": "kang",
      "kang": "k'ang",
      "gao": "kao",
      "kao": "k'ao",
      "gei": "kei",
      "gen": "ken",
      "ken": "k'en",
      "geng": "keng",
      "keng": "k'eng",
      "ge": "ko",
      "ke": "k'o",
      "gou": "kou",
      "kou": "k'ou",
      "gu": "ku",
      "ku": "k'u",
      "gua": "kua",
      "kua": "k'ua",
      "guai": "kuai",
      "kuai": "k'uai",
      "guan": "kuan",
      "kuan": "k'uan",
      "guang": "kuang",
      "kuang": "k'uang",
      "gui": "kuei",
      "kui": "k'uei",
      "gun": "kun",
      "kun": "k'un",
      "gong": "kung",
      "kong": "k'ung",
      "guo": "kuo",
      "kuo": "k'uo",
      "lie": "lieh",
      "lian": "lien",
      "luo": "lo",
      "long": "lung",
      "lv": "lü",
      "lve": "lüeh",
      "lvn": "lün",
      "mie": "mieh",
      "mian": "mien",
      "nie": "nieh",
      "nian": "nien",
      "nuo": "no",
      "nong": "nung",
      "nv": "nü",
      "nve": "nüeh",
      "ba": "pa",
      "pa": "p'a",
      "bai": "pai",
      "pai": "p'ai",
      "ban": "pan",
      "pan": "p'an",
      "bang": "pang",
      "pang": "p'ang",
      "bao": "pao",
      "pao": "p'ao",
      "bei": "pei",
      "pei": "p'ei",
      "ben": "pen",
      "pen": "p'en",
      "beng": "peng",
      "peng": "p'eng",
      "bi": "pi",
      "pi": "p'i",
      "biao": "piao",
      "piao": "p'iao",
      "bie": "pieh",
      "pie": "p'ieh",
      "bian": "pien",
      "pian": "p'ien",
      "bin": "pin",
      "pin": "p'in",
      "bing": "ping",
      "ping": "p'ing",
      "bo": "po",
      "po": "p'o",
      "pou": "p'ou",
      "bu": "pu",
      "pu": "p'u",
      "shi": "shih",
      "shong": "shung",
      "suo": "so",
      "si": "ssu",
      "song": "sung",
      "da": "ta",
      "ta": "t'a",
      "dai": "tai",
      "tai": "t'ai",
      "dan": "tan",
      "tan": "t'an",
      "dang": "tang",
      "tang": "t'ang",
      "dao": "tao",
      "tao": "t'ao",
      "de": "te",
      "te": "t'e",
      "dei": "tei",
      "den": "ten",
      "deng": "teng",
      "teng": "t'eng",
      "di": "ti",
      "ti": "t'i",
      "diang": "tiang",
      "diao": "tiao",
      "tiao": "t'iao",
      "die": "tieh",
      "tie": "t'ieh",
      "dian": "tien",
      "tian": "t'ien",
      "ding": "ting",
      "ting": "t'ing",
      "diu": "tiu",
      "duo": "to",
      "tuo": "t'o",
      "dou": "tou",
      "tou": "t'ou",
      "za": "tsa",
      "ca": "ts'a",
      "zai": "tsai",
      "cai": "ts'ai",
      "zan": "tsan",
      "can": "ts'an",
      "zang": "tsang",
      "cang": "ts'ang",
      "zao": "tsao",
      "cao": "ts'ao",
      "ze": "tse",
      "ce": "ts'e",
      "zei": "tsei",
      "zen": "tsen",
      "cen": "ts'en",
      "zeng": "tseng",
      "ceng": "ts'eng",
      "zuo": "tso",
      "cuo": "ts'o",
      "zou": "tsou",
      "cou": "ts'ou",
      "zu": "tsu",
      "cu": "ts'u",
      "zuan": "tsuan",
      "cuan": "ts'uan",
      "zui": "tsui",
      "cui": "ts'ui",
      "zun": "tsun",
      "cun": "ts'un",
      "zong": "tsung",
      "cong": "ts'ung",
      "du": "tu",
      "tu": "t'u",
      "duan": "tuan",
      "tuan": "t'uan",
      "dui": "tui",
      "tui": "t'ui",
      "dun": "tun",
      "tun": "t'un",
      "dong": "tung",
      "tong": "t'ung",
      "zi": "tzu",
      "ci": "tz'u",
      "yan": "yen",
      "ye": "yeh",
      "you": "yu",
      "yong": "yung",
      "yu": "yü",
      "yuan": "yüan",
      "yue": "yüeh",
      "yun": "yün"
    },
    "GuoYin": {
      "gui": "guei",
      "zhao": "jau",
      "zuo": "tzuo",
      "niao": "niau",
      "zan": "tzan",
      "zou": "tzou",
      "rong": "rung",
      "tao": "tau",
      "ci": "tsz",
      "zong": "tzung",
      "cuo": "tsuo",
      "ao": "au",
      "qiang": "chiang",
      "miao": "miau",
      "xuan": "shiuan",
      "lv": "liu",
      "chun": "chuen",
      "sun": "suen",
      "shi": "shr",
      "kao": "kau",
      "can": "tsan",
      "diao": "diau",
      "zu": "tzu",
      "qun": "chiun",
      "ca": "tsa",
      "xing": "shing",
      "zun": "tzuen",
      "xian": "shian",
      "diu": "diou",
      "shun": "shuen",
      "kun": "kuen",
      "yao": "yau",
      "kui": "kuei",
      "jiong": "jiung",
      "dui": "duei",
      "hao": "hau",
      "zen": "tzen",
      "xun": "shiun",
      "diang": "-",
      "hui": "huei",
      "cong": "tsung",
      "xie": "shie",
      "ju": "jiu",
      "cou": "tsou",
      "ceng": "tseng",
      "jue": "jiue",
      "zui": "tzuei",
      "nve": "niue",
      "zhuai": "juai",
      "zhuang": "juang",
      "cui": "tsuei",
      "ce": "tse",
      "yong": "yung",
      "xi": "shi",
      "cun": "tsuen",
      "chao": "chau",
      "zhui": "juei",
      "xiu": "shiou",
      "xiao": "shiau",
      "xin": "shin",
      "dong": "dung",
      "qie": "chie",
      "sui": "suei",
      "zhun": "juen",
      "zhai": "jai",
      "xu": "shiu",
      "si": "sz",
      "qu": "chiu",
      "zhen": "jen",
      "shao": "shau",
      "chi": "chr",
      "cang": "tsang",
      "qiu": "chiou",
      "gao": "gau",
      "xiang": "shiang",
      "za": "tza",
      "zang": "tzang",
      "cu": "tsu",
      "hong": "hung",
      "zha": "ja",
      "kong": "kung",
      "bao": "bau",
      "zhua": "jua",
      "nv": "niu",
      "cen": "tsen",
      "dun": "duen",
      "nong": "nung",
      "liu": "liou",
      "zao": "tzau",
      "piao": "piau",
      "xia": "shia",
      "tun": "tuen",
      "rao": "rau",
      "jiao": "jiau",
      "zhang": "jang",
      "cuan": "tsuan",
      "zhuo": "juo",
      "qiao": "chiau",
      "nun": "nuen",
      "niu": "niou",
      "qing": "ching",
      "jiu": "jiou",
      "zhu": "ju",
      "sao": "sau",
      "qi": "chi",
      "zhan": "jan",
      "zheng": "jeng",
      "liao": "liau",
      "juan": "jiuan",
      "zhe": "je",
      "cai": "tsai",
      "tong": "tung",
      "zhuan": "juan",
      "zi": "tz",
      "qia": "chia",
      "lao": "lau",
      "gun": "guen",
      "zhou": "jou",
      "tiao": "tiau",
      "tui": "tuei",
      "gong": "gung",
      "zei": "tzei",
      "rui": "ruei",
      "lve": "liue",
      "ze": "tze",
      "xue": "shiue",
      "chong": "chung",
      "zeng": "tzeng",
      "cao": "tsau",
      "xiong": "shiung",
      "hun": "huen",
      "zai": "tzai",
      "que": "chiue",
      "biao": "biau",
      "zhong": "jung",
      "nao": "nau",
      "zuan": "tzuan",
      "song": "sung",
      "qiong": "chiung",
      "run": "ruen",
      "long": "lung",
      "chui": "chuei",
      "zhi": "jr",
      "pao": "pau",
      "lun": "luen",
      "qian": "chian",
      "dao": "dau",
      "quan": "chiuan",
      "shui": "shuei",
      "miu": "miou",
      "lvan": "liuan",
      "ri": "r",
      "jun": "jiun",
      "mao": "mau",
      "zhei": "jei",
      "qin": "chin"
    },
    "TongYong": {
      "shi": "shih",
      "xuan": "syuan",
      "lv": "lyu",
      "liu": "liou",
      "xia": "sia",
      "zhua": "jhua",
      "qiang": "ciang",
      "nv": "nyu",
      "zha": "jha",
      "ci": "cih",
      "xiang": "siang",
      "qiu": "ciou",
      "chi": "chih",
      "zhao": "jhao",
      "si": "sih",
      "qu": "cyu",
      "gui": "guei",
      "zhen": "jhen",
      "zhou": "jhou",
      "hui": "huei",
      "qia": "cia",
      "feng": "fong",
      "zi": "zih",
      "xun": "syun",
      "dui": "duei",
      "zhuan": "jhuan",
      "jiong": "jyong",
      "kui": "kuei",
      "juan": "jyuan",
      "zhe": "jhe",
      "zhu": "jhu",
      "qi": "ci",
      "zheng": "jheng",
      "zhan": "jhan",
      "diu": "diou",
      "jiu": "jiou",
      "qing": "cing",
      "niu": "niou",
      "xian": "sian",
      "xing": "sing",
      "qiao": "ciao",
      "zhuo": "jhuo",
      "zhang": "jhang",
      "qun": "cyun",
      "que": "cyue",
      "wen": "wun",
      "xiong": "syong",
      "zhuang": "jhuang",
      "cui": "cuei",
      "zhuai": "jhuai",
      "xue": "syue",
      "nve": "nyue",
      "zui": "zuei",
      "lve": "lyue",
      "jue": "jyue",
      "rui": "ruei",
      "xie": "sie",
      "tui": "tuei",
      "ju": "jyu",
      "qin": "cin",
      "zhai": "jhai",
      "zhei": "jhei",
      "xu": "syu",
      "weng": "wong",
      "jun": "jyun",
      "zhun": "jhun",
      "lvan": "lyuan",
      "ri": "rih",
      "sui": "suei",
      "qie": "cie",
      "shui": "shuei",
      "miu": "miou",
      "xin": "sin",
      "quan": "cyuan",
      "qian": "cian",
      "xiu": "siou",
      "xiao": "siao",
      "zhi": "jhih",
      "zhui": "jhuei",
      "chui": "chuei",
      "qiong": "cyong",
      "zhong": "jhong",
      "xi": "si"
    }
  };
  function compose$() {
    var functions = arguments;
    return function() {
      var i, result;
      result = functions[0].apply(this, arguments);
      for (i = 1; i < functions.length; ++i) {
        result = functions[i](result);
      }
      return result;
    };
  }
  function import$(obj, src){
    var own = {}.hasOwnProperty;
    for (var key in src) if (own.call(src, key)) obj[key] = src[key];
    return obj;
  }
}).call(this);
