//>>built
define("dojox/drawing/plugins/drawing/GreekPalette","dojo dijit/popup ../../library/greek dijit/focus dijit/_Widget dijit/_TemplatedMixin dijit/_PaletteMixin dojo/i18n!dojox/editor/plugins/nls/latinEntities".split(" "),function(b,h,l,n,p,q,r,t){var u=b.declare(null,{constructor:function(a){this._alias=a},getValue:function(){return this._alias},fillCell:function(a){a.innerHTML="\x26"+this._alias+";"}});return b.declare("dojox.drawing.plugins.drawing.GreekPalette",[p,q,r],{postMixInProperties:function(){var a=
0,c;for(c in l)a++;a=Math.floor(Math.sqrt(a));var f=0,g=[],d=[];for(c in l)f++,d.push(c),0===f%a&&(g.push(d),d=[]);0<d.length&&g.push(d);this._palette=g},show:function(a){b.mixin(a,{popup:this});h.open(a)},onChange:function(a){var c=this._textBlock;h.hide(this);c.insertText(this._pushChangeTo,a);c._dropMode=!1},onCancel:function(a){h.hide(this);this._textBlock._dropMode=!1},templateString:'\x3cdiv class\x3d"dojoxEntityPalette"\x3e\n\t\x3ctable\x3e\n\t\t\x3ctbody\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3ctable class\x3d"dijitPaletteTable"\x3e\n\t\t\t\t\t\t\x3ctbody dojoAttachPoint\x3d"gridNode"\x3e\x3c/tbody\x3e\n\t\t\t\t   \x3c/table\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3ctable dojoAttachPoint\x3d"previewPane" class\x3d"dojoxEntityPalettePreviewTable"\x3e\n\t\t\t\t\t\t\x3ctbody\x3e\n\t\t\t\t\t\t\t\x3ctr\x3e\n\t\t\t\t\t\t\t\t\x3ctd class\x3d"dojoxEntityPalettePreviewDetailEntity"\x3eType: \x3cspan class\x3d"dojoxEntityPalettePreviewDetail" dojoAttachPoint\x3d"previewNode"\x3e\x3c/span\x3e\x3c/td\x3e\n\t\t\t\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\t\t\x3c/tbody\x3e\n\t\t\t\t\t\x3c/table\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\x3c/tbody\x3e\n\t\x3c/table\x3e\n\x3c/div\x3e',
baseClass:"dojoxEntityPalette",showPreview:!0,dyeClass:u,paletteClass:"editorLatinEntityPalette",cellClass:"dojoxEntityPaletteCell",buildRendering:function(){this.inherited(arguments);this._preparePalette(this._palette,t);var a=b.query(".dojoxEntityPaletteCell",this.gridNode);b.forEach(a,function(c){this.connect(c,"onmouseenter","_onCellMouseEnter")},this)},_onCellMouseEnter:function(a){this.showPreview&&this._displayDetails(a.target)},_onCellClick:function(a){var c="click"==a.type?a.currentTarget:
this._currentFocus,f=this._getDye(c).getValue();this._setCurrent(c);setTimeout(b.hitch(this,function(){n(c);this._setValueAttr(f,!0)}));b.removeClass(c,"dijitPaletteCellHover");b.stopEvent(a)},postCreate:function(){this.inherited(arguments);this.showPreview||b.style(this.previewNode,"display","none");h.moveOffScreen(this)},_setCurrent:function(a){"_currentFocus"in this&&(b.attr(this._currentFocus,"tabIndex","-1"),b.removeClass(this._currentFocus,"dojoxEntityPaletteCellHover"));if(this._currentFocus=
a)b.attr(a,"tabIndex",this.tabIndex),b.addClass(this._currentFocus,"dojoxEntityPaletteCellHover");this.showPreview&&this._displayDetails(a)},_displayDetails:function(a){(a=this._getDye(a))?(a=a.getValue(),this.previewNode.innerHTML=a):(this.previewNode.innerHTML="",this.descNode.innerHTML="")},_preparePalette:function(a,c){this._cells=[];for(var f=this._blankGif,g="string"===typeof this.dyeClass?b.getObject(this.dyeClass):this.dyeClass,d=0;d<a.length;d++)for(var v=b.create("tr",{tabIndex:"-1"},this.gridNode),
k=0;k<a[d].length;k++){var e=a[d][k];if(e){var m=new g(e);e=b.create("td",{"class":this.cellClass,tabIndex:"-1",title:c[e]});m.fillCell(e,f);this.connect(e,"ondijitclick","_onCellClick");this._trackMouseState(e,this.cellClass);b.place(e,v);e.idx=this._cells.length;this._cells.push({node:e,dye:m})}}this._xDim=a[0].length;this._yDim=a.length},_navigateByArrow:function(a){a={38:-this._xDim,40:this._xDim,39:this.isLeftToRight()?1:-1,37:this.isLeftToRight()?-1:1}[a.keyCode];a=this._currentFocus.idx+a;
a<this._cells.length&&-1<a&&this._setCurrent(this._cells[a].node)}})});