From 62d69c1ede1bac42306b1c74bcbca6f7e00042aa Mon Sep 17 00:00:00 2001 From: Brad Kent Date: Sun, 22 Dec 2024 16:28:32 -0600 Subject: [PATCH] rebuild javascript --- src/Debug/js/Debug.jquery.js | 429 ++++++++++++++++--------------- src/Debug/js/Debug.jquery.min.js | 2 +- 2 files changed, 217 insertions(+), 214 deletions(-) diff --git a/src/Debug/js/Debug.jquery.js b/src/Debug/js/Debug.jquery.js index e82112e6..831dbf84 100644 --- a/src/Debug/js/Debug.jquery.js +++ b/src/Debug/js/Debug.jquery.js @@ -1,8 +1,6 @@ (function ($) { 'use strict'; - $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $; - Object.keys = Object.keys || function (o) { if (o !== Object(o)) { throw new TypeError('Object.keys called on a non-object') @@ -17,18 +15,18 @@ return k }; - var config; + var config$a; - function init($root) + function init$c($root) { - config = $root.data('config').get(); + config$a = $root.data('config').get(); } /** * Adds expand/collapse functionality to array * does not enhance values */ - function enhance ($node) { + function enhance$1 ($node) { // console.log('enhanceArray', $node[0]) var $arrayInner = $node.find('> .array-inner'); var isEnhanced = $node.find(' > .t_array-expand').length > 0; @@ -46,7 +44,7 @@ return } enhanceArrayAddMarkup($node); - $.each(config.iconsArray, function (selector, v) { + $.each(config$a.iconsArray, function (selector, v) { $node.find(selector).prepend(v); }); $node.debugEnhance(enhanceArrayIsExpanded($node) ? 'expand' : 'collapse'); @@ -70,13 +68,13 @@ } $expander = $('' + 'array( ' + - '··· ' + + '··· ' + ')' + ''); // add expand/collapse $node.find('> .t_keyword').first() .wrap('') - .after('( ') + .after('( ') .parent().next().remove(); // remove original '(' $node.prepend($expander); } @@ -95,10 +93,10 @@ return expand || $node.hasClass('array-file-tree') } - var config$1; + var config$9; - function init$1 ($delegateNode) { - config$1 = $delegateNode.data('config').get(); + function init$b ($delegateNode) { + config$9 = $delegateNode.data('config').get(); $delegateNode.on('click', '[data-toggle=vis]', function () { toggleVis(this); return false @@ -109,8 +107,8 @@ }); } - function addIcons ($node) { - $.each(config$1.iconsObject, function (selector, v) { + function addIcons$1 ($node) { + $.each(config$9.iconsObject, function (selector, v) { var $found = addIconFind($node, selector); var vMatches = typeof v === 'string' ? v.match(/^([ap])\s*:(.+)$/) @@ -159,7 +157,7 @@ * Adds toggle icon & hides target * Minimal DOM manipulation -> apply to all descendants */ - function enhance$1 ($node) { + function enhance ($node) { var selectors = $node.find('> .t_identifier').length ? ['> .t_identifier'] : ['> .classname', '> .t_const']; @@ -178,7 +176,7 @@ return } $toggle.wrap('') - .after(' '); + .after(' '); $target.hide(); }); } @@ -199,7 +197,7 @@ } enhanceInterfaces($obj); visToggles($inner, accessible); - addIcons($inner); + addIcons$1($inner); $inner.find('> .property.forceShow').show().find('> .t_array').debugEnhance('expand'); if (callPostToggle) { postToggle($obj, callPostToggle === 'allDesc'); @@ -371,19 +369,19 @@ $obj.trigger('expanded.debug.object'); } - var enhanceObject = /*#__PURE__*/Object.freeze({ + var enhanceObject$1 = /*#__PURE__*/Object.freeze({ __proto__: null, - init: init$1, - enhance: enhance$1, - enhanceInner: enhanceInner + enhance: enhance, + enhanceInner: enhanceInner, + init: init$b }); - var enhanceObject$1; - var enhanceValue; + var enhanceObject; + var enhanceValue$1; - function init$2($root, enhanceVal, enhanceObj) { - enhanceValue = enhanceVal; - enhanceObject$1 = enhanceObj; + function init$a($root, enhanceVal, enhanceObj) { + enhanceValue$1 = enhanceVal; + enhanceObject = enhanceObj; $root.on('click', '.close[data-dismiss=alert]', function () { $(this).parent().remove(); }); @@ -394,7 +392,7 @@ $root.on('expand.debug.group', onExpandGroup); $root.on('expand.debug.object', onExpandObject); $root.on('expanded.debug.next', '.context', function (e) { - enhanceValue($(e.target).find('> td > .t_array'), $(e.target).closest('li')); + enhanceValue$1($(e.target).find('> td > .t_array'), $(e.target).closest('li')); }); $root.on('expanded.debug.array expanded.debug.group expanded.debug.object', onExpanded); } @@ -435,7 +433,7 @@ var $entry = $node.closest('li[class*=m_]'); e.stopPropagation(); $node.find('> .array-inner > li > :last-child, > .array-inner > li[class]').each(function () { - enhanceValue(this, $entry); + enhanceValue$1(this, $entry); }); } @@ -457,9 +455,9 @@ '> .property > :last-child,' + '> .method .t_string' ).each(function () { - enhanceValue(this, $entry); + enhanceValue$1(this, $entry); }); - enhanceObject$1.enhanceInner($node); + enhanceObject.enhanceInner($node); } function onExpanded (e) { @@ -596,14 +594,14 @@ return num } - var config$2; + var config$8; - function init$3 ($root) { - config$2 = $root.data('config').get(); + function init$9 ($root) { + config$8 = $root.data('config').get(); $root.on('config.debug.updated', function (e, changedOpt) { e.stopPropagation(); if (changedOpt === 'linkFilesTemplate') { - config$2 = $root.data('config').get(); + config$8 = $root.data('config').get(); update($root); } }); @@ -613,7 +611,7 @@ * Linkify files if not already done or update already linked files */ function update ($group) { - var remove = !config$2.linkFiles || config$2.linkFilesTemplate.length === 0; + var remove = !config$8.linkFiles || config$8.linkFilesTemplate.length === 0; $group.find('li[data-detect-files]').each(function () { create($(this), $(this).find('.t_string'), remove); }); @@ -627,7 +625,7 @@ return this.innerText.match(/^file$/) }); var detectFiles = $entry.data('detectFiles') === true || $objects.length > 0; - if (!config$2.linkFiles && !remove) { + if (!config$8.linkFiles && !remove) { return } if (detectFiles === false) { @@ -655,7 +653,7 @@ file: file, line: line || 1 }; - return config$2.linkFilesTemplate.replace( + return config$8.linkFilesTemplate.replace( /%(\w*)\b/g, function (m, key) { return Object.prototype.hasOwnProperty.call(data, key) @@ -846,16 +844,16 @@ return text.match(/^(\/.+\.php)(?: \(line (\d+)(, eval'd line \d+)?\))?$/) || [] } - var config$3; + var config$7; var toExpandQueue = []; var processingQueue = false; - function init$4 ($root) { - config$3 = $root.data('config').get(); - init($root); - init$1($root); - init$2($root, enhanceValue$1, enhanceObject); - init$3($root); + function init$8 ($root) { + config$7 = $root.data('config').get(); + init$c($root); + init$b($root); + init$a($root, enhanceValue, enhanceObject$1); + init$9($root); } /** @@ -901,26 +899,26 @@ $entry.trigger('enhanced.debug'); } - function enhanceValue$1 (node, $entry) { + function enhanceValue (node, $entry) { var $node = $(node); if ($node.is('.t_array')) { - enhance($node); - } else if ($node.is('.t_object')) { enhance$1($node); + } else if ($node.is('.t_object')) { + enhance($node); } else if ($node.is('table')) { makeSortable($node); } else if ($node.is('.t_string')) { create($entry, $node); } else if ($node.is('.string-encoded.tabs-container')) { // console.warn('enhanceStringEncoded', $node) - enhanceValue$1($node.find('> .tab-pane.active > *'), $entry); + enhanceValue($node.find('> .tab-pane.active > *'), $entry); } } /** * add font-awesome icons */ - function addIcons$1 ($node) { + function addIcons ($node) { var $caption; var $icon = determineIcon($node); var isNested = false; @@ -953,12 +951,12 @@ var $icon; var $node2; var selector; - for (selector in config$3.iconsMisc) { + for (selector in config$7.iconsMisc) { $node2 = $node.find(selector); if ($node2.length === 0) { continue } - $icon = $(config$3.iconsMisc[selector]); + $icon = $(config$7.iconsMisc[selector]); if ($node2.find('> i:first-child').hasClass($icon.attr('class'))) { // already have icon $icon = null; @@ -989,9 +987,9 @@ function determineIconFromConfig ($node) { var $icon; var selector; - for (selector in config$3.iconsMethods) { + for (selector in config$7.iconsMethods) { if ($node.is(selector)) { - $icon = $(config$3.iconsMethods[selector]); + $icon = $(config$7.iconsMethods[selector]); break } } @@ -1011,18 +1009,18 @@ } create($entry); } - addIcons$1($entry); + addIcons($entry); $entry.children().each(function () { - enhanceValue$1(this, $entry); + enhanceValue(this, $entry); }); } function enhanceEntryTabular ($entry) { create($entry); - addIcons$1($entry); + addIcons($entry); if ($entry.hasClass('m_table')) { $entry.find('> table > tbody > tr > td').each(function () { - enhanceValue$1(this, $entry); + enhanceValue(this, $entry); }); } // table may have a expand collapse row that's initially expanded @@ -1035,12 +1033,12 @@ // console.log('enhanceGroup', $group[0]) var $toggle = $group.find('> .group-header'); var $target = $toggle.next(); - addIcons$1($group); // custom data-icon - addIcons$1($toggle); // expand/collapse + addIcons($group); // custom data-icon + addIcons($toggle); // expand/collapse $toggle.attr('data-toggle', 'group'); $toggle.find('.t_array, .t_object').each(function () { $(this).data('expand', false); - enhanceValue$1(this, $group); + enhanceValue(this, $group); }); $.each(['level-error', 'level-info', 'level-warn'], function (i, classname) { var $toggleIcon; @@ -1071,7 +1069,7 @@ processingQueue = false; } - var $root, config$4, origH, origPageY; + var $root$2, config$6, origH, origPageY; /** * @see https://stackoverflow.com/questions/5802467/prevent-scrolling-of-parent-element-when-inner-element-scroll-position-reaches-t @@ -1085,24 +1083,24 @@ : this.off('DOMMouseScroll mousewheel wheel') }; - function init$5 ($debugRoot) { - $root = $debugRoot; - config$4 = $root.data('config'); - if (!config$4.get('drawer')) { + function init$7 ($debugRoot) { + $root$2 = $debugRoot; + config$6 = $root$2.data('config'); + if (!config$6.get('drawer')) { return } - $root.addClass('debug-drawer debug-enhanced-ui'); // debug-enhanced-ui class is deprecated + $root$2.addClass('debug-drawer debug-enhanced-ui'); // debug-enhanced-ui class is deprecated - addMarkup(); + addMarkup$1(); - $root.find('.tab-panes').scrollLock(); - $root.find('.debug-resize-handle').on('mousedown', onMousedown); - $root.find('.debug-pull-tab').on('click', open); - $root.find('.debug-menu-bar .close').on('click', close); + $root$2.find('.tab-panes').scrollLock(); + $root$2.find('.debug-resize-handle').on('mousedown', onMousedown); + $root$2.find('.debug-pull-tab').on('click', open$2); + $root$2.find('.debug-menu-bar .close').on('click', close$2); - if (config$4.get('persistDrawer') && config$4.get('openDrawer')) { - open(); + if (config$6.get('persistDrawer') && config$6.get('openDrawer')) { + open$2(); } } @@ -1132,8 +1130,8 @@ }); } - function addMarkup () { - var $menuBar = $root.find('.debug-menu-bar'); + function addMarkup$1 () { + var $menuBar = $root$2.find('.debug-menu-bar'); $menuBar.before( '
PHP
' + '
' @@ -1143,23 +1141,23 @@ ''); } - function open () { - $root.addClass('debug-drawer-open'); - $root.debugEnhance(); + function open$2 () { + $root$2.addClass('debug-drawer-open'); + $root$2.debugEnhance(); setHeight(); // makes sure height within min/max - $('body').css('marginBottom', ($root.height() + 8) + 'px'); + $('body').css('marginBottom', ($root$2.height() + 8) + 'px'); $(window).on('resize', setHeight); - if (config$4.get('persistDrawer')) { - config$4.set('openDrawer', true); + if (config$6.get('persistDrawer')) { + config$6.set('openDrawer', true); } } - function close () { - $root.removeClass('debug-drawer-open'); + function close$2 () { + $root$2.removeClass('debug-drawer-open'); $('body').css('marginBottom', ''); $(window).off('resize', setHeight); - if (config$4.get('persistDrawer')) { - config$4.set('openDrawer', false); + if (config$6.get('persistDrawer')) { + config$6.set('openDrawer', false); } } @@ -1173,10 +1171,10 @@ // drawer isn't open / ignore resize return } - origH = $root.find('.tab-panes').height(); + origH = $root$2.find('.tab-panes').height(); origPageY = e.pageY; $('html').addClass('debug-resizing'); - $root.parents() + $root$2.parents() .on('mousemove', onMousemove) .on('mouseup', onMouseup); e.preventDefault(); @@ -1184,15 +1182,15 @@ function onMouseup () { $('html').removeClass('debug-resizing'); - $root.parents() + $root$2.parents() .off('mousemove', onMousemove) .off('mouseup', onMouseup); - $('body').css('marginBottom', ($root.height() + 8) + 'px'); + $('body').css('marginBottom', ($root$2.height() + 8) + 'px'); } function setHeight (height, viaUser) { - var $body = $root.find('.tab-panes'); - var menuH = $root.find('.debug-menu-bar').outerHeight(); + var $body = $root$2.find('.tab-panes'); + var menuH = $root$2.find('.debug-menu-bar').outerHeight(); var minH = 20; // inaccurate if document.doctype is null : $(window).height() // aka document.documentElement.clientHeight @@ -1201,20 +1199,20 @@ height = Math.min(height, maxH); height = Math.max(height, minH); $body.css('height', height); - if (viaUser && config$4.get('persistDrawer')) { - config$4.set('height', height); + if (viaUser && config$6.get('persistDrawer')) { + config$6.set('height', height); } } function checkHeight (height) { - var $body = $root.find('.tab-panes'); + var $body = $root$2.find('.tab-panes'); if (height && typeof height !== 'object') { return height } // no height passed -> use last or 100 height = parseInt($body[0].style.height, 10); - if (!height && config$4.get('persistDrawer')) { - height = config$4.get('height'); + if (!height && config$6.get('persistDrawer')) { + height = config$6.get('height'); } return height || 100 } @@ -1223,6 +1221,7 @@ * Filter entries */ + var channels = []; var tests = [ function ($node) { @@ -1488,7 +1487,7 @@ var config$5; var KEYCODE_ESC = 27; - function init$7 ($debugRoot) { + function init$5 ($debugRoot) { $root$1 = $debugRoot; config$5 = $root$1.data('config'); @@ -1611,7 +1610,7 @@ $('body').off('keyup', onBodyKeyup); } - var config$6; + var config$4; var options; var methods; // method filters var initialized = false; @@ -1653,16 +1652,16 @@ '' + ''; - function init$8 ($root) { - config$6 = $root.data('config') || $('body').data('config'); + function init$4 ($root) { + config$4 = $root.data('config') || $('body').data('config'); options = $root.find('> .tab-panes > .tab-primary').data('options') || {}; if (options.sidebar) { - addMarkup$1($root); + addMarkup($root); } - if (config$6.get('persistDrawer') && !config$6.get('openSidebar')) { - close$2($root); + if (config$4.get('persistDrawer') && !config$4.get('openSidebar')) { + close($root); } $root.on('click', '.close[data-dismiss=alert]', onClickCloseAlert); @@ -1707,9 +1706,9 @@ var $debug = $(this).closest('.debug'); var isVis = $debug.find('.debug-sidebar').is('.show'); if (!isVis) { - open$2($debug); + open($debug); } else { - close$2($debug); + close($debug); } } @@ -1741,7 +1740,7 @@ }); } - function addMarkup$1 ($node) { + function addMarkup ($node) { var $sidebar = $(sidebarHtml); var $expAll = $node.find('.tab-panes > .tab-primary > .tab-body > .expand-all'); $node.find('.tab-panes > .tab-primary > .tab-body').before($sidebar); @@ -1759,19 +1758,19 @@ }, 500); } - function close$2 ($node) { + function close ($node) { $node.find('.debug-sidebar') .removeClass('show') .attr('style', '') .trigger('close.debug.sidebar'); - config$6.set('openSidebar', false); + config$4.set('openSidebar', false); } - function open$2 ($node) { + function open ($node) { $node.find('.debug-sidebar') .addClass('show') .trigger('open.debug.sidebar'); - config$6.set('openSidebar', true); + config$4.set('openSidebar', true); } /** @@ -1858,28 +1857,29 @@ * Add primary Ui elements */ - var config$7; - var $root$2; - function init$9 ($debugRoot) { - $root$2 = $debugRoot; - config$7 = $root$2.data('config').get(); + var config$3; + var $root; + + function init$3 ($debugRoot) { + $root = $debugRoot; + config$3 = $root.data('config').get(); updateMenuBar(); addChannelToggles(); addExpandAll(); addNoti($('body')); enhanceErrorSummary(); - init$5($root$2); - init$6($root$2); - init$8($root$2); - init$7($root$2); + init$7($root); + init$6($root); + init$4($root); + init$5($root); addErrorIcons(); - $root$2.find('.loading').hide(); - $root$2.addClass('enhanced'); + $root.find('.loading').hide(); + $root.addClass('enhanced'); } function updateMenuBar () { - var $menuBar = $root$2.find('.debug-menu-bar'); + var $menuBar = $root.find('.debug-menu-bar'); var nav = $menuBar.find('nav').length ? $menuBar.find('nav')[0].outerHTML : ''; @@ -1890,9 +1890,9 @@ } function addChannelToggles () { - var channelNameRoot = $root$2.data('channelNameRoot'); - var $log = $root$2.find('> .tab-panes > .tab-primary'); - var channels = $root$2.data('channels') || {}; + var channelNameRoot = $root.data('channelNameRoot'); + var $log = $root.find('> .tab-panes > .tab-primary'); + var channels = $root.data('channels') || {}; var $ul; var $toggles; if (!channelNameRoot) { @@ -1913,10 +1913,10 @@ } function addErrorIcons () { - var channelNameRoot = $root$2.data('channelNameRoot'); + var channelNameRoot = $root.data('channelNameRoot'); var counts = { - error: $root$2.find('.m_error[data-channel="' + channelNameRoot + '.phpError"]').length, - warn: $root$2.find('.m_warn[data-channel="' + channelNameRoot + '.phpError"]').length + error: $root.find('.m_error[data-channel="' + channelNameRoot + '.phpError"]').length, + warn: $root.find('.m_warn[data-channel="' + channelNameRoot + '.phpError"]').length }; var $icon; var $icons = $('', { class: 'debug-error-counts' }); @@ -1924,27 +1924,27 @@ if (counts[what] === 0) { return } - $icon = $(config$7.iconsMethods['.m_' + what]).removeClass('fa-lg').addClass('text-' + what); + $icon = $(config$3.iconsMethods['.m_' + what]).removeClass('fa-lg').addClass('text-' + what); $icons.append($icon).append($('', { class: 'badge', html: counts[what] })); }); - $root$2.find('.debug-pull-tab').append($icons[0].outerHTML); - $root$2.find('.debug-menu-bar .float-right').prepend($icons); + $root.find('.debug-pull-tab').append($icons[0].outerHTML); + $root.find('.debug-menu-bar .float-right').prepend($icons); } function addExpandAll () { var $expandAll = $(''),n.append(''))}))}function k(t){var n=e(t),a=n.find("> thead");return n.is("table.sortable")?(n.addClass("table-sort"),a.on("click","th",(function(){var t=e(this),a=e(this).closest("tr").children(),i=a.index(t),r="desc"===(t.is(".sort-asc")?"asc":"desc")?"asc":"desc";a.removeClass("sort-asc sort-desc"),t.addClass("sort-"+r),t.find(".sort-arrows").length||(a.find(".sort-arrows").remove(),t.append('')),function(e,t,n){var a,i=e.tBodies[0],r=i.rows,o="function"==typeof Intl.Collator?new Intl.Collator([],{numeric:!0,sensitivity:"base"}):null;for(n="desc"===n?-1:1,r=(r=Array.prototype.slice.call(r,0)).sort(function(e,t,n){var a=/^([+-]?(?:0|[1-9]\d*)(?:\.\d*)?)(?:[eE]([+-]?\d+))?$/;return function(i,r){var o=i.cells[e].textContent.trim(),s=r.cells[e].textContent.trim(),l=o.match(a),c=s.match(a);return l&&c?t*function(e,t){if(et)return 1;return 0}(_(l),_(c)):t*function(e,t,n){return n?n.compare(e,t):e.localeCompare(t)}(o,s,n)}}(t,n,o)),a=0;a .object-inner > .property.debug-value > .t_identifier").filter((function(){return this.innerText.match(/^file$/)})),r=!0===t.data("detectFiles")||i.length>0;(u.linkFiles||a)&&!1!==r&&(t.is(".m_trace")?function(t,n){var a=t.find(".file-link").length>0;if(a){if(n)return void t.find("table t:not(.context) > *:last-child").remove()}else t.find("table thead tr > *:last-child").after("");t.find("table tbody tr").each((function(){!function(t,n){var a=t.find("> td"),i={file:t.data("file")||a.eq(0).text(),line:t.data("line")||a.eq(1).text()},r=e("",{class:"file-link",href:E(i.file,i.line),html:'',style:"vertical-align: bottom",title:"Open in editor"});if(n)return void t.find(".file-link").replaceWith(r);if(t.hasClass("context"))return void a.eq(0).attr("colspan",parseInt(a.eq(0).attr("colspan"),10)+1);a.last().after(e("",{class:"text-center",html:r}))}(e(this),a)}))}(t,a):t.is("[data-file]")?function(t,n){if(t.find("> .file-link").remove(),n)return;t.append(e("",{html:'',href:E(t.data("file"),t.data("line")),title:"Open in editor",class:"file-link lpad"})[0].outerHTML)}(t,a):function(t,n,a){var i=t.data("foundFiles")||[];t.is(".m_table")&&(n=t.find("> table > tbody > tr > .t_string"));n||(n=[]);e.each(n,(function(){!function(t,n,a){var i,r=e(t),o=t.attributes,s=e.trim(r.text()),l=function(t,n){var a=[],i=e.trim(t.text());if(t.data("file"))return"boolean"==typeof t.data("file")?[null,i,1]:[null,t.data("file"),t.data("line")||1];if(0===n.indexOf(i))return[null,i,1];if(t.parent(".property.debug-value").find("> .t_identifier").text().match(/^file$/))return a={line:1},t.parent().parent().find("> .property.debug-value").each((function(){var t=e(this).find("> .t_identifier")[0].innerText,n=e(this).find("> *:last-child"),i=e.trim(n[0].innerText);a[t]=i})),[null,i,a.line];return i.match(/^(\/.+\.php)(?: \(line (\d+)(, eval'd line \d+)?\))?$/)||[]}(r,a),c=!0!==n&&r.hasClass("file-link");if(r.closest(".m_trace").length)return void O(r.closest(".m_trace"));if(l.length<1)return;i=function(t,n,a,i,r){var o;i?(o=e("",{text:a}),t.removeClass("file-link")):r?(o=t).prop("href",E(n[1],n[2])):o=e("",{class:"file-link",href:E(n[1],n[2]),html:a+' ',title:"Open in editor"});return o}(r,l,s,n,c),!1===c&&function(t,n,a){e.each(a,(function(){if(void 0!==this){var e=this.name;if(!(["html","href","title"].indexOf(e)>-1)){if("class"===e)return n.addClass(this.value),void t.removeClass("t_string");n.attr(e,this.value),t.removeAttr(e)}}})),a.style&&n.attr("style",a.style.value)}(r,i,o);if(!1===r.is("td, th, li"))return void r.replaceWith(i);r.html(n?s:i)}(this,a,i)}))}(t,n,a))}function E(e,t){var n={file:e,line:t||1};return u.linkFilesTemplate.replace(/%(\w*)\b/g,(function(e,t){return Object.prototype.hasOwnProperty.call(n,t)?n[t]:""}))}var T,j,A,D,L=[],S=!1;function M(n){p=n.data("config").get(),function(e){t=e.data("config").get()}(n),i(n),function(t,n,a){f=n,d=a,t.on("click",".close[data-dismiss=alert]",(function(){e(this).parent().remove()})),t.on("click",".show-more-container .show-less",h),t.on("click",".show-more-container .show-more",m),t.on("click",".char-ws, .unicode",b),t.on("expand.debug.array",v),t.on("expand.debug.group",y),t.on("expand.debug.object",w),t.on("expanded.debug.next",".context",(function(t){f(e(t.target).find("> td > .t_array"),e(t.target).closest("li"))})),t.on("expanded.debug.array expanded.debug.group expanded.debug.object",x)}(n,F,g),C(n)}function P(t){var n=t.parent(),a=!n.hasClass("m_group")||n.hasClass("expanded");t.hide(),t.children().each((function(){H(e(this))})),a&&t.show().trigger("expanded.debug.group"),function(){if(S)return;S=!0;for(;L.length;)L.shift().debugEnhance("expand");S=!1}(),!1===t.parent().hasClass("m_group")&&t.addClass("enhanced")}function H(t){if(!t.hasClass("enhanced")){if(t.hasClass("m_group"))!function(t){var n=t.find("> .group-header"),a=n.next();if(I(t),I(n),n.attr("data-toggle","group"),n.find(".t_array, .t_object").each((function(){e(this).data("expand",!1),F(this,t)})),e.each(["level-error","level-info","level-warn"],(function(e,a){var i;t.hasClass(a)&&(i=n.children("i").eq(0),n.wrapInner(''),n.prepend(i))})),t.hasClass("expanded")||a.find(".m_error, .m_warn").not(".filter-hidden").not("[data-uncollapse=false]").length)return void L.push(n);n.debugEnhance("collapse",!0)}(t);else{if(t.hasClass("filter-hidden"))return;t.is(".m_table, .m_trace")?function(e){O(e),I(e),e.hasClass("m_table")&&e.find("> table > tbody > tr > td").each((function(){F(this,e)}));e.find("tbody > tr.expanded").next().trigger("expanded.debug.next"),k(e.find("> table"))}(t):function(e){var t;e.data("file")&&(e.attr("title")||(t=e.data("file")+": line "+e.data("line"),e.data("evalline")&&(t+=" (eval'd line "+e.data("evalline")+")"),e.attr("title",t)),O(e));I(e),e.children().each((function(){F(this,e)}))}(t)}t.addClass("enhanced"),t.trigger("enhanced.debug")}}function F(t,n){var i=e(t);i.is(".t_array")?a(i):i.is(".t_object")?o(i):i.is("table")?k(i):i.is(".t_string")?O(n,i):i.is(".string-encoded.tabs-container")&&F(i.find("> .tab-pane.active > *"),n)}function I(t){var n,a=function(t){var n,a;if(t.data("icon"))return t.data("icon").match("<")?e(t.data("icon")):e("").addClass(t.data("icon"));if(t.hasClass("m_group"))return n;return a=t.hasClass("group-header")?t.parent():t,function(t){var n,a;for(a in p.iconsMethods)if(t.is(a)){n=e(p.iconsMethods[a]);break}return n}(a)}(t),i=!1;!function(t){var n,a,i;for(i in p.iconsMisc)0!==(a=t.find(i)).length&&(n=e(p.iconsMisc[i]),a.find("> i:first-child").hasClass(n.attr("class"))||a.prepend(n),n=null)}(t),a&&(t.hasClass("m_group")?t=t.find("> .group-header .group-label").eq(0):t.find("> table").length&&(i=t.parent(".no-indent").length>0,0===(n=t.find("> table > caption")).length&&!1===i&&(n=e(""),t.find("> table").prepend(n)),t=n),t.find("> i:first-child").hasClass(a.attr("class"))||t.prepend(a))}function N(e){var t;(j=(T=e).data("config")).get("drawer")&&(T.addClass("debug-drawer debug-enhanced-ui"),(t=T.find(".debug-menu-bar")).before('
PHP
'),t.find(".float-right").append(''),T.find(".tab-panes").scrollLock(),T.find(".debug-resize-handle").on("mousedown",W),T.find(".debug-pull-tab").on("click",R),T.find(".debug-menu-bar .close").on("click",V),j.get("persistDrawer")&&j.get("openDrawer")&&R())}function R(){T.addClass("debug-drawer-open"),T.debugEnhance(),$(),e("body").css("marginBottom",T.height()+8+"px"),e(window).on("resize",$),j.get("persistDrawer")&&j.set("openDrawer",!0)}function V(){T.removeClass("debug-drawer-open"),e("body").css("marginBottom",""),e(window).off("resize",$),j.get("persistDrawer")&&j.set("openDrawer",!1)}function B(e){$(A+(D-e.pageY),!0)}function W(t){e(t.target).closest(".debug-drawer").is(".debug-drawer-open")&&(A=T.find(".tab-panes").height(),D=t.pageY,e("html").addClass("debug-resizing"),T.parents().on("mousemove",B).on("mouseup",q),t.preventDefault())}function q(){e("html").removeClass("debug-resizing"),T.parents().off("mousemove",B).off("mouseup",q),e("body").css("marginBottom",T.height()+8+"px")}function $(e,t){var n=T.find(".tab-panes"),a=T.find(".debug-menu-bar").outerHeight(),i=window.innerHeight-a-50;e=function(e){var t=T.find(".tab-panes");if(e&&"object"!=typeof e)return e;e=parseInt(t[0].style.height,10),!e&&j.get("persistDrawer")&&(e=j.get("height"));return e||100}(e),e=Math.min(e,i),e=Math.max(e,20),n.css("height",e),t&&j.get("persistDrawer")&&j.set("height",e)}e.fn.scrollLock=function(t){return(t=void 0===t||t)?void e(this).on("DOMMouseScroll mousewheel wheel",(function(t){var n=e(this),a=this.scrollTop,i=this.scrollHeight,r=n.innerHeight(),o=t.originalEvent.wheelDelta,s=o>0,l=function(){return t.stopPropagation(),t.preventDefault(),t.returnValue=!1,!1};return!s&&-o>i-r-a?(n.scrollTop(i),l()):s&&o>a?(n.scrollTop(0),l()):void 0})):this.off("DOMMouseScroll mousewheel wheel")};var U,z,K=[],G=[function(e){var t=e.data("channel")||e.closest(".debug").data("channelNameRoot");return K.indexOf(t)>-1}],J=[function(t){var n=t.find("input[data-toggle=channel]");0!==n.length?(K=[],n.filter(":checked").each((function(){K.push(e(this).val())}))):K=[t.data("channelNameRoot")]}];function Y(t){t.find("> .tab-body > hr").toggleClass("filter-hidden",t.find("> .tab-body").find(" > .debug-log-summary, > .debug-log").filter((function(){return e(this).height()<1})).length>0)}function X(){var t=e(this),n=t.is(":checked"),a=t.closest("label").next("ul").find("input"),i=t.closest(".debug");t.closest(".debug-options").length>0||"error"!==t.data("toggle")&&(a.prop("checked",n),Z(i))}function Q(){var t=e(this),n=t.is(":checked"),a=t.closest(".debug"),i=".group-body .error-"+t.val();a.find(i).toggleClass("filter-hidden",!n),a.find(".m_error, .m_warn").parents(".m_group").trigger("collapsed.debug.group"),te(a)}function Z(t){var n,a,i=t.data("channelNameRoot"),r=[];for(n in J)J[n](t);for(t.find("> .tab-panes > .tab-primary > .tab-body").find(".m_alert, .group-body > *:not(.m_groupSummary)").each((function(){r.push({depth:e(this).parentsUntil(".tab_body").length,node:e(this)})})),r.sort((function(e,t){return e.depth .tab-panes > .tab-pane.active")),te(t)}function ee(e,t){var n,a=e.is(".filter-hidden");e.data("channel")!==t+".phpError"&&(n=function(e){var t,n=!0;for(t in G)if(!(n=G[t](e)))break;return n}(e),e.toggleClass("filter-hidden",!n),n&&a?function(e){var t=e.parent().closest(".m_group");t.length&&!t.hasClass("expanded")||e.debugEnhance()}(e):n||a||function(e){e.hasClass("m_group")&&e.find("> .group-body").debugEnhance()}(e),n&&e.hasClass("m_group")&&e.trigger("collapsed.debug.group"))}function te(e){var t=e.find(".debug-sidebar input:checkbox:not(:checked)").length>0;e.toggleClass("filter-active",t)}function ne(e){var t=e+"=",n=document.cookie.split(";"),a=null,i=0;for(i=0;i1?n[t[1]]:n}var re,oe,se;function le(t){var n;z=(U=t).data("config"),(n=U.find(".debug-menu-bar")).find(".float-right").prepend(''),n.append('
'),z.get("drawer")||n.find("input[name=persistDrawer]").closest("label").remove(),U.find(".debug-options-toggle").on("click",ue),e("select[name=theme]").on("change",me).val(z.get("theme")),e("input[name=debugCookie]").on("change",fe).prop("checked",z.get("debugKey")&&ne("debug")===z.get("debugKey")),z.get("debugKey")||e("input[name=debugCookie]").prop("disabled",!0).closest("label").addClass("disabled"),e("input[name=persistDrawer]").on("change",he).prop("checked",z.get("persistDrawer")),U.find("input[name=linkFiles]").on("change",pe).prop("checked",z.get("linkFiles")).trigger("change"),U.find("input[name=linkFilesTemplate]").on("change",ge).val(z.get("linkFilesTemplate"))}function ce(e){0===U.find(".debug-options").find(e.target).length&&be()}function de(e){27===e.keyCode&&be()}function fe(){e(this).is(":checked")?ae("debug",z.get("debugKey"),7):ae("debug","",-1)}function ue(t){var n=e(this).closest(".debug-bar").find(".debug-options").is(".show");U=e(this).closest(".debug"),n?be():(U.find(".debug-options").addClass("show"),e("body").on("click",ce),e("body").on("keyup",de)),t.stopPropagation()}function pe(){var t=e(this).prop("checked"),n=e(this).closest(".debug-options").find("input[name=linkFilesTemplate]").closest(".form-group");t?n.slideDown():n.slideUp(),z.set("linkFiles",t),e("input[name=linkFilesTemplate]").trigger("change")}function ge(){var t=e(this).val();z.set("linkFilesTemplate",t),U.trigger("config.debug.updated","linkFilesTemplate")}function he(){var t=e(this).is(":checked");z.set({persistDrawer:t,openDrawer:t,openSidebar:!0})}function me(){z.set("theme",e(this).val()),U.attr("data-theme",z.themeGet())}function be(){U.find(".debug-options").removeClass("show"),e("body").off("click",ce),e("body").off("keyup",de)}var ve,ye,we,xe=!1,ke={alert:'Alerts',error:'Error',warn:'Warning',info:'Info',other:'Other'};function _e(t){var n;(re=t.data("config")||e("body").data("config"),(oe=t.find("> .tab-panes > .tab-primary").data("options")||{}).sidebar&&Ae(t),re.get("persistDrawer")&&!re.get("openSidebar")&&De(t),t.on("click",".close[data-dismiss=alert]",Oe),t.on("click",".sidebar-toggle",Ee),t.on("change",".debug-sidebar input[type=checkbox]",Ce),xe)||(n=je,J.push(n),function(e){G.push(e)}(Te),xe=!0)}function Ce(t){var n=e(this),a=n.closest(".toggle"),i=a.next("ul").find(".toggle"),r=n.is(":checked"),o=e(".m_alert.error-summary.have-fatal");a.toggleClass("active",r),i.toggleClass("active",r),"fatal"===n.val()&&(o.find(".error-fatal").toggleClass("filter-hidden",!r),o.toggleClass("filter-hidden",0===o.children().not(".filter-hidden").length))}function Oe(t){var n=e(t.delegateTarget);setTimeout((function(){0===n.find(".tab-primary > .tab-body > .m_alert").length&&n.find(".debug-sidebar input[data-toggle=method][value=alert]").parent().addClass("disabled")}))}function Ee(){var t=e(this).closest(".debug");t.find(".debug-sidebar").is(".show")?De(t):Le(t)}function Te(e){var t=e[0].className.match(/\bm_(\S+)\b/),n=t?t[1]:null;return!oe.sidebar||("group"===n&&e.find("> .group-body")[0].className.match(/level-(error|info|warn)/)&&(n=e.find("> .group-body")[0].className.match(/level-(error|info|warn)/)[1],e.toggleClass("filter-hidden-body",se.indexOf(n)<0)),["alert","error","warn","info"].indexOf(n)>-1?se.indexOf(n)>-1:se.indexOf("other")>-1)}function je(t){var n=t.find(".tab-pane.active .debug-sidebar");se=[],0===n.length&&(se=Object.keys(ke)),n.find("input[data-toggle=method]:checked").each((function(){se.push(e(this).val())}))}function Ae(t){var n=e('
'),a=t.find(".tab-panes > .tab-primary > .tab-body > .expand-all");t.find(".tab-panes > .tab-primary > .tab-body").before(n),function(e){var t=e.closest(".debug").find(".m_alert.error-summary"),n=t.find(".in-console");n.prev().remove(),n.remove(),0===t.children().length&&t.remove()}(t),function(t){var n=t.find(".debug-sidebar .php-errors ul"),a=["fatal","error","warning","deprecated","notice","strict"];e.each(a,(function(a,i){var r="fatal"===i?t.find(".m_alert.error-summary.have-fatal").length:t.find(".error-"+i).filter(".m_error,.m_warn").length;0!==r&&n.append(e("
  • ").append(e('
  • ").append(e('