diff --git a/include/ajax.draft.php b/include/ajax.draft.php index fa9d5c9b638f7ea81af2a8f78a94d1331591197c..90d9a39826de000dbd1503795fce8bda3181e43a 100644 --- a/include/ajax.draft.php +++ b/include/ajax.draft.php @@ -318,11 +318,23 @@ class DraftAjaxAPI extends AjaxController { if (!$thisstaff) Http::response(403, "Login required for file queries"); + if (isset($_GET['threadId']) && is_numeric($_GET['threadId']) + && ($thread = Thread::lookup($_GET['threadId'])) + && ($object = $thread->getObject()) + && ($thisstaff->canAccess($object)) + ) { + $union = ' UNION SELECT f.id, a.`type` FROM '.THREAD_TABLE.' t + JOIN '.THREAD_ENTRY_TABLE.' th ON (th.thread_id = t.id) + JOIN '.ATTACHMENT_TABLE.' a ON (a.object_id = th.id AND a.`type` = \'H\') + JOIN '.FILE_TABLE.' f ON (a.file_id = f.id) + WHERE t.id='.db_input($_GET['threadId']); + } + $sql = 'SELECT distinct f.id, COALESCE(a.type, f.ft) FROM '.FILE_TABLE .' f LEFT JOIN '.ATTACHMENT_TABLE.' a ON (a.file_id = f.id) - WHERE (a.`type` IN (\'C\', \'F\', \'T\', \'P\') OR f.ft = \'L\') - AND f.`type` LIKE \'image/%\''; - if (!($res = db_query($sql))) + WHERE (a.`type` IN (\'C\', \'F\', \'T\', \'P\') OR f.ft = \'L\')' + .' AND f.`type` LIKE \'image/%\''; + if (!($res = db_query($sql.$union))) Http::response(500, 'Unable to lookup files'); $files = array(); @@ -332,12 +344,15 @@ class DraftAjaxAPI extends AjaxController { 'T' => __('Email Templates'), 'L' => __('Logos'), 'P' => __('Pages'), + 'H' => __('This Thread'), ); while (list($id, $type) = db_fetch_row($res)) { $f = AttachmentFile::lookup($id); $url = $f->getDownloadUrl(); $files[] = array( - 'thumb'=>$url.'&s=128', + // Don't send special sizing for thread items 'cause they + // should be cached already by the client + 'thumb'=>$url.($type != 'H' ? '&s=128' : ''), 'image'=>$url, 'title'=>$f->getName(), 'folder'=>$folders[$type] diff --git a/include/class.staff.php b/include/class.staff.php index 94dcc68cec4e8b7565e682c33d07289f07a2d7a4..3201db170e8e1364d992e1d753ac2932dc1103eb 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -150,6 +150,13 @@ implements AuthenticatedUser { && $this->passwd_change>($cfg->getPasswdResetPeriod()*30*24*60*60)); } + function canAccess($something) { + if ($something instanceof RestrictedAccess) + return $something->checkStaffPerm($this); + + return true; + } + function isPasswdChangeDue() { return $this->isPasswdResetDue(); } @@ -835,4 +842,8 @@ implements AuthenticatedUser { return false; } } + +interface RestrictedAccess { + function checkStaffPerm($staff); +} ?> diff --git a/include/class.ticket.php b/include/class.ticket.php index 5348791c5cfe50a535a4d481a6df9e86a900210e..0b3c6574107193faf282fccb2fe34a0b32ab026b 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -216,7 +216,8 @@ class TicketCData extends VerySimpleModel { TicketCData::$meta['table'] = TABLE_PREFIX . 'ticket__cdata'; -class Ticket { +class Ticket +implements RestrictedAccess { var $id; var $number; diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 83d249fd32dc2a789756cb621de47f9b5ac5de4d..eb34d70a3e82222da418dc6c025081487bf4490c 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -390,7 +390,7 @@ $tcount+= $ticket->getNumNotes(); ?></a></li> </ul> <div id="ticket_tabs_container"> - <div id="ticket_thread" class="tab_content"> + <div id="ticket_thread" data-thread-id="<?php echo $ticket->getThread()->getId(); ?>" class="tab_content"> <?php $threadTypes=array('M'=>'message','R'=>'response', 'N'=>'note'); /* -------- Messages & Responses & Notes (if inline)-------------*/ diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index f0d8a95926bb7245b02de5a476e938b436ea4c43..04592b663f870babd470b334b80915711d2923f0 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -237,8 +237,8 @@ $(function() { 'minHeight': selectedSize, 'focus': false, 'plugins': el.hasClass('no-bar') - ? ['imagemanager','definedlinks'] - : ['signature','imagemanager','table','video','definedlinks'], + ? ['imagepaste','imagemanager','definedlinks'] + : ['signature','imagepaste','imagemanager','imageannotate','table','video','definedlinks'], 'imageUpload': 'tbd', 'imageManagerJson': 'ajax.php/draft/images/browse', 'syncBeforeCallback': captureImageSizes, @@ -277,6 +277,8 @@ $(function() { } if (el.hasClass('fullscreen')) options['plugins'].push('fullscreen'); + if ($('#ticket_thread[data-thread-id]').length) + options['imageManagerJson'] += '?threadId=' + $('#ticket_thread').data('threadId'); getConfig().then(function(c) { if (c.lang && c.lang.toLowerCase() != 'en_us' && $.Redactor.opts.langs[c.short_lang]) diff --git a/js/redactor-plugins.js b/js/redactor-plugins.js index 48e8f60d1c5e1463fb61921b397cf646f0730316..3631a32c8f80b763f8e3cf8f754b6391c48acbf3 100644 --- a/js/redactor-plugins.js +++ b/js/redactor-plugins.js @@ -837,3 +837,81 @@ RedactorPlugins.imagepaste = function() { } }; }; + +RedactorPlugins.imageannotate = function() { + return { + canvases: [], + init: function() { + var button = this.button.add('annotate', __('Annotate')), + dropdown = { + line: {title: __('Add Line'), func: this.imageannotate.addLine} + }; + this.button.setAwesome('annotate', 'icon-pencil'); + this.button.addDropdown(button, dropdown); + if (typeof window.fabric === 'undefined') + $.getScript('../js/fabric.min.js'); + }, + addLine: function() { + this.imageannotate.initCanvas(); + // @see http://jsfiddle.net/URWru/ + var isDown, line; + $(this.imageannotate.canvases) + .on('mouse:down', function(o){ + isDown = true; + var pointer = canvas.getPointer(o.e); + var points = [ pointer.x, pointer.y, pointer.x, pointer.y ]; + line = new fabric.Line(points, { + strokeWidth: 5, + fill: 'red', + stroke: 'red', + originX: 'center', + originY: 'center' + }); + this.add(line); + }) + .on('mouse:move', function(o){ + if (!isDown) return; + var pointer = this.getPointer(o.e); + line.set({ x2: pointer.x, y2: pointer.y }); + this.renderAll(); + }) + .on('mouse:up', function(o){ + isDown = false; + }); + }, + initCanvas: function() { + var self = this; + $('img', this.$editor).each(function(i, img) { + var $img = $(img), + box = self.imageannotate.wrapImage($img), + canvas = fabric.Canvas(box); + $img.data('canvas') = canvas; + }); + }, + wrapImage: function($image) { + var imageBox = $('<span id="redactor-image-box" data-redactor="verified">'); + imageBox.css('float', $image.css('float')).attr('contenteditable', false); + + if ($image[0].style.margin != 'auto') + { + imageBox.css({ + marginTop: $image[0].style.marginTop, + marginBottom: $image[0].style.marginBottom, + marginLeft: $image[0].style.marginLeft, + marginRight: $image[0].style.marginRight + }); + + $image.css('margin', ''); + } + else + { + imageBox.css({ 'display': 'block', 'margin': 'auto' }); + } + + $image.css('opacity', '.5').after(imageBox); + + imageBox.append($image); + return imageBox; + } + }; +}; diff --git a/js/redactor.min.js b/js/redactor.min.js index 2e800e0daec7c51352bb9a8c8ac809771302923f..dec48cf1451db171eea9b5c2c063671eb3b1dff8 100644 --- a/js/redactor.min.js +++ b/js/redactor.min.js @@ -8,5 +8,7 @@ License: http://imperavi.com/redactor/license/ Usage: $('#content').redactor(); -*/ -eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(B($){\'kg kf\';if(!dA.5k.9B){dA.5k.9B=B(dj){C fn=c;E B(){E fn.87(dj)}}}C 8J=0;C bh=/6n?:\\/\\/(?:[0-9A-Z-]+\\.)?(?:k5\\.be\\/|hH\\.9R\\S*[^\\w\\-\\s])([\\w\\-]{11})(?=[^\\w\\-]|$)(?![?=&+%\\w.\\-]*(?:[\'"][^<>]*>|<\\/a>))[?=&+%\\w.-]*/ig;C aU=/6n?:\\/\\/(9a\\.)?hI.9R\\/(\\d+)($|\\/)/;$.fn.G=B(3L){C 2w=[];C dq=7M.5k.jX.5X(h7,1);if(1C 3L===\'62\'){c.1z(B(){C 5V=$.1h(c,\'G\');C 1v;if(3L.3F(/\\./)!=\'-1\'){1v=3L.4E(\'.\');if(1C 5V[1v[0]]!=\'1H\'){1v=5V[1v[0]][1v[1]]}}L{1v=5V[3L]}if(1C 5V!==\'1H\'&&$.5n(1v)){C aG=1v.87(5V,dq);if(aG!==1H&&aG!==5V){2w.2W(aG)}}L{$.5r(\'jW jV ae "\'+3L+\'" 2v 3l\')}})}L{c.1z(B(){$.1h(c,\'G\',{});$.1h(c,\'G\',3l(c,3L))})}if(2w.1o===0)E c;L if(2w.1o===1)E 2w[0];L E 2w};B 3l(el,3L){E 1J 3l.5k.3r(el,3L)}$.3l=3l;$.3l.k0=\'10.0.5\';$.3l.9r=[\'3t\',\'3x\',\'N\',\'1Z\',\'2f\',\'1s\',\'1U\',\'1p\',\'1a\',\'1S\',\'1y\',\'1P\',\'2t\',\'J\',\'3e\',\'1V\',\'1O\',\'1u\',\'2m\',\'1E\',\'4r\',\'T\',\'2T\',\'V\',\'2n\',\'2p\',\'4V\',\'2Y\',\'5p\',\'K\',\'5A\',\'2s\',\'1x\',\'1r\',\'1j\',\'O\'];$.3l.F={1E:\'en\',cd:\'kA\',7t:M,2t:M,eB:M,2Y:M,63:1q,8y:M,av:M,9J:M,1L:M,6S:1q,2p:1q,dv:M,bi:1q,j8:1q,eJ:1q,eu:M,3x:M,b4:M,7K:60,aT:M,iW:1q,8k:\'7Y\',es:M,6H:50,gw:1q,gq:1q,gp:1q,8b:\'kE\',aN:1q,8s:M,hW:\'1P\',kD:M,f0:1q,8t:M,hS:\'1P\',eT:1q,8u:M,8A:1q,75:1q,6C:1q,6T:1q,5Z:4,9j:M,dC:1q,7p:M,1r:1q,gT:1q,6v:1d,6y:0,aj:M,gV:M,gS:M,3D:[\'q\',\'2K\',\'3W\',\'3X\',\'5I\',\'5z\',\'54\',\'6O\',\'3e\',\'J\',\'1P\',\'T\',\'3t\',\'9q\'],bQ:[],bR:[],2K:[\'p\',\'1N\',\'2D\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'],cq:M,2s:1q,4G:[\'q\',\'hf\',\'T\',\'2x\',\'5m\',\'3Z\',\'1n\',\'kt\'],4R:M,6k:M,56:[[\'81\',\'43\']],55:[[\'3p-6E:\\\\s?3W\',"5i"],[\'3p-1n:\\\\s?3X\',"em"],[\'1b-76:\\\\s?5c\',"u"],[\'1b-76:\\\\s?4r-fh\',\'43\']],5b:M,1W:M,58:M,6j:[\'1e\'],3N:[\'p\'],9N:[\'5I\',\'3X\',\'3W\',\'5c\',\'5z\',\'54\',\'kk\',\'kr\',\'jm\',\'8g\'],bl:{b:\'3W\',5i:\'3W\',i:\'3X\',em:\'3X\',43:\'5I\',81:\'5I\',2O:\'5z\',ol:\'54\',u:\'5c\'},5A:{\'3S+67+m, 5m+67+m\':{1v:\'1V.b7\'},\'3S+b, 5m+b\':{1v:\'1V.2Z\',5w:[\'3W\']},\'3S+i, 5m+i\':{1v:\'1V.2Z\',5w:[\'3X\']},\'3S+h, 5m+h\':{1v:\'1V.2Z\',5w:[\'fx\']},\'3S+l, 5m+l\':{1v:\'1V.2Z\',5w:[\'fw\']},\'3S+k, 5m+k\':{1v:\'T.2B\'},\'3S+67+7\':{1v:\'2T.2M\',5w:[\'54\']},\'3S+67+8\':{1v:\'2T.2M\',5w:[\'5z\']}},fz:M,1Z:[],7m:[],7G:\'<p>&#bU;</p>\',5M:\'&#bU;\',hU:[\'J/hL\',\'J/hK\',\'J/hG\'],9I:20,bL:[\'a\',\'1B\',\'b\',\'5i\',\'7a\',\'74\',\'i\',\'em\',\'u\',\'8l\',\'81\',\'43\',\'8r\',\'2O\',\'ol\',\'li\'],4C:[\'5i\',\'b\',\'u\',\'em\',\'i\',\'1a\',\'43\',\'jp\',\'9V\',\'a5\',\'74\',\'7a\',\'6s\',\'C\',\'8r\',\'8l\'],7J:[\'P\',\'eV\',\'eU\',\'eW\',\'eX\',\'eZ\',\'eY\',\'js\',\'jk\',\'ju\',\'8F\',\'7k\',\'8L\',\'jc\',\'eH\',\'je\',\'jf\',\'jM\',\'jK\',\'jS\',\'jw\'],8G:[\'ad\',\'8j\',\'8i\',\'4P\'],da:{en:{q:\'jB\',6t:\'6c fC\',J:\'6c fB\',4q:\'cC\',T:\'bb\',bq:\'6c T\',jC:\'fM T\',6h:\'jF\',2K:\'jE\',gY:\'jD 1b\',bO:\'lJ\',1a:\'fP\',gX:\'89 1\',gH:\'89 2\',gI:\'89 3\',gJ:\'89 4\',gK:\'89 5\',3W:\'lS\',3X:\'lI\',lA:\'lB du\',lG:\'m9 du\',5z:\'mg cY\',54:\'m6 cY\',6O:\'lY\',3e:\'kU\',iO:\'kQ\',1O:\'6c\',2R:\'lr\',gc:\'7o\',mh:\'6c cC\',lc:\'7U cA ld\',le:\'7U cA lf\',lb:\'7U cH d6\',la:\'7U cH fD\',l6:\'7o cH\',l7:\'7o cA\',l8:\'7o cC\',l9:\'lg\',lh:\'lp\',lq:\'7U d2\',ls:\'7o d2\',1F:\'lo\',ik:\'ln\',5f:\'lj\',21:\'d6\',4c:\'fD\',57:\'fN\',lk:\'fB lm bb\',1b:\'l5\',bW:\'l4\',kO:\'ip\',kP:\'fC kR fP or kM/kI bb\',1P:\'6c kJ\',1j:\'kK\',kL:\'kS\',fR:\'kT\',l0:\'l1 fR\',l3:\'hZ 1P i0\',gG:\'fK 1b fL ag 21\',gF:\'fN 1b\',gB:\'fK 1b fL ag 4c\',gA:\'kY 1b\',9q:\'6c kV kW\',5I:\'kX\',lu:\'lv\',bu:\'m1 T in 1J 5j\',5c:\'m2\',3t:\'m3\',6p:\'m4 (m0)\',7T:\'fM\'}}};3l.fn=$.3l.5k={3j:{7d:8,8C:46,db:40,5T:13,cz:32,cG:27,b8:9,d5:17,d1:91,dr:16,dp:18,lV:37,dc:91},3r:B(el,3L){c.$2F=$(el);c.8J=8J++;c.7h=M;c.$5C=M;c.fy(3L);c.fk();c.2K={};$.lW(c.F.8G,c.F.7J);c.hx=1J 1T(\'^(\'+c.F.8G.2H(\'|\')+\')$\',\'i\');c.1x.hq();c.1E.2G();$.70(c.F.5A,c.F.fz);c.1S.2o(\'2X\');c.2X=1q;c.2f.dO()},fy:B(3L){c.F=$.70({},$.70(1q,{},$.3l.F),c.$2F.1h(),3L)},bt:B(4F){E hD.m5(4F).g7(B(9f){E 1C 4F[9f]==\'B\'})},fk:B(){C 22=$.3l.9r.1o;2v(C i=0;i<22;i++){c.fl($.3l.9r[i])}},fl:B(5y){if(1C c[5y]==\'1H\')E;c[5y]=c[5y]();C 5s=c.bt(c[5y]);C 22=5s.1o;2v(C z=0;z<22;z++){c[5y][5s[z]]=c[5y][5s[z]].9B(c)}},3t:B(){E{21:B(){c.3t.1K(\'\')},4c:B(){c.3t.1K(\'4c\')},57:B(){c.3t.1K(\'57\')},8g:B(){c.3t.1K(\'8g\')},1K:B(1c){if(!c.O.26(\'2J\'))c.$U.2t();c.1Z.1K();c.K.2R();c.3t.1Q=c.K.3V();if(c.F.1L&&c.3t.1Q[0]===M){c.3t.fj(1c)}L{c.3t.fi(1c)}c.K.2S();c.1a.1R()},fj:B(1c){C 4j=c.K.5E(\'1i\');$(4j).Y(\'1h-7N\',\'G\');$(4j).1I(\'1b-4S\',1c)},fi:B(1c){$.1z(c.3t.1Q,$.X(B(i,el){C $el=c.O.9e(el);if(!$el)E;if(1c===\'\'&&1C($el.1h(\'7N\'))!==\'1H\'){$el.2y($el.q())}L{$el.1I(\'1b-4S\',1c);c.O.5J($el,\'1n\')}},c))}}},3x:B(){E{9b:B(){if(!c.F.3x)E;c.3x.q=M;c.3x.1f=(c.F.b4)?c.F.b4:c.$2E.Y(\'1f\');if(!c.F.aT){c.7K=me($.X(c.3x.2G,c),c.F.7K*mf)}},e1:B(){if(!c.F.aT)E;c.3x.2G()},2G:B(){C q=c.1a.14();if(c.3x.q===q)E;if(c.O.4t(q))E;$.mc({2c:c.F.3x,1c:\'mb\',1h:\'1f=\'+c.3x.1f+\'&\'+c.3x.1f+\'=\'+m7(m8(q)),bd:$.X(B(1h){c.3x.bd(1h,q)},c)})},bd:B(1h,q){C 2z;4s{2z=$.i2(1h)}4x(e){2z=1h}C fS=(1C 2z.5r==\'1H\')?\'3x\':\'ma\';c.1S.2o(fS,c.3x.1f,2z);c.3x.q=q},lU:B(){fW(c.7K)}}},N:B(){E{2K:B(1f){C 1c,1D;if(1C c.2K[1f].1h!=\'1H\')1c=\'1h\';L if(1C c.2K[1f].Y!=\'1H\')1c=\'Y\';L if(1C c.2K[1f].1G!=\'1H\')1c=\'1G\';if(1c)1D=c.2K[1f][1c];c.N.2Z(c.2K[1f].R,1c,1D)},2Z:B(R,1c,1D){if(R==\'bO\')R=\'1N\';C gh=[\'p\',\'2D\',\'1N\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'];if($.3B(R,gh)==-1)E;c.N.8f=(R==\'2D\'||R.3F(/h[1-6]/i)!=-1);if(!c.O.26(\'2J\'))c.$U.2t();c.N.1Q=c.K.3V();c.N.7j=c.N.1Q.1o;c.N.1c=1c;c.N.1D=1D;c.1Z.1K();c.K.2R();c.N.1K(R);c.K.2S();c.1a.1R()},1K:B(R){c.K.14();c.N.5P=c.12.g9.1l;if(c.12.4Z){c.N.fU(R)}L{c.N.fV(R)}},fU:B(R){C N=c.N.1Q[0];if(N===M)E;if(N.1l==\'4P\'){if(R!=\'1N\')E;c.N.ab();E}C 8M=(c.N.5P==\'7k\'||c.N.5P==\'aL\');if(8M&&!c.F.1L){1d.3O(\'a2\',M,\'<\'+R+\'>\');N=c.K.47();c.N.2M($(N))}L if(N.1l.2P()!=R){if(c.F.1L&&R==\'p\'){$(N).4N(\'<br>\').1w(\'<br>\');c.O.5N(N)}L{C $1Y=c.O.4v(N,R);c.N.2M($1Y);if(R!=\'p\'&&R!=\'1N\')$1Y.1k(\'1B\').1t();if(c.N.8f)c.O.4J($1Y);if(R==\'p\'||c.N.cv)$1Y.1k(\'p\').23().3Y();c.N.bB($1Y)}}L if(R==\'1N\'&&N.1l.2P()==R){if(c.F.1L){$(N).4N(\'<br>\').1w(\'<br>\');c.O.5N(N)}L{C $el=c.O.4v(N,\'p\');c.N.2M($el)}}L if(N.1l.2P()==R){c.N.2M($(N))}},fV:B(R){C N=c.N.1Q[0];C 8M=(c.N.5P==\'7k\'||c.N.5P==\'aL\');if(N!==M&&c.N.7j===1){if(N.1l.2P()==R&&R==\'1N\'){if(c.F.1L){$(N).4N(\'<br>\').1w(\'<br>\');c.O.5N(N)}L{C $el=c.O.4v(N,\'p\');c.N.2M($el)}}L if(N.1l==\'4P\'){if(R!=\'1N\')E;c.N.ab()}L if(c.N.5P==\'8L\'){c.N.e4(R)}L if(c.F.1L&&((8M)||(c.12.g9!=N))){c.N.a7(R)}L{if(c.F.1L&&R==\'p\'){$(N).4N(\'<br>\').1w(\'<br>\');c.O.5N(N)}L if(N.1l===\'7k\'){c.N.a7(R)}L{C $1Y=c.O.4v(N,R);c.N.2M($1Y);if(c.N.8f)c.O.4J($1Y);if(R==\'p\'||c.N.cv)$1Y.1k(\'p\').23().3Y()}}}L{if(c.F.1L||R!=\'p\'){if(R==\'1N\'){C ct=0;2v(C i=0;i<c.N.7j;i++){if(c.N.1Q[i].1l==\'8L\')ct++}if(ct==c.N.7j){$.1z(c.N.1Q,$.X(B(i,s){if(c.F.1L){$(s).4N(\'<br>\').1w(\'<br>\');c.O.5N(s)}L{c.O.4v(s,\'p\')}},c));E}}c.N.a7(R)}L{C 7W=0;C 5o=M;if(c.N.1c==\'1G\'){5o=\'2M\';7W=$(c.N.1Q).g7(\'.\'+c.N.1D).28();if(c.N.7j==7W)5o=\'2M\';L if(c.N.7j>7W)5o=\'1K\';L if(7W===0)5o=\'1K\'}C 7A=[\'2O\',\'ol\',\'li\',\'3K\',\'5U\',\'dl\',\'dt\',\'dd\'];$.1z(c.N.1Q,$.X(B(i,s){if($.3B(s.1l.2P(),7A)!=-1)E;C $1Y=c.O.4v(s,R);if(5o){if(5o==\'2M\')c.N.2M($1Y);L if(5o==\'1t\')c.N.1t($1Y);L if(5o==\'1K\')c.N.e5($1Y)}L c.N.2M($1Y);if(R!=\'p\'&&R!=\'1N\')$1Y.1k(\'1B\').1t();if(c.N.8f)c.O.4J($1Y);if(R==\'p\'||c.N.cv)$1Y.1k(\'p\').23().3Y()},c))}}},e5:B($el){if(c.N.1c==\'1G\'){$el.2q(c.N.1D);E}L if(c.N.1c==\'Y\'||c.N.1c==\'1h\'){$el.Y(c.N.1D.1f,c.N.1D.1D);E}},2M:B($el){if(c.N.1c==\'1G\'){$el.94(c.N.1D);E}L if(c.N.1c==\'Y\'||c.N.1c==\'1h\'){if($el.Y(c.N.1D.1f)==c.N.1D.1D){$el.1W(c.N.1D.1f)}L{$el.Y(c.N.1D.1f,c.N.1D.1D)}E}L{$el.1W(\'1n 1G\');E}},1t:B($el){$el.2I(c.N.1D)},ab:B(){C N=$(c.N.1Q[0]).2u(\'2O, ol\');$(N).1k(\'2O, ol\').23().3Y();$(N).1k(\'li\').1w($(\'<br>\')).23().3Y();C $el=c.O.4v(N,\'1N\');c.N.2M($el)},e4:B(R){1d.3O(\'6O\');1d.3O(\'a2\',M,R);c.1p.4d();c.$U.1k(\'p:ea\').1t();C 1Y=c.K.47();if(R!=\'p\'){$(1Y).1k(\'1B\').1t()}if(!c.F.1L){c.N.2M($(1Y))}c.$U.1k(\'2O, ol, 6q, 1N, p\').1z($.X(c.O.3N,c));if(c.F.1L&&R==\'p\'){c.O.5N(1Y)}},a7:B(R){if(c.N.5P==\'8j\'||c.N.5P==\'8i\'){if(R==\'1N\'){c.N.ab()}L{E}}C 1Y=c.K.5E(R);if(1Y===M)E;C $1Y=$(1Y);c.N.bB($1Y);C $bK=$1Y.1k(c.F.8G.2H(\',\')+\', 3K, 4q, cJ, cs, cT, 5U, 6q\');if((c.F.1L&&R==\'p\')||R==\'2D\'||R==\'1N\'){$bK.1w(\'<br />\')}$bK.23().3Y();if(R!=\'p\'&&R!=\'1N\')$1Y.1k(\'1B\').1t();$.1z(c.N.1Q,$.X(c.O.3N,c));$1Y.1w(c.K.6d(2));if(!c.F.1L){c.N.2M($1Y)}c.$U.1k(\'2O, ol, 6q, 1N, p\').1z($.X(c.O.3N,c));$1Y.1k(\'1N:ea\').1t();if(c.N.8f){c.O.4J($1Y)}if(c.F.1L&&R==\'p\'){c.O.5N($1Y)}},bB:B($1Y){if($1Y.2u(\'4q\').28()===0)E;if($1Y.2u(\'6q\').28()===0)$1Y.5E(\'<6q>\');if($1Y.2u(\'3K\').28()===0&&$1Y.2u(\'5U\').28()===0){$1Y.5E(\'<3K>\')}},g2:B(1f,1D){C 1Q=c.K.3V();$(1Q).1W(\'1h-\'+1f);c.1a.1R()},lO:B(1f,1D){C 1Q=c.K.3V();$(1Q).Y(\'1h-\'+1f,1D);c.1a.1R()},lN:B(1f,1D){C 1Q=c.K.3V();$.1z(1Q,B(){if($(c).Y(\'1h-\'+1f)){$(c).1W(\'1h-\'+1f)}L{$(c).Y(\'1h-\'+1f,1D)}})},1W:B(Y,1D){C 1Q=c.K.3V();$(1Q).1W(Y);c.1a.1R()},lK:B(Y,1D){C 1Q=c.K.3V();$(1Q).Y(Y,1D);c.1a.1R()},lL:B(Y,1D){C 1Q=c.K.3V();$.1z(1Q,B(){if($(c).Y(1f)){$(c).1W(1f)}L{$(c).Y(1f,1D)}})},2I:B(4u){C 1Q=c.K.3V();$(1Q).2I(4u);c.O.5J(1Q,\'1G\');c.1a.1R()},lM:B(4u){C 1Q=c.K.3V();$(1Q).2q(4u);c.1a.1R()},94:B(4u){C 1Q=c.K.3V();$(1Q).94(4u);c.1a.1R()}}},1Z:B(){E{1K:B(1c){if(1C 1c==\'1H\'||1c==\'9C\'){c.1Z.ee()}L{c.1Z.eb()}},ee:B(){c.K.2R();c.F.1Z.2W(c.$U.q());c.K.2S()},eb:B(){c.K.2R();c.F.7m.2W(c.$U.q());c.K.2S()},dM:B(){c.$U.q(c.F.1Z.ed())},dN:B(){c.$U.q(c.F.7m.ed())},ck:B(){c.F.1Z.2W(c.$U.q())},9C:B(){if(c.F.1Z.1o===0)E;c.1Z.1K(\'cB\');c.1Z.dM();c.K.2S();3q($.X(c.2n.2G,c),50)},cB:B(){if(c.F.7m.1o===0)E;c.1Z.1K(\'9C\');c.1Z.dN();c.K.2S();3q($.X(c.2n.2G,c),50)}}},2f:B(){E{dO:B(){c.2f.dL();c.2f.dG();c.2f.dJ();c.2f.dI();c.2f.ej()},8O:B(){E(c.$2F[0].1l===\'kF\')},dL:B(){c.$2r=$(\'<1i 1G="G-2r" />\')},dS:B(){c.$2E=$(\'<2E />\').Y(\'1f\',c.2f.dK())},dK:B(){C 1f=c.$2F.Y(\'id\');if(1C(1f)==\'1H\'){1f=\'c7-\'+c.8J}E 1f},dG:B(){C 1v=(c.2f.8O())?\'2w\':\'q\';c.c7=$.3d(c.$2F[1v]())},dI:B(){c.$U.Y({\'77\':1q,\'eQ\':c.F.cd})},dJ:B(){C 1v=(c.2f.8O())?\'dQ\':\'dW\';c.2f[1v]()},dQ:B(){c.$U=$(\'<1i />\');c.$2E=c.$2F;c.$2r.dT(c.$2F).1w(c.$U).1w(c.$2F);c.$U.2q(\'G-U\');c.$2F.3b()},dW:B(){c.$U=c.$2F;c.2f.dS();c.$2r.dT(c.$U).1w(c.$U).1w(c.$2E);c.$U.2q(\'G-U\');c.$2E.3b()},ej:B(){c.1a.1K(c.c7);c.2f.eP();c.2f.eO();if(!c.F.63){3q($.X(c.1a.bH,c),9D)}},eO:B(){c.2f.eA();c.2f.eS();c.2f.er();if(c.F.1r){c.F.1r=c.1r.3r();c.1r.2f()}c.V.ix();c.2f.7t();3q($.X(c.2n.2G,c),4);c.1S.2o(\'3r\')},eP:B(){$(c.$2E).Y(\'eQ\',c.F.cd);if(c.F.1L)c.$U.2q(\'G-1L\');if(c.F.8y)c.$U.Y(\'8y\',c.F.8y);if(c.F.av)c.$U.1I(\'av\',c.F.av);if(c.F.9J)c.$U.1I(\'9J\',c.F.9J)},eS:B(){c.$U.on(\'4A.G\',$.X(B(e){e=e.7l||e;if(3M.9i===1H||!e.9d)E 1q;C 1o=e.9d.5D.1o;if(1o===0){c.1a.1R();3q($.X(c.1p.4d,c),1);c.1S.2o(\'4A\',e);E 1q}L{e.2k();if(c.F.f0||c.F.eT){C 5D=e.9d.5D;c.1j.hX(5D[0],e)}}3q($.X(c.1p.4d,c),1);c.1S.2o(\'4A\',e)},c));c.$U.on(\'2e.G\',$.X(B(e){C 1c=\'2e\';if((c.1S.69()==\'2e\'||c.1S.69()==\'4D\')){1c=M}c.1S.7H(1c);c.O.8a();c.1S.2o(\'2e\',e)},c));c.$U.on(\'4V.G\',$.X(c.4V.3r,c));c.$U.on(\'1u.G\',$.X(c.1u.3r,c));c.$U.on(\'2m.G\',$.X(c.2m.3r,c));if($.5n(c.F.eI)){c.$2E.on(\'1u.G-2E\',$.X(c.F.eI,c))}if($.5n(c.F.ew)){c.$2E.on(\'2m.G-2E\',$.X(c.F.ew,c))}if($.5n(c.F.ep)){c.$U.on(\'2t.G\',$.X(c.F.ep,c))}C bS;$(1d).on(\'cD\',B(e){bS=$(e.1M)});c.$U.on(\'aD.G\',$.X(B(e){if(c.7h)E;C $el=$(bS);if(!$el.3i(\'G-1r, G-1y\')&&!$el.is(\'#G-V\')&&$el.hF(\'.G-1r, .G-1y, #G-V\').28()===0){c.O.8a();if($.5n(c.F.jL))c.1S.2o(\'aD\',e)}},c))},er:B(){c.3x.9b();c.2Y.9b();if(c.F.2t)3q($.X(c.2t.3h,c),7I);if(c.F.eB)3q($.X(c.2t.41,c),7I)},7t:B(){if(!c.F.7t)E;if(!ar)E;$.1z(c.F.7t,$.X(B(i,s){if(1C ar[s]===\'1H\')E;if($.3B(s,$.3l.9r)!==-1){$.5r(\'ji 1f "\'+s+\'" 4l ag 1f of ag 3l\\\'s 5y.\');E}if(!$.5n(ar[s]))E;c[s]=ar[s]();C 5s=c.bt(c[s]);C 22=5s.1o;2v(C z=0;z<22;z++){c[s][5s[z]]=c[s][5s[z]].9B(c)}if($.5n(c[s].3r))c[s].3r()},c))},eA:B(){if(!c.O.26(\'6P\'))E;4s{1d.3O(\'jt\',M,M);1d.3O(\'jq\',M,M)}4x(e){}}}},1s:B(){E{2f:B(2i,3k){C $1s=$(\'<a 29="#" 1G="3U-8x 3U-\'+2i+\'" 3G="\'+2i+\'" />\').Y(\'8y\',\'-1\');if(3k.1v||3k.4a||3k.1y){$1s.on(\'68 2e\',$.X(B(e){if($1s.3i(\'G-1s-8w\'))E M;C 1c=\'1v\';C 2l=3k.1v;if(3k.4a){1c=\'4a\';2l=3k.4a}L if(3k.1y){1c=\'1y\';2l=M}c.1s.9l(e,2i,1c,2l)},c))}if(3k.1y){C $1y=$(\'<1i 1G="G-1y G-1y-2r-\'+2i+\'" 1n="6f: 5f;">\');$1s.1h(\'1y\',$1y);c.1y.2f(2i,$1y,3k.1y)}if(c.O.c8()){c.1s.ez($1s,2i,3k.1F)}E $1s},ez:B($1s,1f,1F){C $31=$(\'<1e>\').2q(\'G-1r-31 G-1r-31-\'+1f).3b().q(1F);$31.cw(\'2x\');$1s.on(\'fY\',B(){if($(c).3i(\'G-1s-8w\'))E;C 2V=$1s.2Q();C 3f=$1s.5G();C 2h=$1s.a0();$31.2B();$31.1I({2C:(2V.2C+3f)+\'3m\',21:(2V.21+2h/2-$31.a0()/2)+\'3m\'})});$1s.on(\'g1\',B(){$31.3b()})},9l:B(e,2i,1c,2l){c.1s.jn=c.1U.a4();e.2k();if(c.O.26(\'2J\'))e.jo=M;if(1c==\'4a\'){c.1V.2Z(2l)}L if(1c==\'1y\'){c.1y.2B(e,2i)}L{C 1v;if($.5n(2l)){2l.5X(c,2i);c.2n.3D(e,2i)}L if(2l.3F(/\\./)!=\'-1\'){1v=2l.4E(\'.\');if(1C c[1v[0]]!=\'1H\'){c[1v[0]][1v[1]](2i);c.2n.3D(e,2i)}}L{c[2l](2i);c.2n.3D(e,2i)}}},14:B(1m){E c.$1r.1k(\'a.3U-\'+1m)},8d:B(1m){c.1s.14(1m).2q(\'G-7D\')},g5:B(1m){c.1s.14(1m).2I(\'G-7D\')},j4:B(1m){if(1C 1m==\'1H\'){c.$1r.1k(\'a.3U-8x\').2I(\'G-7D\')}L{c.$1r.1k(\'a.3U-8x\').6o(\'.3U-\'+1m).2I(\'G-7D\')}},g6:B(){c.$1r.1k(\'a.3U-8x\').6o(\'a.3U-q\').2I(\'G-1s-8w\')},e7:B(){c.$1r.1k(\'a.3U-8x\').6o(\'a.3U-q\').2q(\'G-1s-8w\')},jU:B(1m,9n){c.1s.14(1m).2q(\'3U-\'+9n)},kp:B(1m,9n){c.1s.14(1m).2I(\'3U-\'+9n)},ks:B(1m,1f){C $1s=c.1s.14(1m);$1s.2I(\'G-25-J\').2q(\'fa-G-25\');$1s.q(\'<i 1G="fa \'+1f+\'"></i>\')},bo:B($25,2l){C 1c=(2l==\'1y\')?\'1y\':\'1v\';C 1m=$25.Y(\'3G\');$25.on(\'68 2e\',$.X(B(e){if($25.3i(\'G-1s-8w\'))E M;c.1s.9l(e,1m,1c,2l)},c))},kn:B($25,1y){C 1m=$25.Y(\'3G\');c.1s.bo($25,\'1y\');C $1y=$(\'<1i 1G="G-1y G-1y-2r-\'+1m+\'" 1n="6f: 5f;">\');$25.1h(\'1y\',$1y);if(1y){c.1y.2f(1m,$1y,1y)}E $1y},ck:B(1m,1F){if(!c.F.1r)E;C 25=c.1s.2f(1m,{1F:1F});25.2q(\'G-25-J\');c.$1r.1w($(\'<li>\').1w(25));E 25},kj:B(1m,1F){if(!c.F.1r)E;C 25=c.1s.2f(1m,{1F:1F});c.$1r.4N($(\'<li>\').1w(25));E 25},kl:B(eC,1m,1F){if(!c.F.1r)E;C 25=c.1s.2f(1m,{1F:1F});C $25=c.1s.14(eC);if($25.28()!==0)$25.1g().3u($(\'<li>\').1w(25));L c.$1r.1w($(\'<li>\').1w(25));E 25},ku:B(eD,1m,1F){if(!c.F.1r)E;C 25=c.1s.2f(1m,{1F:1F});C $25=c.1s.14(eD);if($25.28()!==0)$25.1g().aI($(\'<li>\').1w(25));L c.$1r.1w($(\'<li>\').1w(25));E 25},1t:B(1m){c.1s.14(1m).1t()}}},1U:B(){E{3h:B(Q){if(!c.O.6m(Q)){C 2U=c.O.9X();$(Q).4N(2U);c.1U.41(2U)}L{c.1U.1K(Q,0,Q,0)}},41:B(Q){c.1U.1K(Q,1,Q,1)},1K:B(4n,eG,6F,eF){if(!c.O.26(\'2J\'))c.$U.2t();4n=4n[0]||4n;6F=6F[0]||6F;if(c.O.6V(4n.1l)&&4n.3w===\'\'){4n.3w=c.F.5M}if(4n.1l==\'6i\'&&c.F.1L===M){C c3=$(c.F.7G)[0];$(4n).2y(c3);4n=c3;6F=4n}c.K.14();4s{c.12.3h(4n,eG);c.12.41(6F,eF)}4x(e){}c.K.4M()},5q:B(Q){4s{C R=$(Q)[0].1l;if(R!=\'6i\'&&!c.O.6m(Q)){C 2U=c.O.9X();$(Q).3u(2U);c.1U.41(2U)}L{if(R!=\'6i\'&&c.O.26(\'2J\')){c.1U.3h($(Q).2b())}L{c.1U.bZ(Q,\'3u\')}}}4x(e){C 2U=c.O.9X();$(Q).3u(2U);c.1U.41(2U)}},bJ:B(Q){if(c.O.6m(Q)){c.1U.41($(Q).6e())}L{c.1U.bZ(Q,\'aI\')}},bZ:B(Q,1c){if(!c.O.26(\'2J\'))c.$U.2t();Q=Q[0]||Q;c.K.14();if(1c==\'3u\'){4s{c.12.fO(Q);c.12.kw(Q)}4x(e){}}L{4s{c.12.kx(Q);c.12.ky(Q)}4x(e){}}c.12.51(M);c.K.4M()},bF:B(Q){Q=Q[0]||Q;c.K.14();C 9Q=c.12.7B();9Q.ap(Q);9Q.41(c.12.eE,c.12.ey);E $.3d(9Q.4I()).1o},a4:B(){C 2Q=0;C 2N=3M.6a();if(2N.7R>0){C 12=3M.6a().6G(0);C 9L=12.7B();9L.ap(c.$U[0]);9L.41(12.eE,12.ey);2Q=9L.4I().1o}E 2Q},9o:B(2X,3I){if(1C 3I==\'1H\')3I=2X;if(!c.2t.g0())c.2t.3h();C 12=1d.aZ();C 2N=1d.6a();C Q,2Q=0;C ex=1d.k3(c.$U[0],k4.jZ,4f,4f);4O(Q=ex.jY()){2Q+=Q.9g.1o;if(2Q>2X){12.3h(Q,Q.9g.1o+2X-2Q);2X=k6}if(2Q>=3I){12.41(Q,Q.9g.1o+3I-2Q);6x}}2N.aB();2N.4M(12)},mi:B(2X,3I){c.1U.9o(2X,3I)},kd:B(){E c.1U.a4()}}},1p:B(){E{e3:B(q){q=c.1p.dZ(q);q=q.I(/<3Z(.*?[^>]?)>([\\w\\W]*?)<\\/3Z>/gi,\'<2D 1G="G-3Z-R" 1n="6f: 5f;" $1>$2</2D>\');q=q.I(/\\$/g,\'$\');q=q.I(/â€/g,\'"\');q=q.I(/‘/g,\'\\\'\');q=q.I(/’/g,\'\\\'\');if(c.F.6S)q=c.1p.6S(q);if(c.F.1L)q=c.1p.am(q);q=c.1p.bP(q);C $1i=$(\'<1i>\');$1i.q(q);C bT=$1i.1k(\'3p[1n]\');if(bT.1o!==0){bT.2y(B(){C $el=$(c);C $1e=$(\'<1e>\').Y(\'1n\',$el.Y(\'1n\'));E $1e.1w($el.23())});q=$1i.q()}$1i.1t();q=q.I(/<3p(.*?[^<])>/gi,\'\');q=q.I(/<\\/3p>/gi,\'\');q=c.1x.2G(q);if(c.F.2p)q=c.2p.2G(q);q=c.1p.6B(q);q=c.1p.bN(q);E q},b5:B(q){q=q.I(/[\\8o-\\aE\\aq]/g,\'\');q=q.I(/&#bU;/gi,\'\');q=q.I(/&53;/gi,\' \');if(q.3F(/^<p>(||\\s||&53;)<\\/p>$/i)!=-1){E\'\'}q=q.I(/<2D 1G="G-3Z-R" 1n="6f: 5f;"(.*?[^>]?)>([\\w\\W]*?)<\\/2D>/gi,\'<3Z$1>$2</3Z>\');q=c.1p.e9(q);C eo={\'\\kc\':\'&kb;\',\'\\k7\':\'&k8;\',\'\\k9\':\'&ka;\',\'\\lT\':\'&mw;\',\'\\o1\':\'&o2;\'};$.1z(eo,B(i,s){q=q.I(1J 1T(i,\'g\'),s)});q=q.I(1J 1T(\'<br\\\\s?/?></li>\',\'gi\'),\'</li>\');q=q.I(1J 1T(\'</li><br\\\\s?/?>\',\'gi\'),\'</li>\');q=q.I(1J 1T(\'<1i(.*?) 1h-7N="G"(.*?[^>])>\',\'gi\'),\'<1i$1$2>\');q=q.I(1J 1T(\'<(.*?) 1h-3v="G"(.*?[^>])>\',\'gi\'),\'<$1$2>\');q=q.I(1J 1T(\'<1e(.*?) 3G="(.*?)"(.*?[^>])>\',\'gi\'),\'<1e$1$3>\');q=q.I(1J 1T(\'<1B(.*?) 3G="(.*?)"(.*?[^>])>\',\'gi\'),\'<1B$1$3>\');q=q.I(1J 1T(\'<1B(.*?) 1n="" (.*?[^>])>\',\'gi\'),\'<1B$1 $2>\');q=q.I(1J 1T(\'<1B(.*?) 1n (.*?[^>])>\',\'gi\'),\'<1B$1 $2>\');q=q.I(1J 1T(\'<1e 1G="G-7u-2U">(.*?)</1e>\',\'gi\'),\'$1\');q=q.I(/ 1h-2R-2c="(.*?[^>])"/gi,\'\');q=q.I(/<1e(.*?)id="G-J-2r"(.*?[^>])>([\\w\\W]*?)<1B(.*?)><\\/1e>/gi,\'$3<1B$4>\');q=q.I(/<1e(.*?)id="G-J-7n"(.*?[^>])>(.*?)<\\/1e>/gi,\'\');q=q.I(/<1e(.*?)id="G-J-5h"(.*?[^>])>(.*?)<\\/1e>/gi,\'\');q=q.I(/<3p(.*?[^<])>/gi,\'\');q=q.I(/<\\/3p>/gi,\'\');q=c.1x.2G(q);if(c.F.es){q=q.I(/<a(.*?)3G="et"(.*?[^>])>/gi,\'<a$1$2>\');q=q.I(/<a(.*?[^>])>/gi,\'<a$1 3G="et">\')}q=q.I(/<(.*?) 1h-G-R="(.*?)"(.*?[^>])>/gi,\'<$1$3>\');q=q.I(/<(.*?) 1h-G-1G="(.*?)"(.*?[^>])>/gi,\'<$1$3>\');q=q.I(/<(.*?) 1h-G-1n="(.*?)"(.*?[^>])>/gi,\'<$1$3>\');q=q.I(1J 1T(\'<(.*?) 1h-3v="G"(.*?[^>])>\',\'gi\'),\'<$1$2>\');q=q.I(1J 1T(\'<(.*?) 1h-3v="G">\',\'gi\'),\'<$1>\');E q},8B:B(q,8n){q=$.3d(q);q=q.I(/\\$/g,\'$\');q=q.I(/â€/g,\'"\');q=q.I(/“/g,\'"\');q=q.I(/‘/g,\'\\\'\');q=q.I(/’/g,\'\\\'\');q=q.I(/<1e 1G="ev-nV-2U">&53;<\\/1e>/gi,\' \');q=q.I(/<1e 1G="ev-5j-1e"[^>]*>\\t<\\/1e>/gi,\'\\t\');q=q.I(/<1e[^>]*>(\\s|&53;)<\\/1e>/gi,\' \');if(c.F.eu){E c.1p.8T(q)}if(!c.O.6J()&&1C 8n==\'1H\'){if(c.O.5g([\'eH\',\'A\'])){E c.1p.8T(q,M)}if(c.O.5g(\'ad\')){E c.1p.e0(q)}if(c.O.5g([\'8L\',\'eV\',\'eU\',\'eW\',\'eX\',\'eZ\',\'eY\'])){q=c.1p.ec(q);if(!c.O.26(\'2J\')){C N=c.K.47();if(N&&N.1l==\'P\'){q=q.I(/<1B(.*?)>/gi,\'<p><1B$1></p>\')}}E q}if(c.O.5g([\'7k\'])){q=c.1p.ax(q,\'3K\');if(c.F.1L)q=c.1p.am(q);q=c.1p.eg(q);E q}if(c.O.5g([\'4P\'])){E c.1p.ax(q,\'li\')}}q=c.1p.dY(q,8n);if(!c.1p.8I){if(c.F.1L)q=c.1p.am(q);if(c.F.6S)q=c.1p.6S(q);q=c.1p.bP(q)}q=c.1p.eR(q);q=c.1p.eM(q);q=c.1p.ax(q,\'ek\');if(!c.1p.8I&&c.F.2p){q=c.2p.2G(q)}q=c.1p.ei(q);q=c.1p.dU(q);q=c.1p.dR(q);q=c.1p.bN(q);E q},eR:B(q){q=q.I(/<!--[\\s\\S]*?-->/gi,\'\');q=q.I(/<1n[^>]*>[\\s\\S]*?<\\/1n>/gi,\'\');if(/(1G=\\"?eL|1n=\\"[^\\"]*\\ob\\-|w:oc)/.6L(q)){q=c.1p.dV(q);q=q.I(/<1B(.*?)v:od=(.*?)>/gi,\'\');q=q.I(/4e="1P\\:\\/\\/(.*?)"/,\'4e=""\');q=q.I(/<p(.*?)1G="oa"([\\w\\W]*?)<\\/p>/gi,\'<2O><li$2</li>\');q=q.I(/<p(.*?)1G="o9"([\\w\\W]*?)<\\/p>/gi,\'<li$2</li>\');q=q.I(/<p(.*?)1G="o6"([\\w\\W]*?)<\\/p>/gi,\'<li$2</li></2O>\');q=q.I(/<p(.*?)1G="o7"([\\w\\W]*?)<\\/p>/gi,\'<2O><li$2</li></2O>\');q=q.I(/·/g,\'\');q=q.I(/<p 1G="eL(.*?)"/gi,\'<p\');q=q.I(/ 1G=\\"(eK[^\\"]*)\\"/gi,"");q=q.I(/ 1G=(eK\\w+)/gi,"");q=q.I(/<o:p(.*?)>([\\w\\W]*?)<\\/o:p>/gi,\'$2\');q=q.I(/\\n/g,\' \');q=q.I(/<p>\\n?<li>/gi,\'<li>\')}if(c.F.eJ){q=q.I(/(\\s|&53;)+/g,\' \')}E q},eM:B(q){q=q.I(/<b\\nT="eN-az-2L(.*?)">([\\w\\W]*?)<\\/b>/gi,"$2");q=q.I(/<b(.*?)id="nF-eN-nH(.*?)">([\\w\\W]*?)<\\/b>/gi,"$3");q=q.I(/<1e[^>]*(3p-1n: 3X; 3p-6E: 3W|3p-6E: 3W; 3p-1n: 3X)[^>]*>/gi,\'<1e 1n="3p-6E: 3W;"><1e 1n="3p-1n: 3X;">\');q=q.I(/<1e[^>]*3p-1n: 3X[^>]*>/gi,\'<1e 1n="3p-1n: 3X;">\');q=q.I(/<1e[^>]*3p-6E: 3W[^>]*>/gi,\'<1e 1n="3p-6E: 3W;">\');q=q.I(/<1e[^>]*1b-76: 5c[^>]*>/gi,\'<1e 1n="1b-76: 5c;">\');q=q.I(/<1B>/gi,\'\');q=q.I(/\\n{3,}/gi,\'\\n\');q=q.I(/<3p(.*?)>([\\w\\W]*?)<\\/3p>/gi,\'$2\');q=q.I(/<p><p>/gi,\'<p>\');q=q.I(/<\\/p><\\/p>/gi,\'</p>\');q=q.I(/<li>(\\s*|\\t*|\\n*)<p>/gi,\'<li>\');q=q.I(/<\\/p>(\\s*|\\t*|\\n*)<\\/li>/gi,\'</li>\');q=q.I(/<\\/p>\\s<p/gi,\'<\\/p><p\');q=q.I(/<1B 4e="7g-nD-2c\\:\\/\\/(.*?)"(.*?)>/gi,\'\');q=q.I(/<p>•([\\w\\W]*?)<\\/p>/gi,\'<li>$1</li>\');if(c.O.26(\'6P\')){q=q.I(/<br\\s?\\/?>$/gi,\'\')}E q},ax:B(q,1c){C 2j=[\'1e\',\'a\',\'2D\',\'1N\',\'8l\',\'em\',\'5i\',\'1a\',\'a5\',\'6s\',\'aH\',\'8r\',\'C\',\'9V\',\'c9\',\'74\',\'7a\',\'b\',\'i\',\'u\',\'43\',\'ol\',\'2O\',\'li\',\'dl\',\'dt\',\'dd\',\'p\',\'br\',\'6t\',\'8q\',\'4W\',\'7f\',\'8p\',\'4F\',\'1B\',\'4q\',\'3K\',\'5U\',\'6q\',\'cs\',\'cT\',\'cJ\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'];C bw=M;C bx=[[\'a\',\'*\'],[\'1B\',[\'4e\',\'72\']],[\'1e\',[\'1G\',\'3G\',\'1h-3v\']],[\'4W\',\'*\'],[\'6t\',\'*\'],[\'8q\',\'*\'],[\'7f\',\'*\'],[\'4F\',\'*\'],[\'8p\',\'*\'],[\'az\',\'*\']];if(1c==\'ek\'){bw=[\'p\',\'1e\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\'];bx=[[\'4q\',\'1G\'],[\'3K\',[\'nA\',\'nB\']],[\'a\',\'*\'],[\'1B\',[\'4e\',\'72\',\'1h-G-7V-J\']],[\'1e\',[\'1G\',\'3G\',\'1h-3v\']],[\'4W\',\'*\'],[\'6t\',\'*\'],[\'8q\',\'*\'],[\'7f\',\'*\'],[\'4F\',\'*\'],[\'8p\',\'*\'],[\'az\',\'*\']]}L if(1c==\'3K\'){2j=[\'2O\',\'ol\',\'li\',\'1e\',\'a\',\'8l\',\'em\',\'5i\',\'1a\',\'a5\',\'6s\',\'8r\',\'C\',\'9V\',\'c9\',\'74\',\'7a\',\'b\',\'i\',\'u\',\'43\',\'ol\',\'2O\',\'li\',\'dl\',\'dt\',\'dd\',\'br\',\'4W\',\'6t\',\'8q\',\'7f\',\'8p\',\'4F\',\'1B\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\']}L if(1c==\'li\'){2j=[\'2O\',\'ol\',\'li\',\'1e\',\'a\',\'8l\',\'em\',\'5i\',\'1a\',\'a5\',\'6s\',\'8r\',\'C\',\'9V\',\'c9\',\'74\',\'7a\',\'b\',\'i\',\'u\',\'43\',\'br\',\'4W\',\'6t\',\'8q\',\'7f\',\'8p\',\'4F\',\'1B\']}C 3L={4G:M,4R:2j,6k:1q,nQ:1q,1W:M,58:bx,3N:bw};E c.1x.2G(q,3L)},dR:B(q){q=q.I(/<(p|h[1-6])>(|\\s|\\n|\\t|<br\\s?\\/?>)<\\/(p|h[1-6])>/gi,\'\');if(!c.F.1L)q=q.I(/<br>$/i,\'\');E q},dU:B(q){q=q.I(/<1e>(.*?)<\\/1e>/gi,\'$1\');q=q.I(/<1e[^>]*>\\s|&53;<\\/1e>/gi,\' \');E q},dV:B(q){if(!c.O.26(\'2J\'))E q;C 52=$.3d(q);if(52.3F(/^<a(.*?)>(.*?)<\\/a>$/i)===0){q=q.I(/^<a(.*?)>(.*?)<\\/a>$/i,"$2")}E q},dY:B(q,8n){c.1p.8I=M;if(!c.O.6J()&&1C 8n==\'1H\'){C 1Q=c.F.8G.2H(\'|\').I(\'P|\',\'\').I(\'8F|\',\'\');C dX=q.2d(1J 1T(\'</(\'+1Q+\')>\',\'gi\'));C at=q.2d(/<\\/(p|1i)>/gi);if(!dX&&(at===4f||(at&&at.1o<=1))){C dP=q.2d(/<br\\s?\\/?>/gi);C dH=q.2d(/<1B(.*?[^>])>/gi);if(!dP&&!dH){c.1p.8I=1q;q=q.I(/<\\/?(p|1i)(.*?)>/gi,\'\')}}}E q},nM:B(3n,5a){5a=(((5a||\'\')+\'\').2P().2d(/<[a-z][a-8X-9]*>/g)||[]).2H(\'\');C 2j=/<\\/?([a-z][a-8X-9]*)\\b[^>]*>/gi;E 3n.I(2j,B($0,$1){E 5a.4T(\'<\'+$1.2P()+\'>\')>-1?$0:\'\'})},dZ:B(q){C 2D=q.2d(/<(2D|1a)(.*?)>([\\w\\W]*?)<\\/(2D|1a)>/gi);if(2D!==4f){$.1z(2D,$.X(B(i,s){C 3a=s.2d(/<(2D|1a)(.*?)>([\\w\\W]*?)<\\/(2D|1a)>/i);3a[3]=3a[3].I(/<br\\s?\\/?>/g,\'\\n\');3a[3]=3a[3].I(/&53;/g,\' \');if(c.F.5Z){3a[3]=3a[3].I(/\\t/g,7M(c.F.5Z+1).2H(\' \'))}3a[3]=c.1p.bs(3a[3]);3a[3]=3a[3].I(/\\$/g,\'$\');q=q.I(s,\'<\'+3a[1]+3a[2]+\'>\'+3a[3]+\'</\'+3a[1]+\'>\')},c))}E q},bp:B(q){q=q.I(/<br\\s?\\/?>|<\\/H[1-6]>|<\\/p>|<\\/1i>|<\\/li>|<\\/3K>/gi,\'\\n\');C 52=1d.3A(\'1i\');52.3w=q;q=52.ox||52.ow;E $.3d(q)},8T:B(q,2p){q=c.1p.bp(q);q=q.I(/\\n/g,\'<br />\');if(c.F.2p&&1C 2p==\'1H\'){q=c.2p.2G(q)}E q},e0:B(q){q=q.I(/<1B(.*?) 1n="(.*?)"(.*?[^>])>/gi,\'<1B$1$3>\');q=q.I(/<1B(.*?)>/gi,\'<1B$1>\');q=c.1p.bp(q);if(c.F.5Z){q=q.I(/\\t/g,7M(c.F.5Z+1).2H(\' \'))}q=c.1p.bs(q);E q},ec:B(q){q=q.I(/<1B(.*?)>/gi,\'[1B$1]\');q=q.I(/<(.*?)>/gi,\'\');q=q.I(/\\[1B(.*?)\\]/gi,\'<1B$1>\');E q},oE:B(q){q=q.I(/<a(.*?)29="(.*?)"(.*?)>([\\w\\W]*?)<\\/a>/gi,\'[a 29="$2"]$4[/a]\');q=q.I(/<1B(.*?)>/gi,\'[1B$1]\');q=q.I(/<(.*?)>/gi,\'\');q=q.I(/\\[a 29="(.*?)"\\]([\\w\\W]*?)\\[\\/a\\]/gi,\'<a 29="$1">$2</a>\');q=q.I(/\\[1B(.*?)\\]/gi,\'<1B$1>\');E q},bs:B(5l){5l=5L(5l).I(/&cE;/g,\'&\').I(/</g,\'<\').I(/>/g,\'>\').I(/&ef;/g,\'"\');E 5l.I(/&/g,\'&cE;\').I(/</g,\'<\').I(/>/g,\'>\').I(/"/g,\'&ef;\')},ei:B(q){if(c.O.26(\'2J\'))E q;C 1i=1d.3A(\'1i\');1i.3w=q;c.1p.bM($(1i));q=1i.3w;$(1i).1t();E q},4d:B(){if(c.O.26(\'2J\'))E;c.1p.bM(c.$U);C bC=c.$U.1k(\'h1, h2, h3, h4, h5, h6\');bC.1k(\'1e\').1W(\'1n\');bC.1k(c.F.bL.2H(\', \')).1W(\'1n\');c.1a.1R()},bM:B($U){$U.1k(c.F.bL.2H(\', \')).1W(\'1n\');$U.1k(\'1e\').6o(\'[1h-3v="G"]\').1W(\'1n\');$U.1k(\'1e[1h-3v="G"], 1B[1h-3v="G"]\').1z(B(i,s){C $s=$(s);$s.Y(\'1n\',$s.Y(\'3G\'))})},6B:B(q){if(c.O.26(\'2J\'))E q;q=q.I(1J 1T(\'<1B(.*?[^>])>\',\'gi\'),\'<1B$1 1h-3v="G">\');q=q.I(1J 1T(\'<1e(.*?)>\',\'gi\'),\'<1e$1 1h-3v="G">\');C 4l=q.2d(1J 1T(\'<(1e|1B)(.*?)1n="(.*?)"(.*?[^>])>\',\'gi\'));if(4l){C 22=4l.1o;2v(C i=0;i<22;i++){4s{C eh=4l[i].I(/1n="(.*?)"/i,\'1n="$1" 3G="$1"\');q=q.I(1J 1T(4l[i],\'gi\'),eh)}4x(e){}}}E q},bN:B(q){C $1i=$(\'<1i />\').q(q);C 2j=c.F.4C;2j.2W(\'1e\');$1i.1k(2j.2H(\',\')).1z(B(){C $el=$(c);C R=c.1l.2P();$el.Y(\'1h-G-R\',R);if(R==\'1e\'){if($el.Y(\'1n\'))$el.Y(\'1h-G-1n\',$el.Y(\'1n\'));L if($el.Y(\'1G\'))$el.Y(\'1h-G-1G\',$el.Y(\'1G\'))}});q=$1i.q();$1i.1t();E q},a6:B(){c.$U.1k(\'li\').1z(B(i,s){C $2b=$(s).2b();if($2b.1o!==0&&($2b[0].1l==\'8j\'||$2b[0].1l==\'8i\')){$(s).1w($2b)}})},cN:B(q){q=q.I(/\\n/g,\'\');q=q.I(/[\\t]*/g,\'\');q=q.I(/\\n\\s*\\n/g,"\\n");q=q.I(/^[\\s\\n]*/g,\' \');q=q.I(/[\\s\\n]*$/g,\' \');q=q.I(/>\\s{2,}</g,\'> <\');q=q.I(/\\n\\n/g,"\\n");q=q.I(/[\\8o-\\aE\\aq]/g,\'\');E q},6S:B(q){if(c.F.1L){q=q.I(/<1i><br\\s?\\/?><\\/1i>/gi,\'<br />\');q=q.I(/<1i(.*?)>([\\w\\W]*?)<\\/1i>/gi,\'$2<br />\')}L{q=q.I(/<1i(.*?)>([\\w\\W]*?)<\\/1i>/gi,\'<p$1>$2</p>\')}E q},eg:B(q){q=q.I(/<1i\\s(.*?)>/gi,\'<p>\');q=q.I(/<1i><br\\s?\\/?><\\/1i>/gi,\'<br /><br />\');q=q.I(/<1i>([\\w\\W]*?)<\\/1i>/gi,\'$1<br /><br />\');E q},am:B(q){q=q.I(/<p\\s(.*?)>/gi,\'<p>\');q=q.I(/<p><br\\s?\\/?><\\/p>/gi,\'<br />\');q=q.I(/<p>([\\w\\W]*?)<\\/p>/gi,\'$1<br /><br />\');q=q.I(/(<br\\s?\\/?>){1,}\\n?<\\/1N>/gi,\'</1N>\');E q},bP:B(q){E q.I(/<5v(.*?)>([\\w\\W]*?)<\\/5v>/gi,\'<3T$1 3G="G-5v-R">$2</3T>\')},e9:B(q){E q.I(/<3T(.*?) 3G="G-5v-R"(.*?)>([\\w\\W]*?)<\\/3T>/gi,\'<5v$1$2>$3</5v>\')}}},1a:B(){E{1K:B(q){q=$.3d(q.4I());q=c.1p.e3(q);c.$U.q(q);c.1a.1R();3q($.X(c.1Z.ck,c),15);if(c.2X===M)c.2n.2G()},14:B(){C 1a=c.$2E.2w();1a=c.2s.14(1a);E 1a},1R:B(){3q($.X(c.1a.e2,c),10)},e2:B(){C q=c.$U.q();if(c.1a.bG&&c.1a.bG==q){E}c.1a.bG=q;q=c.1S.2o(\'nx\',q);q=c.1p.b5(q);c.$2E.2w(q);c.1S.2o(\'1R\',q);if(c.2X===M){c.1S.2o(\'i1\',q)}c.2X=M;c.3x.e1()},2M:B(){if(c.F.63){c.1a.bH()}L{c.1a.e6()}},bH:B(){c.1a.2Q=c.1U.a4();C 6W=$(3M).3C();C 3f=c.$U.5G();c.$U.3b();C q=c.$2E.2w();c.fb=c.1p.cN(q);q=c.2s.14(q);c.$2E.2w(q).3f(3f).2B().2t();c.$2E.on(\'1u.G-2E-fc\',c.1a.g4);$(3M).3C(6W);if(c.$2E[0].e8){c.$2E[0].e8(0,0)}c.$2E[0].3C=0;c.F.63=M;c.1s.e7();c.1s.8d(\'q\');c.1S.2o(\'az\',q)},e6:B(){if(c.F.63)E;C q=c.$2E.3b().2w();if(c.fb!==c.1p.cN(q)){c.1a.1K(q)}c.$U.2B();if(!c.O.4t(q)){c.2Y.1t()}c.1U.9o(c.1a.2Q);c.$2E.3H(\'1u.G-2E-fc\');c.1s.g6();c.1s.g5(\'q\');c.2n.2G();c.F.63=1q},g4:B(e){if(e.3j!==9)E 1q;C $el=c.$2E;C 2X=$el.14(0).g8;$el.2w($el.2w().9z(0,2X)+"\\t"+$el.2w().9z($el.14(0).gb));$el.14(0).g8=$el.14(0).gb=2X+1;E M}}},1S:B(){E{mM:B(){E $.70({},c)},mS:B(){E c.$U},mT:B(){E c.$2r},mR:B(){E c.$2F},mQ:B(){E c.$2E},mN:B(){E(c.$1r)?c.$1r:M},7H:B(1f){c.1S.ga=1f},69:B(){E c.1S.ga},2o:B(1c,e,1h){C 2l=c.F[1c+\'mP\'];if($.5n(2l)){E(1C 1h==\'1H\')?2l.5X(c,e):2l.5X(c,e,1h)}L{E(1C 1h==\'1H\')?e:1h}},g3:B(){c.1S.2o(\'g3\');c.$2F.3H(\'.G\').g2(\'G\');c.$U.3H(\'.G\');c.$U.2I(\'G-U G-1L G-2Y\');c.$U.1W(\'77\');C q=c.1a.14();if(c.2f.8O()){c.$2r.3u(c.$2F);c.$2r.1t();c.$2F.2w(q).2B()}L{c.$2r.3u(c.$U);c.$2r.1t();c.$2F.q(q).2B()}if(c.$5C)c.$5C.1t();if(c.$4o)c.$4o.1t();if(c.$6Y)c.$6Y.1t();$(\'.G-1r-31\').1t();fW(c.7K)}}},1y:B(){E{2f:B(1f,$1y,cm){if(1f==\'2K\'&&c.F.cq){$.1z(c.F.cq,$.X(B(i,s){C 1f=s.R;if(1C s.1G!=\'1H\'){1f=1f+\'-\'+s.1G}s.1c=(c.O.6V(s.R))?\'N\':\'1V\';C 1v=(s.1c==\'1V\')?\'1V.2K\':\'N.2K\';if(c.F.1L&&s.1c==\'N\'&&s.R==\'p\')E;c.2K[1f]={R:s.R,1n:s.1n,\'1G\':s.1G,Y:s.Y,1h:s.1h};cm[1f]={1v:1v,1F:s.1F}},c))}$.1z(cm,$.X(B(2i,3k){C $3g=$(\'<a 29="#" 1G="G-1y-\'+2i+\'">\'+3k.1F+\'</a>\');if(1f==\'2K\')$3g.2q(\'G-2K-\'+2i);$3g.on(\'2e\',$.X(B(e){C 1c=\'1v\';C 2l=3k.1v;if(3k.4a){1c=\'4a\';2l=3k.4a}L if(3k.1y){1c=\'1y\';2l=3k.1y}c.1s.9l(e,2i,1c,2l)},c));$1y.1w($3g)},c))},2B:B(e,1m){if(!c.F.63){e.2k();E M}C $1s=c.1s.14(1m);C $1y=$1s.1h(\'1y\').cw(1d.2x);1d.iJ.aD();if($1s.3i(\'78\')){c.1y.9M()}L{c.1y.9M();c.1S.2o(\'mj\',{1y:$1y,1m:1m,1s:$1s});c.1s.8d(1m);$1s.2q(\'78\');C 7v=$1s.2Q();C cn=$1y.2h();if((7v.21+cn)>$(1d).2h()){7v.21-=cn}C 21=7v.21+\'3m\';if(c.$1r.3i(\'1r-71-2r\')){C 2C=c.$1r.5G()+c.F.6y;C 3R=\'71\';if(c.F.6v!==1d){2C=(c.$1r.5G()+c.$1r.2Q().2C)+c.F.6y;3R=\'8H\'}$1y.1I({3R:3R,21:21,2C:2C+\'3m\'}).2B()}L{C 2C=($1s.5G()+7v.2C)+\'3m\';$1y.1I({3R:\'8H\',21:21,2C:2C}).2B()}c.1S.2o(\'ml\',{1y:$1y,1m:1m,1s:$1s})}$(1d).fX(\'2e\',$.X(c.1y.3b,c));c.$U.fX(\'2e\',$.X(c.1y.3b,c));C $2x=$(1d.2x);C 2h=$2x.2h();$1y.on(\'fY\',B(){$2x.2q(\'2x-6z\');$2x.1I(\'48-4c\',($2x.2h()-2h)+\'3m\')});$1y.on(\'g1\',B(){$2x.2I(\'2x-6z\').1I(\'48-4c\',0)});e.do()},9M:B(){c.$1r.1k(\'a.78\').2I(\'G-7D\').2I(\'78\');$(1d.2x).2I(\'2x-6z\').1I(\'48-4c\',0);$(\'.G-1y\').3b();c.1S.2o(\'mA\')},3b:B(e){C $1y=$(e.1M);if(!$1y.3i(\'78\')){$1y.2I(\'78\');c.1y.9M()}}}},1P:B(){E{2B:B(){c.V.2G(\'1P\',c.1E.14(\'1P\'),fZ);c.1j.3r(\'#G-V-1P-1j\',c.F.8t,c.1P.1O);c.K.2R();c.K.14();C 1b=c.2N.4I();$(\'#G-6p\').2w(1b);c.V.2B()},1O:B(2z,4H,e){if(1C 2z.5r!=\'1H\'){c.V.44();c.K.2S();c.1S.2o(\'mv\',2z);E}C T;if(1C 2z==\'62\'){T=2z}L{C 1b=$(\'#G-6p\').2w();if(1C 1b==\'1H\'||1b===\'\')1b=2z.6p;T=\'<a 29="\'+2z.8z+\'" id="8z-2L">\'+1b+\'</a>\'}if(4H){c.K.aC();C 2L=c.K.6d();c.1O.b2(e,2L)}L{c.V.44()}c.K.2S();c.1Z.1K();c.1O.q(T);if(1C 2z==\'62\')E;C 8c=$(c.$U.1k(\'a#8z-2L\'));if(8c.28()!==0)8c.1W(\'id\');L 8c=M;c.1S.2o(\'8t\',8c,2z)}}},2t:B(){E{3h:B(){c.$U.2t();C 3z=c.$U.4g().3z();if(3z.28()===0)E;if(3z[0].1o===0||3z[0].1l==\'6i\'||3z[0].9Z==3){E}if(3z[0].1l==\'8j\'||3z[0].1l==\'8i\'){3z=3z.1k(\'li\').3z();C 5Y=3z.4g().3z();if(!c.O.6m(5Y)&&5Y.1b()===\'\'){c.1U.3h(5Y);E}}if(c.F.1L&&!c.O.6V(3z[0].1l)){c.K.14();c.12.3h(c.$U[0],0);c.12.41(c.$U[0],0);c.K.4M();E}c.1U.3h(3z)},41:B(){if(c.O.26(\'6P\')||c.O.26(\'2J\')){C 3o=c.$U.4g().3o();c.1U.41(3o)}L{c.K.14();4s{c.12.ap(c.$U[0]);c.12.51(M);c.K.4M()}4x(e){}}},g0:B(){C 7L=1d.6a().7L;if(7L===4f)E M;if(c.F.1L&&$(7L.bk).3i(\'G-1L\'))E 1q;L if(!c.O.4i(7L.bk))E M;E c.$U.is(\':2t\')}}},J:B(){E{2B:B(){c.V.2G(\'J\',c.1E.14(\'J\'),fZ);c.1j.3r(\'#G-V-J-3P\',c.F.8s,c.J.1O);c.K.2R();c.V.2B()},gl:B($J){C $T=$J.2u(\'a\');c.V.2G(\'im\',c.1E.14(\'7T\'),nn);c.V.cU();c.J.gd=c.V.iK(c.1E.14(\'gc\'));c.J.gr=c.V.cu(c.1E.14(\'2R\'));c.J.gd.on(\'2e\',$.X(B(){c.J.1t($J)},c));c.J.gr.on(\'2e\',$.X(B(){c.J.dF($J)},c));$(\'#G-J-1F\').2w($J.Y(\'72\'));if(!c.F.gq)$(\'.G-J-T-3E\').3b();L{C $cx=$(\'#G-J-T\');$cx.Y(\'29\',$J.Y(\'4e\'));if($T.28()!==0){$cx.2w($T.Y(\'29\'));if($T.Y(\'1M\')==\'7e\')$(\'#G-J-T-6R\').8P(\'8N\',1q)}}if(!c.F.gp)$(\'.G-J-3R-3E\').3b();L{C gs=($J.1I(\'6f\')==\'N\'&&$J.1I(\'7i\')==\'5f\')?\'57\':$J.1I(\'7i\');$(\'#G-J-4S\').2w(gs)}c.V.2B()},gx:B($J){C gu=$(\'#G-J-4S\').2w();C 9s=\'\';C cI=\'\';C 88=\'\';fm(gu){7Q\'21\':9s=\'21\';88=\'0 \'+c.F.8b+\' \'+c.F.8b+\' 0\';6x;7Q\'4c\':9s=\'4c\';88=\'0 0 \'+c.F.8b+\' \'+c.F.8b;6x;7Q\'57\':cI=\'N\';88=\'a3\';6x}$J.1I({\'7i\':9s,6f:cI,48:88});$J.Y(\'3G\',$J.Y(\'1n\'))},dF:B($J){c.J.64();c.1Z.1K();C $T=$J.2u(\'a\');$J.Y(\'72\',$(\'#G-J-1F\').2w());c.J.gx($J);C T=$.3d($(\'#G-J-T\').2w());if(T!==\'\'){C 1M=($(\'#G-J-T-6R\').8P(\'8N\'))?1q:M;if($T.28()===0){C a=$(\'<a 29="\'+T+\'">\'+c.O.5K($J)+\'</a>\');if(1M)a.Y(\'1M\',\'7e\');$J.2y(a)}L{$T.Y(\'29\',T);if(1M){$T.Y(\'1M\',\'7e\')}L{$T.1W(\'1M\')}}}L if($T.28()!==0){$T.2y(c.O.5K($J))}c.V.44();c.2n.9P();c.1a.1R()},j0:B($J){if(!c.F.gw)E;$J.on(\'nr\',$.X(c.J.9H,c));$J.on(\'cD\',$.X(c.J.64,c));$J.on(\'2e 68\',$.X(B(e){c.2n.J=$J;if(c.$U.1k(\'#G-J-2r\').28()!==0)E M;c.J.7n=c.J.gj($J);$(1d).on(\'2e.G-J-4m-3b\',$.X(c.J.64,c));c.$U.on(\'2e.G-J-4m-3b\',$.X(c.J.64,c));if(!c.F.aN)E;c.J.7n.on(\'cD.G 68.G\',$.X(B(e){e.2k();c.J.4b={x:e.gv,y:e.9u,el:$J,cy:$J.2h()/$J.3f(),h:$J.3f()};e=e.7l||e;if(e.7C){c.J.4b.x=e.7C[0].gv;c.J.4b.y=e.7C[0].9u}c.J.go()},c))},c))},go:B(){$(1d).on(\'nd.G-J-4m n1.G-J-4m\',$.X(c.J.gn,c));$(1d).on(\'gC.G-J-4m n2.G-J-4m\',$.X(c.J.gg,c))},gn:B(e){e.2k();e=e.7l||e;C 3f=c.J.4b.h;if(e.7C)3f+=(e.7C[0].9u-c.J.4b.y);L 3f+=(e.9u-c.J.4b.y);C 2h=n0.mZ(3f*c.J.4b.cy);if(3f<50||2h<7I)E;c.J.4b.el.2h(2h);c.J.4b.el.3f(c.J.4b.el.2h()/c.J.4b.cy);c.1a.1R()},gg:B(){c.iS=M;$(1d).3H(\'.G-J-4m\');c.J.64()},9H:B(e){if(c.$U.1k(\'#G-J-2r\').28()!==0){e.2k();E M}c.$U.on(\'4A.G-J-gf-4A\',$.X(B(){3q($.X(c.J.9U,c),1)},c))},9U:B(){c.J.ge();c.2n.9P();c.$U.3H(\'4A.G-J-gf-4A\');c.1p.4d();c.1a.1R()},ge:B(){c.$U.1k(\'1B[1h-2R-2c]\').1z(B(){C $el=$(c);$el.Y(\'4e\',$el.Y(\'1h-2R-2c\'));$el.1W(\'1h-2R-2c\')})},64:B(e){if(e&&$(e.1M).2u(\'#G-J-2r\').1o!==0)E;if(e&&e.1M.1l==\'bj\'){C $J=$(e.1M);$J.Y(\'1h-2R-2c\',$J.Y(\'4e\'))}C 3s=c.$U.1k(\'#G-J-2r\');if(3s.28()===0)E;c.J.5h.1t();$(c.J.7n).1t();3s.1k(\'1B\').1I({5t:3s[0].1n.5t,9y:3s[0].1n.9y,9w:3s[0].1n.9w,9x:3s[0].1n.9x});3s.1I(\'48\',\'\');3s.1k(\'1B\').1I(\'gm\',\'\');3s.2y(B(){E $(c).23()});$(1d).3H(\'2e.G-J-4m-3b\');c.$U.3H(\'2e.G-J-4m-3b\');if(1C c.J.4b!==\'1H\'){c.J.4b.el.Y(\'3G\',c.J.4b.el.Y(\'1n\'))}c.1a.1R()},gj:B($J){C 3s=$(\'<1e id="G-J-2r" 1h-G="3v">\');3s.1I(\'7i\',$J.1I(\'7i\')).Y(\'77\',M);if($J[0].1n.48!=\'a3\'){3s.1I({5t:$J[0].1n.5t,9y:$J[0].1n.9y,9w:$J[0].1n.9w,9x:$J[0].1n.9x});$J.1I(\'48\',\'\')}L{3s.1I({\'6f\':\'N\',\'48\':\'a3\'})}$J.1I(\'gm\',\'.5\').3u(3s);c.J.5h=$(\'<1e id="G-J-5h" 1h-G="3v">\'+c.1E.14(\'7T\')+\'</1e>\');c.J.5h.Y(\'77\',M);c.J.5h.on(\'2e\',$.X(B(){c.J.gl($J)},c));3s.1w(c.J.5h);C gk=c.J.5h.a0();c.J.5h.1I(\'48-21\',\'-\'+gk/2+\'3m\');if(c.F.aN&&!c.O.5Q()){C 8e=$(\'<1e id="G-J-7n" 1h-G="3v"></1e>\');if(!c.O.c8()){8e.1I({2h:\'fT\',3f:\'fT\'})}8e.Y(\'77\',M);3s.1w(8e);3s.1w($J);E 8e}L{3s.1w($J);E M}},1t:B(J){C $J=$(J);C $T=$J.2u(\'a\');C $6r=$J.2u(\'6r\');C $1g=$J.1g();if($(\'#G-J-2r\').28()!==0){$1g=$(\'#G-J-2r\').1g()}C $2b;if($6r.28()!==0){$2b=$6r.2b();$6r.1t()}L if($T.28()!==0){$1g=$T.1g();$T.1t()}L{$J.1t()}$(\'#G-J-2r\').1t();if($6r.28()!==0){c.1U.3h($2b)}L{c.1U.3h($1g)}c.1S.2o(\'bf\',$J[0].4e,$J);c.V.44();c.1a.1R()},1O:B(2z,4H,e){if(1C 2z.5r!=\'1H\'){c.V.44();c.K.2S();c.1S.2o(\'nt\',2z);E}C $1B;if(1C 2z==\'62\'){$1B=$(2z).Y(\'1h-G-7V-J\',\'1q\')}L{$1B=$(\'<1B>\');$1B.Y(\'4e\',2z.8z).Y(\'1h-G-7V-J\',\'1q\')}C Q=$1B;C aP=c.O.5g(\'P\');if(aP){Q=$(\'<1N />\').1w($1B)}if(4H){c.K.aC();C 2L=c.K.6d();c.1O.b2(e,2L)}L{c.V.44()}c.K.2S();c.1Z.1K();c.1O.q(c.O.5K(Q),M);C $J=c.$U.1k(\'1B[1h-G-7V-J=1q]\').1W(\'1h-G-7V-J\');if(aP){$J.1g().23().3Y().5E(\'<p />\')}L if(c.F.1L){$J.aI(\'<br>\').3u(\'<br>\')}if(1C 2z==\'62\')E;c.1S.2o(\'8s\',$J,2z)}}},3e:B(){E{8S:B(){if(!c.O.26(\'2J\'))c.$U.2t();c.1Z.1K();c.K.2R();C N=c.K.47();if(N&&N.1l==\'4P\'){c.3e.fs()}L if(N===M&&c.F.1L){c.3e.fq()}L{c.3e.fr()}c.K.2S();c.1a.1R()},fs:B(){1d.3O(\'3e\');c.3e.af();c.1p.a6();c.1p.4d()},fr:B(){$.1z(c.K.3V(),$.X(B(i,4z){if(4z.1l===\'7k\'||4z.1l===\'aL\')E;C $el=c.O.9e(4z);C 21=c.O.bv($el.1I(\'48-21\'))+c.F.9I;$el.1I(\'48-21\',21+\'3m\')},c))},fq:B(){C 4j=c.K.5E(\'1i\');$(4j).Y(\'1h-7N\',\'G\');$(4j).1I(\'48-21\',c.F.9I+\'3m\')},8Z:B(){c.1Z.1K();c.K.2R();C N=c.K.47();if(N&&N.1l==\'4P\'){c.3e.ft()}L{c.3e.fu()}c.K.2S();c.1a.1R()},ft:B(){1d.3O(\'6O\');C 1A=c.K.3J();C $3g=$(1A).2u(\'li\');C $1g=$3g.1g();if($3g.28()!==0&&$1g.28()!==0&&$1g[0].1l==\'4P\'){$1g.3u($3g)}c.3e.af();if(!c.F.1L&&$3g.28()===0){1d.3O(\'a2\',M,\'p\');c.$U.1k(\'2O, ol, 1N, p\').1z($.X(c.O.3N,c))}c.1p.4d()},fu:B(){$.1z(c.K.3V(),$.X(B(i,4z){C $el=c.O.9e(4z);C 21=c.O.bv($el.1I(\'48-21\'))-c.F.9I;if(21<=0){if(c.F.1L&&1C($el.1h(\'7N\'))!==\'1H\'){$el.2y($el.q()+\'<br />\')}L{$el.1I(\'48-21\',\'\');c.O.5J($el,\'1n\')}}L{$el.1I(\'48-21\',21+\'3m\')}},c))},af:B(){C N=c.K.47();if(c.12.4Z&&N&&N.1l==\'4P\'&&c.O.4t($(N).1b())){C $N=$(N);$N.1k(\'1e\').6o(\'.G-K-2L\').23().3Y();$N.1w(\'<br>\')}}}},1V:B(){E{2K:B(1f){C 1c,1D;if(1C c.2K[1f].1n!=\'1H\')1c=\'1n\';L if(1C c.2K[1f].1G!=\'1H\')1c=\'1G\';if(1c)1D=c.2K[1f][1c];c.1V.2Z(c.2K[1f].R,1c,1D)},2Z:B(R,1c,1D){if(c.O.5g(\'ad\'))E;C 2j=[\'b\',\'3W\',\'i\',\'3X\',\'5c\',\'fo\',\'5I\',\'fx\',\'fw\'];C 82=[\'5i\',\'5i\',\'em\',\'em\',\'u\',\'43\',\'43\',\'74\',\'7a\'];2v(C i=0;i<2j.1o;i++){if(R==2j[i])R=82[i]}c.1V.1c=1c||M;c.1V.1D=1D||M;c.1Z.1K();c.$U.2t();c.K.14();if(c.12.4Z){c.1V.fv(R)}L{c.1V.fp(R)}},fv:B(R){C 1A=c.K.3J();C $1g=$(1A).2u(R+\'[1h-G-R=\'+R+\']\');if($1g.28()!==0){c.1U.5q($1g[0]);if(c.O.4t($1g.1b()))$1g.1t();c.1a.1R();E}C Q=$(\'<\'+R+\'>\').Y(\'1h-3v\',\'G\').Y(\'1h-G-R\',R);Q.q(c.F.5M);Q=c.1V.b1(Q);c.1O.Q(Q);c.1a.1R();E},fp:B(R){c.1V.fe(R);c.K.2R();1d.3O(\'fo\');c.$U.1k(\'81\').1z($.X(B(i,s){C $el=$(s);c.1V.ff($el,R);C $1e;if(c.1V.1c){$1e=$(\'<1e>\').Y(\'1h-G-R\',R).Y(\'1h-3v\',\'G\');$1e=c.1V.b1($1e)}L{$1e=$(\'<\'+R+\'>\').Y(\'1h-G-R\',R).Y(\'1h-3v\',\'G\')}$el.2y($1e.q($el.23()));if(R==\'1e\'){C $1g=$1e.1g();if($1g&&$1g[0].1l==\'6M\'&&c.1V.1c==\'1n\'){C 3a=c.1V.1D.4E(\';\');2v(C z=0;z<3a.1o;z++){if(3a[z]===\'\')E;C 1n=3a[z].4E(\':\');$1g.1I(1n[0],\'\');if(c.O.5J($1g,\'1n\')){$1g.2y($1g.23())}}}}},c));if(R!=\'1e\'){c.$U.1k(c.F.4C.2H(\', \')).1z($.X(B(i,s){C $el=$(s);C 9f=$el.1I(\'1b-76\');if(9f==\'4r-fh\'){$el.1I(\'1b-76\',\'\');c.O.5J($el,\'1n\')}},c))}if(R!=\'43\'){C fg=c;c.$U.1k(\'1V\').1z(B(i,s){fg.O.4v(s,\'43\')})}c.K.2S();c.1a.1R()},ff:B($el,R){$el.4g(R).1z(B(){C $5Y=$(c);if(!$5Y.3i(\'G-K-2L\')){$5Y.23().3Y()}})},fe:B(R){c.K.2R();C 1k=\'\';if(c.1V.1c==\'1G\')1k=\'[1h-G-1G=\'+c.1V.1D+\']\';L if(c.1V.1c==\'1n\'){1k=\'[1h-G-1n="\'+c.1V.1D+\'"]\'}if(R!=\'43\'){C 3Q=c;c.$U.1k(\'43\').1z(B(i,s){3Q.O.4v(s,\'1V\')})}c.$U.1k(\'[1h-G-R="\'+R+\'"]\'+1k).1z(B(){if(1k===\'\'&&R==\'1e\'&&c.1l.2P()==R)E;C $el=$(c);$el.2y($(\'<81 />\').q($el.23()))});c.K.2S()},b1:B(Q){fm(c.1V.1c){7Q\'1G\':if(Q.3i(c.1V.1D)){Q.2I(c.1V.1D);Q.1W(\'1h-G-1G\')}L{Q.2q(c.1V.1D);Q.Y(\'1h-G-1G\',c.1V.1D)}6x;7Q\'1n\':Q[0].1n.oy=c.1V.1D;Q.Y(\'1h-G-1n\',c.1V.1D);6x}E Q},op:B(){c.1Z.1K();C 1A=c.K.3J();C 1X=c.K.aS();c.K.2R();if(1A&&1A.1l===\'6M\'){C $s=$(1A);$s.1W(\'1n\');if($s[0].42.1o===0){$s.2y($s.23())}}$.1z(1X,$.X(B(i,s){C $s=$(s);if($.3B(s.1l.2P(),c.F.4C)!=-1&&!$s.3i(\'G-K-2L\')){$s.1W(\'1n\');if($s[0].42.1o===0){$s.2y($s.23())}}},c));c.K.2S();c.1a.1R()},om:B(1f){c.1Z.1K();C 1g=c.K.5R();C 1X=c.K.aS();c.K.2R();if(1g&&1g.1l===\'6M\'){C $s=$(1g);$s.1I(1f,\'\');c.O.5J($s,\'1n\');if($s[0].42.1o===0){$s.2y($s.23())}}$.1z(1X,$.X(B(i,s){C $s=$(s);if($.3B(s.1l.2P(),c.F.4C)!=-1&&!$s.3i(\'G-K-2L\')){$s.1I(1f,\'\');c.O.5J($s,\'1n\');if($s[0].42.1o===0){$s.2y($s.23())}}},c));c.K.2S();c.1a.1R()},b7:B(){c.1Z.1K();C 1A=c.K.3J();c.K.2R();1d.3O(\'b7\');if(1A&&1A.1l===\'6M\'){$(1A).2y($(1A).23())}$.1z(c.K.6Z(),$.X(B(i,s){C $s=$(s);if($.3B(s.1l.2P(),c.F.4C)!=-1&&!$s.3i(\'G-K-2L\')){$s.2y($s.23())}},c));c.K.2S();c.1a.1R()},94:B(4u){c.1V.2Z(\'1e\',\'1G\',4u)},oi:B(1D){c.1V.2Z(\'1e\',\'1n\',1D)}}},1O:B(){E{1K:B(q,1p){c.2Y.1t();q=c.1p.6B(q);if(1C 1p==\'1H\'){q=c.1p.8B(q,M)}c.$U.q(q);c.K.1t();c.2t.41();c.1p.a6();c.1a.1R();c.2n.2G();if(1C 1p==\'1H\'){3q($.X(c.1p.4d,c),10)}},1b:B(1b){c.2Y.1t();1b=1b.4I();1b=$.3d(1b);1b=c.1p.8T(1b,M);c.$U.2t();if(c.O.26(\'2J\')){c.1O.aV(1b)}L{c.K.14();c.12.4L();C el=1d.3A("1i");el.3w=1b;C 4X=1d.cV(),Q,4Y;4O((Q=el.aR)){4Y=4X.7S(Q)}c.12.49(4X);if(4Y){C 12=c.12.7B();12.fO(4Y);12.51(1q);c.2N.aB();c.2N.4M(12)}}c.1a.1R();c.1p.4d()},oB:B(q){c.1O.q(q,M)},q:B(q,1p){c.2Y.1t();if(1C 1p==\'1H\')1p=1q;c.$U.2t();q=c.1p.6B(q);if(1p){q=c.1p.8B(q)}if(c.O.26(\'2J\')){c.1O.aV(q)}L{if(c.1p.8I)c.1O.fI(q);L 1d.3O(\'iB\',4f,q);c.1O.fQ()}c.1p.a6();if(!c.F.1L){c.$U.1k(\'p\').1z($.X(c.O.3N,c))}c.1a.1R();c.2n.2G();if(1p){c.1p.4d()}},fQ:B(){if(!c.O.26(\'6P\'))E;C $2b=$(c.K.47()).2b();if($2b.1o>0&&$2b[0].1l==\'P\'&&$2b.q()===\'\'){$2b.1t()}},aV:B(q){if(c.O.hM()){C 1g=c.O.5g(\'P\');C $q=$(\'<1i>\').1w(q);C fJ=$q.23().is(\'p, :a9, dl, 2O, ol, 1i, 4q, 3K, 1N, 2D, aH, 3T, a9, b3, it, iu\');if(1g&&fJ)c.1O.fF(1g,q);L c.1O.gy(q);E}1d.K.aZ().nE(q)},fI:B(q){q=c.1p.6B(q);c.K.14();c.12.4L();C el=1d.3A(\'1i\');el.3w=q;C 4X=1d.cV(),Q,4Y;4O((Q=el.aR)){4Y=4X.7S(Q)}c.12.49(4X);c.12.51(1q);c.1U.5q(4Y)},Q:B(Q,4L){Q=Q[0]||Q;C q=c.O.5K(Q);q=c.1p.6B(q);Q=$(q)[0];c.K.14();if(4L!==M){c.12.4L()}c.12.49(Q);c.12.51(M);c.K.4M();E Q},nW:B(Q,x,y){Q=Q[0]||Q;c.K.14();C 12;if(1d.8Y){C 2V=1d.8Y(x,y);c.12.3h(2V.fA,2V.2Q);c.12.51(1q);c.12.49(Q)}L if(1d.8U){12=1d.8U(x,y);12.49(Q)}L if(1C 1d.2x.9m!="1H"){12=1d.2x.9m();12.9G(x,y);C 6I=12.fE();6I.9G(x,y);12.fH("fG",6I);12.6U()}},b2:B(e,Q){Q=Q[0]||Q;C 12;C x=e.o5,y=e.nL;if(1d.8Y){C 2V=1d.8Y(x,y);C 2N=1d.6a();12=2N.6G(0);12.3h(2V.fA,2V.2Q);12.51(1q);12.49(Q)}L if(1d.8U){12=1d.8U(x,y);12.49(Q)}L if(1C 1d.2x.9m!="1H"){12=1d.2x.9m();12.9G(x,y);C 6I=12.fE();6I.9G(x,y);12.fH("fG",6I);12.6U()}},fF:B(1g,q){C Q=1d.3A(\'1e\');Q.4u=\'G-ie-4V\';c.1O.Q(Q);C 9p=$(1g).q();9p=\'<p>\'+9p.I(/<1e 1G="G-ie-4V"><\\/1e>/gi,\'</p>\'+q+\'<p>\')+\'</p>\';$(1g).2y(9p)},gy:B(q){c.K.14();c.12.4L();C el=1d.3A("1i");el.3w=q;C 4X=1d.cV(),Q,4Y;4O((Q=el.aR)){4Y=4X.7S(Q)}c.12.49(4X)}}},1u:B(){E{3r:B(e){if(c.7h)E;C 1m=e.7E;C 4D=(1m>=37&&1m<=40);c.1u.3S=e.7X||e.5W;c.1u.1A=c.K.3J();c.1u.1g=c.K.5R();c.1u.N=c.K.47();c.1u.2D=c.O.9Y(c.1u.1A,\'2D\');c.1u.1N=c.O.9Y(c.1u.1A,\'1N\');c.1u.6Q=c.O.9Y(c.1u.1A,\'6Q\');c.5A.3r(e,1m);c.1u.dw(4D,1m);c.1u.cX(e,1m);c.1u.dm(4D);c.1u.d9(e,1m);C d4=c.1S.2o(\'1u\',e);if(d4===M){e.2k();E M}if(c.F.bi&&1m===c.3j.db){c.1u.dx()}if(!c.F.bi&&1m===c.3j.5T){e.2k();if(!c.12.4Z)c.12.4L();E}if(1m==c.3j.5T&&!e.5S&&!e.7X&&!e.5W){C d0=c.1S.2o(\'oh\',e);if(d0===M){e.2k();E M}if(c.1u.1N&&c.1u.df(e)===1q){E M}C 1A,$2b;if(c.1u.2D){E c.1u.dB(e)}L if(c.1u.1N||c.1u.6Q){1A=c.K.3J();$2b=$(1A).2b();if($2b.28()!==0&&$2b[0].1l==\'6i\'){E c.1u.7r(e)}L if(c.O.84()&&(1A&&1A!=\'6M\')){E c.1u.7F(e)}L{E c.1u.7r(e)}}L if(c.F.1L&&!c.1u.N){1A=c.K.3J();$2b=$(c.1u.1A).2b();if(1A!==M&&$(1A).3i(\'G-7u-2U\')){$(1A).1t();E c.1u.7F(e)}L{if($2b.1o===0&&1A===M&&1C $2b.oD!=\'1H\'){E c.1u.7F(e)}E c.1u.7r(e)}}L if(c.F.1L&&c.1u.N){3q($.X(c.1u.dk,c),1)}L if(!c.F.1L&&c.1u.N&&c.1u.N.1l!==\'4P\'){3q($.X(c.1u.ds,c),1)}L if(!c.F.1L&&!c.1u.N){E c.1u.d8(e)}}if(1m===c.3j.5T&&(e.7X||e.5S)){E c.1u.dg(e)}if(1m===c.3j.b8||e.5W&&1m===co||e.5W&&1m===cp){E c.1u.dD(e,1m)}if(1m===c.3j.7d||1m===c.3j.8C){C 1X=c.K.6Z();if(1X){C 22=1X.1o;C 3o;2v(C i=0;i<22;i++){C 4g=$(1X[i]).4g(\'1B\');if(4g.28()!==0){C 3Q=c;$.1z(4g,B(z,s){C $s=$(s);if($s.1I(\'7i\')!=\'5f\')E;3Q.1S.2o(\'bf\',s.4e,$s);3o=s})}L if(1X[i].1l==\'bj\'){if(3o!=1X[i]){c.1S.2o(\'bf\',1X[i].4e,$(1X[i]));3o=1X[i]}}}}}if(1m===c.3j.7d){c.1u.dh();c.1u.dy(e)}c.1a.1R()},dw:B(4D,1m){if(!4D&&(c.1S.69()==\'2e\'||c.1S.69()==\'4D\')){c.1S.7H(M);if(c.1u.d3(1m)){c.1Z.1K()}}},d3:B(1m){C k=c.3j;C 4B=[k.7d,k.8C,k.5T,k.cz,k.cG,k.b8,k.d5,k.d1,k.dp,k.dr];E($.3B(1m,4B)==-1)?1q:M},dm:B(4D){if(!4D)E;if((c.1S.69()==\'2e\'||c.1S.69()==\'4D\')){c.1S.7H(M);E}c.1S.7H(\'4D\')},cX:B(e,1m){if(c.1u.3S&&1m===90&&!e.5S&&!e.cZ&&c.F.1Z.1o){e.2k();c.1Z.9C();E}L if(c.1u.3S&&1m===90&&e.5S&&!e.cZ&&c.F.7m.1o!==0){e.2k();c.1Z.cB();E}L if(!c.1u.3S){if(1m==c.3j.7d||1m==c.3j.8C||(1m==c.3j.5T&&!e.7X&&!e.5S)||1m==c.3j.cz){c.1Z.1K()}}},d9:B(e,1m){if(c.1u.3S&&1m===65){c.O.hE()}L if(1m!=c.3j.dc&&!c.1u.3S){c.O.8a()}},dx:B(){C 2j=[c.1u.1N,c.1u.2D,c.1u.6Q];2v(C i=0;i<2j.1o;i++){if(2j[i]){c.1u.dz(2j[i]);E M}}},dg:B(e){c.1Z.1K();if(c.1u.1N&&c.O.84()){E c.1u.7F(e)}E c.1u.7r(e)},dD:B(e,1m){if(!c.F.dC)E 1q;if(c.O.4t(c.1a.14())&&c.F.9j===M)E 1q;e.2k();C Q;if(c.1u.2D&&!e.5S){Q=(c.F.5Z)?1d.8R(7M(c.F.5Z+1).2H(\'\\di\')):1d.8R(\'\\t\');c.1O.Q(Q);c.1a.1R()}L if(c.F.9j!==M){Q=1d.8R(7M(c.F.9j+1).2H(\'\\di\'));c.1O.Q(Q);c.1a.1R()}L{if(e.5W&&1m===cp)c.3e.8Z();L if(e.5W&&1m===co)c.3e.8S();L if(!e.5S)c.3e.8S();L c.3e.8Z()}E M},dk:B(){C 4k=c.K.47();C 95=4k.3w.I(/<br\\s?\\/?>/gi,\'\');if((4k.1l===\'8F\'||4k.1l===\'P\')&&95===\'\'&&!$(4k).3i(\'G-U\')){C br=1d.3A(\'br\');$(4k).2y(br);c.1U.bJ(br);c.1a.1R();E M}},ds:B(){C 4k=c.K.47();C 95=4k.3w.I(/<br\\s?\\/?>/gi,\'\');if(4k.1l===\'8F\'&&95===\'\'&&!$(4k).3i(\'G-U\')){C p=1d.3A(\'p\');p.3w=c.F.5M;$(4k).2y(p);c.1U.3h(p);c.1a.1R();E M}L if(c.F.dv&&4k.1l==\'P\'){$(4k).1W(\'1G\').1W(\'1n\')}},d8:B(e){e.2k();c.K.14();C p=1d.3A(\'p\');p.3w=c.F.5M;c.12.4L();c.12.49(p);c.1U.3h(p);c.1a.1R();E M},df:B(e){if(!c.O.84())E;C 52=$.3d($(c.1u.N).q());if(52.3F(/(<br\\s?\\/?>){2}$/i)!=-1){e.2k();if(c.F.1L){C br=1d.3A(\'br\');$(c.1u.1N).3u(br);c.1U.bJ(br);$(c.1u.N).q(52.I(/<br\\s?\\/?>$/i,\'\'))}L{C Q=$(c.F.7G);$(c.1u.1N).3u(Q);c.1U.3h(Q)}E 1q}E},dz:B(2F){if(!c.O.84())E;c.1Z.1K();if(c.F.1L){C 23=$(\'<1i>\').1w($.3d(c.$U.q())).23();C 3o=23.3o()[0];if(3o.1l==\'6M\'&&3o.3w===\'\'){3o=23.6e()[0]}if(c.O.5K(3o)!=c.O.5K(2F))E;C br=1d.3A(\'br\');$(2F).3u(br);c.1U.5q(br)}L{if(c.$U.23().3o()[0]!==2F)E;C Q=$(c.F.7G);$(2F).3u(Q);c.1U.3h(Q)}},dB:B(e){e.2k();C Q=1d.8R(\'\\n\');c.K.14();c.12.4L();c.12.49(Q);c.1U.5q(Q);c.1a.1R();E M},7r:B(e){E c.1u.bn(e)},7F:B(e){E c.1u.bn(e,1q)},bn:B(e,dn){e.do();c.K.14();C bz=1d.3A(\'br\');c.12.4L();c.12.49(bz);if(dn===1q){C bA=1d.3A(\'br\');c.12.49(bA);c.1U.5q(bA)}L{c.1U.5q(bz)}c.1a.1R();E M},dh:B(){C $1A=$(c.1u.1A);if($1A.1b().3F(/^\\8o$/g)===0){$1A.1t()}},dy:B(e){C $1A=$(c.1u.1A);C $1g=$(c.1u.1g);C 3K=$1A.2u(\'3K\');if(3K.28()!==0&&$1A.2u(\'li\')&&$1g.4g(\'li\').28()===1){if(!c.O.4t($1A.1b()))E;e.2k();$1A.1t();$1g.1t();c.1U.3h(3K)}}}},2m:B(){E{3r:B(e){if(c.7h)E;C 1m=e.7E;c.2m.1A=c.K.3J();c.2m.1g=c.K.5R();C $1g=c.O.4i($(c.2m.1g).1g());C dE=c.1S.2o(\'2m\',e);if(dE===M){e.2k();E M}if(!c.F.1L&&c.2m.1A.9Z==3&&c.2m.1A.1o<=1&&(c.2m.1g===M||c.2m.1g.1l==\'aY\')){c.2m.bV()}if(!c.F.1L&&$(c.2m.1g).3i(\'G-7u-2U\')&&($1g===M||$1g[0].1l==\'aY\')){$(c.2m.1g).23().3Y();c.2m.bV()}if(c.F.8A&&(c.F.75||c.F.6C||c.F.6T)&&1m===c.3j.5T){c.cb(c.F.8k,c.F.8A,c.F.75,c.F.6C,c.F.6T,c.F.6H);c.2n.2G();c.1a.1R()}if(1m===c.3j.8C||1m===c.3j.7d){c.1p.4d();if(c.2n.J){e.2k();c.J.64();c.1Z.1K();c.J.1t(c.2n.J);c.2n.J=M;E M}c.$U.1k(\'p\').1z($.X(c.O.3N,c));if(c.2m.1A&&c.2m.1A.1l==\'8F\'&&c.O.4t(c.2m.1A.3w)){if(c.F.1L){$(c.2m.1A).3u(c.K.7x());c.K.2S();$(c.2m.1A).1t()}}E c.2m.de(e)}},bV:B(){C $1A=$(c.2m.1A);C Q=$(\'<p>\').1w($1A.hu());$1A.2y(Q);C 2b=$(Q).2b();if(1C(2b[0])!==\'1H\'&&2b[0].1l==\'6i\'){2b.1t()}c.1U.41(Q)},de:B(e){C q=$.3d(c.$U.q());if(!c.O.4t(q))E;e.2k();if(c.F.1L){c.$U.q(c.K.7x());c.K.2S()}L{q=\'<p><br /></p>\';c.$U.q(q);c.2t.3h()}c.1a.1R();E M}}},1E:B(){E{2G:B(){c.F.c4=c.F.da[c.F.1E]},14:B(1f){E(1C c.F.c4[1f]!=\'1H\')?c.F.c4[1f]:\'\'}}},4r:B(){E{1O:B(){c.1Z.1K();C 1Q=c.K.3V();if(1Q[0]!==M&&c.4r.d7(1Q)){if(!c.O.26(\'2J\'))c.$U.2t();E}if(c.O.26(\'2J\')){c.4r.ay()}L{c.4r.j5()}},d7:B(1Q){C 7A=[\'li\',\'3K\',\'5U\',\'1N\',\'6Q\',\'2D\',\'dl\',\'dt\',\'dd\'];C 3z=1Q[0].1l.2P();C 3o=c.K.hb();3o=(1C 3o==\'1H\')?3z:3o.1l.2P();C c1=$.3B(3z,7A)!=-1;C ht=$.3B(3o,7A)!=-1;if((c1&&ht)||c1){E 1q}},ay:B(){c.O.7z();c.1Z.1K();c.1O.Q(1d.3A(\'hr\'));c.O.a1();c.1a.1R()},j5:B(){c.1Z.1K();C c2=\'<p id="G-1O-4r"><br /></p>\';if(c.F.1L)c2=\'<br id="G-1O-4r">\';1d.3O(\'iB\',M,\'<hr>\'+c2);c.4r.iA();c.1a.1R()},iA:B(){C Q=c.$U.1k(\'#G-1O-4r\');C 2b=$(Q).2b()[0];if(2b){c.1U.5q(Q);Q.1t()}L{Q.1W(\'id\')}}}},T:B(){E{2B:B(e){if(1C e!=\'1H\'&&e.2k)e.2k();c.V.2G(\'T\',c.1E.14(\'bq\'),lZ);c.V.cU();c.T.iz=c.V.cu(c.1E.14(\'1O\'));c.K.14();c.T.iF();c.T.iy();if(c.T.1M==\'7e\')$(\'#G-T-6R\').8P(\'8N\',1q);c.T.$8D=$(\'#G-T-2c\');c.T.$bX=$(\'#G-T-2c-1b\');c.T.$bX.2w(c.T.1b);c.T.$8D.2w(c.T.2c);c.T.iz.on(\'2e\',$.X(c.T.1O,c));$(\'.G-T-31\').1t();c.K.2R();c.V.2B();c.T.$8D.2t()},iy:B(){C iC=3Q.iD.29.I(/\\/$/i,\'\');c.T.2c=c.T.2c.I(iC,\'\');c.T.2c=c.T.2c.I(/^\\/#/,\'#\');c.T.2c=c.T.2c.I(\'bW:\',\'\');if(!c.F.8k){C 3U=1J 1T(\'^(7Y|a8|6n)://\'+3Q.iD.lw,\'i\');c.T.2c=c.T.2c.I(3U,\'\')}},iF:B(){c.T.$Q=M;C $el=$(c.K.3J()).2u(\'a\');if($el.28()!==0&&$el[0].1l===\'A\'){c.T.$Q=$el;c.T.2c=$el.Y(\'29\');c.T.1b=$el.1b();c.T.1M=$el.Y(\'1M\')}L{c.T.1b=c.2N.4I();c.T.2c=\'\';c.T.1M=\'\'}},1O:B(){C 1M=\'\';C T=c.T.$8D.2w();C 1b=c.T.$bX.2w();if($.3d(T)===\'\'){c.T.$8D.2q(\'G-3n-5r\').on(\'2m\',B(){$(c).2I(\'G-3n-5r\');$(c).3H(\'2m\')});E}if(T.3F(\'@\')!=-1&&/(7Y|a8|6n):\\/\\//i.6L(T)===M){T=\'bW:\'+T}L if(T.3F(\'#\')!==0){if($(\'#G-T-6R\').8P(\'8N\')){1M=\'7e\'}C c5=\'((lH--)?[a-8X-9]+(-[a-8X-9]+)*\\\\.)+[a-z]{2,}\';C 3U=1J 1T(\'^(7Y|a8|6n)://\'+c5,\'i\');C iE=1J 1T(\'^\'+c5,\'i\');if(T.3F(3U)==-1&&T.3F(iE)===0&&c.F.8k){T=c.F.8k+\'://\'+T}}c.T.1K(1b,T,1M);c.V.44()},1K:B(1b,T,1M){1b=$.3d(1b.I(/<|>/g,\'\'));c.K.2S();if(1b===\'\'&&T===\'\')E;if(1b===\'\'&&T!==\'\')1b=T;if(c.T.$Q){c.1Z.1K();c.T.$Q.1b(1b).Y(\'29\',T);if(1M!==\'\'){c.T.$Q.Y(\'1M\',1M)}L{c.T.$Q.1W(\'1M\')}c.1a.1R()}L{if(c.O.26(\'6P\')&&c.T.1b===\'\'){C $a=$(\'<a />\').Y(\'29\',T).1b(1b);if(1M!==\'\')$a.Y(\'1M\',1M);c.1O.Q($a);c.K.9c($a)}L{C $a;if(c.O.26(\'2J\')){$a=$(\'<a 29="\'+T+\'">\').1b(1b);if(1M!==\'\')$a.Y(\'1M\',1M);$a=$(c.1O.Q($a));c.K.9c($a)}L{1d.3O(\'lQ\',M,T);$a=$(c.K.3J()).2u(\'a\');if(1M!==\'\')$a.Y(\'1M\',1M);$a.1W(\'1n\');if(c.T.1b===\'\'){$a.1b(1b);c.K.9c($a)}}}c.1a.1R();c.1S.2o(\'lR\',$a)}3q($.X(B(){c.2n.aX()},c),5)},6h:B(e){if(1C e!=\'1H\'&&e.2k)e.2k();C 1X=c.K.6Z();if(!1X)E;c.1Z.1K();C 22=1X.1o;2v(C i=0;i<22;i++){if(1X[i].1l==\'A\'){C $Q=$(1X[i]);$Q.2y($Q.23())}}$(\'.G-T-31\').1t();c.1a.1R()}}},2T:B(){E{2M:B(4w){if(!c.O.26(\'2J\'))c.$U.2t();c.1Z.1K();c.K.2R();C 1g=c.K.5R();C $2T=$(1g).2u(\'ol, 2O\');if(!c.O.4i($2T)&&$2T.28()!==0){$2T=M}C cg,ci;C 1t=M;if($2T&&$2T.1o){1t=1q;C ce=$2T[0].1l;cg=(4w===\'54\'&&ce===\'8j\');ci=(4w===\'5z\'&&ce===\'8i\')}if(cg){c.O.4v($2T,\'ol\')}L if(ci){c.O.4v($2T,\'2O\')}L{if(1t){c.2T.1t(4w)}L{c.2T.1O(4w)}}c.K.2S();c.1a.1R()},1O:B(4w){if(c.O.26(\'2J\')&&c.F.1L){c.2T.ay(4w)}L{1d.3O(\'1O\'+4w)}C 1g=c.K.5R();C $2T=$(1g).2u(\'ol, 2O\');if(c.O.4t($2T.1k(\'li\').1b())){C $4g=$2T.4g(\'li\');$4g.1k(\'br\').1t();$4g.1w(c.K.7x())}if($2T.1o){C $6A=$2T.1g();if(c.O.4i($6A)&&$6A[0].1l!=\'4P\'&&c.O.6m($6A[0])){$6A.2y($6A.23())}}if(!c.O.26(\'2J\')){c.$U.2t()}c.1p.4d()},ay:B(4w){C 4j=c.K.5E(\'1i\');C aF=$(4j).q();C 6w=(4w==\'54\')?$(\'<ol>\'):$(\'<2O>\');C 8m=$(\'<li>\');if($.3d(aF)===\'\'){8m.1w(c.K.7x());6w.1w(8m);c.$U.1k(\'#K-2L-1\').2y(6w)}L{C 8h=aF.4E(/<br\\s?\\/?>/gi);if(8h){2v(C i=0;i<8h.1o;i++){if($.3d(8h[i])!==\'\'){6w.1w($(\'<li>\').q(8h[i]))}}}L{8m.1w(aF);6w.1w(8m)}$(4j).2y(6w)}},1t:B(4w){1d.3O(\'1O\'+4w);C $1A=$(c.K.3J());c.3e.af();if(!c.F.1L&&$1A.2u(\'li, 5U, 3K\').28()===0){1d.3O(\'a2\',M,\'p\');c.$U.1k(\'2O, ol, 1N\').1z($.X(c.O.3N,c))}C $4q=$(c.K.3J()).2u(\'4q\');C $6e=$4q.6e();if(!c.F.1L&&$4q.28()!==0&&$6e.28()!==0&&$6e[0].1l==\'6i\'){$6e.1t()}c.1p.4d()}}},V:B(){E{9h:{},ix:B(){c.F.V={im:5L()+\'<3T id="G-V-J-7T">\'+\'<3c>\'+c.1E.14(\'1F\')+\'</3c>\'+\'<3n 1c="1b" id="G-J-1F" />\'+\'<3c 1G="G-J-T-3E">\'+c.1E.14(\'T\')+\'</3c>\'+\'<3n 1c="1b" id="G-J-T" 1G="G-J-T-3E" />\'+\'<3c 1G="G-J-T-3E"><3n 1c="iq" id="G-J-T-6R"> \'+c.1E.14(\'bu\')+\'</3c>\'+\'<3c 1G="G-J-3R-3E">\'+c.1E.14(\'ik\')+\'</3c>\'+\'<6U 1G="G-J-3R-3E" id="G-J-4S">\'+\'<3E 1D="5f">\'+c.1E.14(\'5f\')+\'</3E>\'+\'<3E 1D="21">\'+c.1E.14(\'21\')+\'</3E>\'+\'<3E 1D="57">\'+c.1E.14(\'57\')+\'</3E>\'+\'<3E 1D="4c">\'+c.1E.14(\'4c\')+\'</3E>\'+\'</6U>\'+\'</3T>\',J:5L()+\'<3T id="G-V-J-1O">\'+\'<1i id="G-V-J-3P"></1i>\'+\'</3T>\',1P:5L()+\'<3T id="G-V-1P-1O">\'+\'<1i id="G-V-1P-1j-2r">\'+\'<3c>\'+c.1E.14(\'6p\')+\'</3c>\'+\'<3n 1c="1b" id="G-6p" /><br><br>\'+\'<1i id="G-V-1P-1j"></1i>\'+\'</1i>\'+\'</3T>\',T:5L()+\'<3T id="G-V-T-1O">\'+\'<3c>ip</3c>\'+\'<3n 1c="2c" id="G-T-2c" />\'+\'<3c>\'+c.1E.14(\'1b\')+\'</3c>\'+\'<3n 1c="1b" id="G-T-2c-1b" />\'+\'<3c><3n 1c="iq" id="G-T-6R"> \'+c.1E.14(\'bu\')+\'</3c>\'+\'</3T>\'};$.70(c.F,c.F.V)},bo:B(1f,2l){c.V.9h[1f]=2l},jy:B($V){c.V.$7q=$(\'<1i>\').Y(\'id\',\'G-V-7q\');$V.4N(c.V.$7q)},jA:B(id,1f,7w){C $5j=$(\'<a 29="#" 3G="5j\'+id+\'">\').1b(1f);if(7w){$5j.2q(\'7w\')}C 3Q=c;$5j.on(\'2e\',B(e){e.2k();$(\'.G-5j\').3b();$(\'.G-\'+$(c).Y(\'3G\')).2B();3Q.V.$7q.1k(\'a\').2I(\'7w\');$(c).2q(\'7w\')});c.V.$7q.1w($5j)},jH:B(1f,iv){c.F.V[1f]=iv},iT:B(1f){E c.F.V[1f]},jh:B(){E c.$9F.1k(\'3T\')},2G:B(5H,1F,2h){c.V.5H=5H;c.V.2h=2h;c.V.2f();c.V.iV();c.V.iN(1F);c.V.iQ();c.V.iM();if(1C c.V.9h[5H]!=\'1H\'){c.V.9h[5H].5X(c)}},2B:B(){1d.iJ.aD();$(1d.2x).2I(\'2x-6z\');c.V.j3=$(1d.2x).1I(\'aa\');$(1d.2x).1I(\'aa\',\'6z\');if(c.O.5Q()){c.V.cj()}L{c.V.ao()}c.$6Y.2B();c.$4o.2B();c.V.iL();c.O.7z();if(!c.O.5Q()){3q($.X(c.V.ao,c),0);$(3M).on(\'4m.G-V\',$.X(c.V.4m,c))}c.1S.2o(\'ja\',c.V.5H,c.$V);$(1d).3H(\'jd.V\');c.$V.1k(\'3n[1c=1b]\').on(\'1u.G-V\',$.X(c.V.iP,c))},ao:B(){C 3f=c.$V.jl();C 9W=$(3M).3f();C j1=$(3M).2h();if(c.V.2h>j1){c.$V.1I({2h:\'96%\',5t:(9W/2-3f/2)+\'3m\'});E}if(3f>9W){c.$V.1I({2h:c.V.2h+\'3m\',5t:\'kB\'})}L{c.$V.1I({2h:c.V.2h+\'3m\',5t:(9W/2-3f/2)+\'3m\'})}},cj:B(){c.$V.1I({2h:\'96%\',5t:\'2%\'})},4m:B(){if(c.O.5Q()){c.V.cj()}L{c.V.ao()}},iN:B(1F){c.$7y.q(1F)},iM:B(){c.$9F.q(c.V.iT(c.V.5H))},iQ:B(){if(1C $.fn.iR===\'1H\')E;c.$V.iR({iS:c.$7y});c.$7y.1I(\'nY\',\'o4\')},iP:B(e){if(e.7E!=13)E;e.2k();c.$V.1k(\'1s.G-V-6N-25\').2e()},cU:B(){C 1s=$(\'<1s>\').2q(\'G-V-25 G-V-44-25\').q(c.1E.14(\'iO\'));1s.on(\'2e\',$.X(c.V.44,c));c.$7P.1w(1s)},iK:B(3c){E c.V.cK(3c,\'8v\')},cu:B(3c){E c.V.cK(3c,\'6N\')},cK:B(3c,4u){C 1s=$(\'<1s>\').2q(\'G-V-25\').2q(\'G-V-\'+4u+\'-25\').q(3c);c.$7P.1w(1s);E 1s},iL:B(){C 3D=c.$7P.1k(\'1s\');C cl=3D.28();if(cl===0)E;3D.1I(\'2h\',(7I/cl)+\'%\')},2f:B(){c.V.iU();c.$4o=$(\'<1i id="G-V-2r" />\').3b();c.$V=$(\'<1i id="G-V" />\');c.$7y=$(\'<a9 />\');c.$7s=$(\'<1e id="G-V-44" />\').q(\'&nG;\');c.$9F=$(\'<1i id="G-V-2x" />\');c.$7P=$(\'<b3 />\');c.$V.1w(c.$7y);c.$V.1w(c.$7s);c.$V.1w(c.$9F);c.$V.1w(c.$7P);c.$4o.1w(c.$V);c.$4o.cw(1d.2x)},iU:B(){c.$6Y=$(\'<1i id="G-V-nz">\').3b();$(\'2x\').4N(c.$6Y)},iV:B(){c.$7s.on(\'2e.G-V\',$.X(c.V.44,c));$(1d).on(\'2m.G-V\',$.X(c.V.cF,c));c.$U.on(\'2m.G-V\',$.X(c.V.cF,c));c.$4o.on(\'2e.G-V\',$.X(c.V.44,c))},j2:B(){c.$7s.3H(\'2e.G-V\');$(1d).3H(\'2m.G-V\');c.$U.3H(\'2m.G-V\');c.$4o.3H(\'2e.G-V\');$(3M).3H(\'4m.G-V\')},cF:B(e){if(e.7E!=c.3j.cG)E;c.V.44(M)},44:B(e){if(e){if(!$(e.1M).3i(\'G-V-44-25\')&&e.1M!=c.$7s[0]&&e.1M!=c.$4o[0]){E}e.2k()}if(!c.$4o)E;c.V.j2();c.$6Y.1t();c.$4o.ii(\'nI\',$.X(B(){c.$4o.1t();3q($.X(c.O.a1,c),0);if(e!==1H)c.K.2S();$(1d.2x).1I(\'aa\',c.V.j3);c.1S.2o(\'nJ\',c.V.5H)},c))}}},2n:B(){E{2G:B(){c.2n.9P();c.2n.aX()},3D:B(e,2i){C 1A=c.K.3J();C 1g=c.K.5R();c.1s.j4(2i);if(e===M&&2i!==\'q\'){if($.3B(2i,c.F.9N)!=-1)c.1s.og(2i);E}$.1z(c.F.bl,$.X(B(1m,1D){C 9v=$(1g).2u(1m);C aJ=$(1A).2u(1m);if(9v.1o!==0&&!c.O.4i(9v))E;if(!c.O.4i(aJ))E;if(9v.1o!==0||aJ.2u(1m).1o!==0){c.1s.8d(1D)}},c));C $1g=$(1g).2u(c.F.7J.4I().2P());if(c.O.4i(1g)&&$1g.1o){C 4S=($1g.1I(\'1b-4S\')===\'\')?\'21\':$1g.1I(\'1b-4S\');c.1s.8d(\'4S\'+4S)}},nS:B(R,2i){c.F.9N.2W(2i);c.F.bl[R]=2i},9P:B(){c.$U.1k(\'1B\').1z($.X(B(i,1B){C $1B=$(1B);$1B.2u(\'a\').on(\'2e\',B(e){e.2k()});if(c.O.26(\'2J\'))$1B.Y(\'nP\',\'on\');c.J.j0($1B)},c));$(1d).on(\'2e.G-J-8v\',$.X(B(e){c.2n.J=M;if(e.1M.1l==\'bj\'&&c.O.4i(e.1M)){c.2n.J=(c.2n.J&&c.2n.J==e.1M)?M:e.1M}},c))},aX:B(){if(!c.F.iW)E;c.$U.1k(\'a\').on(\'68 2e\',$.X(c.2n.iX,c));c.$U.on(\'68 2e.G\',$.X(c.2n.bc,c));$(1d).on(\'68 2e.G\',$.X(c.2n.bc,c))},iY:B($T){E $T.2Q()},iX:B(e){C $T=$(e.1M);C $1g=$T.2u(\'a\');if($1g.28()!==0&&$1g[0].1l===\'A\'&&$T[0].1l!==\'A\'){$T=$1g}L if($T.28()===0||$T[0].1l!==\'A\'){E}C 2V=c.2n.iY($T);C 31=$(\'<1e 1G="G-T-31"></1e>\');C 29=$T.Y(\'29\');if(29===1H){29=\'\'}if(29.1o>24)29=29.9z(0,24)+\'...\';C iZ=$(\'<a 29="\'+$T.Y(\'29\')+\'" 1M="7e" />\').q(29).2q(\'G-T-31-6N\');C iI=$(\'<a 29="#" />\').q(c.1E.14(\'7T\')).on(\'2e\',$.X(c.T.2B,c)).2q(\'G-T-31-6N\');C ir=$(\'<a 29="#" />\').q(c.1E.14(\'6h\')).on(\'2e\',$.X(c.T.6h,c)).2q(\'G-T-31-6N\');31.1w(iZ).1w(\' | \').1w(iI).1w(\' | \').1w(ir);31.1I({2C:(2V.2C+20)+\'3m\',21:2V.21+\'3m\'});$(\'.G-T-31\').1t();$(\'2x\').1w(31)},bc:B(e){e=e.7l||e;C 1M=e.1M;C $1g=$(1M).2u(\'a\');if($1g.28()!==0&&$1g[0].1l===\'A\'&&1M.1l!==\'A\'){E}L if((1M.1l===\'A\'&&c.O.4i(1M))||$(1M).3i(\'G-T-31-6N\')){E}$(\'.G-T-31\').1t()}}},2p:B(){E{2G:B(q){if(c.F.1L)E q;if(q===\'\'||q===\'<p></p>\')E c.F.7G;c.2p.1Q=[\'4q\',\'1i\',\'2D\',\'5v\',\'2O\',\'ol\',\'h1\',\'h2\',\'h3\',\'h4\',\'h5\',\'h6\',\'dl\',\'1N\',\'6Q\',\'aH\',\'3T\',\'a9\',\'b3\',\'it\',\'iu\',\'4F\',\'1n\',\'3Z\',\'4W\',\'6U\',\'3n\',\'2E\',\'1s\',\'3E\',\'hn\',\'h8\',\'oo\',\'hr\',\'hg\',\'oq\',\'oj\',\'oA\',\'6r\',\'oz\',\'mI\',\'mK\',\'p\'];q=q+"\\n";c.2p.9t=[];c.2p.z=0;q=q.I(/(<br\\s?\\/?>){1,}\\n?<\\/1N>/gi,\'</1N>\');q=c.2p.gz(q);q=c.2p.io(q);q=c.2p.iH(q);q=c.2p.iG(q);q=c.2p.j6(q);q=c.2p.iw(q);q=q.I(1J 1T(\'<br\\\\s?/?>\\n?<(\'+c.2p.1Q.2H(\'|\')+\')(.*?[^>])>\',\'gi\'),\'<p><br /></p>\\n<$1$2>\');E $.3d(q)},gz:B(q){C $1i=$(\'<1i />\').1w(q);$1i.1k(\'1N p\').2y(B(){E $(c).1w(\'<br />\').23()});q=$1i.q();$1i.1k(c.2p.1Q.2H(\', \')).1z($.X(B(i,s){c.2p.z++;c.2p.9t[c.2p.z]=s.il;q=q.I(s.il,\'\\n{I\'+c.2p.z+\'}\')},c));E q},io:B(q){C aM=q.2d(/<!--([\\w\\W]*?)-->/gi);if(!aM)E q;$.1z(aM,$.X(B(i,s){c.2p.z++;c.2p.9t[c.2p.z]=s;q=q.I(s,\'\\n{I\'+c.2p.z+\'}\')},c));E q},iw:B(q){$.1z(c.2p.9t,B(i,s){q=q.I(\'{I\'+i+\'}\',s)});E q},iG:B(q){C 4p=q.4E(1J 1T(\'\\n\',\'g\'),-1);q=\'\';if(4p){C 22=4p.1o;2v(C i=0;i<22;i++){if(!4p.mp(i))E;if(4p[i].3F(\'{I\')==-1){4p[i]=4p[i].I(/<p>\\n\\t?<\\/p>/gi,\'\');4p[i]=4p[i].I(/<p><\\/p>/gi,\'\');if(4p[i]!==\'\'){q+=\'<p>\'+4p[i].I(/^\\n+|\\n+$/g,"")+"</p>"}}L q+=4p[i]}}E q},iH:B(q){q=q.I(/<br \\/>\\s*<br \\/>/gi,"\\n\\n");q=q.I(/<br\\s?\\/?>\\n?<br\\s?\\/?>/gi,"\\n<br /><br />");q=q.I(1J 1T("\\r\\n",\'g\'),"\\n");q=q.I(1J 1T("\\r",\'g\'),"\\n");q=q.I(1J 1T("/\\n\\n+/"),\'g\',"\\n\\n");E q},j6:B(q){q=q.I(1J 1T(\'</1N></p>\',\'gi\'),\'</1N>\');q=q.I(1J 1T(\'<p></1N>\',\'gi\'),\'</1N>\');q=q.I(1J 1T(\'<p><1N>\',\'gi\'),\'<1N>\');q=q.I(1J 1T(\'<1N></p>\',\'gi\'),\'<1N>\');q=q.I(1J 1T(\'<p><p \',\'gi\'),\'<p \');q=q.I(1J 1T(\'<p><p>\',\'gi\'),\'<p>\');q=q.I(1J 1T(\'</p></p>\',\'gi\'),\'</p>\');q=q.I(1J 1T(\'<p>\\\\s?</p>\',\'gi\'),\'\');q=q.I(1J 1T("\\n</p>",\'gi\'),\'</p>\');q=q.I(1J 1T(\'<p>\\t?\\t?\\n?<p>\',\'gi\'),\'<p>\');q=q.I(1J 1T(\'<p>\\t*</p>\',\'gi\'),\'\');E q}}},4V:B(){E{3r:B(e){if(!c.F.j8)E;c.7h=1q;c.1Z.1K();c.K.2R();c.O.7z();c.4V.j7();$(3M).on(\'6W.G-j9\',$.X(B(){$(3M).3C(c.al)},c));3q($.X(B(){C q=c.$5C.q();c.$5C.1t();c.K.2S();c.O.a1();c.4V.1O(q);$(3M).3H(\'6W.G-j9\')},c),1)},j7:B(){c.$5C=$(\'<1i>\').q(\' \').Y(\'77\',\'1q\').1I({3R:\'71\',2h:0,2C:0,21:\'-oe\'});c.$2r.1g().1w(c.$5C);c.$5C.2t()},1O:B(q){q=c.1S.2o(\'nN\',q);q=(c.O.6J())?c.1p.8B(q,M):c.1p.8B(q);q=c.1S.2o(\'4V\',q);if(c.O.6J()){c.1O.1K(q,M)}L{c.1O.q(q,M)}c.O.8a();c.7h=M;3q($.X(c.1p.4d,c),10)}}},2Y:B(){E{9b:B(){if(!c.2Y.is())E;c.$U.Y(\'2Y\',c.$2F.Y(\'2Y\'));c.2Y.2M();c.$U.on(\'2m.G-2Y\',$.X(c.2Y.2M,c))},2M:B(){C 1v=\'2I\';if(c.O.4t(c.$U.q(),M))1v=\'2q\';c.$U[1v](\'G-2Y\')},1t:B(){c.$U.2I(\'G-2Y\')},is:B(){if(c.F.2Y){E c.$2F.Y(\'2Y\',c.F.2Y)}L{E!(1C c.$2F.Y(\'2Y\')==\'1H\'||c.$2F.Y(\'2Y\')===\'\')}}}},5p:B(){E{2B:B(){$(1d.2x).1w($(\'<1i id="G-5p"><1e></1e></1i>\'));$(\'#G-5p\').nX()},3b:B(){$(\'#G-5p\').ii(nR,B(){$(c).1t()})}}},K:B(){E{14:B(){c.2N=1d.6a();if(1d.6a&&c.2N.6G&&c.2N.7R){c.12=c.2N.6G(0)}L{c.12=1d.aZ()}},4M:B(){4s{c.2N.aB()}4x(e){}c.2N.4M(c.12)},3J:B(){C el=M;c.K.14();if(c.2N&&c.2N.7R>0){el=c.2N.6G(0).nK}E c.O.4i(el)},5R:B(4z){4z=4z||c.K.3J();if(4z){E c.O.4i($(4z).1g()[0])}E M},47:B(Q){Q=Q||c.K.3J();4O(Q){if(c.O.6V(Q.1l)){E($(Q).3i(\'G-U\'))?M:Q}Q=Q.bk}E M},aS:B(1X){c.K.14();if(c.12&&c.12.4Z){E M}C ai=[];1X=(1C 1X==\'1H\')?c.K.6Z():1X;C 4C=c.F.4C;4C.2W(\'1e\');$.1z(1X,$.X(B(i,Q){if($.3B(Q.1l.2P(),4C)!=-1){ai.2W(Q)}},c));E(ai.1o===0)?M:ai},3V:B(1X){c.K.14();if(c.12&&c.12.4Z){E[c.K.47()]}C 1Q=[];1X=(1C 1X==\'1H\')?c.K.6Z():1X;$.1z(1X,$.X(B(i,Q){if(c.O.6m(Q)){c.K.hc=Q;1Q.2W(Q)}},c));E(1Q.1o===0)?[c.K.47()]:1Q},hb:B(){E c.K.hc},6Z:B(){c.K.14();C as=c.K.b9(1);C 93=c.K.b9(2);c.K.aO(c.12,as,1q);if(c.12.4Z===M){c.K.aO(c.12,93,M)}L{93=as}C 1X=[];C 8K=0;C 3Q=c;c.$U.1k(\'*\').1z(B(){if(c==as){C 1g=$(c).1g();if(1g.1o!==0&&1g[0].1l!=\'aY\'&&3Q.O.4i(1g[0])){1X.2W(1g[0])}1X.2W(c);8K=1}L{if(8K>0){1X.2W(c);8K=8K+1}}if(c==93){E M}});C b6=[];C 22=1X.1o;2v(C i=0;i<22;i++){if(1X[i].id!=\'1X-2L-1\'&&1X[i].id!=\'1X-2L-2\'){b6.2W(1X[i])}}c.K.hd();E b6},b9:B(5F){E $(\'<1e id="1X-2L-\'+5F+\'" 1G="G-1X-2L" 1h-3v="G">\'+c.F.5M+\'</1e>\')[0]},aO:B(12,Q,1c){12=12.7B();4s{12.51(1c);12.49(Q)}4x(e){}},hd:B(){$(1d).1k(\'1e.G-1X-2L\').1t();c.$U.1k(\'1e.G-1X-2L\').1t()},oF:B(2X,3I){c.1U.9o(2X,3I)},5E:B(R){c.K.14();if(c.12.4Z)E M;C 4j=1d.3A(R);4j.7S(c.12.ok());c.12.49(4j);E 4j},9c:B(Q){c.1U.1K(Q,0,Q,1)},ak:B(){c.K.14();c.12.ap(c.$U[0]);c.K.4M()},1t:B(){c.K.14();c.2N.aB()},2R:B(){c.K.he()},he:B(){c.K.14();C 5B=c.K.6d(1);c.K.aQ(c.12,5B,1q);if(c.12.4Z===M){C 83=c.K.6d(2);c.K.aQ(c.12,83,M)}c.ha=c.$U.q()},6d:B(5F){if(1C 5F==\'1H\')5F=1;E $(\'<1e id="K-2L-\'+5F+\'" 1G="G-K-2L" 1h-3v="G">\'+c.F.5M+\'</1e>\')[0]},7x:B(5F){E c.O.5K(c.K.6d(5F))},aQ:B(12,Q,1c){12=12.7B();4s{12.51(1c);12.49(Q)}4x(e){c.2t.3h()}},2S:B(){C 5B=c.$U.1k(\'1e#K-2L-1\');C 83=c.$U.1k(\'1e#K-2L-2\');if(5B.1o!==0&&83.1o!==0){c.1U.1K(5B,0,83,0)}L if(5B.1o!==0){c.1U.1K(5B,0,5B,0)}L{c.$U.2t()}c.K.aC();c.ha=M},aC:B(){c.$U.1k(\'1e.G-K-2L\').1t()},os:B(){c.K.14();E c.2N.4I()},ot:B(){C q=\'\';c.K.14();if(c.2N.7R){C b0=1d.3A(\'1i\');C 22=c.2N.7R;2v(C i=0;i<22;++i){b0.7S(c.2N.6G(i).ov())}q=b0.3w}E c.1p.b5(q)}}},5A:B(){E{3r:B(e,1m){if(!c.F.5A){if((e.7X||e.5W)&&(1m===66||1m===73))e.2k();E M}$.1z(c.F.5A,$.X(B(5l,4a){C 4B=5l.4E(\',\');C 22=4B.1o;2v(C i=0;i<22;i++){if(1C 4B[i]===\'62\'){c.5A.h9(e,$.3d(4B[i]),$.X(B(){C 1v;if(4a.1v.3F(/\\./)!=\'-1\'){1v=4a.1v.4E(\'.\');if(1C c[1v[0]]!=\'1H\'){c[1v[0]][1v[1]].87(c,4a.5w)}}L{c[4a.1v].87(c,4a.5w)}},c))}}},c))},h9:B(e,4B,h0){C gZ={8:"mJ",9:"5j",10:"E",13:"E",16:"67",17:"3S",18:"72",19:"mG",20:"mD",27:"ny",32:"2U",33:"mL",34:"mO",35:"3I",36:"mo",37:"21",38:"mm",39:"4c",40:"mt",45:"1O",46:"43",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",7I:"4",mY:"5",nc:"6",na:"7",n8:"8",mE:"9",n7:"*",n6:"+",n9:"-",nb:".",n5:"/",n4:"f1",mX:"f2",mW:"f3",n3:"f4",ne:"f5",ns:"f6",nq:"f7",nu:"f8",nw:"f9",nv:"np",no:"nh",ng:"nf",ni:"nj",nm:"6W",nk:"-",mV:";",mU:"=",mu:",",mx:"-",mz:".",my:"/",ms:"`",cp:"[",mr:"\\\\",co:"]",mk:"\'"};C cr={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"5O","=":"+",";":": ","\'":"\\"",",":"<",".":">","/":"?","\\\\":"|"};4B=4B.2P().4E(" ");C 8W=gZ[e.3j],86=5L.mn(e.7E).2P(),7b="",7c={};$.1z(["72","3S","5m","67"],B(5u,8V){if(e[8V+\'mq\']&&8W!==8V){7b+=8V+\'+\'}});if(8W)7c[7b+8W]=1q;if(86){7c[7b+86]=1q;7c[7b+cr[86]]=1q;if(7b==="67+"){7c[cr[86]]=1q}}2v(C i=0,22=4B.1o;i<22;i++){if(7c[4B[i]]){e.2k();E h0.87(c,h7)}}}}},2s:B(){E{14:B(1a){if(!c.F.2s)E 1a;C cP=[\'h8\',\'2x\',\'hf\',\'hr\',\'i?mB\',\'T\',\'5m\',\'mC\',\'1n\',\'3Z\',\'4q\',\'cs\',\'cJ\',\'cT\'];C cM=[\'li\',\'dt\',\'dt\',\'h[1-6]\',\'3E\',\'3Z\'];C 80=[\'1N\',\'1i\',\'dl\',\'hg\',\'5v\',\'mF\',\'hn\',\'ol\',\'p\',\'2D\',\'6U\',\'3K\',\'5U\',\'6q\',\'2O\'];c.2s.ho=1J 1T(\'^<(/?\'+cP.2H(\'|/?\')+\'|\'+cM.2H(\'|\')+\')[ >]\');c.2s.hp=1J 1T(\'^<(br|/?\'+cP.2H(\'|/?\')+\'|/\'+cM.2H(\'|/\')+\')[ >]\');c.2s.80=1J 1T(\'^</?(\'+80.2H(\'|\')+\')[ >]\');C i=0,au=1a.1o,3y=0,2X=4f,3I=4f,R=\'\',2a=\'\',4U=\'\';c.2s.7Z=0;2v(;i<au;i++){3y=i;if(-1==1a.4Q(i).4T(\'<\')){2a+=1a.4Q(i);E c.2s.cL(2a)}4O(3y<au&&1a.5x(3y)!=\'<\'){3y++}if(i!=3y){4U=1a.4Q(i,3y-i);if(!4U.2d(/^\\s{2,}$/g)){if(\'\\n\'==2a.5x(2a.1o-1))2a+=c.2s.6u();L if(\'\\n\'==4U.5x(0)){2a+=\'\\n\'+c.2s.6u();4U=4U.I(/^\\s+/,\'\')}2a+=4U}if(4U.2d(/\\n/))2a+=\'\\n\'+c.2s.6u()}2X=3y;4O(3y<au&&\'>\'!=1a.5x(3y)){3y++}R=1a.4Q(2X,3y-2X);i=3y;C t;if(\'!--\'==R.4Q(1,3)){if(!R.2d(/--$/)){4O(\'-->\'!=1a.4Q(3y,3)){3y++}3y+=2;R=1a.4Q(2X,3y-2X);i=3y}if(\'\\n\'!=2a.5x(2a.1o-1))2a+=\'\\n\';2a+=c.2s.6u();2a+=R+\'>\\n\'}L if(\'!\'==R[1]){2a=c.2s.aA(R+\'>\',2a)}L if(\'?\'==R[1]){2a+=R+\'>\\n\'}L if(t=R.2d(/^<(3Z|1n|2D)/i)){t[1]=t[1].2P();R=c.2s.cR(R);2a=c.2s.aA(R,2a);3I=5L(1a.4Q(i+1)).2P().4T(\'</\'+t[1]);if(3I){4U=1a.4Q(i+1,3I);i+=3I;2a+=4U}}L{R=c.2s.cR(R);2a=c.2s.aA(R,2a)}}E c.2s.cL(2a)},6u:B(){C s=\'\';2v(C j=0;j<c.2s.7Z;j++){s+=\'\\t\'}E s},cL:B(1a){1a=1a.I(/\\n\\s*\\n/g,\'\\n\');1a=1a.I(/^[\\s\\n]*/,\'\');1a=1a.I(/[\\s\\n]*$/,\'\');1a=1a.I(/<3Z(.*?)>\\n<\\/3Z>/gi,\'<3Z$1></3Z>\');c.2s.7Z=0;E 1a},cR:B(R){C 7O=\'\';R=R.I(/\\n/g,\' \');R=R.I(/\\s{2,}/g,\' \');R=R.I(/^\\s+|\\s+$/g,\' \');C cW=\'\';if(R.2d(/\\/$/)){cW=\'/\';R=R.I(/\\/+$/,\'\')}C m;4O(m=/\\s*([^= ]+)(?:=(([\'"\']).*?\\3|[^ ]+))?/.4K(R)){if(m[2])7O+=m[1].2P()+\'=\'+m[2];L if(m[1])7O+=m[1].2P();7O+=\' \';R=R.4Q(m[0].1o)}E 7O.I(/\\s*$/,\'\')+cW+\'>\'},aA:B(R,2a){C nl=R.2d(c.2s.80);if(R.2d(c.2s.ho)||nl){2a=2a.I(/\\s*$/,\'\');2a+=\'\\n\'}if(nl&&\'/\'==R.5x(1))c.2s.7Z--;if(\'\\n\'==2a.5x(2a.1o-1))2a+=c.2s.6u();if(nl&&\'/\'!=R.5x(1))c.2s.7Z++;2a+=R;if(R.2d(c.2s.hp)||R.2d(c.2s.80)){2a=2a.I(/ *$/,\'\');2a+=\'\\n\'}E 2a}}},1x:B(){E{hq:B(){if(c.F.4R)c.F.4G=M;if(c.F.58)c.F.1W=M;if(c.F.1L)E;C 2j=[\'p\',\'3T\'];if(c.F.4R)c.1x.hm(2j);if(c.F.4G)c.1x.hl(2j)},hm:B(2j){C 22=2j.1o;2v(C i=0;i<22;i++){if($.3B(2j[i],c.F.4R)==-1){c.F.4R.2W(2j[i])}}},hl:B(2j){C 22=2j.1o;2v(C i=0;i<22;i++){C 2V=$.3B(2j[i],c.F.4G);if(2V!=-1){c.F.4G.ah(2V,1)}}},2G:B(q,3L){c.1x.2g={4G:c.F.4G,4R:c.F.4R,6k:c.F.6k,56:c.F.56,55:c.F.55,5b:c.F.5b,1W:c.F.1W,58:c.F.58,6j:c.F.6j,3N:c.F.3N};$.70(c.1x.2g,3L);q=c.1x.6k(q);c.1x.$1i=$(\'<1i />\').1w(q);c.1x.56();c.1x.55();c.1x.hh();c.1x.1W();c.1x.3N();c.1x.hj();c.1x.5b();c.1x.6j();q=c.1x.$1i.q();c.1x.$1i.1t();E q},6k:B(q){if(!c.1x.2g.6k)E q;E q.I(/<!--[\\s\\S]*?-->/gi,\'\')},56:B(q){if(!c.1x.2g.56)E q;C 22=c.1x.2g.56.1o;C 5e=[],bI=[];2v(C i=0;i<22;i++){bI.2W(c.1x.2g.56[i][1]);5e.2W(c.1x.2g.56[i][0])}c.1x.$1i.1k(5e.2H(\',\')).1z($.X(B(n,s){C R=bI[n];$(s).2y(B(){C 82=$(\'<\'+R+\' />\').1w($(c).23());2v(C i=0;i<c.42.1o;i++){82.Y(c.42[i].1f,c.42[i].1D)}E 82})},c));E q},55:B(){if(!c.1x.2g.55)E;C 22=c.1x.2g.55.1o;c.1x.$1i.1k(\'1e\').1z($.X(B(n,s){C $el=$(s);C 1n=$el.Y(\'1n\');2v(C i=0;i<22;i++){if(1n&&1n.2d(1J 1T(\'^\'+c.1x.2g.55[i][0],\'i\'))){C 1l=c.1x.2g.55[i][1];$el.2y(B(){C R=1d.3A(1l);E $(R).1w($(c).23())})}}},c))},hh:B(){if(!c.1x.2g.4G&&c.1x.2g.4R){c.1x.$1i.1k(\'*\').6o(c.1x.2g.4R.2H(\',\')).1z(B(i,s){if(s.3w===\'\')$(s).1t();L $(s).23().3Y()})}if(c.1x.2g.4G){c.1x.$1i.1k(c.1x.2g.4G.2H(\',\')).1z(B(i,s){if(s.3w===\'\')$(s).1t();L $(s).23().3Y()})}},1W:B(){C 22;if(!c.1x.2g.1W&&c.1x.2g.58){C bD=[],bE=[];22=c.1x.2g.58.1o;2v(C i=0;i<22;i++){bD.2W(c.1x.2g.58[i][0]);bE.2W(c.1x.2g.58[i][1])}c.1x.$1i.1k(\'*\').1z($.X(B(n,s){C $el=$(s);C 2V=$.3B($el[0].1l.2P(),bD);C 5d=c.1x.hi(2V,bE,$el);if(5d){$.1z(5d,B(z,f){$el.1W(f)})}},c))}if(c.1x.2g.1W){22=c.1x.2g.1W.1o;2v(C i=0;i<22;i++){C 85=c.1x.2g.1W[i][1];if($.an(85))85=85.2H(\' \');c.1x.$1i.1k(c.1x.2g.1W[i][0]).1W(85)}}},hi:B(2V,5a,$el){C 5d=[];if(2V==-1){$.1z($el[0].42,B(i,3g){5d.2W(3g.1f)})}L if(5a[2V]==\'*\'){5d=[]}L{$.1z($el[0].42,B(i,3g){if($.an(5a[2V])){if($.3B(3g.1f,5a[2V])==-1){5d.2W(3g.1f)}}L if(5a[2V]!=3g.1f){5d.2W(3g.1f)}})}E 5d},hk:B(el,6X){6X=1J 1T(6X,"g");E el.1z(B(){C 3Q=$(c);C 22=c.42.1o-1;2v(C i=22;i>=0;i--){C 3g=c.42[i];if(3g&&3g.ou&&3g.1f.3F(6X)>=0){3Q.1W(3g.1f)}}})},3N:B(){if(!c.1x.2g.3N)E;c.1x.$1i.1k(c.1x.2g.3N.2H(\',\')).1z(B(){C $el=$(c);C 1b=$el.1b();1b=1b.I(/[\\8o-\\aE\\aq]/g,\'\');1b=1b.I(/&53;/gi,\'\');1b=1b.I(/\\s/g,\'\');if(1b===\'\'&&$el.4g().1o===0){$el.1t()}})},hj:B(){c.1x.$1i.1k(\'li p\').23().3Y()},5b:B(){if(!c.1x.2g.5b)E;C 2j=c.1x.2g.5b;if($.an(c.1x.2g.5b))2j=c.1x.2g.5b.2H(\',\');c.1x.hk(c.1x.$1i.1k(2j),\'^(1h-)\')},6j:B(){if(!c.1x.2g.6j)E;c.1x.$1i.1k(c.1x.2g.6j.2H(\',\')).1z(B(){if(c.42.1o===0){$(c).23().3Y()}})}}},1r:B(){E{3r:B(){E{q:{1F:c.1E.14(\'q\'),1v:\'1a.2M\'},2K:{1F:c.1E.14(\'2K\'),1y:{p:{1F:c.1E.14(\'gY\'),1v:\'N.2Z\'},1N:{1F:c.1E.14(\'bO\'),1v:\'N.2Z\'},2D:{1F:c.1E.14(\'1a\'),1v:\'N.2Z\'},h1:{1F:c.1E.14(\'gX\'),1v:\'N.2Z\'},h2:{1F:c.1E.14(\'gH\'),1v:\'N.2Z\'},h3:{1F:c.1E.14(\'gI\'),1v:\'N.2Z\'},h4:{1F:c.1E.14(\'gJ\'),1v:\'N.2Z\'},h5:{1F:c.1E.14(\'gK\'),1v:\'N.2Z\'}}},3W:{1F:c.1E.14(\'3W\'),1v:\'1V.2Z\'},3X:{1F:c.1E.14(\'3X\'),1v:\'1V.2Z\'},5I:{1F:c.1E.14(\'5I\'),1v:\'1V.2Z\'},5c:{1F:c.1E.14(\'5c\'),1v:\'1V.2Z\'},5z:{1F:\'&oC; \'+c.1E.14(\'5z\'),1v:\'2T.2M\'},54:{1F:\'1. \'+c.1E.14(\'54\'),1v:\'2T.2M\'},6O:{1F:\'< \'+c.1E.14(\'6O\'),1v:\'3e.8Z\'},3e:{1F:\'> \'+c.1E.14(\'3e\'),1v:\'3e.8S\'},J:{1F:c.1E.14(\'J\'),1v:\'J.2B\'},1P:{1F:c.1E.14(\'1P\'),1v:\'1P.2B\'},T:{1F:c.1E.14(\'T\'),1y:{T:{1F:c.1E.14(\'bq\'),1v:\'T.2B\'},6h:{1F:c.1E.14(\'6h\'),1v:\'T.6h\'}}},3t:{1F:c.1E.14(\'3t\'),1y:{21:{1F:c.1E.14(\'gG\'),1v:\'3t.21\'},57:{1F:c.1E.14(\'gF\'),1v:\'3t.57\'},4c:{1F:c.1E.14(\'gB\'),1v:\'3t.4c\'},8g:{1F:c.1E.14(\'gA\'),1v:\'3t.8g\'}}},9q:{1F:c.1E.14(\'9q\'),1v:\'4r.1O\'}}},2f:B(){c.1r.gR();c.1r.gN();c.1r.gW();if(c.F.3D.1o===0)E;c.$1r=c.1r.gD();c.1r.gU();c.1r.1w();c.1r.gE();c.1r.gL();c.1r.gM();if(c.F.9N){c.$U.on(\'gC.G 2m.G 2t.G\',$.X(c.2n.3D,c))}},gD:B(){E $(\'<2O>\').2q(\'G-1r\').Y(\'id\',\'G-1r-\'+c.8J)},gE:B(){$.1z(c.F.1r.2K.1y,$.X(B(i,s){if($.3B(i,c.F.2K)==-1)8v c.F.1r.2K.1y[i]},c))},gL:B(){$.1z(c.F.3D,$.X(B(i,2i){if(!c.F.1r[2i])E;if(c.F.8t===M&&2i===\'1P\')E 1q;if((c.F.8s===M&&c.F.8u===M)&&2i===\'J\')E 1q;C 3k=c.F.1r[2i];c.$1r.1w($(\'<li>\').1w(c.1s.2f(2i,3k)))},c))},1w:B(){if(c.F.aj){c.$1r.2q(\'G-1r-nO\');$(c.F.aj).q(c.$1r)}L{c.$2r.4N(c.$1r)}},gM:B(){if(c.O.5Q())E;if(c.F.aj)E;if(!c.F.gT)E;c.1r.ca();$(c.F.6v).on(\'6W.G\',$.X(c.1r.ca,c))},gU:B(){if(c.O.5Q()&&c.F.gV){c.$1r.2q(\'G-1r-aa\')}},gW:B(){if(c.F.gS)E;C 5u=c.F.3D.4T(\'q\');if(5u!==-1){c.F.3D.ah(5u,1)}},gR:B(){if(c.F.bQ.1o===0)E;$.1z(c.F.bQ,$.X(B(i,s){C 5u=c.F.3D.4T(s);c.F.3D.ah(5u,1)},c))},gN:B(){if(!c.O.5Q()||c.F.bR.1o===0)E;$.1z(c.F.bR,$.X(B(i,s){C 5u=c.F.3D.4T(s);c.F.3D.ah(5u,1)},c))},ca:B(){C 3C=$(c.F.6v).3C();C 6l=1;if(c.F.6v===1d){6l=c.$2r.2Q().2C}if(3C>6l){c.1r.gO(3C,6l)}L{c.1r.gP()}},gO:B(3C,6l){C 2C=c.F.6y+3C-6l;C 21=0;C 3I=6l+c.$2r.3f()+30;C 2h=c.$2r.a0();c.$1r.2q(\'1r-71-2r\');c.$1r.1I({3R:\'8H\',2h:2h,2C:2C+\'3m\',21:21});c.1r.ij();c.$1r.1I(\'gQ\',(3C<3I)?\'hs\':\'6z\')},gP:B(){c.$1r.1I({3R:\'nC\',2h:\'a3\',2C:0,21:0,gQ:\'hs\'});c.1r.hY();c.$1r.2I(\'1r-71-2r\')},ij:B(){C 2C=c.$1r.5G()+c.F.6y;C 3R=\'71\';if(c.F.6v!==1d){2C=(c.$1r.5G()+c.$1r.2Q().2C)+c.F.6y;3R=\'8H\'}$(\'.G-1y\').1z(B(){$(c).1I({3R:3R,2C:2C+\'3m\'})})},hY:B(){C 2C=(c.$1r.5G()+c.$1r.2Q().2C);$(\'.G-1y\').1z(B(){$(c).1I({3R:\'8H\',2C:2C+\'3m\'})})}}},1j:B(){E{3r:B(id,2c,2l){c.1j.4H=M;c.1j.2l=2l;c.1j.2c=2c;c.1j.$el=$(id);c.1j.$3P=$(\'<1i id="G-3P" />\');c.1j.$ch=$(\'<1i id="G-3P-2Y" />\').1b(\'hZ 1P i0 or \');c.1j.$3n=$(\'<3n 1c="1P" 1f="1P" />\');c.1j.$ch.1w(c.1j.$3n);c.1j.$3P.1w(c.1j.$ch);c.1j.$el.1w(c.1j.$3P);c.1j.$3P.3H(\'G.1j\');c.1j.$3n.3H(\'G.1j\');c.1j.$3P.on(\'nU.G.1j\',$.X(c.1j.9H,c));c.1j.$3P.on(\'o8.G.1j\',$.X(c.1j.i3,c));c.1j.$3n.on(\'i1.G.1j\',$.X(B(e){e=e.7l||e;c.1j.9k(c.1j.$3n[0].5D[0],e)},c));c.1j.$3P.on(\'4A.G.1j\',$.X(B(e){e.2k();c.1j.$3P.2I(\'79-bY\').2q(\'79-4A\');c.1j.9U(e)},c))},hX:B(1P,e){c.1j.4H=1q;c.1j.9k(1P,e)},9U:B(e){e=e.7l||e;C 5D=e.9d.5D;c.1j.9k(5D[0],e)},9k:B(1P,e){if(c.F.8u){c.1j.c6(1P);c.1j.ia(1P);E}C 4h=!!3M.9i?1J 9i():4f;if(3M.9i){c.1j.c6(1P);C 1f=(c.1j.1c==\'J\')?c.F.hW:c.F.hS;4h.1w(1f,1P)}c.5p.2B();c.1j.hV(4h,e)},c6:B(1P){c.1j.hT(1P);if(c.1j.4H){c.1j.2c=(c.1j.1c==\'J\')?c.F.8s:c.F.8t;c.1j.2l=(c.1j.1c==\'J\')?c.J.1O:c.1P.1O}},hT:B(1P){c.1j.1c=\'J\';if(c.F.hU.4T(1P.1c)==-1){c.1j.1c=\'1P\'}},8E:B(6K,fd){if(6K===M||1C 6K!==\'4F\')E fd;$.1z(6K,$.X(B(k,v){if(v!==4f&&v.4I().4T(\'#\')===0)v=$(v).2w();fd.1w(k,v)},c));E fd},hV:B(4h,e){if(c.1j.1c==\'J\'){4h=c.1j.8E(c.F.nZ,4h);4h=c.1j.8E(c.1j.9S,4h)}L{4h=c.1j.8E(c.F.o0,4h);4h=c.1j.8E(c.1j.9E,4h)}C 2A=1J by();2A.ac(\'o3\',c.1j.2c);2A.i9=$.X(B(){if(2A.cS==4){C 1h=2A.i4;1h=1h.I(/^\\[/,\'\');1h=1h.I(/\\]$/,\'\');C 2z;4s{2z=(1C 1h===\'62\'?$.i2(1h):1h)}4x(ke){2z={5r:1q}}c.5p.3b();if(!c.1j.4H){c.1j.$3P.2I(\'79-4A\')}c.1j.2l(2z,c.1j.4H,e)}},c);2A.cc(4h)},9H:B(e){e.2k();c.1j.$3P.2q(\'79-bY\')},i3:B(e){e.2k();c.1j.$3P.2I(\'79-bY\')},k2:B(){c.1j.9S={}},k1:B(1f,1D){c.1j.9S[1f]=1D},kh:B(1f){8v c.1j.9S[1f]},ki:B(){c.1j.9E={}},kv:B(1f,1D){c.1j.9E[1f]=1D},kz:B(1f){8v c.1j.9E[1f]},ia:B(1P){c.1j.ic(1P,$.X(B(ib){c.1j.i6(1P,ib)},c))},ic:B(1P,2l){C 2A=1J by();C 6s=\'?\';if(c.F.8u.3F(/\\?/)!=\'-1\')6s=\'&\';2A.ac(\'kC\',c.F.8u+6s+\'1f=\'+1P.1f+\'&1c=\'+1P.1c,1q);if(2A.ih)2A.ih(\'1b/km; ko=x-kq-jT\');C i8=c;2A.i9=B(e){if(c.cS==4&&c.c0==9D){i8.5p.2B();2l(jj(c.i4))}L if(c.cS==4&&c.c0!=9D){}};2A.cc()},i7:B(ae,2c){C 2A=1J by();if("jb"in 2A){2A.ac(ae,2c,1q)}L if(1C i5!="1H"){2A=1J i5();2A.ac(ae,2c)}L{2A=4f}E 2A},i6:B(1P,2c){C 2A=c.1j.i7(\'jg\',2c);if(!2A){}L{2A.jr=$.X(B(){if(2A.c0==9D){c.5p.3b();C 9K=2c.4E(\'?\');if(!9K[0]){E M}if(!c.1j.4H){c.1j.$3P.2I(\'79-4A\')}C 2z={8z:9K[0]};if(c.1j.1c==\'1P\'){C 3a=9K[0].4E(\'/\');2z.6p=3a[3a.1o-1]}c.1j.2l(2z,c.1j.4H,M)}L{}},c);2A.jv=B(){};2A.1j.jJ=B(e){};2A.hR(\'jN-jO\',1P.1c);2A.hR(\'x-jR-jQ\',\'jP-jI\');2A.cc(1P)}}}},O:B(){E{5Q:B(){E/(hQ|hA|hB|hC)/.6L(92.8Q)},c8:B(){E!/(hQ|hA|jz|hB|hC)/.6L(92.8Q)},jx:B(6K){E hD.5k.4I.5X(6K)==\'[4F 5L]\'},4t:B(q,hz){q=q.I(/[\\8o-\\aE\\aq]/g,\'\');q=q.I(/&53;/gi,\'\');q=q.I(/<\\/?br\\s?\\/?>/g,\'\');q=q.I(/\\s/g,\'\');q=q.I(/^<p>[^\\W\\w\\D\\d]*?<\\/p>$/i,\'\');if(hz!==M){q=q.I(/<[^\\/>][^>]*><\\/[^>]+>/gi,\'\');q=q.I(/<[^\\/>][^>]*><\\/[^>]+>/gi,\'\')}q=$.3d(q);E q===\'\'},bv:B(5l){if(1C(5l)===\'1H\')E 0;E 6D(5l.I(\'3m\',\'\'),10)},jG:B(6g){if(1C 6g==\'1H\')E;if(6g.3F(/^#/)==-1)E 6g;C hy=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;6g=6g.I(hy,B(m,r,g,b){E r+r+g+g+b+b});C 9T=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.4K(6g);E\'kG(\'+6D(9T[1],16)+\', \'+6D(9T[2],16)+\', \'+6D(9T[3],16)+\')\'},5K:B(el){E $(\'<1i>\').1w($(el).eq(0).hu()).q()},9e:B(el){if($.3B(el.1l,c.F.7J)!==-1){E $(el)}L{E $(el).2u(c.F.7J.4I().2P(),c.$U[0])}},5J:B(el,Y){C $el=$(el);if(1C $el.Y(Y)==\'1H\'){E 1q}if($el.Y(Y)===\'\'){$el.1W(Y);E 1q}E M},3N:B(i,s){C $s=$(s);$s.1k(\'.G-7u-2U\').1W(\'1n\').1W(\'1G\');if($s.1k(\'hr, br, 1B, 4W\').1o!==0)E;C 1b=$.3d($s.1b());if(c.O.4t(1b,M)){$s.1t()}},7z:B(){if(c.O.6J())E;c.hv=c.$U.3C();c.al=$(3M).3C();if(c.F.7p)c.hw=$(c.F.7p).3C()},a1:B(){if(1C c.7z===\'1H\'&&1C c.al===\'1H\')E;$(3M).3C(c.al);c.$U.3C(c.hv);if(c.F.7p)$(c.F.7p).3C(c.hw)},9X:B(){C 2U=1d.3A(\'1e\');2U.4u=\'G-7u-2U\';2U.3w=c.F.5M;E 2U},4J:B(Q){C 2j=c.F.4C;2j.2W(\'1e\');if(Q.1l==\'ad\')2j.2W(\'a\');$(Q).1k(2j.2H(\',\')).6o(\'1e.G-K-2L\').23().3Y()},5N:B(Q,4J){C 3Q=c;$(Q).2y(B(){if(4J===1q)3Q.O.4J(c);E $(c).23()})},4v:B(Q,R,4J){C 5e;C 3Q=c;$(Q).2y(B(){5e=$(\'<\'+R+\' />\').1w($(c).23());2v(C i=0;i<c.42.1o;i++){5e.Y(c.42[i].1f,c.42[i].1D)}if(4J===1q)3Q.O.4J(5e);E 5e});E 5e},lP:B(){C N=c.K.47();if(!N)E M;C 2Q=c.1U.bF(N);E(2Q===0)?1q:M},84:B(){C N=c.K.47();if(!N)E M;C 2Q=c.1U.bF(N);C 1b=$.3d($(N).1b()).I(/\\n\\r\\n/g,\'\');E(2Q==1b.1o)?1q:M},6m:B(N){N=N[0]||N;E N&&c.O.6V(N.1l)},6V:B(R){if(1C R==\'1H\')E M;E c.hx.6L(R)},9Y:B(1A,R){C 2F=$(1A).2u(R);if(2F.28()==1){E 2F[0]}E M},6J:B(){E c.ak},hE:B(){c.ak=1q},8a:B(){c.ak=M},4i:B(el){if(!el){E M}if($(el).hF(\'.G-U\').1o===0||$(el).3i(\'G-U\')){E M}E el},5g:B(1l){C 1g=c.K.5R();C 1A=c.K.3J();if($.an(1l)){C cO=0;$.1z(1l,$.X(B(i,s){if(c.O.cQ(1A,1g,s)){cO++}},c));E(cO===0)?M:1q}L{E c.O.cQ(1A,1g,1l)}},cQ:B(1A,1g,1l){E 1g&&1g.1l===1l?1g:1A&&1A.1l===1l?1A:M},lz:B(){E(c.O.26(\'2J\')&&6D(c.O.26(\'9O\'),10)<9)?1q:M},ly:B(){E(c.O.26(\'2J\')&&6D(c.O.26(\'9O\'),10)<10)?1q:M},hM:B(){E!!92.8Q.2d(/lx\\/7\\./)},26:B(26){C 4y=92.8Q.2P();C 2d=/(hO)[\\/]([\\w.]+)/.4K(4y)||/(hN)[ \\/]([\\w.]+)/.4K(4y)||/(7g)[ \\/]([\\w.]+).*(lC)[ \\/]([\\w.]+)/.4K(4y)||/(7g)[ \\/]([\\w.]+)/.4K(4y)||/(lF)(?:.*9O|)[ \\/]([\\w.]+)/.4K(4y)||/(2J) ([\\w.]+)/.4K(4y)||4y.4T("lE")>=0&&/(bg)(?::| )([\\w.]+)/.4K(4y)||4y.4T("lD")<0&&/(6P)(?:.*? bg:([\\w.]+)|)/.4K(4y)||[];if(26==\'9O\')E 2d[2];if(26==\'7g\')E(2d[1]==\'hN\'||2d[1]==\'7g\');if(2d[1]==\'bg\')E 26==\'2J\';if(2d[1]==\'hO\')E 26==\'7g\';E 26==2d[1]}}}};3l.5k.3r.5k=3l.5k;$.3l.fn.cb=B(cf,8A,75,6C,6T,6H){C hP=\'((?:7Y[s]?:\\\\/\\\\/(?:9a\\\\.)?|9a\\\\.){1}(?:[0-9A-6b-z\\\\-%5O]+\\\\.)+[a-md-Z]{2,}(?::[0-9]+)?(?:(?:/[0-9A-6b-z\\\\-\\\\.%\\+5O]*)+)?(?:\\\\?(?:[0-9A-6b-z\\\\-\\\\.%5O]+(?:=[0-9A-6b-z\\\\-\\\\.%5O\\\\+]*)?)?(?:&(?:[0-9A-6b-z\\\\-\\\\.%5O]+(?:=[0-9A-6b-z\\\\-\\\\.%5O\\\\+]*)?)?)*)?(?:#[0-9A-6b-z\\\\-\\\\.%5O\\\\+=\\\\?&;]*)?)\';C 6X=1J 1T(hP,\'gi\');C hJ=/(6n?|a8):\\/\\//i;C ba=/(6n?:\\/\\/.*\\.(?:hL|lX|hK|hG))/gi;C aw=(c.$U?c.$U[0]:c).aw,i=aw.1o;4O(i--){C n=aw[i];if(n.9Z===3){C q=n.9g;if(6T&&q){C aW=\'<4W 2h="kZ" 3f="l2" 4e="\',aK=\'" kH="0" kN></4W>\';if(q.2d(bh)){q=q.I(bh,aW+\'//9a.hH.9R/7f/$1\'+aK);$(n).3u(q).1t()}L if(q.2d(aU)){q=q.I(aU,aW+\'//ll.hI.9R/6t/$2\'+aK);$(n).3u(q).1t()}}if(6C&&q&&q.2d(ba)){q=q.I(ba,\'<1B 4e="$1" />\');$(n).3u(q).1t();E}if(q.3F(/\\$/g)!=-1)q=q.I(/\\$/g,\'$\');C 4l=q.2d(6X);if(75&&q&&4l){C 22=4l.1o;2v(C z=0;z<22;z++){if(4l[z].2d(/\\.$/)!==4f)4l[z]=4l[z].I(/\\.$/,\'\');C 29=4l[z];C 1b=29;C 2U=\'\';if(29.2d(/\\s$/)!==4f)2U=\' \';C bm=cf+\'://\';if(29.2d(hJ)!==4f)bm=\'\';if(1b.1o>6H)1b=1b.9z(0,6H)+\'...\';1b=1b.I(/$/g,\'$\').I(/&/g,\'&cE;\').I(/</g,\'<\').I(/>/g,\'>\');q=q.I(29,\'<a 29=\\"\'+bm+$.3d(29)+\'\\">\'+$.3d(1b)+\'</a>\'+2U)}$(n).3u(q).1t()}}L if(n.9Z===1&&!/^(a|1s|2E)$/i.6L(n.1l)){$.3l.fn.cb.5X(n,cf,8A,75,6C,6T,6H)}}}})(mH);',62,1530,'||||||||||||this||||||||||||||html|||||||||||function|var||return|opts|redactor||replace|image|selection|else|false|block|utils||node|tag||link|editor|modal||proxy|attr||||range||get||||||code|text|type|document|span|name|parent|data|div|upload|find|tagName|key|style|length|clean|true|toolbar|button|remove|keydown|func|append|tidy|dropdown|each|current|img|typeof|value|lang|title|class|undefined|css|new|set|linebreaks|target|blockquote|insert|file|blocks|sync|core|RegExp|caret|inline|removeAttr|nodes|formatted|buffer||left|len|contents||btn|browser||size|href|out|next|url|match|click|build|settings|width|btnName|tags|preventDefault|callback|keyup|observe|setCallback|paragraphize|addClass|box|tabifier|focus|closest|for|val|body|replaceWith|json|xhr|show|top|pre|textarea|element|load|join|removeClass|msie|formatting|marker|toggle|sel|ul|toLowerCase|offset|save|restore|list|space|pos|push|start|placeholder|format||tooltip|||||||||arr|hide|label|trim|indent|height|item|setStart|hasClass|keyCode|btnObject|Redactor|px|input|last|font|setTimeout|init|imageBox|alignment|after|verified|innerHTML|autosave|point|first|createElement|inArray|scrollTop|buttons|option|search|rel|off|end|getCurrent|td|options|window|removeEmpty|execCommand|droparea|self|position|ctrl|section|re|getBlocks|bold|italic|unwrap|script||setEnd|attributes|del|close|||getBlock|margin|insertNode|command|resizeHandle|right|clearUnverified|src|null|children|formData|isRedactorParent|wrapper|blockElem|matches|resize|orgn|modalBox|htmls|table|line|try|isEmpty|className|replaceToTag|cmd|catch|ua|elem|drop|keys|inlineTags|arrow|split|object|deniedTags|direct|toString|removeInlineTags|exec|deleteContents|addRange|prepend|while|LI|substr|allowedTags|align|indexOf|cont|paste|iframe|frag|lastNode|collapsed||collapse|tmp|nbsp|orderedlist|replaceStyles|replaceTags|center|allowedAttr||allowed|removeDataAttr|underline|attributesRemove|replacement|none|isCurrentOrParent|editter|strong|tab|prototype|str|meta|isFunction|toggleType|progress|setAfter|error|methods|marginTop|index|form|params|charAt|module|unorderedlist|shortcuts|node1|pasteBox|files|wrap|num|innerHeight|templateName|deleted|removeEmptyAttr|getOuterHtml|String|invisibleSpace|replaceWithContents|_|containerTag|isMobile|getParent|shiftKey|ENTER|th|instance|metaKey|call|child|preSpaces|||string|visual|hideResize|||shift|touchstart|getEvent|getSelection|Za|Insert|getMarker|prev|display|hex|unlink|BR|removeWithoutAttr|removeComments|boxTop|isBlock|https|not|filename|tr|figure|mark|video|getTabs|toolbarFixedTarget|tmpList|break|toolbarFixedTopOffset|hidden|listParent|setVerified|convertImageLinks|parseInt|weight|focn|getRangeAt|linkSize|endRange|isSelectAll|obj|test|SPAN|action|outdent|mozilla|figcaption|blank|replaceDivs|convertVideoLinks|select|isBlockTag|scroll|regex|modalOverlay|getNodes|extend|fixed|alt||sup|convertUrlLinks|decoration|contenteditable|dropact|drag|sub|modif|possible|BACKSPACE|_blank|embed|webkit|rtePaste|float|blocksSize|TD|originalEvent|rebuffer|resizer|Delete|scrollTarget|tabber|insertBreakLine|modalClose|plugins|invisible|keyPosition|active|getMarkerAsHtml|modalHeader|saveScroll|exceptTags|cloneRange|targetTouches|act|which|insertDblBreakLine|emptyHtml|addEvent|100|alignmentTags|autosaveInterval|focusNode|Array|tagblock|tagout|modalFooter|case|rangeCount|appendChild|edit|Add|inserted|classSize|ctrlKey|http|cleanlevel|newLevel|strike|replaced|node2|isEndOfElement|attrs|character|apply|imageMargin|Header|disableSelectAll|imageFloatMargin|linkmarker|setActive|imageResizer|isRemoveInline|justify|items|OL|UL|linkProtocol|small|tmpLi|setMode|u200B|param|audio|cite|imageUpload|fileUpload|s3|delete|disabled|icon|tabindex|filelink|convertLinks|onPaste|DELETE|inputUrl|getHiddenFields|DIV|blockLevelElements|absolute|singleLine|uuid|counter|BLOCKQUOTE|isContainerTable|checked|isTextarea|prop|userAgent|createTextNode|increase|getPlainText|caretRangeFromPoint|specialKey|special|z0|caretPositionFromPoint|decrease|||navigator|endNode|toggleClass|blockHtml|||||www|enable|selectElement|dataTransfer|getAlignmentElement|property|nodeValue|callbacks|FormData|tabAsSpaces|traverseFile|onClick|createTextRange|classname|setOffset|parHtml|horizontalrule|modules|imageFloat|safes|pageY|parentEl|marginLeft|marginRight|marginBottom|substring||bind|undo|200|fileFields|modalBody|moveToPoint|onDrag|indentValue|maxHeight|s3file|preCaretRange|hideAll|activeButtons|version|images|cloned|com|imageFields|result|onDrop|samp|windowHeight|createSpaceElement|isTag|nodeType|innerWidth|restoreScroll|formatblock|auto|getOffset|kbd|normalizeLists|formatWrap|ftp|header|overflow|formatListToBlockquote|open|PRE|method|fixEmptyIndent|the|splice|inlines|toolbarExternal|selectAll|saveBodyScroll|replaceParagraphsToBr|isArray|showOnDesktop|selectNodeContents|uFEFF|RedactorPlugins|startNode|matchContainers|codeLength|minHeight|childNodes|onPasteTidy|insertInIe|source|placeTag|removeAllRanges|removeMarkers|blur|u200D|wrapperHtml|methodVal|address|before|currentEl|iframeEnd|TH|commentsMatches|imageResizable|setNodesMarker|isP|setMarker|firstChild|getInlines|autosaveOnChange|reUrlVimeo|htmlIe|iframeStart|links|BODY|createRange|container|setFormat|nodeToCaretPositionFromPoint|footer|autosaveName|onSync|finalNodes|removeFormat|TAB|getNodesMarker|urlImage|Link|closeTooltip|success||imageDelete|rv|reUrlYoutube|enterKey|IMG|parentNode|activeButtonsStates|addProtocol|insertBreakLineProcessing|addCallback|getTextFromHtml|link_insert||encodeEntities|getModuleMethods|link_new_tab|normalize|tagsEmpty|attrAllowed|XMLHttpRequest|br1|br2|formatTableWrapping|headers|allowedAttrTags|allowedAttrData|getOffsetOfElement|syncCode|showCode|rTags|setBefore|elements|verifiedTags|clearUnverifiedRemove|convertInline|quote|saveFormTags|buttonsHide|buttonsHideOnMobile|clickedElement|fonts|x200b|replaceToParagraph|mailto|inputText|hover|setAfterOrBefore|status|firstFound|extra|par|curLang|pattern|setConfig|content|isDesktop|dfn|observeScroll|formatLinkify|send|direction|listTag|protocol|isUnorderedCmdOrdered|placeholdler|isOrderedCmdUnordered|showOnMobile|add|buttonsSize|dropdownObject|dropdownWidth|221|219|formattingAdd|hotkeysShiftNums|tbody|count|createActionButton|headTag|appendTo|redactorImageLink|ratio|SPACE|Row|redo|Table|mousedown|amp|closeHandler|ESC|Column|imageDisplay|thead|createButton|finish|contOwnLine|removeSpaces|matched|ownLine|isCurrentOrParentOne|cleanTag|readyState|tfoot|createCancelButton|createDocumentFragment|suffix|setupBuffer|List|altKey|stop|META|Head|checkKeyEvents|keydownStop|CTRL|Left|isExceptLastOrFirst|insertParagraph|setupSelectAll|langs|DOWN|LEFT_WIN||formatEmpty|exitFromBlockquote|onShiftEnter|removeInvisibleSpace|u00a0|scope|replaceDivToBreakLine||addArrowsEvent|dbl|stopPropagation|ALT|args|SHIFT|replaceDivToParagraph||Color|cleanStyleOnEnter|checkEvents|onArrowDown|removeEmptyListInTable|insertAfterLastElement|Function|insertNewLine|tabFocus|onTab|keyupStop|update|loadContent|matchIMG|enableEditor|loadEditor|getTextareaName|createContainerBox|getUndo|getRedo|run|matchBR|fromTextarea|onPasteRemoveEmpty|createTextarea|insertAfter|onPasteRemoveSpans|onPasteIeFixLinks|fromElement|matchBlocks|isSingleLine|savePreCode|getPreCode|onChange|startSync|onSet|formatBlockquote|setForce|showVisual|setInactiveInCode|setSelectionRange|restoreFormTags|empty|setRedo|getOnlyImages|pop|setUndo|quot|replaceDivsToBr|newTag|removeDirtyStyles|setCodeAndCall|all||||chars|focusCallback||setHelpers|linkNofollow|nofollow|pastePlainText|Apple|codeKeyupCallback|walker|endOffset|createTooltip|disableMozillaEditing|focusEnd|afterkey|beforekey|endContainer|foco|orgo|FIGCAPTION|codeKeydownCallback|cleanSpaces|mso|Mso|onPasteExtra|internal|callEditor|setOptions|dir|onPasteWord|setEvents|dragFileUpload|H2|H1|H3|H4|H6|H5|dragImageUpload|||||||||||modified|indenting||formatConvert|formatRemoveSameChildren|_this|through|setBlocks|setText|loadModules|bindModuleMethods|switch||strikethrough|formatMultiple|increaseText|increaseBlocks|increaseLists|decreaseLists|decreaseBlocks|formatCollapsed|subscript|superscript|loadOptions|shortcutsAdd|offsetNode|Image|Video|Right|duplicate|ie11FixInserting|EndToEnd|setEndPoint|execHtml|blocksMatch|Align|to|Edit|Center|setStartAfter|Code|htmlFixMozilla|choose|callbackName|15px|setCollapsed|setMultiple|clearInterval|one|mouseover|700|isFocused|mouseout|removeData|destroy|textareaIndenting|setInactive|setActiveInVisual|filter|selectionStart|commonAncestorContainer|event|selectionEnd|_delete|buttonDelete|fixImageSourceAfterDrop|inside|stopResize|formatTags||loadEditableControls|editerWidth|showEdit|opacity|moveResize|startResize|imagePosition|imageLink|buttonSave|floatValue||floating|pageX|imageEditable|setFloating|ie11PasteFrag|getSafes|align_justify|align_right|mouseup|createContainer|setFormattingTags|align_center|align_left|header2|header3|header4|header5|loadButtons|setFixed|hideButtonsOnMobile|observeScrollEnable|observeScrollDisable|visibility|hideButtons|buttonSource|toolbarFixed|setOverflow|toolbarOverflow|isButtonSourceNeeded|header1|paragraph|hotkeysSpecialKeys|origHandler|||||||arguments|area|handler|savedSel|getLastBlock|lastBlock|removeNodesMarkers|createMarkers|head|fieldset|removeTags|removeAttrGetRemoves|removeParagraphsInLists|removeAttrs|removeFromDenied|addToAllowed|map|lineBefore|lineAfter|setupAllowed||visible|lastFound|clone|saveEditorScroll|saveTargetScroll|reIsBlock|shorthandRegex|removeEmptyTags|iPod|BlackBerry|Android|Object|enableSelectAll|parents|gif|youtube|vimeo|rProtocol|jpeg|png|isIe11|chrome|opr|urlCheck|iPhone|setRequestHeader|fileUploadParam|getType|imageTypes|sendData|imageUploadParam|directUpload|unsetDropdownsFixed|Drop|here|change|parseJSON|onDragLeave|responseText|XDomainRequest|s3uploadToS3|s3createCORSRequest|that|onreadystatechange|s3uploadFile|signedURL|s3executeOnSignedUrl|||||overrideMimeType|fadeOut|setDropdownsFixed|image_position|outerHTML|imageEdit||getSafesComments|URL|checkbox|aUnlink||aside|article|template|restoreSafes|loadTemplates|cleanUrl|buttonInsert|setFocus|insertHTML|thref|location|re2|getData|replaceBreaksToParagraphs|replaceBreaksToNewLines|aEdit|activeElement|createDeleteButton|setButtonsWidth|setContent|setTitle|cancel|setEnter|setDraggable|draggable|handle|getTemplate|buildOverlay|enableEvents|linkTooltip|showTooltip|getTooltipPosition|aLink|setEditable|windowWidth|disableEvents|bodyOveflow|setInactiveAll|insertInOthersBrowsers|clear|createPasteBox|cleanOnPaste|freeze|modalOpened|withCredentials|OUTPUT|focusin|ADDRESS|SECTION|PUT|getModal|Plugin|decodeURIComponent|DT|outerHeight|alignright|caretOffset|returnValue|ins|enableInlineTableEditing|onload|DL|enableObjectResizing|DD|onerror|ARTICLE|isString|createTabber|iPad|addTab|HTML|link_edit|Normal|Formatting|Unlink|hexToRgb|addTemplate|read|onprogress|FOOTER|blurCallback|HEADER|Content|Type|public|acl|amz|ASIDE|defined|changeIcon|such|No|slice|nextNode|SHOW_TEXT|VERSION|addImageFields|clearImageFields|createTreeWalker|NodeFilter|youtu|Infinity|u00a9|copy|u2026|hellip|trade|u2122|getCoords|err|strict|use|removeImageFields|clearFileFields|addFirst|alignleft|addAfter|plain|addDropdown|charset|removeIcon|user|aligncenter|setAwesome|applet|addBefore|addFileFields|setEndAfter|setStartBefore|setEndBefore|removeFileFields|ltr|20px|GET|uploadImageField|10px|TEXTAREA|rgb|frameborder|Vimeo|File|Upload|download|Youtube|allowfullscreen|web|video_html_code|Cancel|Embed|Download|Choose|Indent|Horizontal|Rule|Deleted|Justify|500|or_choose|Or|281|drop_file_here|Email|Text|delete_column|delete_row|delete_table|rows|insert_column_right|insert_column_left|insert_row_above|Above|insert_row_below|Below|Rows|columns||None|image_web_link|player|Web|Position|Title|Columns|add_head|Save|delete_head||anchor|Anchor|host|Trident|isLessIe10|isOldIe|fontcolor|Font|safari|compatible|trident|opera|backcolor|xn|Italic|Quote|setAttr|toggleAttr|setClass|toggleData|setData|isStartOfElement|createLink|insertedLink|Bold|u2014|disable|LEFT|merge|jpg|Outdent|600|optional|Open|Underline|Alignment|Name|getOwnPropertyNames|Ordered|escape|encodeURIComponent|Back|autosaveError|post|ajax|zA|setInterval|1000|Unordered|insert_table|setToPoint|dropdownShow|222|dropdownShown|up|fromCharCode|home|hasOwnProperty|Key|220|192|down|188|fileUploadError|mdash|189|191|190|dropdownHide|frame|noscript|capslock|105|frameset|pause|jQuery|menu|backspace|summary|pageup|getObject|getToolbar|pagedown|Callback|getTextarea|getElement|getEditor|getBox|187|186|114|113|101|round|Math|touchmove|touchend|115|112|111|107|106|104|109|103|110|102|mousemove|116|f12|123|f11|144|numlock|173||145|705|122|f10|118|dragstart|117|imageUploadError|119|121|120|syncBefore|esc|overlay|colspan|rowspan|relative|fake|pasteHTML|docs|times|guid|fast|modalClosed|startContainer|clientY|stripTags|pasteBefore|external|unselectable|removePhp|1500|addButton|sid|dragover|converted|nodeToPoint|fadeIn|cursor|uploadImageFields|uploadFileFields|u2010|dash|POST|move|clientX|MsoListParagraphCxSpLast|MsoListParagraph|dragleave|MsoListParagraphCxSpMiddle|MsoListParagraphCxSpFirst|bmso|WordDocument|shapes|9999px||toggleActive|enter|toggleStyle|hgroup|extractContents||removeStyleRule||math|removeStyle|legend||getText|getHtml|specified|cloneContents|innerText|textContent|cssText|details|nav|htmlWithoutClean|bull|context|getOnlyLinksAndImages|fromPoint'.split('|'),0,{})) \ No newline at end of file +*/(function(e){"use strict";function i(e,t){return new i.prototype.init(e,t)}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;return function(){return t.apply(e)}});var t=0,n=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,r=/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/;e.fn.redactor=function(t){var n=[],r=Array.prototype.slice.call(arguments,1);return typeof t=="string"?this.each(function(){var i=e.data(this,"redactor"),s;t.search(/\./)!="-1"?(s=t.split("."),typeof i[s[0]]!="undefined"&&(s=i[s[0]][s[1]])):s=i[t];if(typeof i!="undefined"&&e.isFunction(s)){var o=s.apply(i,r);o!==undefined&&o!==i&&n.push(o)}else e.error('No such method "'+t+'" for Redactor')}):this.each(function(){e.data(this,"redactor",{}),e.data(this,"redactor",i(this,t))}),n.length===0?this:n.length===1?n[0]:n},e.Redactor=i,e.Redactor.VERSION="10.0.5",e.Redactor.modules=["alignment","autosave","block","buffer","build","button","caret","clean","code","core","dropdown","file","focus","image","indent","inline","insert","keydown","keyup","lang","line","link","list","modal","observe","paragraphize","paste","placeholder","progress","selection","shortcuts","tabifier","tidy","toolbar","upload","utils"],e.Redactor.opts={lang:"en",direction:"ltr",plugins:!1,focus:!1,focusEnd:!1,placeholder:!1,visual:!0,tabindex:!1,minHeight:!1,maxHeight:!1,linebreaks:!1,replaceDivs:!0,paragraphize:!0,cleanStyleOnEnter:!1,enterKey:!0,cleanOnPaste:!0,cleanSpaces:!0,pastePlainText:!1,autosave:!1,autosaveName:!1,autosaveInterval:60,autosaveOnChange:!1,linkTooltip:!0,linkProtocol:"http",linkNofollow:!1,linkSize:50,imageEditable:!0,imageLink:!0,imagePosition:!0,imageFloatMargin:"10px",imageResizable:!0,imageUpload:!1,imageUploadParam:"file",uploadImageField:!1,dragImageUpload:!0,fileUpload:!1,fileUploadParam:"file",dragFileUpload:!0,s3:!1,convertLinks:!0,convertUrlLinks:!0,convertImageLinks:!0,convertVideoLinks:!0,preSpaces:4,tabAsSpaces:!1,tabFocus:!0,scrollTarget:!1,toolbar:!0,toolbarFixed:!0,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:!1,toolbarOverflow:!1,buttonSource:!1,buttons:["html","formatting","bold","italic","deleted","unorderedlist","orderedlist","outdent","indent","image","file","link","alignment","horizontalrule"],buttonsHide:[],buttonsHideOnMobile:[],formatting:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],formattingAdd:!1,tabifier:!0,deniedTags:["html","head","link","body","meta","script","style","applet"],allowedTags:!1,removeComments:!1,replaceTags:[["strike","del"]],replaceStyles:[["font-weight:\\s?bold","strong"],["font-style:\\s?italic","em"],["text-decoration:\\s?underline","u"],["text-decoration:\\s?line-through","del"]],removeDataAttr:!1,removeAttr:!1,allowedAttr:!1,removeWithoutAttr:["span"],removeEmpty:["p"],activeButtons:["deleted","italic","bold","underline","unorderedlist","orderedlist","alignleft","aligncenter","alignright","justify"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted",ul:"unorderedlist",ol:"orderedlist",u:"underline"},shortcuts:{"ctrl+shift+m, meta+shift+m":{func:"inline.removeFormat"},"ctrl+b, meta+b":{func:"inline.format",params:["bold"]},"ctrl+i, meta+i":{func:"inline.format",params:["italic"]},"ctrl+h, meta+h":{func:"inline.format",params:["superscript"]},"ctrl+l, meta+l":{func:"inline.format",params:["subscript"]},"ctrl+k, meta+k":{func:"link.show"},"ctrl+shift+7":{func:"list.toggle",params:["orderedlist"]},"ctrl+shift+8":{func:"list.toggle",params:["unorderedlist"]}},shortcutsAdd:!1,buffer:[],rebuffer:[],emptyHtml:"<p>​</p>",invisibleSpace:"​",imageTypes:["image/png","image/jpeg","image/gif"],indentValue:20,verifiedTags:["a","img","b","strong","sub","sup","i","em","u","small","strike","del","cite","ul","ol","li"],inlineTags:["strong","b","u","em","i","code","del","ins","samp","kbd","sup","sub","mark","var","cite","small"],alignmentTags:["P","H1","H2","H3","H4","H5","H6","DL","DT","DD","DIV","TD","BLOCKQUOTE","OUTPUT","FIGCAPTION","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE"],blockLevelElements:["PRE","UL","OL","LI"],langs:{en:{html:"HTML",video:"Insert Video",image:"Insert Image",table:"Table",link:"Link",link_insert:"Insert link",link_edit:"Edit link",unlink:"Unlink",formatting:"Formatting",paragraph:"Normal text",quote:"Quote",code:"Code",header1:"Header 1",header2:"Header 2",header3:"Header 3",header4:"Header 4",header5:"Header 5",bold:"Bold",italic:"Italic",fontcolor:"Font Color",backcolor:"Back Color",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",cancel:"Cancel",insert:"Insert",save:"Save",_delete:"Delete",insert_table:"Insert Table",insert_row_above:"Add Row Above",insert_row_below:"Add Row Below",insert_column_left:"Add Column Left",insert_column_right:"Add Column Right",delete_column:"Delete Column",delete_row:"Delete Row",delete_table:"Delete Table",rows:"Rows",columns:"Columns",add_head:"Add Head",delete_head:"Delete Head",title:"Title",image_position:"Position",none:"None",left:"Left",right:"Right",center:"Center",image_web_link:"Image Web Link",text:"Text",mailto:"Email",web:"URL",video_html_code:"Video Embed Code or Youtube/Vimeo Link",file:"Insert File",upload:"Upload",download:"Download",choose:"Choose",or_choose:"Or choose",drop_file_here:"Drop file here",align_left:"Align text to the left",align_center:"Center text",align_right:"Align text to the right",align_justify:"Justify text",horizontalrule:"Insert Horizontal Rule",deleted:"Deleted",anchor:"Anchor",link_new_tab:"Open link in new tab",underline:"Underline",alignment:"Alignment",filename:"Name (optional)",edit:"Edit"}}},i.fn=e.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,SPACE:32,ESC:27,TAB:9,CTRL:17,META:91,SHIFT:16,ALT:18,LEFT:37,LEFT_WIN:91},init:function(n,r){this.$element=e(n),this.uuid=t++,this.rtePaste=!1,this.$pasteBox=!1,this.loadOptions(r),this.loadModules(),this.formatting={},e.merge(this.opts.blockLevelElements,this.opts.alignmentTags),this.reIsBlock=new RegExp("^("+this.opts.blockLevelElements.join("|")+")$","i"),this.tidy.setupAllowed(),this.lang.load(),e.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.core.setCallback("start"),this.start=!0,this.build.run()},loadOptions:function(t){this.opts=e.extend({},e.extend(!0,{},e.Redactor.opts),this.$element.data(),t)},getModuleMethods:function(e){return Object.getOwnPropertyNames(e).filter(function(t){return typeof e[t]=="function"})},loadModules:function(){var t=e.Redactor.modules.length;for(var n=0;n<t;n++)this.bindModuleMethods(e.Redactor.modules[n])},bindModuleMethods:function(e){if(typeof this[e]=="undefined")return;this[e]=this[e]();var t=this.getModuleMethods(this[e]),n=t.length;for(var r=0;r<n;r++)this[e][t[r]]=this[e][t[r]].bind(this)},alignment:function(){return{left:function(){this.alignment.set("")},right:function(){this.alignment.set("right")},center:function(){this.alignment.set("center")},justify:function(){this.alignment.set("justify")},set:function(e){this.utils.browser("msie")||this.$editor.focus(),this.buffer.set(),this.selection.save(),this.alignment.blocks=this.selection.getBlocks(),this.opts.linebreaks&&this.alignment.blocks[0]===!1?this.alignment.setText(e):this.alignment.setBlocks(e),this.selection.restore(),this.code.sync()},setText:function(t){var n=this.selection.wrap("div");e(n).attr("data-tagblock","redactor"),e(n).css("text-align",t)},setBlocks:function(t){e.each(this.alignment.blocks,e.proxy(function(e,n){var r=this.utils.getAlignmentElement(n);if(!r)return;t===""&&typeof r.data("tagblock")!="undefined"?r.replaceWith(r.html()):(r.css("text-align",t),this.utils.removeEmptyAttr(r,"style"))},this))}}},autosave:function(){return{enable:function(){if(!this.opts.autosave)return;this.autosave.html=!1,this.autosave.name=this.opts.autosaveName?this.opts.autosaveName:this.$textarea.attr("name"),this.opts.autosaveOnChange||(this.autosaveInterval=setInterval(e.proxy(this.autosave.load,this),this.opts.autosaveInterval*1e3))},onChange:function(){if(!this.opts.autosaveOnChange)return;this.autosave.load()},load:function(){var t=this.code.get();if(this.autosave.html===t)return;if(this.utils.isEmpty(t))return;e.ajax({url:this.opts.autosave,type:"post",data:"name="+this.autosave.name+"&"+this.autosave.name+"="+escape(encodeURIComponent(t)),success:e.proxy(function(e){this.autosave.success(e,t)},this)})},success:function(t,n){var r;try{r=e.parseJSON(t)}catch(i){r=t}var s=typeof r.error=="undefined"?"autosave":"autosaveError";this.core.setCallback(s,this.autosave.name,r),this.autosave.html=n},disable:function(){clearInterval(this.autosaveInterval)}}},block:function(){return{formatting:function(e){var t,n;typeof this.formatting[e].data!="undefined"?t="data":typeof this.formatting[e].attr!="undefined"?t="attr":typeof this.formatting[e].class!="undefined"&&(t="class"),t&&(n=this.formatting[e][t]),this.block.format(this.formatting[e].tag,t,n)},format:function(t,n,r){t=="quote"&&(t="blockquote");var i=["p","pre","blockquote","h1","h2","h3","h4","h5","h6"];if(e.inArray(t,i)==-1)return;this.block.isRemoveInline=t=="pre"||t.search(/h[1-6]/i)!=-1,this.utils.browser("msie")||this.$editor.focus(),this.block.blocks=this.selection.getBlocks(),this.block.blocksSize=this.block.blocks.length,this.block.type=n,this.block.value=r,this.buffer.set(),this.selection.save(),this.block.set(t),this.selection.restore(),this.code.sync()},set:function(e){this.selection.get(),this.block.containerTag=this.range.commonAncestorContainer.tagName,this.range.collapsed?this.block.setCollapsed(e):this.block.setMultiple(e)},setCollapsed:function(t){var n=this.block.blocks[0];if(n===!1)return;if(n.tagName=="LI"){if(t!="blockquote")return;this.block.formatListToBlockquote();return}var r=this.block.containerTag=="TD"||this.block.containerTag=="TH";if(r&&!this.opts.linebreaks)document.execCommand("formatblock",!1,"<"+t+">"),n=this.selection.getBlock(),this.block.toggle(e(n));else if(n.tagName.toLowerCase()!=t)if(this.opts.linebreaks&&t=="p")e(n).prepend("<br>").append("<br>"),this.utils.replaceWithContents(n);else{var i=this.utils.replaceToTag(n,t);this.block.toggle(i),t!="p"&&t!="blockquote"&&i.find("img").remove(),this.block.isRemoveInline&&this.utils.removeInlineTags(i),(t=="p"||this.block.headTag)&&i.find("p").contents().unwrap(),this.block.formatTableWrapping(i)}else if(t=="blockquote"&&n.tagName.toLowerCase()==t)if(this.opts.linebreaks)e(n).prepend("<br>").append("<br>"),this.utils.replaceWithContents(n);else{var s=this.utils.replaceToTag(n,"p");this.block.toggle(s)}else n.tagName.toLowerCase()==t&&this.block.toggle(e(n))},setMultiple:function(t){var n=this.block.blocks[0],r=this.block.containerTag=="TD"||this.block.containerTag=="TH";if(n!==!1&&this.block.blocksSize===1)if(n.tagName.toLowerCase()==t&&t=="blockquote")if(this.opts.linebreaks)e(n).prepend("<br>").append("<br>"),this.utils.replaceWithContents(n);else{var i=this.utils.replaceToTag(n,"p");this.block.toggle(i)}else if(n.tagName=="LI"){if(t!="blockquote")return;this.block.formatListToBlockquote()}else if(this.block.containerTag=="BLOCKQUOTE")this.block.formatBlockquote(t);else if(this.opts.linebreaks&&(r||this.range.commonAncestorContainer!=n))this.block.formatWrap(t);else if(this.opts.linebreaks&&t=="p")e(n).prepend("<br>").append("<br>"),this.utils.replaceWithContents(n);else if(n.tagName==="TD")this.block.formatWrap(t);else{var s=this.utils.replaceToTag(n,t);this.block.toggle(s),this.block.isRemoveInline&&this.utils.removeInlineTags(s),(t=="p"||this.block.headTag)&&s.find("p").contents().unwrap()}else if(this.opts.linebreaks||t!="p"){if(t=="blockquote"){var o=0;for(var u=0;u<this.block.blocksSize;u++)this.block.blocks[u].tagName=="BLOCKQUOTE"&&o++;if(o==this.block.blocksSize){e.each(this.block.blocks,e.proxy(function(t,n){this.opts.linebreaks?(e(n).prepend("<br>").append("<br>"),this.utils.replaceWithContents(n)):this.utils.replaceToTag(n,"p")},this));return}}this.block.formatWrap(t)}else{var a=0,f=!1;this.block.type=="class"&&(f="toggle",a=e(this.block.blocks).filter("."+this.block.value).size(),this.block.blocksSize==a?f="toggle":this.block.blocksSize>a?f="set":a===0&&(f="set"));var l=["ul","ol","li","td","th","dl","dt","dd"];e.each(this.block.blocks,e.proxy(function(n,r){if(e.inArray(r.tagName.toLowerCase(),l)!=-1)return;var i=this.utils.replaceToTag(r,t);f?f=="toggle"?this.block.toggle(i):f=="remove"?this.block.remove(i):f=="set"&&this.block.setForce(i):this.block.toggle(i),t!="p"&&t!="blockquote"&&i.find("img").remove(),this.block.isRemoveInline&&this.utils.removeInlineTags(i),(t=="p"||this.block.headTag)&&i.find("p").contents().unwrap()},this))}},setForce:function(e){if(this.block.type=="class"){e.addClass(this.block.value);return}if(this.block.type=="attr"||this.block.type=="data"){e.attr(this.block.value.name,this.block.value.value);return}},toggle:function(e){if(this.block.type=="class"){e.toggleClass(this.block.value);return}if(this.block.type=="attr"||this.block.type=="data"){e.attr(this.block.value.name)==this.block.value.value?e.removeAttr(this.block.value.name):e.attr(this.block.value.name,this.block.value.value);return}e.removeAttr("style class");return},remove:function(e){e.removeClass(this.block.value)},formatListToBlockquote:function(){var t=e(this.block.blocks[0]).closest("ul, ol");e(t).find("ul, ol").contents().unwrap(),e(t).find("li").append(e("<br>")).contents().unwrap();var n=this.utils.replaceToTag(t,"blockquote");this.block.toggle(n)},formatBlockquote:function(t){document.execCommand("outdent"),document.execCommand("formatblock",!1,t),this.clean.clearUnverified(),this.$editor.find("p:empty").remove();var n=this.selection.getBlock();t!="p"&&e(n).find("img").remove(),this.opts.linebreaks||this.block.toggle(e(n)),this.$editor.find("ul, ol, tr, blockquote, p").each(e.proxy(this.utils.removeEmpty,this)),this.opts.linebreaks&&t=="p"&&this.utils.replaceWithContents(n)},formatWrap:function(t){if(this.block.containerTag=="UL"||this.block.containerTag=="OL"){if(t!="blockquote")return;this.block.formatListToBlockquote()}var n=this.selection.wrap(t);if(n===!1)return;var r=e(n);this.block.formatTableWrapping(r);var i=r.find(this.opts.blockLevelElements.join(",")+", td, table, thead, tbody, tfoot, th, tr");(this.opts.linebreaks&&t=="p"||t=="pre"||t=="blockquote")&&i.append("<br />"),i.contents().unwrap(),t!="p"&&t!="blockquote"&&r.find("img").remove(),e.each(this.block.blocks,e.proxy(this.utils.removeEmpty,this)),r.append(this.selection.getMarker(2)),this.opts.linebreaks||this.block.toggle(r),this.$editor.find("ul, ol, tr, blockquote, p").each(e.proxy(this.utils.removeEmpty,this)),r.find("blockquote:empty").remove(),this.block.isRemoveInline&&this.utils.removeInlineTags(r),this.opts.linebreaks&&t=="p"&&this.utils.replaceWithContents(r)},formatTableWrapping:function(e){if(e.closest("table").size()===0)return;e.closest("tr").size()===0&&e.wrap("<tr>"),e.closest("td").size()===0&&e.closest("th").size()===0&&e.wrap("<td>")},removeData:function(t,n){var r=this.selection.getBlocks();e(r).removeAttr("data-"+t),this.code.sync()},setData:function(t,n){var r=this.selection.getBlocks();e(r).attr("data-"+t,n),this.code.sync()},toggleData:function(t,n){var r=this.selection.getBlocks();e.each(r,function(){e(this).attr("data-"+t)?e(this).removeAttr("data-"+t):e(this).attr("data-"+t,n)})},removeAttr:function(t,n){var r=this.selection.getBlocks();e(r).removeAttr(t),this.code.sync()},setAttr:function(t,n){var r=this.selection.getBlocks();e(r).attr(t,n),this.code.sync()},toggleAttr:function(t,n){var r=this.selection.getBlocks();e.each(r,function(){e(this).attr(name)?e(this).removeAttr(name):e(this).attr(name,n)})},removeClass:function(t){var n=this.selection.getBlocks();e(n).removeClass(t),this.utils.removeEmptyAttr(n,"class"),this.code.sync()},setClass:function(t){var n=this.selection.getBlocks();e(n).addClass(t),this.code.sync()},toggleClass:function(t){var n=this.selection.getBlocks();e(n).toggleClass(t),this.code.sync()}}},buffer:function(){return{set:function(e){typeof e=="undefined"||e=="undo"?this.buffer.setUndo():this.buffer.setRedo()},setUndo:function(){this.selection.save(),this.opts.buffer.push(this.$editor.html()),this.selection.restore()},setRedo:function(){this.selection.save(),this.opts.rebuffer.push(this.$editor.html()),this.selection.restore()},getUndo:function(){this.$editor.html(this.opts.buffer.pop())},getRedo:function(){this.$editor.html(this.opts.rebuffer.pop())},add:function(){this.opts.buffer.push(this.$editor.html())},undo:function(){if(this.opts.buffer.length===0)return;this.buffer.set("redo"),this.buffer.getUndo(),this.selection.restore(),setTimeout(e.proxy(this.observe.load,this),50)},redo:function(){if(this.opts.rebuffer.length===0)return;this.buffer.set("undo"),this.buffer.getRedo(),this.selection.restore(),setTimeout(e.proxy(this.observe.load,this),50)}}},build:function(){return{run:function(){this.build.createContainerBox(),this.build.loadContent(),this.build.loadEditor(),this.build.enableEditor(),this.build.setCodeAndCall()},isTextarea:function(){return this.$element[0].tagName==="TEXTAREA"},createContainerBox:function(){this.$box=e('<div class="redactor-box" />')},createTextarea:function(){this.$textarea=e("<textarea />").attr("name",this.build.getTextareaName())},getTextareaName:function(){var e=this.$element.attr("id");return typeof e=="undefined"&&(e="content-"+this.uuid),e},loadContent:function(){var t=this.build.isTextarea()?"val":"html";this.content=e.trim(this.$element[t]())},enableEditor:function(){this.$editor.attr({contenteditable:!0,dir:this.opts.direction})},loadEditor:function(){var e=this.build.isTextarea()?"fromTextarea":"fromElement";this.build[e]()},fromTextarea:function(){this.$editor=e("<div />"),this.$textarea=this.$element,this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element),this.$editor.addClass("redactor-editor"),this.$element.hide()},fromElement:function(){this.$editor=this.$element,this.build.createTextarea(),this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$textarea),this.$editor.addClass("redactor-editor"),this.$textarea.hide()},setCodeAndCall:function(){this.code.set(this.content),this.build.setOptions(),this.build.callEditor(),this.opts.visual||setTimeout(e.proxy(this.code.showCode,this),200)},callEditor:function(){this.build.disableMozillaEditing(),this.build.setEvents(),this.build.setHelpers(),this.opts.toolbar&&(this.opts.toolbar=this.toolbar.init(),this.toolbar.build()),this.modal.loadTemplates(),this.build.plugins(),setTimeout(e.proxy(this.observe.load,this),4),this.core.setCallback("init")},setOptions:function(){e(this.$textarea).attr("dir",this.opts.direction),this.opts.linebreaks&&this.$editor.addClass("redactor-linebreaks"),this.opts.tabindex&&this.$editor.attr("tabindex",this.opts.tabindex),this.opts.minHeight&&this.$editor.css("minHeight",this.opts.minHeight),this.opts.maxHeight&&this.$editor.css("maxHeight",this.opts.maxHeight)},setEvents:function(){this.$editor.on("drop.redactor",e.proxy(function(t){t=t.originalEvent||t;if(window.FormData===undefined||!t.dataTransfer)return!0;var n=t.dataTransfer.files.length;if(n===0)return this.code.sync(),setTimeout(e.proxy(this.clean.clearUnverified,this),1),this.core.setCallback("drop",t),!0;t.preventDefault();if(this.opts.dragImageUpload||this.opts.dragFileUpload){var r=t.dataTransfer.files;this.upload.directUpload(r[0],t)}setTimeout(e.proxy(this.clean.clearUnverified,this),1),this.core.setCallback("drop",t)},this)),this.$editor.on("click.redactor",e.proxy(function(e){var t="click";if(this.core.getEvent()=="click"||this.core.getEvent()=="arrow")t=!1;this.core.addEvent(t),this.utils.disableSelectAll(),this.core.setCallback("click",e)},this)),this.$editor.on("paste.redactor",e.proxy(this.paste.init,this)),this.$editor.on("keydown.redactor",e.proxy(this.keydown.init,this)),this.$editor.on("keyup.redactor",e.proxy(this.keyup.init,this)),e.isFunction(this.opts.codeKeydownCallback)&&this.$textarea.on("keydown.redactor-textarea",e.proxy(this.opts.codeKeydownCallback,this)),e.isFunction(this.opts.codeKeyupCallback)&&this.$textarea.on("keyup.redactor-textarea",e.proxy(this.opts.codeKeyupCallback,this)),e.isFunction(this.opts.focusCallback)&&this.$editor.on("focus.redactor",e.proxy(this.opts.focusCallback,this));var t;e(document).on("mousedown",function(n){t=e(n.target)}),this.$editor.on("blur.redactor",e.proxy(function(n){if(this.rtePaste)return;var r=e(t);!r.hasClass("redactor-toolbar, redactor-dropdown")&&!r.is("#redactor-modal")&&r.parents(".redactor-toolbar, .redactor-dropdown, #redactor-modal").size()===0&&(this.utils.disableSelectAll(),e.isFunction(this.opts.blurCallback)&&this.core.setCallback("blur",n))},this))},setHelpers:function(){this.autosave.enable(),this.placeholder.enable(),this.opts.focus&&setTimeout(e.proxy(this.focus.setStart,this),100),this.opts.focusEnd&&setTimeout(e.proxy(this.focus.setEnd,this),100)},plugins:function(){if(!this.opts.plugins)return;if(!RedactorPlugins)return;e.each(this.opts.plugins,e.proxy(function(t,n){if(typeof RedactorPlugins[n]=="undefined")return;if(e.inArray(n,e.Redactor.modules)!==-1){e.error('Plugin name "'+n+"\" matches the name of the Redactor's module.");return}if(!e.isFunction(RedactorPlugins[n]))return;this[n]=RedactorPlugins[n]();var r=this.getModuleMethods(this[n]),i=r.length;for(var s=0;s<i;s++)this[n][r[s]]=this[n][r[s]].bind(this);e.isFunction(this[n].init)&&this[n].init()},this))},disableMozillaEditing:function(){if(!this.utils.browser("mozilla"))return;try{document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1)}catch(e){}}}},button:function(){return{build:function(t,n){var r=e('<a href="#" class="re-icon re-'+t+'" rel="'+t+'" />').attr("tabindex","-1");(n.func||n.command||n.dropdown)&&r.on("touchstart click",e.proxy(function(e){if(r.hasClass("redactor-button-disabled"))return!1;var i="func",s=n.func;n.command?(i="command",s=n.command):n.dropdown&&(i="dropdown",s=!1),this.button.onClick(e,t,i,s)},this));if(n.dropdown){var i=e('<div class="redactor-dropdown redactor-dropdown-box-'+t+'" style="display: none;">');r.data("dropdown",i),this.dropdown.build(t,i,n.dropdown)}return this.utils.isDesktop()&&this.button.createTooltip(r,t,n.title),r},createTooltip:function(t,n,r){var i=e("<span>").addClass("redactor-toolbar-tooltip redactor-toolbar-tooltip-"+n).hide().html(r);i.appendTo("body"),t.on("mouseover",function(){if(e(this).hasClass("redactor-button-disabled"))return;var n=t.offset(),r=t.innerHeight(),s=t.innerWidth();i.show(),i.css({top:n.top+r+"px",left:n.left+s/2-i.innerWidth()/2+"px"})}),t.on("mouseout",function(){i.hide()})},onClick:function(t,n,r,i){this.button.caretOffset=this.caret.getOffset(),t.preventDefault(),this.utils.browser("msie")&&(t.returnValue=!1);if(r=="command")this.inline.format(i);else if(r=="dropdown")this.dropdown.show(t,n);else{var s;e.isFunction(i)?(i.call(this,n),this.observe.buttons(t,n)):i.search(/\./)!="-1"?(s=i.split("."),typeof this[s[0]]!="undefined"&&(this[s[0]][s[1]](n),this.observe.buttons(t,n))):(this[i](n),this.observe.buttons(t,n))}},get:function(e){return this.$toolbar.find("a.re-"+e)},setActive:function(e){this.button.get(e).addClass("redactor-act")},setInactive:function(e){this.button.get(e).removeClass("redactor-act")},setInactiveAll:function(e){typeof e=="undefined"?this.$toolbar.find("a.re-icon").removeClass("redactor-act"):this.$toolbar.find("a.re-icon").not(".re-"+e).removeClass("redactor-act")},setActiveInVisual:function(){this.$toolbar.find("a.re-icon").not("a.re-html").removeClass("redactor-button-disabled")},setInactiveInCode:function(){this.$toolbar.find("a.re-icon").not("a.re-html").addClass("redactor-button-disabled")},changeIcon:function(e,t){this.button.get(e).addClass("re-"+t)},removeIcon:function(e,t){this.button.get(e).removeClass("re-"+t)},setAwesome:function(e,t){var n=this.button.get(e);n.removeClass("redactor-btn-image").addClass("fa-redactor-btn"),n.html('<i class="fa '+t+'"></i>')},addCallback:function(t,n){var r=n=="dropdown"?"dropdown":"func",i=t.attr("rel");t.on("touchstart click",e.proxy(function(e){if(t.hasClass("redactor-button-disabled"))return!1;this.button.onClick(e,i,r,n)},this))},addDropdown:function(t,n){var r=t.attr("rel");this.button.addCallback(t,"dropdown");var i=e('<div class="redactor-dropdown redactor-dropdown-box-'+r+'" style="display: none;">');return t.data("dropdown",i),n&&this.dropdown.build(r,i,n),i},add:function(t,n){if(!this.opts.toolbar)return;var r=this.button.build(t,{title:n});return r.addClass("redactor-btn-image"),this.$toolbar.append(e("<li>").append(r)),r},addFirst:function(t,n){if(!this.opts.toolbar)return;var r=this.button.build(t,{title:n});return this.$toolbar.prepend(e("<li>").append(r)),r},addAfter:function(t,n,r){if(!this.opts.toolbar)return;var i=this.button.build(n,{title:r}),s=this.button.get(t);return s.size()!==0?s.parent().after(e("<li>").append(i)):this.$toolbar.append(e("<li>").append(i)),i},addBefore:function(t,n,r){if(!this.opts.toolbar)return;var i=this.button.build(n,{title:r}),s=this.button.get(t);return s.size()!==0?s.parent().before(e("<li>").append(i)):this.$toolbar.append(e("<li>").append(i)),i},remove:function(e){this.button.get(e).remove()}}},caret:function(){return{setStart:function(t){if(!this.utils.isBlock(t)){var n=this.utils.createSpaceElement();e(t).prepend(n),this.caret.setEnd(n)}else this.caret.set(t,0,t,0)},setEnd:function(e){this.caret.set(e,1,e,1)},set:function(t,n,r,i){this.utils.browser("msie")||this.$editor.focus(),t=t[0]||t,r=r[0]||r,this.utils.isBlockTag(t.tagName)&&t.innerHTML===""&&(t.innerHTML=this.opts.invisibleSpace);if(t.tagName=="BR"&&this.opts.linebreaks===!1){var s=e(this.opts.emptyHtml)[0];e(t).replaceWith(s),t=s,r=t}this.selection.get();try{this.range.setStart(t,n),this.range.setEnd(r,i)}catch(o){}this.selection.addRange()},setAfter:function(t){try{var n=e(t)[0].tagName;if(n!="BR"&&!this.utils.isBlock(t)){var r=this.utils.createSpaceElement();e(t).after(r),this.caret.setEnd(r)}else n!="BR"&&this.utils.browser("msie")?this.caret.setStart(e(t).next()):this.caret.setAfterOrBefore(t,"after")}catch(i){var r=this.utils.createSpaceElement();e(t).after(r),this.caret.setEnd(r)}},setBefore:function(t){this.utils.isBlock(t)?this.caret.setEnd(e(t).prev()):this.caret.setAfterOrBefore(t,"before")},setAfterOrBefore:function(e,t){this.utils.browser("msie")||this.$editor.focus(),e=e[0]||e,this.selection.get();if(t=="after")try{this.range.setStartAfter(e),this.range.setEndAfter(e)}catch(n){}else try{this.range.setStartBefore(e),this.range.setEndBefore(e)}catch(n){}this.range.collapse(!1),this.selection.addRange()},getOffsetOfElement:function(t){t=t[0]||t,this.selection.get();var n=this.range.cloneRange();return n.selectNodeContents(t),n.setEnd(this.range.endContainer,this.range.endOffset),e.trim(n.toString()).length},getOffset:function(){var e=0,t=window.getSelection();if(t.rangeCount>0){var n=window.getSelection().getRangeAt(0),r=n.cloneRange();r.selectNodeContents(this.$editor[0]),r.setEnd(n.endContainer,n.endOffset),e=r.toString().length}return e},setOffset:function(e,t){typeof t=="undefined"&&(t=e),this.focus.isFocused()||this.focus.setStart();var n=document.createRange(),r=document.getSelection(),i,s=0,o=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);while(i=o.nextNode()){s+=i.nodeValue.length,s>e&&(n.setStart(i,i.nodeValue.length+e-s),e=Infinity);if(s>=t){n.setEnd(i,i.nodeValue.length+t-s);break}}r.removeAllRanges(),r.addRange(n)},setToPoint:function(e,t){this.caret.setOffset(e,t)},getCoords:function(){return this.caret.getOffset()}}},clean:function(){return{onSet:function(t){t=this.clean.savePreCode(t),t=t.replace(/<script(.*?[^>]?)>([\w\W]*?)<\/script>/gi,'<pre class="redactor-script-tag" style="display: none;" $1>$2</pre>'),t=t.replace(/\$/g,"$"),t=t.replace(/â€/g,'"'),t=t.replace(/‘/g,"'"),t=t.replace(/’/g,"'"),this.opts.replaceDivs&&(t=this.clean.replaceDivs(t)),this.opts.linebreaks&&(t=this.clean.replaceParagraphsToBr(t)),t=this.clean.saveFormTags(t);var n=e("<div>");n.html(t);var r=n.find("font[style]");return r.length!==0&&(r.replaceWith(function(){var t=e(this),n=e("<span>").attr("style",t.attr("style"));return n.append(t.contents())}),t=n.html()),n.remove(),t=t.replace(/<font(.*?[^<])>/gi,""),t=t.replace(/<\/font>/gi,""),t=this.tidy.load(t),this.opts.paragraphize&&(t=this.paragraphize.load(t)),t=this.clean.setVerified(t),t=this.clean.convertInline(t),t},onSync:function(t){t=t.replace(/[\u200B-\u200D\uFEFF]/g,""),t=t.replace(/​/gi,""),t=t.replace(/ /gi," ");if(t.search(/^<p>(||\s|| )<\/p>$/i)!=-1)return"";t=t.replace(/<pre class="redactor-script-tag" style="display: none;"(.*?[^>]?)>([\w\W]*?)<\/pre>/gi,"<script$1>$2</script>"),t=this.clean.restoreFormTags(t);var n={"â„¢":"™","©":"©","…":"…","—":"—","â€":"‐"};return e.each(n,function(e,n){t=t.replace(new RegExp(e,"g"),n)}),t=t.replace(new RegExp("<br\\s?/?></li>","gi"),"</li>"),t=t.replace(new RegExp("</li><br\\s?/?>","gi"),"</li>"),t=t.replace(new RegExp('<div(.*?) data-tagblock="redactor"(.*?[^>])>',"gi"),"<div$1$2>"),t=t.replace(new RegExp('<(.*?) data-verified="redactor"(.*?[^>])>',"gi"),"<$1$2>"),t=t.replace(new RegExp('<span(.*?) rel="(.*?)"(.*?[^>])>',"gi"),"<span$1$3>"),t=t.replace(new RegExp('<img(.*?) rel="(.*?)"(.*?[^>])>',"gi"),"<img$1$3>"),t=t.replace(new RegExp('<img(.*?) style="" (.*?[^>])>',"gi"),"<img$1 $2>"),t=t.replace(new RegExp("<img(.*?) style (.*?[^>])>","gi"),"<img$1 $2>"),t=t.replace(new RegExp('<span class="redactor-invisible-space">(.*?)</span>',"gi"),"$1"),t=t.replace(/ data-save-url="(.*?[^>])"/gi,""),t=t.replace(/<span(.*?)id="redactor-image-box"(.*?[^>])>([\w\W]*?)<img(.*?)><\/span>/gi,"$3<img$4>"),t=t.replace(/<span(.*?)id="redactor-image-resizer"(.*?[^>])>(.*?)<\/span>/gi,""),t=t.replace(/<span(.*?)id="redactor-image-editter"(.*?[^>])>(.*?)<\/span>/gi,""),t=t.replace(/<font(.*?[^<])>/gi,""),t=t.replace(/<\/font>/gi,""),t=this.tidy.load(t),this.opts.linkNofollow&&(t=t.replace(/<a(.*?)rel="nofollow"(.*?[^>])>/gi,"<a$1$2>"),t=t.replace(/<a(.*?[^>])>/gi,'<a$1 rel="nofollow">')),t=t.replace(/<(.*?) data-redactor-tag="(.*?)"(.*?[^>])>/gi,"<$1$3>"),t=t.replace(/<(.*?) data-redactor-class="(.*?)"(.*?[^>])>/gi,"<$1$3>"),t=t.replace(/<(.*?) data-redactor-style="(.*?)"(.*?[^>])>/gi,"<$1$3>"),t=t.replace(new RegExp('<(.*?) data-verified="redactor"(.*?[^>])>',"gi"),"<$1$2>"),t=t.replace(new RegExp('<(.*?) data-verified="redactor">',"gi"),"<$1>"),t},onPaste:function(t,n){t=e.trim(t);if(!t)return t;t=t.replace(/\$/g,"$"),t=t.replace(/â€/g,'"'),t=t.replace(/“/g,'"'),t=t.replace(/‘/g,"'"),t=t.replace(/’/g,"'"),t=t.replace(/<span class="Apple-converted-space"> <\/span>/gi," "),t=t.replace(/<span class="Apple-tab-span"[^>]*>\t<\/span>/gi," "),t=t.replace(/<span[^>]*>(\s| )<\/span>/gi," ");if(this.opts.pastePlainText)return this.clean.getPlainText(t);if(!this.utils.isSelectAll()&&typeof n=="undefined"){if(this.utils.isCurrentOrParent(["FIGCAPTION","A"]))return this.clean.getPlainText(t,!1);if(this.utils.isCurrentOrParent("PRE"))return this.clean.getPreCode(t);if(this.utils.isCurrentOrParent(["BLOCKQUOTE","H1","H2","H3","H4","H5","H6"])){t=this.clean.getOnlyImages(t);if(!this.utils.browser("msie")){var r=this.selection.getBlock();r&&r.tagName=="P"&&(t=t.replace(/<img(.*?)>/gi,"<p><img$1></p>"))}return t}if(this.utils.isCurrentOrParent(["TD"]))return t=this.clean.onPasteTidy(t,"td"),this.opts.linebreaks&&(t=this.clean.replaceParagraphsToBr(t)),t=this.clean.replaceDivsToBr(t),t;if(this.utils.isCurrentOrParent(["LI"]))return this.clean.onPasteTidy(t,"li")}return t=this.clean.isSingleLine(t,n),this.clean.singleLine||(this.opts.linebreaks&&(t=this.clean.replaceParagraphsToBr(t)),this.opts.replaceDivs&&(t=this.clean.replaceDivs(t)),t=this.clean.saveFormTags(t)),t=this.clean.onPasteWord(t),t=this.clean.onPasteExtra(t),t=this.clean.onPasteTidy(t,"all"),!this.clean.singleLine&&this.opts.paragraphize&&(t=this.paragraphize.load(t)),t=this.clean.removeDirtyStyles(t),t=this.clean.onPasteRemoveSpans(t),t=this.clean.onPasteRemoveEmpty(t),t=this.clean.convertInline(t),t},onPasteWord:function(e){return e=e.replace(/<!--[\s\S]*?-->/gi,""),e=e.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,""),/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(e)&&(e=this.clean.onPasteIeFixLinks(e),e=e.replace(/<img(.*?)v:shapes=(.*?)>/gi,""),e=e.replace(/src="file\:\/\/(.*?)"/ +,'src=""'),e=e.replace(/<p(.*?)class="MsoListParagraphCxSpFirst"([\w\W]*?)<\/p>/gi,"<ul><li$2</li>"),e=e.replace(/<p(.*?)class="MsoListParagraphCxSpMiddle"([\w\W]*?)<\/p>/gi,"<li$2</li>"),e=e.replace(/<p(.*?)class="MsoListParagraphCxSpLast"([\w\W]*?)<\/p>/gi,"<li$2</li></ul>"),e=e.replace(/<p(.*?)class="MsoListParagraph"([\w\W]*?)<\/p>/gi,"<ul><li$2</li></ul>"),e=e.replace(/·/g,""),e=e.replace(/<p class="Mso(.*?)"/gi,"<p"),e=e.replace(/ class=\"(mso[^\"]*)\"/gi,""),e=e.replace(/ class=(mso\w+)/gi,""),e=e.replace(/<o:p(.*?)>([\w\W]*?)<\/o:p>/gi,"$2"),e=e.replace(/\n/g," "),e=e.replace(/<p>\n?<li>/gi,"<li>")),this.opts.cleanSpaces&&(e=e.replace(/(\s| )+/g," ")),e},onPasteExtra:function(e){return e=e.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2"),e=e.replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3"),e=e.replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>/gi,'<span style="font-weight: bold;"><span style="font-style: italic;">'),e=e.replace(/<span[^>]*font-style: italic[^>]*>/gi,'<span style="font-style: italic;">'),e=e.replace(/<span[^>]*font-weight: bold[^>]*>/gi,'<span style="font-weight: bold;">'),e=e.replace(/<span[^>]*text-decoration: underline[^>]*>/gi,'<span style="text-decoration: underline;">'),e=e.replace(/<img>/gi,""),e=e.replace(/\n{3,}/gi,"\n"),e=e.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi,"$2"),e=e.replace(/<p><p>/gi,"<p>"),e=e.replace(/<\/p><\/p>/gi,"</p>"),e=e.replace(/<li>(\s*|\t*|\n*)<p>/gi,"<li>"),e=e.replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi,"</li>"),e=e.replace(/<\/p>\s<p/gi,"</p><p"),e=e.replace(/<img src="webkit-fake-url\:\/\/(.*?)"(.*?)>/gi,""),e=e.replace(/<p>•([\w\W]*?)<\/p>/gi,"<li>$1</li>"),this.utils.browser("mozilla")&&(e=e.replace(/<br\s?\/?>$/gi,"")),e},onPasteTidy:function(e,t){var n=["span","a","pre","blockquote","small","em","strong","code","kbd","mark","address","cite","var","samp","dfn","sup","sub","b","i","u","del","ol","ul","li","dl","dt","dd","p","br","video","audio","iframe","embed","param","object","img","table","td","th","tr","tbody","tfoot","thead","h1","h2","h3","h4","h5","h6"],r=!1,i=[["a","*"],["img",["src","alt"]],["span",["class","rel","data-verified"]],["iframe","*"],["video","*"],["audio","*"],["embed","*"],["object","*"],["param","*"],["source","*"]];t=="all"?(r=["p","span","h1","h2","h3","h4","h5","h6"],i=[["table","class"],["td",["colspan","rowspan"]],["a","*"],["img",["src","alt","data-redactor-inserted-image"]],["span",["class","rel","data-verified"]],["iframe","*"],["video","*"],["audio","*"],["embed","*"],["object","*"],["param","*"],["source","*"]]):t=="td"?n=["ul","ol","li","span","a","small","em","strong","code","kbd","mark","cite","var","samp","dfn","sup","sub","b","i","u","del","ol","ul","li","dl","dt","dd","br","iframe","video","audio","embed","param","object","img","h1","h2","h3","h4","h5","h6"]:t=="li"&&(n=["ul","ol","li","span","a","small","em","strong","code","kbd","mark","cite","var","samp","dfn","sup","sub","b","i","u","del","br","iframe","video","audio","embed","param","object","img"]);var s={deniedTags:!1,allowedTags:n,removeComments:!0,removePhp:!0,removeAttr:!1,allowedAttr:i,removeEmpty:r};return this.tidy.load(e,s)},onPasteRemoveEmpty:function(e){return e=e.replace(/<(p|h[1-6])>(|\s|\n|\t|<br\s?\/?>)<\/(p|h[1-6])>/gi,""),this.opts.linebreaks||(e=e.replace(/<br>$/i,"")),e},onPasteRemoveSpans:function(e){return e=e.replace(/<span>(.*?)<\/span>/gi,"$1"),e=e.replace(/<span[^>]*>\s| <\/span>/gi," "),e},onPasteIeFixLinks:function(t){if(!this.utils.browser("msie"))return t;var n=e.trim(t);return n.search(/^<a(.*?)>(.*?)<\/a>$/i)===0&&(t=t.replace(/^<a(.*?)>(.*?)<\/a>$/i,"$2")),t},isSingleLine:function(e,t){this.clean.singleLine=!1;if(!this.utils.isSelectAll()&&typeof t=="undefined"){var n=this.opts.blockLevelElements.join("|").replace("P|","").replace("DIV|",""),r=e.match(new RegExp("</("+n+")>","gi")),i=e.match(/<\/(p|div)>/gi);if(!r&&(i===null||i&&i.length<=1)){console.log("isSingleLine",e,"?");var s=e.match(/<br\s?\/?>/gi),o=e.match(/<img(.*?[^>])>/gi);!s&&!o&&(this.clean.singleLine=!0,e=e.replace(/<\/?(p|div)(.*?)>/gi,""))}}return e},stripTags:function(e,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var n=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;return e.replace(n,function(e,n){return t.indexOf("<"+n.toLowerCase()+">")>-1?e:""})},savePreCode:function(t){var n=t.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/gi);return n!==null&&e.each(n,e.proxy(function(e,n){var r=n.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/i);r[3]=r[3].replace(/<br\s?\/?>/g,"\n"),r[3]=r[3].replace(/ /g," "),this.opts.preSpaces&&(r[3]=r[3].replace(/\t/g,Array(this.opts.preSpaces+1).join(" "))),r[3]=this.clean.encodeEntities(r[3]),r[3]=r[3].replace(/\$/g,"$"),t=t.replace(n,"<"+r[1]+r[2]+">"+r[3]+"</"+r[1]+">")},this)),t},getTextFromHtml:function(t){t=t.replace(/<br\s?\/?>|<\/H[1-6]>|<\/p>|<\/div>|<\/li>|<\/td>/gi,"\n");var n=document.createElement("div");return n.innerHTML=t,t=n.textContent||n.innerText,e.trim(t)},getPlainText:function(e,t){return e=this.clean.getTextFromHtml(e),e=e.replace(/\n/g,"<br />"),this.opts.paragraphize&&typeof t=="undefined"&&(e=this.paragraphize.load(e)),e},getPreCode:function(e){return e=e.replace(/<img(.*?) style="(.*?)"(.*?[^>])>/gi,"<img$1$3>"),e=e.replace(/<img(.*?)>/gi,"<img$1>"),e=this.clean.getTextFromHtml(e),this.opts.preSpaces&&(e=e.replace(/\t/g,Array(this.opts.preSpaces+1).join(" "))),e=this.clean.encodeEntities(e),e},getOnlyImages:function(e){return e=e.replace(/<img(.*?)>/gi,"[img$1]"),e=e.replace(/<(.*?)>/gi,""),e=e.replace(/\[img(.*?)\]/gi,"<img$1>"),e},getOnlyLinksAndImages:function(e){return e=e.replace(/<a(.*?)href="(.*?)"(.*?)>([\w\W]*?)<\/a>/gi,'[a href="$2"]$4[/a]'),e=e.replace(/<img(.*?)>/gi,"[img$1]"),e=e.replace(/<(.*?)>/gi,""),e=e.replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi,'<a href="$1">$2</a>'),e=e.replace(/\[img(.*?)\]/gi,"<img$1>"),e},encodeEntities:function(e){return e=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"'),e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},removeDirtyStyles:function(t){if(this.utils.browser("msie"))return t;var n=document.createElement("div");return n.innerHTML=t,this.clean.clearUnverifiedRemove(e(n)),t=n.innerHTML,e(n).remove(),t},clearUnverified:function(){if(this.utils.browser("msie"))return;this.clean.clearUnverifiedRemove(this.$editor);var e=this.$editor.find("h1, h2, h3, h4, h5, h6");e.find("span").removeAttr("style"),e.find(this.opts.verifiedTags.join(", ")).removeAttr("style"),this.code.sync()},clearUnverifiedRemove:function(t){t.find(this.opts.verifiedTags.join(", ")).removeAttr("style"),t.find("span").not('[data-verified="redactor"]').removeAttr("style"),t.find('span[data-verified="redactor"], img[data-verified="redactor"]').each(function(t,n){var r=e(n);r.attr("style",r.attr("rel"))})},setVerified:function(e){if(this.utils.browser("msie"))return e;e=e.replace(new RegExp("<img(.*?[^>])>","gi"),'<img$1 data-verified="redactor">'),e=e.replace(new RegExp("<span(.*?)>","gi"),'<span$1 data-verified="redactor">');var t=e.match(new RegExp('<(span|img)(.*?)style="(.*?)"(.*?[^>])>',"gi"));if(t){var n=t.length;for(var r=0;r<n;r++)try{var i=t[r].replace(/style="(.*?)"/i,'style="$1" rel="$1"');e=e.replace(new RegExp(t[r],"gi"),i)}catch(s){}}return e},convertInline:function(t){var n=e("<div />").html(t),r=this.opts.inlineTags;return r.push("span"),n.find(r.join(",")).each(function(){var t=e(this),n=this.tagName.toLowerCase();t.attr("data-redactor-tag",n),n=="span"&&(t.attr("style")?t.attr("data-redactor-style",t.attr("style")):t.attr("class")&&t.attr("data-redactor-class",t.attr("class")))}),t=n.html(),n.remove(),t},normalizeLists:function(){this.$editor.find("li").each(function(t,n){var r=e(n).next();r.length!==0&&(r[0].tagName=="UL"||r[0].tagName=="OL")&&e(n).append(r)})},removeSpaces:function(e){return e=e.replace(/\n/g,""),e=e.replace(/[\t]*/g,""),e=e.replace(/\n\s*\n/g,"\n"),e=e.replace(/^[\s\n]*/g," "),e=e.replace(/[\s\n]*$/g," "),e=e.replace(/>\s{2,}</g,"> <"),e=e.replace(/\n\n/g,"\n"),e=e.replace(/[\u200B-\u200D\uFEFF]/g,""),e},replaceDivs:function(e){return this.opts.linebreaks?(e=e.replace(/<div><br\s?\/?><\/div>/gi,"<br />"),e=e.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2<br />")):e=e.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p$1>$2</p>"),e},replaceDivsToBr:function(e){return e=e.replace(/<div\s(.*?)>/gi,"<p>"),e=e.replace(/<div><br\s?\/?><\/div>/gi,"<br /><br />"),e=e.replace(/<div>([\w\W]*?)<\/div>/gi,"$1<br /><br />"),e},replaceParagraphsToBr:function(e){return e=e.replace(/<p\s(.*?)>/gi,"<p>"),e=e.replace(/<p><br\s?\/?><\/p>/gi,"<br />"),e=e.replace(/<p>([\w\W]*?)<\/p>/gi,"$1<br /><br />"),e=e.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi,"</blockquote>"),e},saveFormTags:function(e){return e.replace(/<form(.*?)>([\w\W]*?)<\/form>/gi,'<section$1 rel="redactor-form-tag">$2</section>')},restoreFormTags:function(e){return e.replace(/<section(.*?) rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>")}}},code:function(){return{set:function(t){t=e.trim(t.toString()),t=this.clean.onSet(t),this.$editor.html(t),this.code.sync(),setTimeout(e.proxy(this.buffer.add,this),15),this.start===!1&&this.observe.load()},get:function(){var e=this.$textarea.val();return e=this.tabifier.get(e),e},sync:function(){setTimeout(e.proxy(this.code.startSync,this),10)},startSync:function(){var e=this.$editor.html();if(this.code.syncCode&&this.code.syncCode==e)return;this.code.syncCode=e,e=this.core.setCallback("syncBefore",e),e=this.clean.onSync(e),this.$textarea.val(e),this.core.setCallback("sync",e),this.start===!1&&this.core.setCallback("change",e),this.start=!1,this.autosave.onChange()},toggle:function(){this.opts.visual?this.code.showCode():this.code.showVisual()},showCode:function(){this.code.offset=this.caret.getOffset();var t=e(window).scrollTop(),n=this.$editor.innerHeight();this.$editor.hide();var r=this.$textarea.val();this.modified=this.clean.removeSpaces(r),r=this.tabifier.get(r),this.$textarea.val(r).height(n).show().focus(),this.$textarea.on("keydown.redactor-textarea-indenting",this.code.textareaIndenting),e(window).scrollTop(t),this.$textarea[0].setSelectionRange&&this.$textarea[0].setSelectionRange(0,0),this.$textarea[0].scrollTop=0,this.opts.visual=!1,this.button.setInactiveInCode(),this.button.setActive("html"),this.core.setCallback("source",r)},showVisual:function(){if(this.opts.visual)return;var e=this.$textarea.hide().val();this.modified!==this.clean.removeSpaces(e)&&this.code.set(e),this.$editor.show(),this.utils.isEmpty(e)||this.placeholder.remove(),this.caret.setOffset(this.code.offset),this.$textarea.off("keydown.redactor-textarea-indenting"),this.button.setActiveInVisual(),this.button.setInactive("html"),this.observe.load(),this.opts.visual=!0},textareaIndenting:function(e){if(e.keyCode!==9)return!0;var t=this.$textarea,n=t.get(0).selectionStart;return t.val(t.val().substring(0,n)+" "+t.val().substring(t.get(0).selectionEnd)),t.get(0).selectionStart=t.get(0).selectionEnd=n+1,!1}}},core:function(){return{getObject:function(){return e.extend({},this)},getEditor:function(){return this.$editor},getBox:function(){return this.$box},getElement:function(){return this.$element},getTextarea:function(){return this.$textarea},getToolbar:function(){return this.$toolbar?this.$toolbar:!1},addEvent:function(e){this.core.event=e},getEvent:function(){return this.core.event},setCallback:function(t,n,r){var i=this.opts[t+"Callback"];return e.isFunction(i)?typeof r=="undefined"?i.call(this,n):i.call(this,n,r):typeof r=="undefined"?n:r},destroy:function(){this.core.setCallback("destroy"),this.$element.off(".redactor").removeData("redactor"),this.$editor.off(".redactor"),this.$editor.removeClass("redactor-editor redactor-linebreaks redactor-placeholder"),this.$editor.removeAttr("contenteditable");var t=this.code.get();this.build.isTextarea()?(this.$box.after(this.$element),this.$box.remove(),this.$element.val(t).show()):(this.$box.after(this.$editor),this.$box.remove(),this.$element.html(t).show()),this.$pasteBox&&this.$pasteBox.remove(),this.$modalBox&&this.$modalBox.remove(),this.$modalOverlay&&this.$modalOverlay.remove(),e(".redactor-toolbar-tooltip").remove(),clearInterval(this.autosaveInterval)}}},dropdown:function(){return{build:function(t,n,r){t=="formatting"&&this.opts.formattingAdd&&e.each(this.opts.formattingAdd,e.proxy(function(e,t){var n=t.tag;typeof t.class!="undefined"&&(n=n+"-"+t.class),t.type=this.utils.isBlockTag(t.tag)?"block":"inline";var i=t.type=="inline"?"inline.formatting":"block.formatting";if(this.opts.linebreaks&&t.type=="block"&&t.tag=="p")return;this.formatting[n]={tag:t.tag,style:t.style,"class":t.class,attr:t.attr,data:t.data},r[n]={func:i,title:t.title}},this)),e.each(r,e.proxy(function(r,i){var s=e('<a href="#" class="redactor-dropdown-'+r+'">'+i.title+"</a>");t=="formatting"&&s.addClass("redactor-formatting-"+r),s.on("click",e.proxy(function(e){var t="func",n=i.func;i.command?(t="command",n=i.command):i.dropdown&&(t="dropdown",n=i.dropdown),this.button.onClick(e,r,t,n)},this)),n.append(s)},this))},show:function(t,n){if(!this.opts.visual)return t.preventDefault(),!1;var r=this.button.get(n),i=r.data("dropdown").appendTo(document.body);document.activeElement.blur();if(r.hasClass("dropact"))this.dropdown.hideAll();else{this.dropdown.hideAll(),this.core.setCallback("dropdownShow",{dropdown:i,key:n,button:r}),this.button.setActive(n),r.addClass("dropact");var s=r.offset(),o=i.width();s.left+o>e(document).width()&&(s.left-=o);var u=s.left+"px";if(this.$toolbar.hasClass("toolbar-fixed-box")){var a=this.$toolbar.innerHeight()+this.opts.toolbarFixedTopOffset,f="fixed";this.opts.toolbarFixedTarget!==document&&(a=this.$toolbar.innerHeight()+this.$toolbar.offset().top+this.opts.toolbarFixedTopOffset,f="absolute"),i.css({position:f,left:u,top:a+"px"}).show()}else{var a=r.innerHeight()+s.top+"px";i.css({position:"absolute",left:u,top:a}).show()}this.core.setCallback("dropdownShown",{dropdown:i,key:n,button:r})}e(document).one("click",e.proxy(this.dropdown.hide,this)),this.$editor.one("click",e.proxy(this.dropdown.hide,this));var l=e(document.body),c=l.width();i.on("mouseover",function(){l.addClass("body-hidden"),l.css("margin-right",l.width()-c+"px")}),i.on("mouseout",function(){l.removeClass("body-hidden").css("margin-right",0)}),t.stopPropagation()},hideAll:function(){this.$toolbar.find("a.dropact").removeClass("redactor-act").removeClass("dropact"),e(document.body).removeClass("body-hidden").css("margin-right",0),e(".redactor-dropdown").hide(),this.core.setCallback("dropdownHide")},hide:function(t){var n=e(t.target);n.hasClass("dropact")||(n.removeClass("dropact"),this.dropdown.hideAll())}}},file:function(){return{show:function(){this.modal.load("file",this.lang.get("file"),700),this.upload.init("#redactor-modal-file-upload",this.opts.fileUpload,this.file.insert),this.selection.save(),this.selection.get();var t=this.sel.toString();e("#redactor-filename").val(t),this.modal.show()},insert:function(t,n,r){if(typeof t.error!="undefined"){this.modal.close(),this.selection.restore(),this.core.setCallback("fileUploadError",t);return}var i;if(typeof t=="string")i=t;else{var s=e("#redactor-filename").val();if(typeof s=="undefined"||s==="")s=t.filename;i='<a href="'+t.filelink+'" id="filelink-marker">'+s+"</a>"}if(n){this.selection.removeMarkers();var o=this.selection.getMarker();this.insert.nodeToCaretPositionFromPoint(r,o)}else this.modal.close();this.selection.restore(),this.buffer.set(),this.insert.html(i);if(typeof t=="string")return;var u=e(this.$editor.find("a#filelink-marker"));u.size()!==0?u.removeAttr("id"):u=!1,this.core.setCallback("fileUpload",u,t)}}},focus:function(){return{setStart:function(){this.$editor.focus();var e=this.$editor.children().first();if(e.size()===0)return;if(e[0].length===0||e[0].tagName=="BR"||e[0].nodeType==3)return;if(e[0].tagName=="UL"||e[0].tagName=="OL"){e=e.find("li").first();var t=e.children().first();if(!this.utils.isBlock(t)&&t.text()===""){this.caret.setStart(t);return}}if(this.opts.linebreaks&&!this.utils.isBlockTag(e[0].tagName)){this.selection.get(),this.range.setStart(this.$editor[0],0),this.range.setEnd(this.$editor[0],0),this.selection.addRange();return}this.caret.setStart(e)},setEnd:function(){if(this.utils.browser("mozilla")||this.utils.browser("msie")){var e=this.$editor.children().last();this.caret.setEnd(e)}else{this.selection.get();try{this.range.selectNodeContents(this.$editor[0]),this.range.collapse(!1),this.selection.addRange()}catch(t){}}},isFocused:function(){var t=document.getSelection().focusNode;return t===null?!1:this.opts.linebreaks&&e(t.parentNode).hasClass("redactor-linebreaks")?!0:this.utils.isRedactorParent(t.parentNode)?this.$editor.is(":focus"):!1}}},image:function(){return{show:function(){this.modal.load("image",this.lang.get("image"),700),this.upload.init("#redactor-modal-image-droparea",this.opts.imageUpload,this.image.insert),this.selection.save(),this.modal.show()},showEdit:function(t){var n=t.closest("a");this.modal.load("imageEdit",this.lang.get("edit"),705),this.modal.createCancelButton(),this.image.buttonDelete=this.modal.createDeleteButton(this.lang.get("_delete")),this.image.buttonSave=this.modal.createActionButton(this.lang.get("save")),this.image.buttonDelete.on("click",e.proxy(function(){this.image.remove(t)},this)),this.image.buttonSave.on("click",e.proxy(function(){this.image.update(t)},this)),e("#redactor-image-title").val(t.attr("alt"));if(!this.opts.imageLink)e(".redactor-image-link-option").hide();else{var r=e("#redactor-image-link");r.attr("href",t.attr("src")),n.size()!==0&&(r.val(n.attr("href")),n.attr("target")=="_blank"&&e("#redactor-image-link-blank").prop("checked",!0))}if(!this.opts.imagePosition)e(".redactor-image-position-option").hide();else{var i=t.css("display")=="block"&&t.css("float")=="none"?"center":t.css("float");e("#redactor-image-align").val(i)}this.modal.show()},setFloating:function(t){var n=e("#redactor-image-align").val(),r="",i="",s="";switch(n){case"left":r="left",s="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0";break;case"right":r="right",s="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin;break;case"center":i="block",s="auto"}t.css({"float":r,display:i,margin:s}),t.attr("rel",t.attr("style"))},update:function(t){this.image.hideResize(),this.buffer.set();var n=t.closest("a");t.attr("alt",e("#redactor-image-title").val()),this.image.setFloating(t);var r=e.trim(e("#redactor-image-link").val());if(r!==""){var i=e("#redactor-image-link-blank").prop("checked")?!0:!1;if(n.size()===0){var s=e('<a href="'+r+'">'+this.utils.getOuterHtml(t)+"</a>");i&&s.attr("target","_blank"),t.replaceWith(s)}else n.attr("href",r),i?n.attr("target","_blank"):n.removeAttr("target")}else n.size()!==0&&n.replaceWith(this.utils.getOuterHtml(t));this.modal.close(),this.observe.images(),this.code.sync()},setEditable:function(t){if(!this.opts.imageEditable)return;t.on("dragstart",e.proxy(this.image.onDrag,this)),t.on("mousedown",e.proxy(this.image.hideResize,this)),t.on("click touchstart",e.proxy(function(n){this.observe.image=t;if(this.$editor.find("#redactor-image-box").size()!==0)return!1;this.image.resizer=this.image.loadEditableControls(t),e(document).on("click.redactor-image-resize-hide",e.proxy(this.image.hideResize,this)),this.$editor.on("click.redactor-image-resize-hide",e.proxy(this.image.hideResize,this));if(!this.opts.imageResizable)return;this.image.resizer.on("mousedown.redactor touchstart.redactor",e.proxy(function(e){e.preventDefault(),this.image.resizeHandle={x:e.pageX,y:e.pageY,el:t,ratio:t.width()/t.height(),h:t.height()},e=e.originalEvent||e,e.targetTouches&&(this.image.resizeHandle.x=e.targetTouches[0].pageX,this.image.resizeHandle.y=e.targetTouches[0].pageY),this.image.startResize()},this))},this))},startResize:function(){e(document).on("mousemove.redactor-image-resize touchmove.redactor-image-resize",e.proxy(this.image.moveResize,this)),e(document).on("mouseup.redactor-image-resize touchend.redactor-image-resize",e.proxy(this.image.stopResize,this))},moveResize:function(e){e.preventDefault(),e=e.originalEvent||e;var t=this.image.resizeHandle.h;e.targetTouches?t+=e.targetTouches[0].pageY-this.image.resizeHandle.y:t+=e.pageY-this.image.resizeHandle.y;var n=Math.round(t*this.image.resizeHandle.ratio);if(t<50||n<100)return;this.image.resizeHandle.el.width(n),this.image.resizeHandle.el.height(this.image.resizeHandle.el.width()/this.image.resizeHandle.ratio),this.code.sync()},stopResize:function(){this.handle=!1,e(document).off(".redactor-image-resize"),this.image.hideResize()},onDrag:function(t){if(this.$editor.find("#redactor-image-box").size()!==0)return t.preventDefault(),!1;this.$editor.on("drop.redactor-image-inside-drop",e.proxy(function(){setTimeout(e.proxy(this.image.onDrop,this),1)},this))},onDrop:function(){this.image.fixImageSourceAfterDrop(),this.observe.images(),this.$editor.off("drop.redactor-image-inside-drop"),this.clean.clearUnverified(),this.code.sync()},fixImageSourceAfterDrop:function(){this.$editor.find("img[data-save-url]").each(function(){var t=e(this);t.attr("src",t.attr("data-save-url")),t.removeAttr("data-save-url")})},hideResize:function(t){if(t&&e(t.target).closest("#redactor-image-box").length!==0)return;if(t&&t.target.tagName=="IMG"){var n=e(t.target);n.attr("data-save-url",n.attr("src"))}var r=this.$editor.find("#redactor-image-box");if(r.size()===0)return;this.image.editter.remove(),e(this.image.resizer).remove(),r.find("img").css({marginTop:r[0].style.marginTop,marginBottom:r[0].style.marginBottom,marginLeft:r[0].style.marginLeft,marginRight:r[0].style.marginRight}),r.css("margin",""),r.find("img").css("opacity",""),r.replaceWith(function(){return e(this).contents()}),e(document).off("click.redactor-image-resize-hide"),this.$editor.off("click.redactor-image-resize-hide"),typeof this.image.resizeHandle!="undefined"&&this.image.resizeHandle.el.attr("rel",this.image.resizeHandle.el.attr("style")),this.code.sync()},loadEditableControls:function(t){var n=e('<span id="redactor-image-box" data-redactor="verified">');n.css("float",t.css("float")).attr("contenteditable",!1),t[0].style.margin!="auto"?(n.css({marginTop:t[0].style.marginTop,marginBottom:t[0].style.marginBottom,marginLeft:t[0].style.marginLeft,marginRight:t[0].style.marginRight}),t.css("margin","")):n.css({display:"block",margin:"auto"}),t.css("opacity",".5").after(n),this.image.editter=e('<span id="redactor-image-editter" data-redactor="verified">'+this.lang.get("edit")+"</span>"),this.image.editter.attr("contenteditable",!1),this.image.editter.on("click",e.proxy(function(){this.image.showEdit(t)},this)),n.append(this.image.editter);var r=this.image.editter.innerWidth();this.image.editter.css("margin-left","-"+r/2+"px");if(this.opts.imageResizable&&!this.utils.isMobile()){var i=e('<span id="redactor-image-resizer" data-redactor="verified"></span>');return this.utils.isDesktop()||i.css({width:"15px",height:"15px"}),i.attr("contenteditable",!1),n.append(i),n.append(t),i}return n.append(t),!1},remove:function(t){var n=e(t),r=n.closest("a"),i=n.closest("figure"),s=n.parent();e("#redactor-image-box").size()!==0&&(s=e("#redactor-image-box").parent());var o;i.size()!==0?(o=i.next(),i.remove()):r.size()!==0?(s=r.parent(),r.remove()):n.remove(),e("#redactor-image-box").remove(),i.size()!==0?this.caret.setStart(o):this.caret.setStart(s),this.core.setCallback("imageDelete",n[0].src,n),this.modal.close(),this.code.sync()},insert:function(t,n,r){if(typeof t.error!="undefined"){this.modal.close(),this.selection.restore(),this.core.setCallback("imageUploadError",t);return}var i;typeof t=="string"?i=e(t).attr("data-redactor-inserted-image","true"):(i=e("<img>"),i.attr("src",t.filelink).attr("data-redactor-inserted-image","true"));var s=i,o=this.utils.isCurrentOrParent("P");o&&(s=e("<blockquote />").append(i));if(n){this.selection.removeMarkers();var u=this.selection.getMarker();this.insert.nodeToCaretPositionFromPoint(r,u)}else this.modal.close();this.selection.restore(),this.buffer.set(),this.insert.html(this.utils.getOuterHtml(s),!1);var a=this.$editor.find("img[data-redactor-inserted-image=true]").removeAttr("data-redactor-inserted-image");o?a.parent().contents().unwrap().wrap("<p />"):this.opts.linebreaks&&a.before("<br>").after("<br>");if(typeof t=="string")return;this.core.setCallback("imageUpload",a,t)}}},indent:function(){return{increase:function(){this.utils.browser("msie")||this.$editor.focus(),this.buffer.set(),this.selection.save();var e=this.selection.getBlock();e&&e.tagName=="LI"?this.indent.increaseLists():e===!1&&this.opts.linebreaks?this.indent.increaseText():this.indent.increaseBlocks(),this.selection.restore(),this.code.sync()},increaseLists:function(){document.execCommand("indent"),this.indent.fixEmptyIndent(),this.clean.normalizeLists(),this.clean.clearUnverified()},increaseBlocks:function(){e.each(this.selection.getBlocks(),e.proxy(function(e,t){if(t.tagName==="TD"||t.tagName==="TH")return;var n=this.utils.getAlignmentElement(t),r=this.utils.normalize(n.css("margin-left"))+this.opts.indentValue;n.css("margin-left",r+"px")},this))},increaseText:function(){var t=this.selection.wrap("div");e(t).attr("data-tagblock","redactor"),e(t).css("margin-left",this.opts.indentValue+"px")},decrease:function(){this.buffer.set(),this.selection.save();var e=this.selection.getBlock();e&&e.tagName=="LI"?this.indent.decreaseLists():this.indent.decreaseBlocks(),this.selection.restore(),this.code.sync()},decreaseLists:function(){document.execCommand("outdent");var t=this.selection.getCurrent(),n=e(t).closest("li"),r=n.parent();n.size()!==0&&r.size()!==0&&r[0].tagName=="LI"&&r.after(n),this.indent.fixEmptyIndent(),!this.opts.linebreaks&&n.size()===0&&(document.execCommand("formatblock",!1,"p"),this.$editor.find("ul, ol, blockquote, p").each(e.proxy(this.utils.removeEmpty,this))),this.clean.clearUnverified()},decreaseBlocks:function(){e.each(this.selection.getBlocks(),e.proxy(function(e,t){var n=this.utils.getAlignmentElement(t),r=this.utils.normalize(n.css("margin-left"))-this.opts.indentValue;r<=0?this.opts.linebreaks&&typeof n.data("tagblock")!="undefined"?n.replaceWith(n.html()+"<br />"):(n.css("margin-left",""),this.utils.removeEmptyAttr(n,"style")):n.css("margin-left",r+"px")},this))},fixEmptyIndent:function(){var t=this.selection.getBlock();if(this.range.collapsed&&t&&t.tagName=="LI"&&this.utils.isEmpty(e(t).text())){var n=e(t);n.find("span").not(".redactor-selection-marker").contents().unwrap(),n.append("<br>")}}}},inline:function(){return{formatting:function(e){var t,n;typeof this.formatting[e].style!="undefined"?t="style":typeof this.formatting[e].class!="undefined"&&(t="class"),t&&(n=this.formatting[e][t]),this.inline.format(this.formatting[e].tag,t,n)},format:function(e,t,n){if(this.utils.isCurrentOrParent("PRE"))return;var r=["b","bold","i","italic","underline","strikethrough","deleted","superscript","subscript"],i=["strong","strong","em","em","u","del","del","sup","sub"];for(var s=0;s<r.length;s++)e==r[s]&&(e=i[s]);this.inline.type=t||!1,this.inline.value=n||!1,this.buffer.set(),this.$editor.focus(),this.selection.get(),this.range.collapsed?this.inline.formatCollapsed(e):this.inline.formatMultiple(e)},formatCollapsed:function(t){var n=this.selection.getCurrent(),r=e(n).closest(t+"[data-redactor-tag="+t+"]");if(r.size()!==0){this.caret.setAfter(r[0]),this.utils.isEmpty(r.text())&&r.remove(),this.code.sync();return}var i=e("<"+t+">").attr("data-verified","redactor").attr("data-redactor-tag",t);i.html(this.opts.invisibleSpace),i=this.inline.setFormat(i),this.insert.node(i),this.code.sync();return},formatMultiple:function(t){this.inline.formatConvert(t),this.selection.save(),document.execCommand("strikethrough"),this.$editor.find("strike").each(e.proxy(function(n,r){var i=e(r);this.inline.formatRemoveSameChildren(i,t);var s;this.inline.type?(s=e("<span>").attr("data-redactor-tag",t).attr("data-verified","redactor"),s=this.inline.setFormat(s)):s=e("<"+t+">").attr("data-redactor-tag",t).attr("data-verified","redactor"),i.replaceWith(s.html(i.contents()));if(t=="span"){var o=s.parent();if(o&&o[0].tagName=="SPAN"&&this.inline.type=="style"){var u=this.inline.value.split(";");for(var a=0;a<u.length;a++){if(u[a]==="")return;var f=u[a].split(":");o.css(f[0],""),this.utils.removeEmptyAttr(o,"style")&&o.replaceWith(o.contents())}}}},this)),t!="span"&&this.$editor.find(this.opts.inlineTags.join(", ")).each(e.proxy(function(t,n){var r=e(n),i=r.css("text-decoration");i=="line-through"&&(r.css("text-decoration",""),this.utils.removeEmptyAttr(r,"style"))},this));if(t!="del"){var n=this;this.$editor.find("inline").each(function(e,t){n.utils.replaceToTag(t,"del")})}this.selection.restore(),this.code.sync()},formatRemoveSameChildren:function(t,n){t.children(n).each(function(){var t=e(this);t.hasClass("redactor-selection-marker")||t.contents().unwrap()})},formatConvert:function(t){this.selection.save();var n="";this.inline.type=="class"?n="[data-redactor-class="+this.inline.value+"]":this.inline.type=="style"&&(n='[data-redactor-style="'+this.inline.value+'"]');if(t!="del"){var r=this;this.$editor.find("del").each(function(e,t){r.utils.replaceToTag(t,"inline")})}this.$editor.find('[data-redactor-tag="'+t+'"]'+n).each(function(){if(n===""&&t=="span"&&this.tagName.toLowerCase()==t)return;var r=e(this);r.replaceWith(e("<strike />").html(r.contents()))}),this.selection.restore()},setFormat:function(e){switch(this.inline.type){case"class":e.hasClass(this.inline.value)?(e.removeClass(this.inline.value),e.removeAttr("data-redactor-class")):(e.addClass(this.inline.value),e.attr("data-redactor-class",this.inline.value));break;case"style":e[0].style.cssText=this.inline.value,e.attr("data-redactor-style",this.inline.value)}return e},removeStyle:function(){this.buffer.set();var t=this.selection.getCurrent(),n=this.selection.getInlines();this.selection.save();if(t&&t.tagName==="SPAN"){var r=e(t);r.removeAttr("style"),r[0].attributes.length===0&&r.replaceWith(r.contents())}e.each(n,e.proxy(function(t,n){var r=e(n);e.inArray(n.tagName.toLowerCase(),this.opts.inlineTags)!=-1&&!r.hasClass("redactor-selection-marker")&&(r.removeAttr("style"),r[0].attributes.length===0&&r.replaceWith(r.contents()))},this)),this.selection.restore(),this.code.sync()},removeStyleRule:function(t){this.buffer.set();var n=this.selection.getParent(),r=this.selection.getInlines();this.selection.save();if(n&&n.tagName==="SPAN"){var i=e(n);i.css(t,""),this.utils.removeEmptyAttr(i,"style"),i[0].attributes.length===0&&i.replaceWith(i.contents())}e.each(r,e.proxy(function(n,r){var i=e(r);e.inArray(r.tagName.toLowerCase(),this.opts.inlineTags)!=-1&&!i.hasClass("redactor-selection-marker")&&(i.css(t,""),this.utils.removeEmptyAttr(i,"style"),i[0].attributes.length===0&&i.replaceWith(i.contents()))},this)),this.selection.restore(),this.code.sync()},removeFormat:function(){this.buffer.set();var t=this.selection.getCurrent();this.selection.save(),document.execCommand("removeFormat"),t&&t.tagName==="SPAN"&&e(t).replaceWith(e(t).contents()),e.each(this.selection.getNodes(),e.proxy(function(t,n){var r=e(n);e.inArray(n.tagName.toLowerCase(),this.opts.inlineTags)!=-1&&!r.hasClass("redactor-selection-marker")&&r.replaceWith(r.contents())},this)),this.selection.restore(),this.code.sync()},toggleClass:function(e){this.inline.format("span","class",e)},toggleStyle:function(e){this.inline.format("span","style",e)}}},insert:function(){return{set:function(t,n){this.placeholder.remove(),t=this.clean.setVerified(t),typeof n=="undefined"&&(t=this.clean.onPaste(t,!1)),this.$editor.html(t),this.selection.remove(),this.focus.setEnd(),this.clean.normalizeLists(),this.code.sync(),this.observe.load(),typeof n=="undefined"&&setTimeout(e.proxy(this.clean.clearUnverified,this),10)},text:function(t){this.placeholder.remove(),t=t.toString(),t=e.trim(t),t=this.clean.getPlainText(t,!1),this.$editor.focus();if(this.utils.browser("msie"))this.insert.htmlIe(t);else{this.selection.get(),this.range.deleteContents();var n=document.createElement("div");n.innerHTML=t;var r=document.createDocumentFragment(),i,s;while(i=n.firstChild)s=r.appendChild(i);this.range.insertNode(r);if(s){var o=this.range.cloneRange();o.setStartAfter(s),o.collapse(!0),this.sel.removeAllRanges(),this.sel.addRange(o)}}this.code.sync(),this.clean.clearUnverified()},htmlWithoutClean:function(e){this.insert.html(e,!1)},html:function(t,n){this.placeholder.remove(),typeof n=="undefined"&&(n=!0),this.$editor.focus(),t=this.clean.setVerified(t),n&&(t=this.clean.onPaste(t)),this.utils.browser +("msie")?this.insert.htmlIe(t):(console.log(this.clean.singleLine,t),this.clean.singleLine?this.insert.execHtml(t):document.execCommand("insertHTML",null,t),this.insert.htmlFixMozilla()),this.clean.normalizeLists(),this.opts.linebreaks||this.$editor.find("p").each(e.proxy(this.utils.removeEmpty,this)),this.code.sync(),this.observe.load(),n&&this.clean.clearUnverified()},htmlFixMozilla:function(){if(!this.utils.browser("mozilla"))return;var t=e(this.selection.getBlock()).next();t.length>0&&t[0].tagName=="P"&&t.html()===""&&t.remove()},htmlIe:function(t){if(this.utils.isIe11()){var n=this.utils.isCurrentOrParent("P"),r=e("<div>").append(t),i=r.contents().is("p, :header, dl, ul, ol, div, table, td, blockquote, pre, address, section, header, footer, aside, article");n&&i?this.insert.ie11FixInserting(n,t):this.insert.ie11PasteFrag(t);return}document.selection.createRange().pasteHTML(t)},execHtml:function(e){e=this.clean.setVerified(e),this.selection.get(),this.range.deleteContents();var t=document.createElement("div");t.innerHTML=e;var n=document.createDocumentFragment(),r,i;while(r=t.firstChild)i=n.appendChild(r);this.range.insertNode(n),this.range.collapse(!0),this.caret.setAfter(i)},node:function(t,n){t=t[0]||t;var r=this.utils.getOuterHtml(t);return r=this.clean.setVerified(r),t=e(r)[0],this.selection.get(),n!==!1&&this.range.deleteContents(),this.range.insertNode(t),this.range.collapse(!1),this.selection.addRange(),t},nodeToPoint:function(e,t,n){e=e[0]||e,this.selection.get();var r;if(document.caretPositionFromPoint){var i=document.caretPositionFromPoint(t,n);this.range.setStart(i.offsetNode,i.offset),this.range.collapse(!0),this.range.insertNode(e)}else if(document.caretRangeFromPoint)r=document.caretRangeFromPoint(t,n),r.insertNode(e);else if(typeof document.body.createTextRange!="undefined"){r=document.body.createTextRange(),r.moveToPoint(t,n);var s=r.duplicate();s.moveToPoint(t,n),r.setEndPoint("EndToEnd",s),r.select()}},nodeToCaretPositionFromPoint:function(e,t){t=t[0]||t;var n,r=e.clientX,i=e.clientY;if(document.caretPositionFromPoint){var s=document.caretPositionFromPoint(r,i),o=document.getSelection();n=o.getRangeAt(0),n.setStart(s.offsetNode,s.offset),n.collapse(!0),n.insertNode(t)}else if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r,i),n.insertNode(t);else if(typeof document.body.createTextRange!="undefined"){n=document.body.createTextRange(),n.moveToPoint(r,i);var u=n.duplicate();u.moveToPoint(r,i),n.setEndPoint("EndToEnd",u),n.select()}},ie11FixInserting:function(t,n){var r=document.createElement("span");r.className="redactor-ie-paste",this.insert.node(r);var i=e(t).html();i="<p>"+i.replace(/<span class="redactor-ie-paste"><\/span>/gi,"</p>"+n+"<p>")+"</p>",e(t).replaceWith(i)},ie11PasteFrag:function(e){this.selection.get(),this.range.deleteContents();var t=document.createElement("div");t.innerHTML=e;var n=document.createDocumentFragment(),r,i;while(r=t.firstChild)i=n.appendChild(r);this.range.insertNode(n)}}},keydown:function(){return{init:function(t){if(this.rtePaste)return;var n=t.which,r=n>=37&&n<=40;this.keydown.ctrl=t.ctrlKey||t.metaKey,this.keydown.current=this.selection.getCurrent(),this.keydown.parent=this.selection.getParent(),this.keydown.block=this.selection.getBlock(),this.keydown.pre=this.utils.isTag(this.keydown.current,"pre"),this.keydown.blockquote=this.utils.isTag(this.keydown.current,"blockquote"),this.keydown.figcaption=this.utils.isTag(this.keydown.current,"figcaption"),this.shortcuts.init(t,n),this.keydown.checkEvents(r,n),this.keydown.setupBuffer(t,n),this.keydown.addArrowsEvent(r),this.keydown.setupSelectAll(t,n);var i=this.core.setCallback("keydown",t);if(i===!1)return t.preventDefault(),!1;this.opts.enterKey&&n===this.keyCode.DOWN&&this.keydown.onArrowDown();if(!this.opts.enterKey&&n===this.keyCode.ENTER){t.preventDefault(),this.range.collapsed||this.range.deleteContents();return}if(n==this.keyCode.ENTER&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey){var s=this.core.setCallback("enter",t);if(s===!1)return t.preventDefault(),!1;if(this.keydown.blockquote&&this.keydown.exitFromBlockquote(t)===!0)return!1;var o,u;if(this.keydown.pre)return this.keydown.insertNewLine(t);if(this.keydown.blockquote||this.keydown.figcaption)return o=this.selection.getCurrent(),u=e(o).next(),u.size()!==0&&u[0].tagName=="BR"?this.keydown.insertBreakLine(t):this.utils.isEndOfElement()&&o&&o!="SPAN"?this.keydown.insertDblBreakLine(t):this.keydown.insertBreakLine(t);if(this.opts.linebreaks&&!this.keydown.block)return o=this.selection.getCurrent(),u=e(this.keydown.current).next(),o!==!1&&e(o).hasClass("redactor-invisible-space")?(e(o).remove(),this.keydown.insertDblBreakLine(t)):u.length===0&&o===!1&&typeof u.context!="undefined"?this.keydown.insertDblBreakLine(t):this.keydown.insertBreakLine(t);if(this.opts.linebreaks&&this.keydown.block)setTimeout(e.proxy(this.keydown.replaceDivToBreakLine,this),1);else if(!this.opts.linebreaks&&this.keydown.block&&this.keydown.block.tagName!=="LI")setTimeout(e.proxy(this.keydown.replaceDivToParagraph,this),1);else if(!this.opts.linebreaks&&!this.keydown.block)return this.keydown.insertParagraph(t)}if(n===this.keyCode.ENTER&&(t.ctrlKey||t.shiftKey))return this.keydown.onShiftEnter(t);if(n===this.keyCode.TAB||t.metaKey&&n===221||t.metaKey&&n===219)return this.keydown.onTab(t,n);if(n===this.keyCode.BACKSPACE||n===this.keyCode.DELETE){var a=this.selection.getNodes();if(a){var f=a.length,l;for(var c=0;c<f;c++){var h=e(a[c]).children("img");if(h.size()!==0){var p=this;e.each(h,function(t,n){var r=e(n);if(r.css("float")!="none")return;p.core.setCallback("imageDelete",n.src,r),l=n})}else a[c].tagName=="IMG"&&l!=a[c]&&(this.core.setCallback("imageDelete",a[c].src,e(a[c])),l=a[c])}}}n===this.keyCode.BACKSPACE&&(this.keydown.removeInvisibleSpace(),this.keydown.removeEmptyListInTable(t)),this.code.sync()},checkEvents:function(e,t){!e&&(this.core.getEvent()=="click"||this.core.getEvent()=="arrow")&&(this.core.addEvent(!1),this.keydown.checkKeyEvents(t)&&this.buffer.set())},checkKeyEvents:function(t){var n=this.keyCode,r=[n.BACKSPACE,n.DELETE,n.ENTER,n.SPACE,n.ESC,n.TAB,n.CTRL,n.META,n.ALT,n.SHIFT];return e.inArray(t,r)==-1?!0:!1},addArrowsEvent:function(e){if(!e)return;if(this.core.getEvent()=="click"||this.core.getEvent()=="arrow"){this.core.addEvent(!1);return}this.core.addEvent("arrow")},setupBuffer:function(e,t){if(this.keydown.ctrl&&t===90&&!e.shiftKey&&!e.altKey&&this.opts.buffer.length){e.preventDefault(),this.buffer.undo();return}if(this.keydown.ctrl&&t===90&&e.shiftKey&&!e.altKey&&this.opts.rebuffer.length!==0){e.preventDefault(),this.buffer.redo();return}this.keydown.ctrl||(t==this.keyCode.BACKSPACE||t==this.keyCode.DELETE||t==this.keyCode.ENTER&&!e.ctrlKey&&!e.shiftKey||t==this.keyCode.SPACE)&&this.buffer.set()},setupSelectAll:function(e,t){this.keydown.ctrl&&t===65?this.utils.enableSelectAll():t!=this.keyCode.LEFT_WIN&&!this.keydown.ctrl&&this.utils.disableSelectAll()},onArrowDown:function(){var e=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption];for(var t=0;t<e.length;t++)if(e[t])return this.keydown.insertAfterLastElement(e[t]),!1},onShiftEnter:function(e){return this.buffer.set(),this.keydown.blockquote&&this.utils.isEndOfElement()?this.keydown.insertDblBreakLine(e):this.keydown.insertBreakLine(e)},onTab:function(e,t){if(!this.opts.tabFocus)return!0;if(this.utils.isEmpty(this.code.get())&&this.opts.tabAsSpaces===!1)return!0;e.preventDefault();var n;return this.keydown.pre&&!e.shiftKey?(n=this.opts.preSpaces?document.createTextNode(Array(this.opts.preSpaces+1).join(" ")):document.createTextNode(" "),this.insert.node(n),this.code.sync()):this.opts.tabAsSpaces!==!1?(n=document.createTextNode(Array(this.opts.tabAsSpaces+1).join(" ")),this.insert.node(n),this.code.sync()):e.metaKey&&t===219?this.indent.decrease():e.metaKey&&t===221?this.indent.increase():e.shiftKey?this.indent.decrease():this.indent.increase(),!1},replaceDivToBreakLine:function(){var t=this.selection.getBlock(),n=t.innerHTML.replace(/<br\s?\/?>/gi,"");if((t.tagName==="DIV"||t.tagName==="P")&&n===""&&!e(t).hasClass("redactor-editor")){var r=document.createElement("br");return e(t).replaceWith(r),this.caret.setBefore(r),this.code.sync(),!1}},replaceDivToParagraph:function(){var t=this.selection.getBlock(),n=t.innerHTML.replace(/<br\s?\/?>/gi,"");if(t.tagName==="DIV"&&n===""&&!e(t).hasClass("redactor-editor")){var r=document.createElement("p");return r.innerHTML=this.opts.invisibleSpace,e(t).replaceWith(r),this.caret.setStart(r),this.code.sync(),!1}this.opts.cleanStyleOnEnter&&t.tagName=="P"&&e(t).removeAttr("class").removeAttr("style")},insertParagraph:function(e){e.preventDefault(),this.selection.get();var t=document.createElement("p");return t.innerHTML=this.opts.invisibleSpace,this.range.deleteContents(),this.range.insertNode(t),this.caret.setStart(t),this.code.sync(),!1},exitFromBlockquote:function(t){if(!this.utils.isEndOfElement())return;var n=e.trim(e(this.keydown.block).html());if(n.search(/(<br\s?\/?>){2}$/i)!=-1){t.preventDefault();if(this.opts.linebreaks){var r=document.createElement("br");e(this.keydown.blockquote).after(r),this.caret.setBefore(r),e(this.keydown.block).html(n.replace(/<br\s?\/?>$/i,""))}else{var i=e(this.opts.emptyHtml);e(this.keydown.blockquote).after(i),this.caret.setStart(i)}return!0}return},insertAfterLastElement:function(t){if(!this.utils.isEndOfElement())return;this.buffer.set();if(this.opts.linebreaks){var n=e("<div>").append(e.trim(this.$editor.html())).contents(),r=n.last()[0];r.tagName=="SPAN"&&r.innerHTML===""&&(r=n.prev()[0]);if(this.utils.getOuterHtml(r)!=this.utils.getOuterHtml(t))return;var i=document.createElement("br");e(t).after(i),this.caret.setAfter(i)}else{if(this.$editor.contents().last()[0]!==t)return;var s=e(this.opts.emptyHtml);e(t).after(s),this.caret.setStart(s)}},insertNewLine:function(e){e.preventDefault();var t=document.createTextNode("\n");return this.selection.get(),this.range.deleteContents(),this.range.insertNode(t),this.caret.setAfter(t),this.code.sync(),!1},insertBreakLine:function(e){return this.keydown.insertBreakLineProcessing(e)},insertDblBreakLine:function(e){return this.keydown.insertBreakLineProcessing(e,!0)},insertBreakLineProcessing:function(e,t){e.stopPropagation(),this.selection.get();var n=document.createElement("br");this.range.deleteContents(),this.range.insertNode(n);if(t===!0){var r=document.createElement("br");this.range.insertNode(r),this.caret.setAfter(r)}else this.caret.setAfter(n);return this.code.sync(),!1},removeInvisibleSpace:function(){var t=e(this.keydown.current);t.text().search(/^\u200B$/g)===0&&t.remove()},removeEmptyListInTable:function(t){var n=e(this.keydown.current),r=e(this.keydown.parent),i=n.closest("td");if(i.size()!==0&&n.closest("li")&&r.children("li").size()===1){if(!this.utils.isEmpty(n.text()))return;t.preventDefault(),n.remove(),r.remove(),this.caret.setStart(i)}}}},keyup:function(){return{init:function(t){if(this.rtePaste)return;var n=t.which;this.keyup.current=this.selection.getCurrent(),this.keyup.parent=this.selection.getParent();var r=this.utils.isRedactorParent(e(this.keyup.parent).parent()),i=this.core.setCallback("keyup",t);if(i===!1)return t.preventDefault(),!1;!this.opts.linebreaks&&this.keyup.current.nodeType==3&&this.keyup.current.length<=1&&(this.keyup.parent===!1||this.keyup.parent.tagName=="BODY")&&this.keyup.replaceToParagraph(),!this.opts.linebreaks&&e(this.keyup.parent).hasClass("redactor-invisible-space")&&(r===!1||r[0].tagName=="BODY")&&(e(this.keyup.parent).contents().unwrap(),this.keyup.replaceToParagraph()),this.opts.convertLinks&&(this.opts.convertUrlLinks||this.opts.convertImageLinks||this.opts.convertVideoLinks)&&n===this.keyCode.ENTER&&(this.formatLinkify(this.opts.linkProtocol,this.opts.convertLinks,this.opts.convertUrlLinks,this.opts.convertImageLinks,this.opts.convertVideoLinks,this.opts.linkSize),this.observe.load(),this.code.sync());if(n===this.keyCode.DELETE||n===this.keyCode.BACKSPACE)return this.clean.clearUnverified(),this.observe.image?(t.preventDefault(),this.image.hideResize(),this.buffer.set(),this.image.remove(this.observe.image),this.observe.image=!1,!1):(this.$editor.find("p").each(e.proxy(this.utils.removeEmpty,this)),this.keyup.current&&this.keyup.current.tagName=="DIV"&&this.utils.isEmpty(this.keyup.current.innerHTML)&&this.opts.linebreaks&&(e(this.keyup.current).after(this.selection.getMarkerAsHtml()),this.selection.restore(),e(this.keyup.current).remove()),this.keyup.formatEmpty(t))},replaceToParagraph:function(){var t=e(this.keyup.current),n=e("<p>").append(t.clone());t.replaceWith(n);var r=e(n).next();typeof r[0]!="undefined"&&r[0].tagName=="BR"&&r.remove(),this.caret.setEnd(n)},formatEmpty:function(t){var n=e.trim(this.$editor.html());if(!this.utils.isEmpty(n))return;return t.preventDefault(),this.opts.linebreaks?(this.$editor.html(this.selection.getMarkerAsHtml()),this.selection.restore()):(n="<p><br /></p>",this.$editor.html(n),this.focus.setStart()),this.code.sync(),!1}}},lang:function(){return{load:function(){this.opts.curLang=this.opts.langs[this.opts.lang]},get:function(e){return typeof this.opts.curLang[e]!="undefined"?this.opts.curLang[e]:""}}},line:function(){return{insert:function(){this.buffer.set();var e=this.selection.getBlocks();if(e[0]!==!1&&this.line.isExceptLastOrFirst(e)){this.utils.browser("msie")||this.$editor.focus();return}this.utils.browser("msie")?this.line.insertInIe():this.line.insertInOthersBrowsers()},isExceptLastOrFirst:function(t){var n=["li","td","th","blockquote","figcaption","pre","dl","dt","dd"],r=t[0].tagName.toLowerCase(),i=this.selection.getLastBlock();i=typeof i=="undefined"?r:i.tagName.toLowerCase();var s=e.inArray(r,n)!=-1,o=e.inArray(i,n)!=-1;if(s&&o||s)return!0},insertInIe:function(){this.utils.saveScroll(),this.buffer.set(),this.insert.node(document.createElement("hr")),this.utils.restoreScroll(),this.code.sync()},insertInOthersBrowsers:function(){this.buffer.set();var e='<p id="redactor-insert-line"><br /></p>';this.opts.linebreaks&&(e='<br id="redactor-insert-line">'),document.execCommand("insertHTML",!1,"<hr>"+e),this.line.setFocus(),this.code.sync()},setFocus:function(){var t=this.$editor.find("#redactor-insert-line"),n=e(t).next()[0];n?(this.caret.setAfter(t),t.remove()):t.removeAttr("id")}}},link:function(){return{show:function(t){typeof t!="undefined"&&t.preventDefault&&t.preventDefault(),this.modal.load("link",this.lang.get("link_insert"),600),this.modal.createCancelButton(),this.link.buttonInsert=this.modal.createActionButton(this.lang.get("insert")),this.selection.get(),this.link.getData(),this.link.cleanUrl(),this.link.target=="_blank"&&e("#redactor-link-blank").prop("checked",!0),this.link.$inputUrl=e("#redactor-link-url"),this.link.$inputText=e("#redactor-link-url-text"),this.link.$inputText.val(this.link.text),this.link.$inputUrl.val(this.link.url),this.link.buttonInsert.on("click",e.proxy(this.link.insert,this)),e(".redactor-link-tooltip").remove(),this.selection.save(),this.modal.show(),this.link.$inputUrl.focus()},cleanUrl:function(){var e=self.location.href.replace(/\/$/i,"");this.link.url=this.link.url.replace(e,""),this.link.url=this.link.url.replace(/^\/#/,"#"),this.link.url=this.link.url.replace("mailto:","");if(!this.opts.linkProtocol){var t=new RegExp("^(http|ftp|https)://"+self.location.host,"i");this.link.url=this.link.url.replace(t,"")}},getData:function(){this.link.$node=!1;var t=e(this.selection.getCurrent()).closest("a");t.size()!==0&&t[0].tagName==="A"?(this.link.$node=t,this.link.url=t.attr("href"),this.link.text=t.text(),this.link.target=t.attr("target")):(this.link.text=this.sel.toString(),this.link.url="",this.link.target="")},insert:function(){var t="",n=this.link.$inputUrl.val(),r=this.link.$inputText.val();if(e.trim(n)===""){this.link.$inputUrl.addClass("redactor-input-error").on("keyup",function(){e(this).removeClass("redactor-input-error"),e(this).off("keyup")});return}if(n.search("@")!=-1&&/(http|ftp|https):\/\//i.test(n)===!1)n="mailto:"+n;else if(n.search("#")!==0){e("#redactor-link-blank").prop("checked")&&(t="_blank");var i="((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}",s=new RegExp("^(http|ftp|https)://"+i,"i"),o=new RegExp("^"+i,"i");n.search(s)==-1&&n.search(o)===0&&this.opts.linkProtocol&&(n=this.opts.linkProtocol+"://"+n)}this.link.set(r,n,t),this.modal.close()},set:function(t,n,r){t=e.trim(t.replace(/<|>/g,"")),this.selection.restore();if(t===""&&n==="")return;t===""&&n!==""&&(t=n);if(this.link.$node)this.buffer.set(),this.link.$node.text(t).attr("href",n),r!==""?this.link.$node.attr("target",r):this.link.$node.removeAttr("target"),this.code.sync();else{if(this.utils.browser("mozilla")&&this.link.text===""){var i=e("<a />").attr("href",n).text(t);r!==""&&i.attr("target",r),this.insert.node(i),this.selection.selectElement(i)}else{var i;this.utils.browser("msie")?(i=e('<a href="'+n+'">').text(t),r!==""&&i.attr("target",r),i=e(this.insert.node(i)),this.selection.selectElement(i)):(document.execCommand("createLink",!1,n),i=e(this.selection.getCurrent()).closest("a"),r!==""&&i.attr("target",r),i.removeAttr("style"),this.link.text===""&&(i.text(t),this.selection.selectElement(i)))}this.code.sync(),this.core.setCallback("insertedLink",i)}setTimeout(e.proxy(function(){this.observe.links()},this),5)},unlink:function(t){typeof t!="undefined"&&t.preventDefault&&t.preventDefault();var n=this.selection.getNodes();if(!n)return;this.buffer.set();var r=n.length;for(var i=0;i<r;i++)if(n[i].tagName=="A"){var s=e(n[i]);s.replaceWith(s.contents())}e(".redactor-link-tooltip").remove(),this.code.sync()}}},list:function(){return{toggle:function(t){this.utils.browser("msie")||this.$editor.focus(),this.buffer.set(),this.selection.save();var n=this.selection.getParent(),r=e(n).closest("ol, ul");!this.utils.isRedactorParent(r)&&r.size()!==0&&(r=!1);var i,s,o=!1;if(r&&r.length){o=!0;var u=r[0].tagName;i=t==="orderedlist"&&u==="UL",s=t==="unorderedlist"&&u==="OL"}i?this.utils.replaceToTag(r,"ol"):s?this.utils.replaceToTag(r,"ul"):o?this.list.remove(t):this.list.insert(t),this.selection.restore(),this.code.sync()},insert:function(t){this.utils.browser("msie")&&this.opts.linebreaks?this.list.insertInIe(t):document.execCommand("insert"+t);var n=this.selection.getParent(),r=e(n).closest("ol, ul");if(this.utils.isEmpty(r.find("li").text())){var i=r.children("li");i.find("br").remove(),i.append(this.selection.getMarkerAsHtml())}if(r.length){var s=r.parent();this.utils.isRedactorParent(s)&&s[0].tagName!="LI"&&this.utils.isBlock(s[0])&&s.replaceWith(s.contents())}this.utils.browser("msie")||this.$editor.focus(),this.clean.clearUnverified()},insertInIe:function(t){var n=this.selection.wrap("div"),r=e(n).html(),i=t=="orderedlist"?e("<ol>"):e("<ul>"),s=e("<li>");if(e.trim(r)==="")s.append(this.selection.getMarkerAsHtml()),i.append(s),this.$editor.find("#selection-marker-1").replaceWith(i);else{var o=r.split(/<br\s?\/?>/gi);if(o)for(var u=0;u<o.length;u++)e.trim(o[u])!==""&&i.append(e("<li>").html(o[u]));else s.append(r),i.append(s);e(n).replaceWith(i)}},remove:function(t){document.execCommand("insert"+t);var n=e(this.selection.getCurrent());this.indent.fixEmptyIndent(),!this.opts.linebreaks&&n.closest("li, th, td").size()===0&&(document.execCommand("formatblock",!1,"p"),this.$editor.find("ul, ol, blockquote").each(e.proxy(this.utils.removeEmpty,this)));var r=e(this.selection.getCurrent()).closest("table"),i=r.prev();!this.opts.linebreaks&&r.size()!==0&&i.size()!==0&&i[0].tagName=="BR"&&i.remove(),this.clean.clearUnverified()}}},modal:function(){return{callbacks:{},loadTemplates:function(){this.opts.modal={imageEdit:String()+'<section id="redactor-modal-image-edit">'+"<label>"+this.lang.get("title")+"</label>"+'<input type="text" id="redactor-image-title" />'+'<label class="redactor-image-link-option">'+this.lang.get("link")+"</label>"+'<input type="text" id="redactor-image-link" class="redactor-image-link-option" />'+'<label class="redactor-image-link-option"><input type="checkbox" id="redactor-image-link-blank"> '+this.lang.get("link_new_tab")+"</label>"+'<label class="redactor-image-position-option">'+this.lang.get("image_position")+"</label>"+'<select class="redactor-image-position-option" id="redactor-image-align">'+'<option value="none">'+this.lang.get("none")+"</option>"+'<option value="left">'+this.lang.get("left")+"</option>"+'<option value="center">'+this.lang.get("center")+"</option>"+'<option value="right">'+this.lang.get("right")+"</option>"+"</select>"+"</section>",image:String()+'<section id="redactor-modal-image-insert">'+'<div id="redactor-modal-image-droparea"></div>'+"</section>",file:String()+'<section id="redactor-modal-file-insert">'+'<div id="redactor-modal-file-upload-box">'+"<label>"+this.lang.get("filename")+"</label>"+'<input type="text" id="redactor-filename" /><br><br>'+'<div id="redactor-modal-file-upload"></div>'+"</div>"+"</section>",link:String()+'<section id="redactor-modal-link-insert">'+"<label>URL</label>"+'<input type="url" id="redactor-link-url" />'+"<label>"+this.lang.get("text")+"</label>"+'<input type="text" id="redactor-link-url-text" />'+'<label><input type="checkbox" id="redactor-link-blank"> '+this.lang.get("link_new_tab")+"</label>"+"</section>"},e.extend(this.opts,this.opts.modal)},addCallback:function(e,t){this.modal.callbacks[e]=t},createTabber:function(t){this.modal.$tabber=e("<div>").attr("id","redactor-modal-tabber"),t.prepend(this.modal.$tabber)},addTab:function(t,n,r){var i=e('<a href="#" rel="tab'+t+'">').text(n);r&&i.addClass("active");var s=this;i.on("click",function(t){t.preventDefault(),e(".redactor-tab").hide(),e(".redactor-"+e(this).attr("rel")).show(),s.modal.$tabber.find("a").removeClass("active"),e(this).addClass("active")}),this.modal.$tabber.append(i)},addTemplate:function(e,t){this.opts.modal[e]=t},getTemplate:function(e){return this.opts.modal[e]},getModal:function(){return this.$modalBody.find("section")},load:function(e,t,n){this.modal.templateName=e,this.modal.width=n,this.modal.build(),this.modal.enableEvents(),this.modal.setTitle(t),this.modal.setDraggable(),this.modal.setContent(),typeof this.modal.callbacks[e]!="undefined"&&this.modal.callbacks[e].call(this)},show:function(){document.activeElement.blur(),e(document.body).removeClass("body-hidden"),this.modal.bodyOveflow=e(document.body).css("overflow"),e(document.body).css("overflow","hidden"),this.utils.isMobile()?this.modal.showOnMobile():this.modal.showOnDesktop(),this.$modalOverlay.show(),this.$modalBox.show(),this.modal.setButtonsWidth(),this.utils.saveScroll(),this.utils.isMobile()||(setTimeout(e.proxy(this.modal.showOnDesktop,this),0),e(window).on("resize.redactor-modal",e.proxy(this.modal.resize,this))),this.core.setCallback("modalOpened",this.modal.templateName,this.$modal),e(document).off("focusin.modal"),this.$modal.find("input[type=text]").on("keydown.redactor-modal",e.proxy(this.modal.setEnter,this))},showOnDesktop:function(){var t=this.$modal.outerHeight(),n=e(window).height(),r=e(window).width();if(this.modal.width>r){this.$modal.css({width:"96%",marginTop:n/2-t/2+"px"});return}t>n?this.$modal.css({width:this.modal.width+"px",marginTop:"20px"}):this.$modal.css({width:this.modal.width+"px",marginTop:n/2-t/2+"px"})},showOnMobile:function(){this.$modal.css({width:"96%",marginTop:"2%"})},resize:function(){this.utils.isMobile()?this.modal.showOnMobile():this.modal.showOnDesktop()},setTitle:function(e){this.$modalHeader.html(e)},setContent:function(){this.$modalBody.html(this.modal.getTemplate(this.modal.templateName))},setDraggable:function(){if(typeof e.fn.draggable=="undefined")return;this.$modal.draggable({handle:this.$modalHeader}),this.$modalHeader.css("cursor","move")},setEnter:function(e){if(e.which!=13)return;e.preventDefault(),this.$modal.find("button.redactor-modal-action-btn").click()},createCancelButton:function(){var t=e("<button>").addClass("redactor-modal-btn redactor-modal-close-btn").html(this.lang.get("cancel"));t.on("click",e.proxy(this.modal.close,this)),this.$modalFooter.append(t)},createDeleteButton:function(e){return this.modal.createButton(e,"delete")},createActionButton:function(e){return this.modal.createButton(e,"action")},createButton:function(t,n){var r=e("<button>").addClass("redactor-modal-btn").addClass("redactor-modal-"+n+"-btn").html(t);return this.$modalFooter.append(r),r},setButtonsWidth:function(){var e=this.$modalFooter.find("button"),t=e.size();if(t===0)return;e.css("width",100/t+"%")},build:function(){this.modal.buildOverlay(),this.$modalBox=e('<div id="redactor-modal-box" />').hide(),this.$modal=e('<div id="redactor-modal" />'),this.$modalHeader=e("<header />"),this.$modalClose=e('<span id="redactor-modal-close" />').html("×"),this.$modalBody=e('<div id="redactor-modal-body" />'),this.$modalFooter=e("<footer />"),this.$modal.append(this.$modalHeader),this.$modal.append(this.$modalClose),this.$modal.append(this.$modalBody),this.$modal.append(this.$modalFooter),this.$modalBox.append(this.$modal),this.$modalBox.appendTo(document.body)},buildOverlay:function(){this.$modalOverlay=e('<div id="redactor-modal-overlay">').hide(),e("body").prepend(this.$modalOverlay)},enableEvents:function(){this.$modalClose.on("click.redactor-modal",e.proxy(this.modal.close,this)),e(document).on("keyup.redactor-modal",e.proxy(this.modal.closeHandler,this)),this.$editor.on("keyup.redactor-modal",e.proxy(this.modal.closeHandler,this)),this.$modalBox.on("click.redactor-modal",e.proxy(this.modal.close,this))},disableEvents:function(){this.$modalClose.off("click.redactor-modal"),e(document).off("keyup.redactor-modal"),this.$editor.off("keyup.redactor-modal"),this.$modalBox.off("click.redactor-modal"),e(window).off("resize.redactor-modal")},closeHandler:function(e){if(e.which!=this.keyCode.ESC)return;this.modal.close(!1)},close:function(t){if(t){if(!e(t.target).hasClass("redactor-modal-close-btn")&&t.target!=this.$modalClose[0]&&t.target!=this.$modalBox[0])return;t.preventDefault()}if(!this.$modalBox)return;this.modal.disableEvents(),this.$modalOverlay.remove(),this.$modalBox.fadeOut("fast",e.proxy(function(){this.$modalBox.remove(),setTimeout(e.proxy(this.utils.restoreScroll,this),0),t!==undefined&&this.selection.restore(),e(document.body).css("overflow",this.modal.bodyOveflow),this.core.setCallback("modalClosed",this.modal.templateName)},this))}}},observe:function(){return{load:function(){this.observe.images(),this.observe.links()},buttons:function(t,n){var r=this.selection.getCurrent(),i=this.selection.getParent();this.button.setInactiveAll(n);if(t===!1&&n!=="html"){e.inArray(n,this.opts.activeButtons)!=-1&&this.button.toggleActive(n);return}e.each(this.opts.activeButtonsStates,e.proxy(function(t,n){var s=e(i).closest(t),o=e(r).closest(t);if(s.length!==0&&!this.utils.isRedactorParent(s))return;if(!this.utils.isRedactorParent(o))return;(s.length!==0||o.closest(t).length!==0)&&this.button.setActive(n)},this));var s=e(i).closest(this.opts.alignmentTags.toString().toLowerCase());if(this.utils.isRedactorParent(i)&&s.length){var o=s.css("text-align")===""?"left":s.css("text-align");this.button.setActive("align"+o)}},addButton:function(e,t){this.opts.activeButtons.push(t),this.opts.activeButtonsStates[e]=t},images:function(){this.$editor.find("img").each(e.proxy(function(t,n){var r=e(n);r.closest("a").on("click",function(e){e.preventDefault()}),this.utils.browser("msie")&&r.attr("unselectable","on"),this.image.setEditable(r)},this)),e(document).on("click.redactor-image-delete",e.proxy(function(e){this.observe.image=!1,e.target.tagName=="IMG"&&this.utils.isRedactorParent(e.target)&&(this.observe.image=this.observe.image&&this.observe.image==e.target?!1:e.target)},this))},links:function(){if(!this.opts.linkTooltip)return;this.$editor.find("a").on("touchstart click",e.proxy(this.observe.showTooltip,this)),this.$editor.on("touchstart click.redactor",e.proxy(this.observe.closeTooltip,this)),e(document).on("touchstart click.redactor",e.proxy(this.observe.closeTooltip,this))},getTooltipPosition:function(e){return e.offset()},showTooltip:function(t){var n=e(t.target),r=n.closest("a");if(r.size()!==0&&r[0].tagName==="A"&&n[0].tagName!=="A")n=r;else if(n.size()===0||n[0].tagName!=="A")return;var i=this.observe.getTooltipPosition(n),s=e('<span class="redactor-link-tooltip"></span>'),o=n.attr("href");o===undefined&&(o=""),o.length>24&&(o=o.substring(0,24)+"...");var u=e('<a href="'+n.attr("href")+'" target="_blank" />').html(o).addClass("redactor-link-tooltip-action"),a=e('<a href="#" />').html(this.lang.get("edit")).on("click",e.proxy(this.link.show,this)).addClass("redactor-link-tooltip-action"),f=e('<a href="#" />').html(this.lang.get("unlink")).on("click",e.proxy(this.link.unlink,this)).addClass("redactor-link-tooltip-action");s.append(u).append(" | ").append(a).append(" | ").append(f),s.css({top:i.top+20+"px",left:i.left+"px"}),e(".redactor-link-tooltip").remove(),e("body").append(s)},closeTooltip:function(t){t=t.originalEvent||t;var n=t.target,r=e(n).closest("a");if(r.size()!==0&&r[0].tagName==="A"&&n.tagName!=="A")return;if(n.tagName==="A"&&this.utils.isRedactorParent(n)||e(n).hasClass("redactor-link-tooltip-action"))return;e(".redactor-link-tooltip").remove()}}},paragraphize:function(){return{load:function(t){return this.opts.linebreaks?t:t===""||t==="<p></p>"?this.opts.emptyHtml:(this.paragraphize.blocks=["table","div","pre","form","ul","ol","h1","h2","h3","h4","h5","h6","dl","blockquote","figcaption","address","section","header","footer","aside","article","object","style","script","iframe","select","input","textarea","button","option","map","area","math","hr","fieldset","legend","hgroup","nav","figure","details","menu","summary","p"],t+="\n",this.paragraphize.safes=[],this.paragraphize.z=0,t=t.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi,"</blockquote>"),t=this.paragraphize.getSafes(t),t=this.paragraphize.getSafesComments(t),t=this.paragraphize.replaceBreaksToNewLines(t),t=this.paragraphize.replaceBreaksToParagraphs(t),t=this.paragraphize.clear(t),t=this.paragraphize.restoreSafes(t),t=t.replace(new RegExp("<br\\s?/?>\n?<("+this.paragraphize.blocks.join("|")+")(.*?[^>])>","gi"),"<p><br /></p>\n<$1$2>"),e.trim(t))},getSafes:function(t){var n=e("<div />").append(t);return n.find("blockquote p").replaceWith(function(){return e(this).append("<br />").contents()}),t=n.html(),n.find(this.paragraphize.blocks.join(", ")).each(e.proxy(function(e,n){this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=n.outerHTML,t=t.replace(n.outerHTML,"\n{replace"+this.paragraphize.z+"}")},this)),t},getSafesComments:function(t){var n=t.match(/<!--([\w\W]*?)-->/gi);return n?(e.each(n,e.proxy(function(e,n){this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=n,t=t.replace(n,"\n{replace"+this.paragraphize.z+"}")},this)),t):t},restoreSafes:function(t){return e.each(this.paragraphize.safes,function(e,n){t=t.replace("{replace"+e+"}",n)}),t},replaceBreaksToParagraphs:function(e){var t=e.split(new RegExp("\n","g"),-1);e="";if(t){var n=t.length;for(var r=0;r<n;r++){if(!t.hasOwnProperty(r))return;t[r].search("{replace")==-1?(t[r]=t[r].replace(/<p>\n\t?<\/p>/gi,""),t[r]=t[r].replace(/<p><\/p>/gi,""),t[r]!==""&&(e+="<p>"+t[r].replace(/^\n+|\n+$/g,"")+"</p>")):e+=t[r]}}return e},replaceBreaksToNewLines:function(e){return e=e.replace(/<br \/>\s*<br \/>/gi,"\n\n"),e=e.replace(/<br\s?\/?>\n?<br\s?\/?>/gi,"\n<br /><br />"),e=e.replace(new RegExp("\r\n","g"),"\n"),e=e.replace(new RegExp("\r","g"),"\n"),e=e.replace(new RegExp("/\n\n+/"),"g","\n\n"),e},clear:function(e){return e=e.replace(new RegExp("</blockquote></p>","gi"),"</blockquote>"),e=e.replace(new RegExp("<p></blockquote>","gi"),"</blockquote>"),e=e.replace(new RegExp("<p><blockquote>","gi"),"<blockquote>"),e=e.replace(new RegExp("<blockquote></p>","gi"),"<blockquote>"),e=e.replace(new RegExp("<p><p ","gi"),"<p "),e=e.replace(new RegExp("<p><p>","gi"),"<p>"),e=e.replace(new RegExp("</p></p>","gi"),"</p>"),e=e.replace(new RegExp("<p>\\s?</p>","gi"),""),e=e.replace(new RegExp("\n</p>","gi"),"</p>"),e=e.replace(new RegExp("<p> ? ?\n?<p>","gi"),"<p>"),e=e.replace(new RegExp("<p> *</p>","gi"),""),e}}},paste:function(){return{init:function(t){if(!this.opts.cleanOnPaste)return;this.rtePaste=!0,this.buffer.set(),this.selection.save(),this.utils.saveScroll(),this.paste.createPasteBox(),e(window).on("scroll.redactor-freeze",e.proxy(function(){e(window).scrollTop(this.saveBodyScroll)},this)),setTimeout(e.proxy(function(){var t=this.$pasteBox.html();this.$pasteBox.remove(),this.selection.restore(),this.utils.restoreScroll(),this.paste.insert(t),e(window).off("scroll.redactor-freeze")},this),1)},createPasteBox:function(){this.$pasteBox=e("<div>").html(" ").attr("contenteditable","true").css({position:"fixed",width:0,top:0 +,left:"-9999px"}),this.$box.parent().append(this.$pasteBox),this.$pasteBox.focus()},insert:function(t){t=this.core.setCallback("pasteBefore",t),t=this.utils.isSelectAll()?this.clean.onPaste(t,!1):this.clean.onPaste(t),t=this.core.setCallback("paste",t),this.utils.isSelectAll()?this.insert.set(t,!1):this.insert.html(t,!1),this.utils.disableSelectAll(),this.rtePaste=!1,setTimeout(e.proxy(this.clean.clearUnverified,this),10)}}},placeholder:function(){return{enable:function(){if(!this.placeholder.is())return;this.$editor.attr("placeholder",this.$element.attr("placeholder")),this.placeholder.toggle(),this.$editor.on("keyup.redactor-placeholder",e.proxy(this.placeholder.toggle,this))},toggle:function(){var e="removeClass";this.utils.isEmpty(this.$editor.html(),!1)&&(e="addClass"),this.$editor[e]("redactor-placeholder")},remove:function(){this.$editor.removeClass("redactor-placeholder")},is:function(){return this.opts.placeholder?this.$element.attr("placeholder",this.opts.placeholder):typeof this.$element.attr("placeholder")!="undefined"&&this.$element.attr("placeholder")!==""}}},progress:function(){return{show:function(){e(document.body).append(e('<div id="redactor-progress"><span></span></div>')),e("#redactor-progress").fadeIn()},hide:function(){e("#redactor-progress").fadeOut(1500,function(){e(this).remove()})}}},selection:function(){return{get:function(){this.sel=document.getSelection(),document.getSelection&&this.sel.getRangeAt&&this.sel.rangeCount?this.range=this.sel.getRangeAt(0):this.range=document.createRange()},addRange:function(){try{this.sel.removeAllRanges()}catch(e){}this.sel.addRange(this.range)},getCurrent:function(){var e=!1;return this.selection.get(),this.sel&&this.sel.rangeCount>0&&(e=this.sel.getRangeAt(0).startContainer),this.utils.isRedactorParent(e)},getParent:function(t){return t=t||this.selection.getCurrent(),t?this.utils.isRedactorParent(e(t).parent()[0]):!1},getBlock:function(t){t=t||this.selection.getCurrent();while(t){if(this.utils.isBlockTag(t.tagName))return e(t).hasClass("redactor-editor")?!1:t;t=t.parentNode}return!1},getInlines:function(t){this.selection.get();if(this.range&&this.range.collapsed)return!1;var n=[];t=typeof t=="undefined"?this.selection.getNodes():t;var r=this.opts.inlineTags;return r.push("span"),e.each(t,e.proxy(function(t,i){e.inArray(i.tagName.toLowerCase(),r)!=-1&&n.push(i)},this)),n.length===0?!1:n},getBlocks:function(t){this.selection.get();if(this.range&&this.range.collapsed)return[this.selection.getBlock()];var n=[];return t=typeof t=="undefined"?this.selection.getNodes():t,e.each(t,e.proxy(function(e,t){this.utils.isBlock(t)&&(this.selection.lastBlock=t,n.push(t))},this)),n.length===0?[this.selection.getBlock()]:n},getLastBlock:function(){return this.selection.lastBlock},getNodes:function(){this.selection.get();var t=this.selection.getNodesMarker(1),n=this.selection.getNodesMarker(2);this.selection.setNodesMarker(this.range,t,!0),this.range.collapsed===!1?this.selection.setNodesMarker(this.range,n,!1):n=t;var r=[],i=0,s=this;this.$editor.find("*").each(function(){if(this==t){var o=e(this).parent();o.length!==0&&o[0].tagName!="BODY"&&s.utils.isRedactorParent(o[0])&&r.push(o[0]),r.push(this),i=1}else i>0&&(r.push(this),i+=1);if(this==n)return!1});var o=[],u=r.length;for(var a=0;a<u;a++)r[a].id!="nodes-marker-1"&&r[a].id!="nodes-marker-2"&&o.push(r[a]);return this.selection.removeNodesMarkers(),o},getNodesMarker:function(t){return e('<span id="nodes-marker-'+t+'" class="redactor-nodes-marker" data-verified="redactor">'+this.opts.invisibleSpace+"</span>")[0]},setNodesMarker:function(e,t,n){e=e.cloneRange();try{e.collapse(n),e.insertNode(t)}catch(r){}},removeNodesMarkers:function(){e(document).find("span.redactor-nodes-marker").remove(),this.$editor.find("span.redactor-nodes-marker").remove()},fromPoint:function(e,t){this.caret.setOffset(e,t)},wrap:function(e){this.selection.get();if(this.range.collapsed)return!1;var t=document.createElement(e);return t.appendChild(this.range.extractContents()),this.range.insertNode(t),t},selectElement:function(e){this.caret.set(e,0,e,1)},selectAll:function(){this.selection.get(),this.range.selectNodeContents(this.$editor[0]),this.selection.addRange()},remove:function(){this.selection.get(),this.sel.removeAllRanges()},save:function(){this.selection.createMarkers()},createMarkers:function(){this.selection.get();var e=this.selection.getMarker(1);this.selection.setMarker(this.range,e,!0);if(this.range.collapsed===!1){var t=this.selection.getMarker(2);this.selection.setMarker(this.range,t,!1)}this.savedSel=this.$editor.html()},getMarker:function(t){return typeof t=="undefined"&&(t=1),e('<span id="selection-marker-'+t+'" class="redactor-selection-marker" data-verified="redactor">'+this.opts.invisibleSpace+"</span>")[0]},getMarkerAsHtml:function(e){return this.utils.getOuterHtml(this.selection.getMarker(e))},setMarker:function(e,t,n){e=e.cloneRange();try{e.collapse(n),e.insertNode(t)}catch(r){this.focus.setStart()}},restore:function(){var e=this.$editor.find("span#selection-marker-1"),t=this.$editor.find("span#selection-marker-2");e.length!==0&&t.length!==0?this.caret.set(e,0,t,0):e.length!==0?this.caret.set(e,0,e,0):this.$editor.focus(),this.selection.removeMarkers(),this.savedSel=!1},removeMarkers:function(){this.$editor.find("span.redactor-selection-marker").remove()},getText:function(){return this.selection.get(),this.sel.toString()},getHtml:function(){var e="";this.selection.get();if(this.sel.rangeCount){var t=document.createElement("div"),n=this.sel.rangeCount;for(var r=0;r<n;++r)t.appendChild(this.sel.getRangeAt(r).cloneContents());e=t.innerHTML}return this.clean.onSync(e)}}},shortcuts:function(){return{init:function(t,n){if(!this.opts.shortcuts)return(t.ctrlKey||t.metaKey)&&(n===66||n===73)&&t.preventDefault(),!1;e.each(this.opts.shortcuts,e.proxy(function(n,r){var i=n.split(","),s=i.length;for(var o=0;o<s;o++)typeof i[o]=="string"&&this.shortcuts.handler(t,e.trim(i[o]),e.proxy(function(){var e;r.func.search(/\./)!="-1"?(e=r.func.split("."),typeof this[e[0]]!="undefined"&&this[e[0]][e[1]].apply(this,r.params)):this[r.func].apply(this,r.params)},this))},this))},handler:function(t,n,r){var i={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"};n=n.toLowerCase().split(" ");var o=i[t.keyCode],u=String.fromCharCode(t.which).toLowerCase(),a="",f={};e.each(["alt","ctrl","meta","shift"],function(e,n){t[n+"Key"]&&o!==n&&(a+=n+"+")}),o&&(f[a+o]=!0),u&&(f[a+u]=!0,f[a+s[u]]=!0,a==="shift+"&&(f[s[u]]=!0));for(var l=0,c=n.length;l<c;l++)if(f[n[l]])return t.preventDefault(),r.apply(this,arguments)}}},tabifier:function(){return{get:function(e){if(!this.opts.tabifier)return e;var t=["area","body","head","hr","i?frame","link","meta","noscript","style","script","table","tbody","thead","tfoot"],n=["li","dt","dt","h[1-6]","option","script"],r=["blockquote","div","dl","fieldset","form","frameset","map","ol","p","pre","select","td","th","tr","ul"];this.tabifier.lineBefore=new RegExp("^<(/?"+t.join("|/?")+"|"+n.join("|")+")[ >]"),this.tabifier.lineAfter=new RegExp("^<(br|/?"+t.join("|/?")+"|/"+n.join("|/")+")[ >]"),this.tabifier.newLevel=new RegExp("^</?("+r.join("|")+")[ >]");var i=0,s=e.length,o=0,u=null,a=null,f="",l="",c="";this.tabifier.cleanlevel=0;for(;i<s;i++){o=i;if(-1==e.substr(i).indexOf("<"))return l+=e.substr(i),this.tabifier.finish(l);while(o<s&&e.charAt(o)!="<")o++;i!=o&&(c=e.substr(i,o-i),c.match(/^\s{2,}$/g)||("\n"==l.charAt(l.length-1)?l+=this.tabifier.getTabs():"\n"==c.charAt(0)&&(l+="\n"+this.tabifier.getTabs(),c=c.replace(/^\s+/,"")),l+=c),c.match(/\n/)&&(l+="\n"+this.tabifier.getTabs())),u=o;while(o<s&&">"!=e.charAt(o))o++;f=e.substr(u,o-u),i=o;var h;if("!--"==f.substr(1,3)){if(!f.match(/--$/)){while("-->"!=e.substr(o,3))o++;o+=2,f=e.substr(u,o-u),i=o}"\n"!=l.charAt(l.length-1)&&(l+="\n"),l+=this.tabifier.getTabs(),l+=f+">\n"}else"!"==f[1]?l=this.tabifier.placeTag(f+">",l):"?"==f[1]?l+=f+">\n":(h=f.match(/^<(script|style|pre)/i))?(h[1]=h[1].toLowerCase(),f=this.tabifier.cleanTag(f),l=this.tabifier.placeTag(f,l),a=String(e.substr(i+1)).toLowerCase().indexOf("</"+h[1]),a&&(c=e.substr(i+1,a),i+=a,l+=c)):(f=this.tabifier.cleanTag(f),l=this.tabifier.placeTag(f,l))}return this.tabifier.finish(l)},getTabs:function(){var e="";for(var t=0;t<this.tabifier.cleanlevel;t++)e+=" ";return e},finish:function(e){return e=e.replace(/\n\s*\n/g,"\n"),e=e.replace(/^[\s\n]*/,""),e=e.replace(/[\s\n]*$/,""),e=e.replace(/<script(.*?)>\n<\/script>/gi,"<script$1></script>"),this.tabifier.cleanlevel=0,e},cleanTag:function(e){var t="";e=e.replace(/\n/g," "),e=e.replace(/\s{2,}/g," "),e=e.replace(/^\s+|\s+$/g," ");var n="";e.match(/\/$/)&&(n="/",e=e.replace(/\/+$/,""));var r;while(r=/\s*([^= ]+)(?:=((['"']).*?\3|[^ ]+))?/.exec(e))r[2]?t+=r[1].toLowerCase()+"="+r[2]:r[1]&&(t+=r[1].toLowerCase()),t+=" ",e=e.substr(r[0].length);return t.replace(/\s*$/,"")+n+">"},placeTag:function(e,t){var n=e.match(this.tabifier.newLevel);if(e.match(this.tabifier.lineBefore)||n)t=t.replace(/\s*$/,""),t+="\n";n&&"/"==e.charAt(1)&&this.tabifier.cleanlevel--,"\n"==t.charAt(t.length-1)&&(t+=this.tabifier.getTabs()),n&&"/"!=e.charAt(1)&&this.tabifier.cleanlevel++,t+=e;if(e.match(this.tabifier.lineAfter)||e.match(this.tabifier.newLevel))t=t.replace(/ *$/,""),t+="\n";return t}}},tidy:function(){return{setupAllowed:function(){this.opts.allowedTags&&(this.opts.deniedTags=!1),this.opts.allowedAttr&&(this.opts.removeAttr=!1);if(this.opts.linebreaks)return;var e=["p","section"];this.opts.allowedTags&&this.tidy.addToAllowed(e),this.opts.deniedTags&&this.tidy.removeFromDenied(e)},addToAllowed:function(t){var n=t.length;for(var r=0;r<n;r++)e.inArray(t[r],this.opts.allowedTags)==-1&&this.opts.allowedTags.push(t[r])},removeFromDenied:function(t){var n=t.length;for(var r=0;r<n;r++){var i=e.inArray(t[r],this.opts.deniedTags);i!=-1&&this.opts.deniedTags.splice(i,1)}},load:function(t,n){return this.tidy.settings={deniedTags:this.opts.deniedTags,allowedTags:this.opts.allowedTags,removeComments:this.opts.removeComments,replaceTags:this.opts.replaceTags,replaceStyles:this.opts.replaceStyles,removeDataAttr:this.opts.removeDataAttr,removeAttr:this.opts.removeAttr,allowedAttr:this.opts.allowedAttr,removeWithoutAttr:this.opts.removeWithoutAttr,removeEmpty:this.opts.removeEmpty},e.extend(this.tidy.settings,n),t=this.tidy.removeComments(t),this.tidy.$div=e("<div />").append(t),this.tidy.replaceTags(),this.tidy.replaceStyles(),this.tidy.removeTags(),this.tidy.removeAttr(),this.tidy.removeEmpty(),this.tidy.removeParagraphsInLists(),this.tidy.removeDataAttr(),this.tidy.removeWithoutAttr(),t=this.tidy.$div.html(),this.tidy.$div.remove(),t},removeComments:function(e){return this.tidy.settings.removeComments?e.replace(/<!--[\s\S]*?-->/gi,""):e},replaceTags:function(t){if(!this.tidy.settings.replaceTags)return t;var n=this.tidy.settings.replaceTags.length,r=[],i=[];for(var s=0;s<n;s++)i.push(this.tidy.settings.replaceTags[s][1]),r.push(this.tidy.settings.replaceTags[s][0]);return this.tidy.$div.find(r.join(",")).each(e.proxy(function(t,n){var r=i[t];e(n).replaceWith(function(){var t=e("<"+r+" />").append(e(this).contents());for(var n=0;n<this.attributes.length;n++)t.attr(this.attributes[n].name,this.attributes[n].value);return t})},this)),t},replaceStyles:function(){if(!this.tidy.settings.replaceStyles)return;var t=this.tidy.settings.replaceStyles.length;this.tidy.$div.find("span").each(e.proxy(function(n,r){var i=e(r),s=i.attr("style");for(var o=0;o<t;o++)if(s&&s.match(new RegExp("^"+this.tidy.settings.replaceStyles[o][0],"i"))){var u=this.tidy.settings.replaceStyles[o][1];i.replaceWith(function(){var t=document.createElement(u);return e(t).append(e(this).contents())})}},this))},removeTags:function(){!this.tidy.settings.deniedTags&&this.tidy.settings.allowedTags&&this.tidy.$div.find("*").not(this.tidy.settings.allowedTags.join(",")).each(function(t,n){n.innerHTML===""?e(n).remove():e(n).contents().unwrap()}),this.tidy.settings.deniedTags&&this.tidy.$div.find(this.tidy.settings.deniedTags.join(",")).each(function(t,n){n.innerHTML===""?e(n).remove():e(n).contents().unwrap()})},removeAttr:function(){var t;if(!this.tidy.settings.removeAttr&&this.tidy.settings.allowedAttr){var n=[],r=[];t=this.tidy.settings.allowedAttr.length;for(var i=0;i<t;i++)n.push(this.tidy.settings.allowedAttr[i][0]),r.push(this.tidy.settings.allowedAttr[i][1]);this.tidy.$div.find("*").each(e.proxy(function(t,i){var s=e(i),o=e.inArray(s[0].tagName.toLowerCase(),n),u=this.tidy.removeAttrGetRemoves(o,r,s);u&&e.each(u,function(e,t){s.removeAttr(t)})},this))}if(this.tidy.settings.removeAttr){t=this.tidy.settings.removeAttr.length;for(var i=0;i<t;i++){var s=this.tidy.settings.removeAttr[i][1];e.isArray(s)&&(s=s.join(" ")),this.tidy.$div.find(this.tidy.settings.removeAttr[i][0]).removeAttr(s)}}},removeAttrGetRemoves:function(t,n,r){var i=[];return t==-1?e.each(r[0].attributes,function(e,t){i.push(t.name)}):n[t]=="*"?i=[]:e.each(r[0].attributes,function(r,s){e.isArray(n[t])?e.inArray(s.name,n[t])==-1&&i.push(s.name):n[t]!=s.name&&i.push(s.name)}),i},removeAttrs:function(t,n){return n=new RegExp(n,"g"),t.each(function(){var t=e(this),r=this.attributes.length-1;for(var i=r;i>=0;i--){var s=this.attributes[i];s&&s.specified&&s.name.search(n)>=0&&t.removeAttr(s.name)}})},removeEmpty:function(){if(!this.tidy.settings.removeEmpty)return;this.tidy.$div.find(this.tidy.settings.removeEmpty.join(",")).each(function(){var t=e(this),n=t.text();n=n.replace(/[\u200B-\u200D\uFEFF]/g,""),n=n.replace(/ /gi,""),n=n.replace(/\s/g,""),n===""&&t.children().length===0&&t.remove()})},removeParagraphsInLists:function(){this.tidy.$div.find("li p").contents().unwrap()},removeDataAttr:function(){if(!this.tidy.settings.removeDataAttr)return;var t=this.tidy.settings.removeDataAttr;e.isArray(this.tidy.settings.removeDataAttr)&&(t=this.tidy.settings.removeDataAttr.join(",")),this.tidy.removeAttrs(this.tidy.$div.find(t),"^(data-)")},removeWithoutAttr:function(){if(!this.tidy.settings.removeWithoutAttr)return;this.tidy.$div.find(this.tidy.settings.removeWithoutAttr.join(",")).each(function(){this.attributes.length===0&&e(this).contents().unwrap()})}}},toolbar:function(){return{init:function(){return{html:{title:this.lang.get("html"),func:"code.toggle"},formatting:{title:this.lang.get("formatting"),dropdown:{p:{title:this.lang.get("paragraph"),func:"block.format"},blockquote:{title:this.lang.get("quote"),func:"block.format"},pre:{title:this.lang.get("code"),func:"block.format"},h1:{title:this.lang.get("header1"),func:"block.format"},h2:{title:this.lang.get("header2"),func:"block.format"},h3:{title:this.lang.get("header3"),func:"block.format"},h4:{title:this.lang.get("header4"),func:"block.format"},h5:{title:this.lang.get("header5"),func:"block.format"}}},bold:{title:this.lang.get("bold"),func:"inline.format"},italic:{title:this.lang.get("italic"),func:"inline.format"},deleted:{title:this.lang.get("deleted"),func:"inline.format"},underline:{title:this.lang.get("underline"),func:"inline.format"},unorderedlist:{title:"• "+this.lang.get("unorderedlist"),func:"list.toggle"},orderedlist:{title:"1. "+this.lang.get("orderedlist"),func:"list.toggle"},outdent:{title:"< "+this.lang.get("outdent"),func:"indent.decrease"},indent:{title:"> "+this.lang.get("indent"),func:"indent.increase"},image:{title:this.lang.get("image"),func:"image.show"},file:{title:this.lang.get("file"),func:"file.show"},link:{title:this.lang.get("link"),dropdown:{link:{title:this.lang.get("link_insert"),func:"link.show"},unlink:{title:this.lang.get("unlink"),func:"link.unlink"}}},alignment:{title:this.lang.get("alignment"),dropdown:{left:{title:this.lang.get("align_left"),func:"alignment.left"},center:{title:this.lang.get("align_center"),func:"alignment.center"},right:{title:this.lang.get("align_right"),func:"alignment.right"},justify:{title:this.lang.get("align_justify"),func:"alignment.justify"}}},horizontalrule:{title:this.lang.get("horizontalrule"),func:"line.insert"}}},build:function(){this.toolbar.hideButtons(),this.toolbar.hideButtonsOnMobile(),this.toolbar.isButtonSourceNeeded();if(this.opts.buttons.length===0)return;this.$toolbar=this.toolbar.createContainer(),this.toolbar.setOverflow(),this.toolbar.append(),this.toolbar.setFormattingTags(),this.toolbar.loadButtons(),this.toolbar.setFixed(),this.opts.activeButtons&&this.$editor.on("mouseup.redactor keyup.redactor focus.redactor",e.proxy(this.observe.buttons,this))},createContainer:function(){return e("<ul>").addClass("redactor-toolbar").attr("id","redactor-toolbar-"+this.uuid)},setFormattingTags:function(){e.each(this.opts.toolbar.formatting.dropdown,e.proxy(function(t,n){e.inArray(t,this.opts.formatting)==-1&&delete this.opts.toolbar.formatting.dropdown[t]},this))},loadButtons:function(){e.each(this.opts.buttons,e.proxy(function(t,n){if(!this.opts.toolbar[n])return;if(this.opts.fileUpload===!1&&n==="file")return!0;if(this.opts.imageUpload===!1&&this.opts.s3===!1&&n==="image")return!0;var r=this.opts.toolbar[n];this.$toolbar.append(e("<li>").append(this.button.build(n,r)))},this))},append:function(){this.opts.toolbarExternal?(this.$toolbar.addClass("redactor-toolbar-external"),e(this.opts.toolbarExternal).html(this.$toolbar)):this.$box.prepend(this.$toolbar)},setFixed:function(){if(this.utils.isMobile())return;if(this.opts.toolbarExternal)return;if(!this.opts.toolbarFixed)return;this.toolbar.observeScroll(),e(this.opts.toolbarFixedTarget).on("scroll.redactor",e.proxy(this.toolbar.observeScroll,this))},setOverflow:function(){this.utils.isMobile()&&this.opts.toolbarOverflow&&this.$toolbar.addClass("redactor-toolbar-overflow")},isButtonSourceNeeded:function(){if(this.opts.buttonSource)return;var e=this.opts.buttons.indexOf("html");e!==-1&&this.opts.buttons.splice(e,1)},hideButtons:function(){if(this.opts.buttonsHide.length===0)return;e.each(this.opts.buttonsHide,e.proxy(function(e,t){var n=this.opts.buttons.indexOf(t);this.opts.buttons.splice(n,1)},this))},hideButtonsOnMobile:function(){if(!this.utils.isMobile()||this.opts.buttonsHideOnMobile.length===0)return;e.each(this.opts.buttonsHideOnMobile,e.proxy(function(e,t){var n=this.opts.buttons.indexOf(t);this.opts.buttons.splice(n,1)},this))},observeScroll:function(){var t=e(this.opts.toolbarFixedTarget).scrollTop(),n=1;this.opts.toolbarFixedTarget===document&&(n=this.$box.offset().top),t>n?this.toolbar.observeScrollEnable(t,n):this.toolbar.observeScrollDisable()},observeScrollEnable:function(e,t){var n=this.opts.toolbarFixedTopOffset+e-t,r=0,i=t+this.$box.height()+30,s=this.$box.innerWidth();this.$toolbar.addClass("toolbar-fixed-box"),this.$toolbar.css({position:"absolute",width:s,top:n+"px",left:r}),this.toolbar.setDropdownsFixed(),this.$toolbar.css("visibility",e<i?"visible":"hidden")},observeScrollDisable:function(){this.$toolbar.css({position:"relative",width:"auto",top:0,left:0,visibility:"visible"}),this.toolbar.unsetDropdownsFixed(),this.$toolbar.removeClass("toolbar-fixed-box")},setDropdownsFixed:function(){var t=this.$toolbar.innerHeight()+this.opts.toolbarFixedTopOffset,n="fixed";this.opts.toolbarFixedTarget!==document&&(t=this.$toolbar.innerHeight()+this.$toolbar.offset().top+this.opts.toolbarFixedTopOffset,n="absolute"),e(".redactor-dropdown").each(function(){e(this).css({position:n,top:t+"px"})})},unsetDropdownsFixed:function(){var t=this.$toolbar.innerHeight()+this.$toolbar.offset().top;e(".redactor-dropdown").each(function(){e(this).css({position:"absolute",top:t+"px"})})}}},upload:function(){return{init:function(t,n,r){this.upload.direct=!1,this.upload.callback=r,this.upload.url=n,this.upload.$el=e(t),this.upload.$droparea=e('<div id="redactor-droparea" />'),this.upload.$placeholdler=e('<div id="redactor-droparea-placeholder" />').text("Drop file here or "),this.upload.$input=e('<input type="file" name="file" />'),this.upload.$placeholdler.append(this.upload.$input),this.upload.$droparea.append(this.upload.$placeholdler),this.upload.$el.append(this.upload.$droparea),this.upload.$droparea.off("redactor.upload"),this.upload.$input.off("redactor.upload"),this.upload.$droparea.on("dragover.redactor.upload",e.proxy(this.upload.onDrag,this)),this.upload.$droparea.on("dragleave.redactor.upload",e.proxy(this.upload.onDragLeave,this)),this.upload.$input.on("change.redactor.upload",e.proxy(function(e){e=e.originalEvent||e,this.upload.traverseFile(this.upload.$input[0].files[0],e)},this)),this.upload.$droparea.on("drop.redactor.upload",e.proxy(function(e){e.preventDefault(),this.upload.$droparea.removeClass("drag-hover").addClass("drag-drop"),this.upload.onDrop(e)},this))},directUpload:function(e,t){this.upload.direct=!0,this.upload.traverseFile(e,t)},onDrop:function(e){e=e.originalEvent||e;var t=e.dataTransfer.files;this.upload.traverseFile(t[0],e)},traverseFile:function(e,t){if(this.opts.s3){this.upload.setConfig(e),this.upload.s3uploadFile(e);return}var n=window.FormData?new FormData:null;if(window.FormData){this.upload.setConfig(e);var r=this.upload.type=="image"?this.opts.imageUploadParam:this.opts.fileUploadParam;n.append(r,e)}this.progress.show(),this.upload.sendData(n,t)},setConfig:function(e){this.upload.getType(e),this.upload.direct&&(this.upload.url=this.upload.type=="image"?this.opts.imageUpload:this.opts.fileUpload,this.upload.callback=this.upload.type=="image"?this.image.insert:this.file.insert)},getType:function(e){this.upload.type="image",this.opts.imageTypes.indexOf(e.type)==-1&&(this.upload.type="file")},getHiddenFields:function(t,n){return t===!1||typeof t!="object"?n:(e.each(t,e.proxy(function(t,r){r!==null&&r.toString().indexOf("#")===0&&(r=e(r).val()),n.append(t,r)},this)),n)},sendData:function(t,n){this.upload.type=="image"?(t=this.upload.getHiddenFields(this.opts.uploadImageFields,t),t=this.upload.getHiddenFields(this.upload.imageFields,t)):(t=this.upload.getHiddenFields(this.opts.uploadFileFields,t),t=this.upload.getHiddenFields(this.upload.fileFields,t));var r=new XMLHttpRequest;r.open("POST",this.upload.url),r.onreadystatechange=e.proxy(function(){if(r.readyState==4){var t=r.responseText;t=t.replace(/^\[/,""),t=t.replace(/\]$/,"");var i;try{i=typeof t=="string"?e.parseJSON(t):t}catch(s){i={error:!0}}this.progress.hide(),this.upload.direct||this.upload.$droparea.removeClass("drag-drop"),this.upload.callback(i,this.upload.direct,n)}},this),r.send(t)},onDrag:function(e){e.preventDefault(),this.upload.$droparea.addClass("drag-hover")},onDragLeave:function(e){e.preventDefault(),this.upload.$droparea.removeClass("drag-hover")},clearImageFields:function(){this.upload.imageFields={}},addImageFields:function(e,t){this.upload.imageFields[e]=t},removeImageFields:function(e){delete this.upload.imageFields[e]},clearFileFields:function(){this.upload.fileFields={}},addFileFields:function(e,t){this.upload.fileFields[e]=t},removeFileFields:function(e){delete this.upload.fileFields[e]},s3uploadFile:function(t){this.upload.s3executeOnSignedUrl(t,e.proxy(function(e){this.upload.s3uploadToS3(t,e)},this))},s3executeOnSignedUrl:function(e,t){var n=new XMLHttpRequest,r="?";this.opts.s3.search(/\?/)!="-1"&&(r="&"),n.open("GET",this.opts.s3+r+"name="+e.name+"&type="+e.type,!0),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined");var i=this;n.onreadystatechange=function(e){this.readyState==4&&this.status==200?(i.progress.show(),t(decodeURIComponent(this.responseText))):this.readyState==4&&this.status!=200},n.send()},s3createCORSRequest:function(e,t){var n=new XMLHttpRequest;return"withCredentials"in n?n.open(e,t,!0):typeof XDomainRequest!="undefined"?(n=new XDomainRequest,n.open(e,t)):n=null,n},s3uploadToS3:function(t,n){var r=this.upload.s3createCORSRequest("PUT",n);!r||(r.onload=e.proxy(function(){if(r.status==200){this.progress.hide();var e=n.split("?");if(!e[0])return!1;this.upload.direct||this.upload.$droparea.removeClass("drag-drop");var t={filelink:e[0]};if(this.upload.type=="file"){var i=e[0].split("/");t.filename=i[i.length-1]}this.upload.callback(t,this.upload.direct,!1)}},this),r.onerror=function(){},r.upload.onprogress=function(e){},r.setRequestHeader("Content-Type",t.type),r.setRequestHeader("x-amz-acl","public-read"),r.send(t))}}},utils:function(){return{isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isDesktop:function(){return!/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent)},isString:function(e){return Object.prototype.toString.call(e)=="[object String]"},isEmpty:function(t,n){return t=t.replace(/[\u200B-\u200D\uFEFF]/g,""),t=t.replace(/ /gi,""),t=t.replace(/<\/?br\s?\/?>/g,""),t=t.replace(/\s/g,""),t=t.replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,""),n!==!1&&(t=t.replace(/<[^\/>][^>]*><\/[^>]+>/gi,""),t=t.replace(/<[^\/>][^>]*><\/[^>]+>/gi,"")),t=e.trim(t),t===""},normalize:function(e){return typeof e=="undefined"?0:parseInt(e.replace("px",""),10)},hexToRgb:function(e){if(typeof e=="undefined")return;if(e.search(/^#/)==-1)return e;var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,n,r){return t+t+n+n+r+r});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return"rgb("+parseInt(n[1],16)+", "+parseInt(n[2],16)+", "+parseInt(n[3],16)+")"},getOuterHtml:function(t){return e("<div>").append(e(t).eq(0).clone()).html()},getAlignmentElement:function(t){return e.inArray(t.tagName,this.opts.alignmentTags)!==-1?e(t):e(t).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0])},removeEmptyAttr:function(t,n){var r=e(t);return typeof r.attr(n)=="undefined"?!0:r.attr(n)===""?(r.removeAttr(n),!0):!1},removeEmpty:function(t,n){var r=e(n);r.find(".redactor-invisible-space").removeAttr("style").removeAttr("class");if(r.find("hr, br, img, iframe").length!==0)return;var i=e.trim(r.text());this.utils.isEmpty(i,!1)&&r.remove()},saveScroll:function(){if(this.utils.isSelectAll())return;this.saveEditorScroll=this.$editor.scrollTop(),this.saveBodyScroll=e(window).scrollTop(),this.opts.scrollTarget&&(this.saveTargetScroll=e(this.opts.scrollTarget).scrollTop())},restoreScroll:function(){if(typeof this.saveScroll=="undefined"&&typeof this.saveBodyScroll=="undefined")return;e(window).scrollTop(this.saveBodyScroll),this.$editor.scrollTop(this.saveEditorScroll),this.opts.scrollTarget&&e(this.opts.scrollTarget).scrollTop(this.saveTargetScroll)},createSpaceElement:function(){var e=document.createElement("span");return e.className="redactor-invisible-space",e.innerHTML=this.opts.invisibleSpace,e},removeInlineTags:function(t){var n=this.opts.inlineTags;n.push("span"),t.tagName=="PRE"&&n.push("a"),e(t).find(n.join(",")).not("span.redactor-selection-marker").contents().unwrap()},replaceWithContents:function(t,n){var r=this;e(t).replaceWith(function(){return n===!0&&r.utils.removeInlineTags(this),e(this).contents()})},replaceToTag:function(t,n,r){var i,s=this;return e(t).replaceWith(function(){i=e("<"+n+" />").append(e(this).contents());for(var t=0;t<this.attributes.length;t++)i.attr(this.attributes[t].name,this.attributes[t].value);return r===!0&&s.utils.removeInlineTags(i),i}),i},isStartOfElement:function(){var e=this.selection.getBlock();if(!e)return!1;var t=this.caret.getOffsetOfElement(e);return t===0?!0:!1},isEndOfElement:function(){var t=this.selection.getBlock();if(!t)return!1;var n=this.caret.getOffsetOfElement(t),r=e.trim(e(t).text()).replace(/\n\r\n/g,"");return n==r.length?!0:!1},isBlock:function(e){return e=e[0]||e,e&&this.utils.isBlockTag(e.tagName)},isBlockTag:function(e){return typeof e=="undefined"?!1:this.reIsBlock.test(e)},isTag:function(t,n){var r=e(t).closest(n);return r.size()==1?r[0]:!1},isSelectAll:function(){return this.selectAll},enableSelectAll:function(){this.selectAll=!0},disableSelectAll:function(){this.selectAll=!1},isRedactorParent:function(t){return t?e(t).parents(".redactor-editor").length===0||e(t).hasClass("redactor-editor")?!1:t:!1},isCurrentOrParent:function(t){var n=this.selection.getParent(),r=this.selection.getCurrent();if(e.isArray(t)){var i=0;return e.each(t,e.proxy(function(e,t){this.utils.isCurrentOrParentOne(r,n,t)&&i++},this)),i===0?!1:!0}return this.utils.isCurrentOrParentOne(r,n,t)},isCurrentOrParentOne:function(e,t,n){return t&&t.tagName===n?t:e&&e.tagName===n?e:!1},isOldIe:function(){return this.utils.browser("msie")&&parseInt(this.utils.browser("version"),10)<9?!0:!1},isLessIe10:function(){return this.utils.browser("msie")&&parseInt(this.utils.browser("version"),10)<10?!0:!1},isIe11:function(){return!!navigator.userAgent.match(/Trident\/7\./)},browser:function(e){var t=navigator.userAgent.toLowerCase(),n=/(opr)[\/]([\w.]+)/.exec(t)||/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return e=="version"?n[2]:e=="webkit"?n[1]=="chrome"||n[1]=="webkit":n[1]=="rv"?e=="msie":n[1]=="opr"?e=="webkit":e==n[1]}}}},i.prototype.init.prototype=i.prototype,e.Redactor.fn.formatLinkify=function(t,i,s,o,u,a){var f="((?:http[s]?:\\/\\/(?:www\\.)?|www\\.){1}(?:[0-9A-Za-z\\-%_]+\\.)+[a-zA-Z]{2,}(?::[0-9]+)?(?:(?:/[0-9A-Za-z\\-\\.%+_]*)+)?(?:\\?(?:[0-9A-Za-z\\-\\.%_]+(?:=[0-9A-Za-z\\-\\.%_\\+]*)?)?(?:&(?:[0-9A-Za-z\\-\\.%_]+(?:=[0-9A-Za-z\\-\\.%_\\+]*)?)?)*)?(?:#[0-9A-Za-z\\-\\.%_\\+=\\?&;]*)?)",l=new RegExp(f,"gi"),c=/(https?|ftp):\/\//i,h=/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/gi,p=(this.$editor?this.$editor[0]:this).childNodes,d=p.length;while(d--){var v=p[d];if(v.nodeType===3){var m=v.nodeValue;if(u&&m){var g='<iframe width="500" height="281" src="',y='" frameborder="0" allowfullscreen></iframe>';m.match(n)?(m=m.replace(n,g+"//www.youtube.com/embed/$1"+y),e(v).after(m).remove()):m.match(r)&&(m=m.replace(r,g+"//player.vimeo.com/video/$2"+y),e(v).after(m).remove())}if(o&&m&&m.match(h)){m=m.replace(h,'<img src="$1" />'),e(v).after(m).remove();return}m.search(/\$/g)!=-1&&(m=m.replace(/\$/g,"$"));var b=m.match(l);if(s&&m&&b){var w=b.length;for(var E=0;E<w;E++){b[E].match(/\.$/)!==null&&(b[E]=b[E].replace(/\.$/,""));var S=b[E],x=S,T="";S.match(/\s$/)!==null&&(T=" ");var N=t+"://";S.match(c)!==null&&(N=""),x.length>a&&(x=x.substring(0,a)+"..."),x=x.replace(/$/g,"$").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),m=m.replace(S,'<a href="'+N+e.trim(S)+'">'+e.trim(x)+"</a>"+T)}e(v).after(m).remove()}}else v.nodeType===1&&!/^(a|button|textarea)$/i.test(v.tagName)&&e.Redactor.fn.formatLinkify.call(v,t,i,s,o,u,a)}}})(jQuery); \ No newline at end of file