diff --git a/resources/debugbar.js b/resources/debugbar.js index 45390ff8..4e5042d4 100644 --- a/resources/debugbar.js +++ b/resources/debugbar.js @@ -1014,7 +1014,7 @@ window.PhpDebugBar = window.PhpDebugBar || {}; this.maximizebtn.after(this.settingsControl.tab); this.settingsControl.tab.hidden = false; this.settingsControl.tab.addEventListener('click', () => { - if (!this.isMinimized() && this.activePanelName === '__settings') { + if (!this.isMinimized() && this.activePanelName === '__settings' && !this.isFullscreen()) { this.minimize(); } else { this.showTab('__settings'); @@ -1115,7 +1115,7 @@ window.PhpDebugBar = window.PhpDebugBar || {}; const self = this; this.headerLeft.append(tab.tab); tab.tab.addEventListener('click', () => { - if (!self.isMinimized() && self.activePanelName === name) { + if (!self.isMinimized() && self.activePanelName === name && !self.isFullscreen()) { self.minimize(); } else { self.restore(); diff --git a/resources/dist/debugbar.min.js b/resources/dist/debugbar.min.js index cb4dabbf..3f81b829 100644 --- a/resources/dist/debugbar.min.js +++ b/resources/dist/debugbar.min.js @@ -8,7 +8,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Ee=D,re=Y),te===void 0 `;return this.cfg.linesBetweenQueries!=="preserve"&&(C=` `.repeat(this.cfg.linesBetweenQueries||1)),M(p)+a.value+C},R.prototype.addNewline=function(a){return a=M(a),a.endsWith(` `)||(a+=` -`),a+this.indentation.getIndent()},R.prototype.previousToken=function(){return this.tokens[this.index-1]||{type:null,value:null}},R.prototype.formatCase=function(a){return this.cfg.reservedWordCase==="upper"?a.toUpperCase():this.cfg.reservedWordCase==="lower"?a.toLowerCase():a},R})();r.default=P}),F=l(r=>{"use strict";var u=r&&r.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};r.__esModule=!0;var c=u(e()),E=u(H()),k=(function(){function N(i){this.cfg=i}return N.prototype.format=function(i){return new E.default(this.cfg,this.tokenizer(),this.tokenOverride).format(i)},N.prototype.tokenize=function(i){return this.tokenizer().tokenize(i)},N.prototype.tokenizer=function(){return new c.default(this.getTokenizerConfig())},N})();r.default=k}),U=l(r=>{"use strict";var u=r&&r.__extends||(function(){var R=function(a,p){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var T in K)Object.prototype.hasOwnProperty.call(K,T)&&(C[T]=K[T])},R(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");R(a,p);function C(){this.constructor=a}a.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})(),c=r&&r.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};r.__esModule=!0;var E=c(F()),k=(function(R){u(a,R);function a(){return R!==null&&R.apply(this,arguments)||this}return a.prototype.getTokenizerConfig=function(){return{reservedWords:N,reservedTopLevelWords:i,reservedNewlineWords:P,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]}},a})(E.default);r.default=k;var N=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],i=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],M=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],P=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"]}),L=l(r=>{"use strict";var u=r&&r.__extends||(function(){var R=function(a,p){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var T in K)Object.prototype.hasOwnProperty.call(K,T)&&(C[T]=K[T])},R(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");R(a,p);function C(){this.constructor=a}a.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})(),c=r&&r.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};r.__esModule=!0;var E=c(F()),k=(function(R){u(a,R);function a(){return R!==null&&R.apply(this,arguments)||this}return a.prototype.getTokenizerConfig=function(){return{reservedWords:N,reservedTopLevelWords:i,reservedNewlineWords:P,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"],specialWordChars:[]}},a})(E.default);r.default=k;var N=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],i=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],M=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],P=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"]}),b=l(r=>{"use strict";var u=r&&r.__extends||(function(){var a=function(p,C){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,T){K.__proto__=T}||function(K,T){for(var B in T)Object.prototype.hasOwnProperty.call(T,B)&&(K[B]=T[B])},a(p,C)};return function(p,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");a(p,C);function K(){this.constructor=p}p.prototype=C===null?Object.create(C):(K.prototype=C.prototype,new K)}})(),c=r&&r.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};r.__esModule=!0;var E=c(F()),k=g(),N=(function(a){u(p,a);function p(){var C=a!==null&&a.apply(this,arguments)||this;return C.tokenOverride=function(K,T){if(K.type===k.TokenTypes.RESERVED_TOP_LEVEL&&T.value&&K.value.toUpperCase()==="SET"&&T.value.toUpperCase()==="BY")return K.type=k.TokenTypes.RESERVED,K},C}return p.prototype.getTokenizerConfig=function(){return{reservedWords:i,reservedTopLevelWords:M,reservedNewlineWords:R,reservedTopLevelWordsNoIndent:P,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]}},p})(E.default);r.default=N;var i=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],M=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],P=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],R=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"]}),A=l(r=>{"use strict";var u=r&&r.__extends||(function(){var R=function(a,p){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var T in K)Object.prototype.hasOwnProperty.call(K,T)&&(C[T]=K[T])},R(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");R(a,p);function C(){this.constructor=a}a.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})(),c=r&&r.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};r.__esModule=!0;var E=c(F()),k=(function(R){u(a,R);function a(){return R!==null&&R.apply(this,arguments)||this}return a.prototype.getTokenizerConfig=function(){return{reservedWords:N,reservedTopLevelWords:i,reservedNewlineWords:P,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"N''","''","``","[]","E''"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":","%","$"],lineCommentTypes:["#","--"],specialWordChars:[]}},a})(E.default);r.default=k;var N=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CASE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","END","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRIGGER","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WHEN","WITH","WORK","WRITE","YEAR_MONTH"],i=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CREATE OR REPLACE","DECLARE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GO","GRANT","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","MODIFY","ORDER BY","RETURNING","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],M=["INTERSECT ALL","INTERSECT","MINUS","UNION ALL","UNION"],P=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","FULL JOIN","FULL OUTER JOIN","LEFT JOIN","LEFT OUTER JOIN","NATURAL JOIN","OR","OUTER APPLY","OUTER JOIN","RENAME","RIGHT JOIN","RIGHT OUTER JOIN","JOIN","WHEN","XOR"]}),f=l(r=>{"use strict";var u=r&&r.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};r.__esModule=!0,r.tokenize=r.format=void 0;var c=u(U()),E=u(L()),k=u(b()),N=u(A()),i=function(P,R){switch(R===void 0&&(R={}),R.language){case"db2":return new c.default(R).format(P);case"n1ql":return new E.default(R).format(P);case"pl/sql":return new k.default(R).format(P);default:return new N.default(R).format(P)}};r.format=i;var M=function(P,R){return R===void 0&&(R={}),new N.default(R).tokenize(P)};r.tokenize=M,r.default={format:r.format,tokenize:r.tokenize}}),I=d(f(),1);globalThis.phpdebugbar_sqlformatter=I.default.default})();window.PhpDebugBar=window.PhpDebugBar||{};(function(){const s=window.PhpDebugBar;s.utils=s.utils||{};const G=s.utils.getDictValue=function(g,e,n){if(g==null)return n;const o=String(e).split(".");let _=g;for(const w of o)if(_==null||(_=_[w],_===void 0))return n;return _};s.utils.csscls=function(g,e){const n=String(g).trim();return n.includes(" ")?n.split(/\s+/).filter(Boolean).map(o=>s.utils.csscls(o,e)).join(" "):n.startsWith(".")?`.${e}${n.slice(1)}`:e+n},s.utils.makecsscls=function(g){return e=>s.utils.csscls(e,g)};const S=s.utils.makecsscls("phpdebugbar-");s.utils.sfDump=function(g){typeof window.Sfdump=="function"&&g.querySelectorAll("pre.sf-dump[id]").forEach(e=>{window.Sfdump(e.id,{maxDepth:0})})},s.utils.schedule=function(g){return window.requestIdleCallback?window.requestIdleCallback(g,{timeout:1e3}):setTimeout(g,0)};class m{get tagName(){return"div"}constructor(e={}){this._attributes=pt({},this.defaults),this._boundAttributes={},this.el=document.createElement(this.tagName),this.className&&this.el.classList.add(...this.className.split(" ")),this.initialize(e),this.render()}initialize(e){this.set(e)}render(){}set(e,n){const o=typeof e=="string"?{[e]:n}:e,_=[];for(const w in o)if(n=o[w],this._attributes[w]=n,this._boundAttributes[w])for(const H of this._boundAttributes[w])_.includes(H)||(H.call(this,n),_.push(H))}has(e){return this._attributes[e]!==void 0&&this._attributes[e]!==null}get(e){return this._attributes[e]}bindAttr(e,n){if(Array.isArray(e)){for(const o of e)this.bindAttr(o,n);return}if(this._boundAttributes[e]||(this._boundAttributes[e]=[]),n instanceof HTMLElement){const o=n;n=_=>o.textContent=_||""}this._boundAttributes[e].push(n),this.has(e)&&n.call(this,this._attributes[e])}static extend(e){const n=this;class o extends n{}for(const _ in e){const w=Object.getOwnPropertyDescriptor(e,_);w&&Object.defineProperty(o.prototype,_,w)}return Object.assign(o,n),o.__super__=n.prototype,o}}m.prototype.defaults={},s.Widget=m;class h extends m{get className(){return S("panel")}render(){this.active=!1,this.tab=document.createElement("a"),this.tab.classList.add(S("tab")),this.icon=document.createElement("i"),this.tab.append(this.icon),this.bindAttr("icon",function(n){n?this.icon.className=`phpdebugbar-icon phpdebugbar-icon-${n}`:this.icon.className=""});const e=document.createElement("span");e.classList.add(S("text")),this.tab.append(e),this.bindAttr("title",e),this.badge=document.createElement("span"),this.badge.classList.add(S("badge")),this.tab.append(this.badge),this.bindAttr("badge",function(n){n!==null?(this.badge.textContent=n,this.badge.classList.add(S("visible"))):this.badge.classList.remove(S("visible"))}),this.bindAttr("widget",function(n){this.el.innerHTML="",this.el.append(n.el)}),this.widgetRendered=!1,this.bindAttr("data",function(n){this.has("widget")&&(this.tab.setAttribute("data-empty",Object.keys(n).length===0||n.count===0),!this.widgetRendered&&this.active&&n!=null?this.renderWidgetData():this.widgetRendered=!1)})}renderWidgetData(){const e=this.get("data"),n=this.get("widget");e==null||!n||(n.set("data",e),s.utils.schedule(()=>{s.utils.sfDump(n.el)}),this.widgetRendered=!0)}show(){const e=S("active");this.tab.classList.add(e),this.tab.hidden=!1,this.el.classList.add(e),this.el.hidden=!1,this.active=!0,this.widgetRendered||this.renderWidgetData()}hide(){const e=S("active");this.tab.classList.remove(e),this.el.classList.remove(e),this.el.hidden=!0,this.active=!1}}class x extends m{get tagName(){return"span"}get className(){return S("indicator")}render(){this.icon=document.createElement("i"),this.el.append(this.icon),this.bindAttr("icon",function(n){n?this.icon.className=`phpdebugbar-icon phpdebugbar-icon-${n}`:this.icon.className=""}),this.bindAttr("link",function(n){n?(this.el.addEventListener("click",()=>{this.get("debugbar").showTab(n)}),this.el.style.cursor="pointer"):this.el.style.cursor=""});const e=document.createElement("span");e.classList.add(S("text")),this.el.append(e),this.bindAttr(["title","data"],e),this.tooltip=document.createElement("span"),this.tooltip.classList.add(S("tooltip"),S("disabled")),this.el.append(this.tooltip),this.bindAttr("tooltip",function(n){if(n)if(Array.isArray(n)||typeof n=="object"){const o=document.createElement("dl");for(const[_,w]of Object.entries(n)){const H=document.createElement("dt");H.textContent=_,o.append(H);const F=document.createElement("dd");F.textContent=w,o.append(F)}this.tooltip.innerHTML="",this.tooltip.append(o),this.tooltip.classList.remove(S("disabled"))}else this.tooltip.textContent=n,this.tooltip.classList.remove(S("disabled"));else this.tooltip.classList.add(S("disabled"))})}}class l extends m{get tagName(){return"form"}get className(){return S("settings")}initialize(e){this.set(e);const n=this.get("debugbar");this.settings=JSON.parse(localStorage.getItem("phpdebugbar-settings"))||{};for(const o in n.options)o in this.settings&&(n.options[o]=this.settings[o]),o==="theme"?n.setTheme(n.options[o]):n.el.setAttribute(`data-${o}`,n.options[o])}clearSettings(){const e=this.get("debugbar");if(localStorage.removeItem("phpdebugbar-settings"),localStorage.removeItem("phpdebugbar-ajaxhandler-autoshow"),this.settings={},e.options=pt({},e.defaultOptions),e.ajaxHandler){const n=e.ajaxHandler.defaultAutoShow;e.ajaxHandler.setAutoShow(n),this.set("autoshow",n),e.controls.__datasets&&e.controls.__datasets.get("widget").set("autoshow",this.autoshow.checked)}this.initialize(e.options)}storeSetting(e,n){this.settings[e]=n;const o=this.get("debugbar");o.options[e]=n,e!=="theme"&&o.el.setAttribute(`data-${e}`,n),localStorage.setItem("phpdebugbar-settings",JSON.stringify(this.settings))}render(){this.el.innerHTML="";const e=this.get("debugbar"),n=this,o={},_=document.createElement("select");_.innerHTML='',_.value=e.options.theme,_.addEventListener("change",function(){n.storeSetting("theme",this.value),e.setTheme(this.value)}),o.Theme=_;const w=document.createElement("select");w.innerHTML='',w.value=e.options.openBtnPosition,w.addEventListener("change",function(){n.storeSetting("openBtnPosition",this.value),this.value==="topLeft"||this.value==="topRight"?n.storeSetting("toolbarPosition","top"):n.storeSetting("toolbarPosition","bottom"),n.get("debugbar").recomputeBottomOffset()}),o["Toolbar Position"]=w,this.hideEmptyTabs=document.createElement("input"),this.hideEmptyTabs.type="checkbox",this.hideEmptyTabs.checked=e.options.hideEmptyTabs,this.hideEmptyTabs.addEventListener("click",function(){n.storeSetting("hideEmptyTabs",this.checked),n.get("debugbar").respCSSSize=0,n.get("debugbar").resize()});const H=document.createElement("label");H.append(this.hideEmptyTabs,"Hide empty tabs until they have data"),o["Hide Empty Tabs"]=H;const F=document.createElement("input");F.type="checkbox",F.checked=e.options.showFullscreenBtn,F.addEventListener("click",function(){n.storeSetting("showFullscreenBtn",this.checked),e.toggleFullscreenBtn(this.checked)});const U=document.createElement("label");U.append(F,"Show fullscreen button in toolbar"),o.Fullscreen=U,this.autoshow=document.createElement("input"),this.autoshow.type="checkbox",this.autoshow.checked=e.ajaxHandler&&e.ajaxHandler.autoShow,this.autoshow.addEventListener("click",function(){e.ajaxHandler&&e.ajaxHandler.setAutoShow(this.checked),e.controls.__datasets&&e.controls.__datasets.get("widget").set("autoshow",this.checked),e.datasetSwitcherWidget&&e.datasetSwitcherWidget.set("autoshow",this.checked)}),this.bindAttr("autoshow",function(){this.autoshow.checked=this.get("autoshow");const A=this.autoshow.closest(`.${S("form-row")}`);A&&(A.style.display="")});const L=document.createElement("label");L.append(this.autoshow,"Automatically show new incoming Ajax requests"),o.Autoshow=L;const b=document.createElement("button");b.textContent="Reset settings",b.addEventListener("click",A=>{A.preventDefault(),n.clearSettings(),n.render()}),o["Reset to defaults"]=b;for(const[A,f]of Object.entries(o)){const I=document.createElement("div");I.classList.add(S("form-row"));const r=document.createElement("div");r.classList.add(S("form-label")),r.textContent=A,I.append(r);const u=document.createElement("div");u.classList.add(S("form-input")),f instanceof HTMLElement?u.append(f):u.innerHTML=f,I.append(u),n.el.append(I)}e.ajaxHandler||(this.autoshow.closest(`.${S("form-row")}`).style.display="none")}}class v{constructor(e){this.debugbar=e}format(e,n,o,_){if(o=o?` ${o}`:"",_=_||Object.keys(this.debugbar.datasets).length,n.__meta===void 0)return`#${_}${o}`;const w=n.__meta.uri.split("/");let H=w.pop();H||(H=`${w.pop()||""}/`),w.length&&!Number.isNaN(H)&&(H=`${w.pop()}/${H}`);const F=150;return H.length>F&&(H=`${H.substr(0,F)}...`),`#${_} ${H}${o} (${n.__meta.datetime.split(" ")[1]})`}}s.DatasetTitleFormater=v;class d extends m{get className(){return"phpdebugbar"}initialize(e={}){this.options=Object.assign({bodyBottomInset:!0,theme:"auto",toolbarPosition:"bottom",openBtnPosition:"bottomLeft",hideEmptyTabs:!1,showFullscreenBtn:!1,spaNavigationEvents:[]},e),this.defaultOptions=pt({},this.options),this.controls={},this.dataMap={},this.datasets={},this.firstTabName=null,this.activePanelName=null,this.activeDatasetId=null,this.pendingDataSetId=null,this.datesetTitleFormater=new v(this);const n=window.getComputedStyle(document.body);this.bodyPaddingBottomHeight=Number.parseInt(n.paddingBottom),this.bodyPaddingTopHeight=Number.parseInt(n.paddingTop);try{this.isIframe=window.self!==window.top&&window.top.PhpDebugBar&&window.top.PhpDebugBar}catch(o){this.isIframe=!1}this.registerResizeHandler(),this.registerMediaListener(),this.registerNavigationListener(),this.settingsControl=new s.DebugBar.Tab({icon:"adjustments-horizontal",title:"Settings",widget:new l({debugbar:this})})}registerResizeHandler(){if(this.resize.bind===void 0||this.isIframe)return;const e=this.resize.bind(this);this.respCSSSize=0,window.addEventListener("resize",e),setTimeout(e,20)}registerMediaListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{this.options.theme==="auto"&&this.setTheme("auto")})}registerNavigationListener(){const e=this.options.spaNavigationEvents;if(!(!e||!e.length))for(const n of e)document.addEventListener(n,()=>{this.recalculateBodyPadding()})}recalculateBodyPadding(){if(!this.options.bodyBottomInset)return;document.body.style.paddingTop="",document.body.style.paddingBottom="";const e=window.getComputedStyle(document.body);this.bodyPaddingTopHeight=Number.parseFloat(e.paddingTop),this.bodyPaddingBottomHeight=Number.parseFloat(e.paddingBottom),this.recomputeBottomOffset()}setTheme(e){this.options.theme=e,e==="auto"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),this.el.setAttribute("data-theme",e),this.openHandler&&this.openHandler.el.setAttribute("data-theme",e),this.datasetSwitcherWidget&&this.datasetSwitcherWidget.panel&&this.datasetSwitcherWidget.panel.setAttribute("data-theme",e)}resize(){if(this.isIframe)return;let e=this.respCSSSize;if(this.respCSSSize===0){const H=Array.from(this.header.children).filter(F=>F.offsetParent!==null);for(const F of H){const U=window.getComputedStyle(F);e+=F.offsetWidth+Number.parseFloat(U.marginLeft)+Number.parseFloat(U.marginRight)}}const n=this.header.offsetWidth,o=S("mini-design"),_=this.header.classList.contains(o);n<=e&&!_?(this.respCSSSize=e,this.header.classList.add(o)):e{e.close()}),this.headerLeft=document.createElement("div"),this.headerLeft.classList.add(S("header-left")),this.header.append(this.headerLeft),this.headerRight=document.createElement("div"),this.headerRight.classList.add(S("header-right")),this.header.append(this.headerRight),this.body=document.createElement("div"),this.body.classList.add(S("body")),this.el.append(this.body),this.recomputeBottomOffset(),this.resizeHandleBottom=document.createElement("div"),this.resizeHandleBottom.classList.add(S("resize-handle")),this.resizeHandleBottom.classList.add(S("resize-handle-bottom")),this.el.append(this.resizeHandleBottom);let n,o;const _=F=>{const U=o+(n-F.pageY);e.setHeight(U)},w=F=>{const U=o-(n-F.pageY);e.setHeight(U)},H=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",H),e.dragCapture.style.display="none"};this.resizeHandle.addEventListener("mousedown",F=>{o=e.body.offsetHeight,n=F.pageY,document.addEventListener("mousemove",_),document.addEventListener("mouseup",H),e.dragCapture.style.display="",F.preventDefault()}),this.resizeHandleBottom.addEventListener("mousedown",F=>{o=e.body.offsetHeight,n=F.pageY,document.addEventListener("mousemove",w),document.addEventListener("mouseup",H),e.dragCapture.style.display="",F.preventDefault()}),this.closebtn=document.createElement("a"),this.closebtn.classList.add(S("close-btn")),this.headerRight.append(this.closebtn),this.closebtn.addEventListener("click",()=>{e.close()}),this.fullscreenbtn=document.createElement("a"),this.fullscreenbtn.classList.add(S("fullscreen-btn")),this.fullscreenbtn.hidden=!this.options.showFullscreenBtn,this.headerRight.append(this.fullscreenbtn),this.fullscreenbtn.addEventListener("click",()=>{e.toggleFullscreen()}),this.minimizebtn=document.createElement("a"),this.minimizebtn.classList.add(S("minimize-btn")),this.minimizebtn.hidden=!this.isMinimized(),this.headerRight.append(this.minimizebtn),this.minimizebtn.addEventListener("click",()=>{e.minimize()}),this.maximizebtn=document.createElement("a"),this.maximizebtn.classList.add(S("maximize-btn")),this.maximizebtn.hidden=this.isMinimized(),this.headerRight.append(this.maximizebtn),this.maximizebtn.addEventListener("click",()=>{e.restore()}),this.restorebtn=document.createElement("a"),this.restorebtn.classList.add(S("restore-btn")),this.restorebtn.hidden=!0,this.el.append(this.restorebtn),this.restorebtn.addEventListener("click",()=>{e.restore()}),this.openbtn=document.createElement("a"),this.openbtn.classList.add(S("open-btn")),this.openbtn.hidden=!0,this.headerRight.append(this.openbtn),this.openbtn.addEventListener("click",()=>{e.openHandler.show((F,U)=>{e.addDataSet(U,F,"(opened)")})}),this.datasetsSelectSpan=document.createElement("span"),this.datasetsSelectSpan.classList.add(S("datasets-switcher")),this.datasetsSelectSpan.setAttribute("name","datasets-switcher"),this.datasetsSelect=document.createElement("select"),this.datasetsSelect.hidden=!0,this.datasetsSelectSpan.append(this.datasetsSelect),this.headerRight.append(this.datasetsSelectSpan),this.datasetsSelect.addEventListener("change",function(){e.showDataSet(this.value)}),this.controls.__settings=this.settingsControl,this.settingsControl.tab.classList.add(S("tab-settings")),this.settingsControl.tab.setAttribute("data-collector","__settings"),this.settingsControl.el.setAttribute("data-collector","__settings"),this.settingsControl.el.hidden=!0,this.maximizebtn.after(this.settingsControl.tab),this.settingsControl.tab.hidden=!1,this.settingsControl.tab.addEventListener("click",()=>{!this.isMinimized()&&this.activePanelName==="__settings"?this.minimize():(this.showTab("__settings"),this.settingsControl.get("widget").render())}),this.body.append(this.settingsControl.el)}setHeight(e){if(this.isFullscreen())return;const n=40,o=window.innerHeight-this.header.offsetHeight-10;e=Math.min(e,o),e=Math.max(e,n),this.body.style.height=`${e}px`,localStorage.setItem("phpdebugbar-height",e),this.recomputeBottomOffset()}restoreState(){if(this.isIframe)return;const e=localStorage.getItem("phpdebugbar-height");this.setHeight(Number.parseInt(e)||this.body.offsetHeight);const n=localStorage.getItem("phpdebugbar-open");if(n&&n==="0")this.close();else{const o=localStorage.getItem("phpdebugbar-visible");if(o&&o==="1"){const _=localStorage.getItem("phpdebugbar-tab");this.isTab(_)?this.showTab(_):this.showTab()}else this.minimize()}this.options.showFullscreenBtn&&sessionStorage.getItem("phpdebugbar-fullscreen")==="1"&&this.toggleFullscreen()}createTab(e,n,o){const _=new h({title:o||e.replace(/[_-]/g," ").charAt(0).toUpperCase()+e.slice(1),widget:n});return this.addTab(e,_)}addTab(e,n){if(this.isControl(e))throw new Error(`${e} already exists`);const o=this;return this.headerLeft.append(n.tab),n.tab.addEventListener("click",()=>{!o.isMinimized()&&o.activePanelName===e?o.minimize():(o.restore(),o.showTab(e))}),n.tab.setAttribute("data-empty",!0),n.tab.setAttribute("data-collector",e),n.el.setAttribute("data-collector",e),this.body.append(n.el),this.controls[e]=n,this.firstTabName===null&&(this.firstTabName=e),n}createIndicator(e,n,o,_){const w=new x({icon:n,tooltip:o});return this.addIndicator(e,w,_)}addIndicator(e,n,o){if(this.isControl(e))throw new Error(`${e} already exists`);return n.set("debugbar",this),o==="left"?this.headerLeft.prepend(n.el):this.headerRight.append(n.el),this.controls[e]=n,n}getControl(e){if(this.isControl(e))return this.controls[e]}isControl(e){return this.controls[e]!==void 0}isTab(e){return this.isControl(e)&&this.controls[e]instanceof h}isIndicator(e){return this.isControl(e)&&this.controls[e]instanceof x}reset(){this.minimize();for(const[e,n]of Object.entries(this.controls))this.isTab(e)&&n.tab.remove(),n.el.remove();this.controls={}}showTab(e){if(e||(this.activePanelName?e=this.activePanelName:e=this.firstTabName),!this.isTab(e))throw new Error(`Unknown tab '${e}'`);this.body.hidden=!1,this.recomputeBottomOffset();for(const[n,o]of Object.entries(this.controls))o instanceof h&&(n===e?o.show():o.hide());this.activePanelName=e,this.el.classList.remove(S("minimized")),localStorage.setItem("phpdebugbar-visible","1"),localStorage.setItem("phpdebugbar-tab",e),this.maximize()}minimize(){this.exitFullscreen();const e=S("active"),n=this.header.querySelectorAll(`:scope > div > .${e}`);for(const o of n)o.classList.remove(e);this.body.hidden=!0,this.minimizebtn.hidden=!0,this.maximizebtn.hidden=!1,this.recomputeBottomOffset(),localStorage.setItem("phpdebugbar-visible","0"),this.el.classList.add(S("minimized")),this.resize()}maximize(){this.header.hidden=!1,this.restorebtn.hidden=!0,this.body.hidden=!1,this.minimizebtn.hidden=!1,this.maximizebtn.hidden=!0,this.recomputeBottomOffset(),localStorage.setItem("phpdebugbar-visible","1"),localStorage.setItem("phpdebugbar-open","1"),this.el.classList.remove(S("minimized")),this.el.classList.remove(S("closed")),this.resize()}isMinimized(){return this.el.classList.contains(S("minimized"))}toggleFullscreen(){this.isFullscreen()?this.exitFullscreen():(this._preFullscreenHeight=this.body.offsetHeight,this.el.classList.add(S("fullscreen")),this.body.style.height="",sessionStorage.setItem("phpdebugbar-fullscreen","1"),this.recomputeBottomOffset())}exitFullscreen(){this.isFullscreen()&&(this.el.classList.remove(S("fullscreen")),this._preFullscreenHeight&&(this.body.style.height=`${this._preFullscreenHeight}px`),sessionStorage.removeItem("phpdebugbar-fullscreen"),this.recomputeBottomOffset())}isFullscreen(){return this.el.classList.contains(S("fullscreen"))}toggleFullscreenBtn(e){this.fullscreenbtn.hidden=!e,e||this.exitFullscreen()}close(){this.exitFullscreen(),this.header.hidden=!0,this.body.hidden=!0,this.restorebtn.hidden=!1,localStorage.setItem("phpdebugbar-open","0"),this.el.classList.add(S("closed")),this.recomputeBottomOffset()}isClosed(){return this.el.classList.contains(S("closed"))}restore(){const e=localStorage.getItem("phpdebugbar-tab");this.pendingDataSetId&&(this.dataChangeHandler(this.datasets[this.pendingDataSetId]),this.pendingDataSetId=null),this.isTab(e)?this.showTab(e):this.showTab()}recomputeBottomOffset(){if(this.options.bodyBottomInset){if(this.isClosed()){document.body.style.paddingBottom=this.bodyPaddingBottomHeight?`${this.bodyPaddingBottomHeight}px`:"",document.body.style.paddingTop=this.bodyPaddingTopHeight?`${this.bodyPaddingTopHeight}px`:"";return}if(this.options.toolbarPosition==="top"){const e=this.el.offsetHeight+(this.bodyPaddingTopHeight||0);document.body.style.paddingTop=`${e}px`,document.body.style.paddingBottom=this.bodyPaddingBottomHeight?`${this.bodyPaddingBottomHeight}px`:""}else{const e=this.el.offsetHeight+(this.bodyPaddingBottomHeight||0);document.body.style.paddingBottom=`${e}px`,document.body.style.paddingTop=this.bodyPaddingTopHeight?`${this.bodyPaddingTopHeight}px`:""}}}setDataMap(e){this.dataMap=e}addDataMap(e){Object.assign(this.dataMap,e)}setData(e){return this.datasets={},this.addDataSet(e)}addDataSet(e,n,o,_){if(!e||!e.__meta)return;if(this.isIframe&&window.top.PhpDebugBar&&window.top.PhpDebugBar.instance){window.top.PhpDebugBar.instance.addDataSet(e,n,`(iframe)${o||""}`,_);return}const w=Object.keys(this.datasets).length+1;n=n||w,e.__meta.nb=w,e.__meta.suffix=o,this.datasets[n]=e;const H=this.datesetTitleFormater.format(n,this.datasets[n],o,w);if(this.datasetSwitcherWidget)this.datasetSwitcherWidget.set("data",this.datasets);else{const F=document.createElement("option");F.value=n,F.textContent=H,this.datasetsSelect.append(F),this.datasetsSelect.hidden=!1}return(_===void 0||_)&&this.showDataSet(n),this.resize(),n}loadDataSet(e,n,o,_){if(!this.openHandler)throw new Error("loadDataSet() needs an open handler");const w=this;this.openHandler.load(e,H=>{w.addDataSet(H,e,n,_),w.resize(),o&&o(H)})}getDataSet(e){return this.datasets[e]}showDataSet(e){this.activeDatasetId=e,this.isClosed()?this.pendingDataSetId=e:(this.dataChangeHandler(this.datasets[e]),this.pendingDataSetId=null),this.datasetSwitcherWidget?this.datasetSwitcherWidget.set("activeId",e):this.datasetsSelect.value=e}dataChangeHandler(e){for(const[n,o]of Object.entries(this.dataMap)){const _=G(e,o[0],o[1]);if(n.includes(":")){const w=n.split(":");this.getControl(w[0]).set(w[1],_)}else this.getControl(n).set("data",_)}this.isMinimized()||this.showTab(),this.resize()}setOpenHandler(e){this.openHandler=e,this.openHandler.el.setAttribute("data-theme",this.el.getAttribute("data-theme")),this.openbtn.hidden=e==null}getOpenHandler(){return this.openHandler}enableAjaxHandlerTab(){this.datasetsSelectSpan&&(this.datasetsSelectSpan.hidden=!0),this.datasetSwitcherWidget=new s.Widgets.DatasetWidget({debugbar:this}),this.openbtn.after(this.datasetSwitcherWidget.el)}}s.DebugBar=d,d.Tab=h,d.Indicator=x;class y{constructor(e,n,o){this.debugbar=e,this.headerName=n||"phpdebugbar",this.autoShow=o===void 0?!0:o,this.defaultAutoShow=this.autoShow,localStorage.getItem("phpdebugbar-ajaxhandler-autoshow")!==null&&(this.autoShow=localStorage.getItem("phpdebugbar-ajaxhandler-autoshow")==="1"),e.controls.__settings&&e.controls.__settings.get("widget").set("autoshow",this.autoShow)}handle(e){const n=this.getHeader(e,`${this.headerName}-stack`);return n&&JSON.parse(n).forEach(_=>{this.debugbar.loadDataSet(_," (stacked)",null,!1)}),!!(this.loadFromId(e)||this.loadFromData(e))}getHeader(e,n){return e instanceof Response?e.headers.get(n):e instanceof XMLHttpRequest?e.getResponseHeader(n):null}setAutoShow(e){this.autoShow=e,localStorage.setItem("phpdebugbar-ajaxhandler-autoshow",e?"1":"0")}loadFromId(e){const n=this.extractIdFromHeaders(e);return n&&this.debugbar.openHandler?(this.debugbar.loadDataSet(n,"(ajax)",void 0,this.autoShow),!0):!1}extractIdFromHeaders(e){return this.getHeader(e,`${this.headerName}-id`)}loadFromData(e){const n=this.extractDataFromHeaders(e);if(!n)return!1;const o=this.parseHeaders(n);if(o.error)throw new Error(`Error loading debugbar data: ${o.error}`);return o.data&&this.debugbar.addDataSet(o.data,o.id,"(ajax)",this.autoShow),!0}extractDataFromHeaders(e){let n=this.getHeader(e,this.headerName);if(n){for(let o=1;;o++){const _=this.getHeader(e,`${this.headerName}-${o}`);if(!_)break;n+=_}return decodeURIComponent(n)}}parseHeaders(e){return JSON.parse(e)}bindToFetch(){const e=this,n=window.fetch.__debugbar_original||window.fetch,o=n.bind(window);function _(...w){var F;const H=o(...w);return(F=H==null?void 0:H.then)==null||F.call(H,U=>e.handle(U)).catch(()=>{}),H}_.__debugbar_wrapped=!0,_.__debugbar_original=n,window.fetch=_}bindToXHR(){const e=this,n=XMLHttpRequest.prototype,o=(n.open||{}).__debugbar_original||n.open;if(typeof o!="function")return;function _(w,H,F=!0,U=null,L=null){return this.__debugbar_listener_attached||(this.__debugbar_listener_attached=!0,this.addEventListener("readystatechange",()=>{this.readyState===4&&e.handle(this)})),o.call(this,w,H,F,U,L)}_.__debugbar_wrapped=!0,_.__debugbar_original=o,n.open=_}}s.AjaxHandler=y})();(function(){PhpDebugBar.Widgets={};const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-"),G=PhpDebugBar.Widgets.htmlize=function(U){return U.replace(/\n/g,"
").replace(/\s/g," ")};let S;const m=PhpDebugBar.Widgets.renderValue=function(U,L){return U&&typeof U=="object"&&"_sd"in U?(S||(S=new PhpDebugBar.Widgets.VarDumpRenderer),S.render(U)):typeof U!="string"?L?G(JSON.stringify(U,void 0,2)):JSON.stringify(U):U};PhpDebugBar.Widgets.renderValueInto=function(U,L,b){const A=m(L,b);A instanceof Node?U.append(A):U.insertAdjacentHTML("beforeend",A)};const h=PhpDebugBar.Widgets.editorLink=function(U){const L=document.createElement("span"),b=U.line?`#${U.line}`:"";if(L.classList.add(s("filename")),L.textContent=U.filename+b,U.path&&L.setAttribute("title",U.path+b),U.url){const A=document.createElement("a");A.classList.add(s("editor-link")),A.setAttribute(A.ajax?"title":"href",U.url),A.addEventListener("click",f=>{f.stopPropagation(),U.ajax&&(fetch(stmt.xdebug_link.url),f.preventDefault())}),L.append(A)}return L},x=PhpDebugBar.Widgets.highlight=function(U,L){if(typeof phpdebugbar_hljs=="undefined")return G(U);const b=phpdebugbar_hljs;return L&&b.getLanguage(L)?b.highlight(U,{language:L}).value:b.highlightAuto(U).value},l=PhpDebugBar.Widgets.createCodeBlock=function(U,L,b,A){const f=document.createElement("pre");f.classList.add(s("code-block"));const I=document.createElement("code");if(I.innerHTML=x(`${U} +`),a+this.indentation.getIndent()},R.prototype.previousToken=function(){return this.tokens[this.index-1]||{type:null,value:null}},R.prototype.formatCase=function(a){return this.cfg.reservedWordCase==="upper"?a.toUpperCase():this.cfg.reservedWordCase==="lower"?a.toLowerCase():a},R})();r.default=P}),F=l(r=>{"use strict";var u=r&&r.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};r.__esModule=!0;var c=u(e()),E=u(H()),k=(function(){function N(i){this.cfg=i}return N.prototype.format=function(i){return new E.default(this.cfg,this.tokenizer(),this.tokenOverride).format(i)},N.prototype.tokenize=function(i){return this.tokenizer().tokenize(i)},N.prototype.tokenizer=function(){return new c.default(this.getTokenizerConfig())},N})();r.default=k}),U=l(r=>{"use strict";var u=r&&r.__extends||(function(){var R=function(a,p){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var T in K)Object.prototype.hasOwnProperty.call(K,T)&&(C[T]=K[T])},R(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");R(a,p);function C(){this.constructor=a}a.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})(),c=r&&r.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};r.__esModule=!0;var E=c(F()),k=(function(R){u(a,R);function a(){return R!==null&&R.apply(this,arguments)||this}return a.prototype.getTokenizerConfig=function(){return{reservedWords:N,reservedTopLevelWords:i,reservedNewlineWords:P,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]}},a})(E.default);r.default=k;var N=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],i=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],M=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],P=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"]}),L=l(r=>{"use strict";var u=r&&r.__extends||(function(){var R=function(a,p){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var T in K)Object.prototype.hasOwnProperty.call(K,T)&&(C[T]=K[T])},R(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");R(a,p);function C(){this.constructor=a}a.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})(),c=r&&r.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};r.__esModule=!0;var E=c(F()),k=(function(R){u(a,R);function a(){return R!==null&&R.apply(this,arguments)||this}return a.prototype.getTokenizerConfig=function(){return{reservedWords:N,reservedTopLevelWords:i,reservedNewlineWords:P,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"],specialWordChars:[]}},a})(E.default);r.default=k;var N=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],i=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],M=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],P=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"]}),b=l(r=>{"use strict";var u=r&&r.__extends||(function(){var a=function(p,C){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,T){K.__proto__=T}||function(K,T){for(var B in T)Object.prototype.hasOwnProperty.call(T,B)&&(K[B]=T[B])},a(p,C)};return function(p,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");a(p,C);function K(){this.constructor=p}p.prototype=C===null?Object.create(C):(K.prototype=C.prototype,new K)}})(),c=r&&r.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};r.__esModule=!0;var E=c(F()),k=g(),N=(function(a){u(p,a);function p(){var C=a!==null&&a.apply(this,arguments)||this;return C.tokenOverride=function(K,T){if(K.type===k.TokenTypes.RESERVED_TOP_LEVEL&&T.value&&K.value.toUpperCase()==="SET"&&T.value.toUpperCase()==="BY")return K.type=k.TokenTypes.RESERVED,K},C}return p.prototype.getTokenizerConfig=function(){return{reservedWords:i,reservedTopLevelWords:M,reservedNewlineWords:R,reservedTopLevelWordsNoIndent:P,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]}},p})(E.default);r.default=N;var i=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],M=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],P=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],R=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"]}),A=l(r=>{"use strict";var u=r&&r.__extends||(function(){var R=function(a,p){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var T in K)Object.prototype.hasOwnProperty.call(K,T)&&(C[T]=K[T])},R(a,p)};return function(a,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");R(a,p);function C(){this.constructor=a}a.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})(),c=r&&r.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};r.__esModule=!0;var E=c(F()),k=(function(R){u(a,R);function a(){return R!==null&&R.apply(this,arguments)||this}return a.prototype.getTokenizerConfig=function(){return{reservedWords:N,reservedTopLevelWords:i,reservedNewlineWords:P,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"N''","''","``","[]","E''"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":","%","$"],lineCommentTypes:["#","--"],specialWordChars:[]}},a})(E.default);r.default=k;var N=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CASE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","END","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRIGGER","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WHEN","WITH","WORK","WRITE","YEAR_MONTH"],i=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CREATE OR REPLACE","DECLARE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GO","GRANT","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","MODIFY","ORDER BY","RETURNING","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],M=["INTERSECT ALL","INTERSECT","MINUS","UNION ALL","UNION"],P=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","FULL JOIN","FULL OUTER JOIN","LEFT JOIN","LEFT OUTER JOIN","NATURAL JOIN","OR","OUTER APPLY","OUTER JOIN","RENAME","RIGHT JOIN","RIGHT OUTER JOIN","JOIN","WHEN","XOR"]}),f=l(r=>{"use strict";var u=r&&r.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};r.__esModule=!0,r.tokenize=r.format=void 0;var c=u(U()),E=u(L()),k=u(b()),N=u(A()),i=function(P,R){switch(R===void 0&&(R={}),R.language){case"db2":return new c.default(R).format(P);case"n1ql":return new E.default(R).format(P);case"pl/sql":return new k.default(R).format(P);default:return new N.default(R).format(P)}};r.format=i;var M=function(P,R){return R===void 0&&(R={}),new N.default(R).tokenize(P)};r.tokenize=M,r.default={format:r.format,tokenize:r.tokenize}}),I=d(f(),1);globalThis.phpdebugbar_sqlformatter=I.default.default})();window.PhpDebugBar=window.PhpDebugBar||{};(function(){const s=window.PhpDebugBar;s.utils=s.utils||{};const G=s.utils.getDictValue=function(g,e,n){if(g==null)return n;const o=String(e).split(".");let _=g;for(const w of o)if(_==null||(_=_[w],_===void 0))return n;return _};s.utils.csscls=function(g,e){const n=String(g).trim();return n.includes(" ")?n.split(/\s+/).filter(Boolean).map(o=>s.utils.csscls(o,e)).join(" "):n.startsWith(".")?`.${e}${n.slice(1)}`:e+n},s.utils.makecsscls=function(g){return e=>s.utils.csscls(e,g)};const S=s.utils.makecsscls("phpdebugbar-");s.utils.sfDump=function(g){typeof window.Sfdump=="function"&&g.querySelectorAll("pre.sf-dump[id]").forEach(e=>{window.Sfdump(e.id,{maxDepth:0})})},s.utils.schedule=function(g){return window.requestIdleCallback?window.requestIdleCallback(g,{timeout:1e3}):setTimeout(g,0)};class m{get tagName(){return"div"}constructor(e={}){this._attributes=pt({},this.defaults),this._boundAttributes={},this.el=document.createElement(this.tagName),this.className&&this.el.classList.add(...this.className.split(" ")),this.initialize(e),this.render()}initialize(e){this.set(e)}render(){}set(e,n){const o=typeof e=="string"?{[e]:n}:e,_=[];for(const w in o)if(n=o[w],this._attributes[w]=n,this._boundAttributes[w])for(const H of this._boundAttributes[w])_.includes(H)||(H.call(this,n),_.push(H))}has(e){return this._attributes[e]!==void 0&&this._attributes[e]!==null}get(e){return this._attributes[e]}bindAttr(e,n){if(Array.isArray(e)){for(const o of e)this.bindAttr(o,n);return}if(this._boundAttributes[e]||(this._boundAttributes[e]=[]),n instanceof HTMLElement){const o=n;n=_=>o.textContent=_||""}this._boundAttributes[e].push(n),this.has(e)&&n.call(this,this._attributes[e])}static extend(e){const n=this;class o extends n{}for(const _ in e){const w=Object.getOwnPropertyDescriptor(e,_);w&&Object.defineProperty(o.prototype,_,w)}return Object.assign(o,n),o.__super__=n.prototype,o}}m.prototype.defaults={},s.Widget=m;class h extends m{get className(){return S("panel")}render(){this.active=!1,this.tab=document.createElement("a"),this.tab.classList.add(S("tab")),this.icon=document.createElement("i"),this.tab.append(this.icon),this.bindAttr("icon",function(n){n?this.icon.className=`phpdebugbar-icon phpdebugbar-icon-${n}`:this.icon.className=""});const e=document.createElement("span");e.classList.add(S("text")),this.tab.append(e),this.bindAttr("title",e),this.badge=document.createElement("span"),this.badge.classList.add(S("badge")),this.tab.append(this.badge),this.bindAttr("badge",function(n){n!==null?(this.badge.textContent=n,this.badge.classList.add(S("visible"))):this.badge.classList.remove(S("visible"))}),this.bindAttr("widget",function(n){this.el.innerHTML="",this.el.append(n.el)}),this.widgetRendered=!1,this.bindAttr("data",function(n){this.has("widget")&&(this.tab.setAttribute("data-empty",Object.keys(n).length===0||n.count===0),!this.widgetRendered&&this.active&&n!=null?this.renderWidgetData():this.widgetRendered=!1)})}renderWidgetData(){const e=this.get("data"),n=this.get("widget");e==null||!n||(n.set("data",e),s.utils.schedule(()=>{s.utils.sfDump(n.el)}),this.widgetRendered=!0)}show(){const e=S("active");this.tab.classList.add(e),this.tab.hidden=!1,this.el.classList.add(e),this.el.hidden=!1,this.active=!0,this.widgetRendered||this.renderWidgetData()}hide(){const e=S("active");this.tab.classList.remove(e),this.el.classList.remove(e),this.el.hidden=!0,this.active=!1}}class x extends m{get tagName(){return"span"}get className(){return S("indicator")}render(){this.icon=document.createElement("i"),this.el.append(this.icon),this.bindAttr("icon",function(n){n?this.icon.className=`phpdebugbar-icon phpdebugbar-icon-${n}`:this.icon.className=""}),this.bindAttr("link",function(n){n?(this.el.addEventListener("click",()=>{this.get("debugbar").showTab(n)}),this.el.style.cursor="pointer"):this.el.style.cursor=""});const e=document.createElement("span");e.classList.add(S("text")),this.el.append(e),this.bindAttr(["title","data"],e),this.tooltip=document.createElement("span"),this.tooltip.classList.add(S("tooltip"),S("disabled")),this.el.append(this.tooltip),this.bindAttr("tooltip",function(n){if(n)if(Array.isArray(n)||typeof n=="object"){const o=document.createElement("dl");for(const[_,w]of Object.entries(n)){const H=document.createElement("dt");H.textContent=_,o.append(H);const F=document.createElement("dd");F.textContent=w,o.append(F)}this.tooltip.innerHTML="",this.tooltip.append(o),this.tooltip.classList.remove(S("disabled"))}else this.tooltip.textContent=n,this.tooltip.classList.remove(S("disabled"));else this.tooltip.classList.add(S("disabled"))})}}class l extends m{get tagName(){return"form"}get className(){return S("settings")}initialize(e){this.set(e);const n=this.get("debugbar");this.settings=JSON.parse(localStorage.getItem("phpdebugbar-settings"))||{};for(const o in n.options)o in this.settings&&(n.options[o]=this.settings[o]),o==="theme"?n.setTheme(n.options[o]):n.el.setAttribute(`data-${o}`,n.options[o])}clearSettings(){const e=this.get("debugbar");if(localStorage.removeItem("phpdebugbar-settings"),localStorage.removeItem("phpdebugbar-ajaxhandler-autoshow"),this.settings={},e.options=pt({},e.defaultOptions),e.ajaxHandler){const n=e.ajaxHandler.defaultAutoShow;e.ajaxHandler.setAutoShow(n),this.set("autoshow",n),e.controls.__datasets&&e.controls.__datasets.get("widget").set("autoshow",this.autoshow.checked)}this.initialize(e.options)}storeSetting(e,n){this.settings[e]=n;const o=this.get("debugbar");o.options[e]=n,e!=="theme"&&o.el.setAttribute(`data-${e}`,n),localStorage.setItem("phpdebugbar-settings",JSON.stringify(this.settings))}render(){this.el.innerHTML="";const e=this.get("debugbar"),n=this,o={},_=document.createElement("select");_.innerHTML='',_.value=e.options.theme,_.addEventListener("change",function(){n.storeSetting("theme",this.value),e.setTheme(this.value)}),o.Theme=_;const w=document.createElement("select");w.innerHTML='',w.value=e.options.openBtnPosition,w.addEventListener("change",function(){n.storeSetting("openBtnPosition",this.value),this.value==="topLeft"||this.value==="topRight"?n.storeSetting("toolbarPosition","top"):n.storeSetting("toolbarPosition","bottom"),n.get("debugbar").recomputeBottomOffset()}),o["Toolbar Position"]=w,this.hideEmptyTabs=document.createElement("input"),this.hideEmptyTabs.type="checkbox",this.hideEmptyTabs.checked=e.options.hideEmptyTabs,this.hideEmptyTabs.addEventListener("click",function(){n.storeSetting("hideEmptyTabs",this.checked),n.get("debugbar").respCSSSize=0,n.get("debugbar").resize()});const H=document.createElement("label");H.append(this.hideEmptyTabs,"Hide empty tabs until they have data"),o["Hide Empty Tabs"]=H;const F=document.createElement("input");F.type="checkbox",F.checked=e.options.showFullscreenBtn,F.addEventListener("click",function(){n.storeSetting("showFullscreenBtn",this.checked),e.toggleFullscreenBtn(this.checked)});const U=document.createElement("label");U.append(F,"Show fullscreen button in toolbar"),o.Fullscreen=U,this.autoshow=document.createElement("input"),this.autoshow.type="checkbox",this.autoshow.checked=e.ajaxHandler&&e.ajaxHandler.autoShow,this.autoshow.addEventListener("click",function(){e.ajaxHandler&&e.ajaxHandler.setAutoShow(this.checked),e.controls.__datasets&&e.controls.__datasets.get("widget").set("autoshow",this.checked),e.datasetSwitcherWidget&&e.datasetSwitcherWidget.set("autoshow",this.checked)}),this.bindAttr("autoshow",function(){this.autoshow.checked=this.get("autoshow");const A=this.autoshow.closest(`.${S("form-row")}`);A&&(A.style.display="")});const L=document.createElement("label");L.append(this.autoshow,"Automatically show new incoming Ajax requests"),o.Autoshow=L;const b=document.createElement("button");b.textContent="Reset settings",b.addEventListener("click",A=>{A.preventDefault(),n.clearSettings(),n.render()}),o["Reset to defaults"]=b;for(const[A,f]of Object.entries(o)){const I=document.createElement("div");I.classList.add(S("form-row"));const r=document.createElement("div");r.classList.add(S("form-label")),r.textContent=A,I.append(r);const u=document.createElement("div");u.classList.add(S("form-input")),f instanceof HTMLElement?u.append(f):u.innerHTML=f,I.append(u),n.el.append(I)}e.ajaxHandler||(this.autoshow.closest(`.${S("form-row")}`).style.display="none")}}class v{constructor(e){this.debugbar=e}format(e,n,o,_){if(o=o?` ${o}`:"",_=_||Object.keys(this.debugbar.datasets).length,n.__meta===void 0)return`#${_}${o}`;const w=n.__meta.uri.split("/");let H=w.pop();H||(H=`${w.pop()||""}/`),w.length&&!Number.isNaN(H)&&(H=`${w.pop()}/${H}`);const F=150;return H.length>F&&(H=`${H.substr(0,F)}...`),`#${_} ${H}${o} (${n.__meta.datetime.split(" ")[1]})`}}s.DatasetTitleFormater=v;class d extends m{get className(){return"phpdebugbar"}initialize(e={}){this.options=Object.assign({bodyBottomInset:!0,theme:"auto",toolbarPosition:"bottom",openBtnPosition:"bottomLeft",hideEmptyTabs:!1,showFullscreenBtn:!1,spaNavigationEvents:[]},e),this.defaultOptions=pt({},this.options),this.controls={},this.dataMap={},this.datasets={},this.firstTabName=null,this.activePanelName=null,this.activeDatasetId=null,this.pendingDataSetId=null,this.datesetTitleFormater=new v(this);const n=window.getComputedStyle(document.body);this.bodyPaddingBottomHeight=Number.parseInt(n.paddingBottom),this.bodyPaddingTopHeight=Number.parseInt(n.paddingTop);try{this.isIframe=window.self!==window.top&&window.top.PhpDebugBar&&window.top.PhpDebugBar}catch(o){this.isIframe=!1}this.registerResizeHandler(),this.registerMediaListener(),this.registerNavigationListener(),this.settingsControl=new s.DebugBar.Tab({icon:"adjustments-horizontal",title:"Settings",widget:new l({debugbar:this})})}registerResizeHandler(){if(this.resize.bind===void 0||this.isIframe)return;const e=this.resize.bind(this);this.respCSSSize=0,window.addEventListener("resize",e),setTimeout(e,20)}registerMediaListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{this.options.theme==="auto"&&this.setTheme("auto")})}registerNavigationListener(){const e=this.options.spaNavigationEvents;if(!(!e||!e.length))for(const n of e)document.addEventListener(n,()=>{this.recalculateBodyPadding()})}recalculateBodyPadding(){if(!this.options.bodyBottomInset)return;document.body.style.paddingTop="",document.body.style.paddingBottom="";const e=window.getComputedStyle(document.body);this.bodyPaddingTopHeight=Number.parseFloat(e.paddingTop),this.bodyPaddingBottomHeight=Number.parseFloat(e.paddingBottom),this.recomputeBottomOffset()}setTheme(e){this.options.theme=e,e==="auto"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),this.el.setAttribute("data-theme",e),this.openHandler&&this.openHandler.el.setAttribute("data-theme",e),this.datasetSwitcherWidget&&this.datasetSwitcherWidget.panel&&this.datasetSwitcherWidget.panel.setAttribute("data-theme",e)}resize(){if(this.isIframe)return;let e=this.respCSSSize;if(this.respCSSSize===0){const H=Array.from(this.header.children).filter(F=>F.offsetParent!==null);for(const F of H){const U=window.getComputedStyle(F);e+=F.offsetWidth+Number.parseFloat(U.marginLeft)+Number.parseFloat(U.marginRight)}}const n=this.header.offsetWidth,o=S("mini-design"),_=this.header.classList.contains(o);n<=e&&!_?(this.respCSSSize=e,this.header.classList.add(o)):e{e.close()}),this.headerLeft=document.createElement("div"),this.headerLeft.classList.add(S("header-left")),this.header.append(this.headerLeft),this.headerRight=document.createElement("div"),this.headerRight.classList.add(S("header-right")),this.header.append(this.headerRight),this.body=document.createElement("div"),this.body.classList.add(S("body")),this.el.append(this.body),this.recomputeBottomOffset(),this.resizeHandleBottom=document.createElement("div"),this.resizeHandleBottom.classList.add(S("resize-handle")),this.resizeHandleBottom.classList.add(S("resize-handle-bottom")),this.el.append(this.resizeHandleBottom);let n,o;const _=F=>{const U=o+(n-F.pageY);e.setHeight(U)},w=F=>{const U=o-(n-F.pageY);e.setHeight(U)},H=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",H),e.dragCapture.style.display="none"};this.resizeHandle.addEventListener("mousedown",F=>{o=e.body.offsetHeight,n=F.pageY,document.addEventListener("mousemove",_),document.addEventListener("mouseup",H),e.dragCapture.style.display="",F.preventDefault()}),this.resizeHandleBottom.addEventListener("mousedown",F=>{o=e.body.offsetHeight,n=F.pageY,document.addEventListener("mousemove",w),document.addEventListener("mouseup",H),e.dragCapture.style.display="",F.preventDefault()}),this.closebtn=document.createElement("a"),this.closebtn.classList.add(S("close-btn")),this.headerRight.append(this.closebtn),this.closebtn.addEventListener("click",()=>{e.close()}),this.fullscreenbtn=document.createElement("a"),this.fullscreenbtn.classList.add(S("fullscreen-btn")),this.fullscreenbtn.hidden=!this.options.showFullscreenBtn,this.headerRight.append(this.fullscreenbtn),this.fullscreenbtn.addEventListener("click",()=>{e.toggleFullscreen()}),this.minimizebtn=document.createElement("a"),this.minimizebtn.classList.add(S("minimize-btn")),this.minimizebtn.hidden=!this.isMinimized(),this.headerRight.append(this.minimizebtn),this.minimizebtn.addEventListener("click",()=>{e.minimize()}),this.maximizebtn=document.createElement("a"),this.maximizebtn.classList.add(S("maximize-btn")),this.maximizebtn.hidden=this.isMinimized(),this.headerRight.append(this.maximizebtn),this.maximizebtn.addEventListener("click",()=>{e.restore()}),this.restorebtn=document.createElement("a"),this.restorebtn.classList.add(S("restore-btn")),this.restorebtn.hidden=!0,this.el.append(this.restorebtn),this.restorebtn.addEventListener("click",()=>{e.restore()}),this.openbtn=document.createElement("a"),this.openbtn.classList.add(S("open-btn")),this.openbtn.hidden=!0,this.headerRight.append(this.openbtn),this.openbtn.addEventListener("click",()=>{e.openHandler.show((F,U)=>{e.addDataSet(U,F,"(opened)")})}),this.datasetsSelectSpan=document.createElement("span"),this.datasetsSelectSpan.classList.add(S("datasets-switcher")),this.datasetsSelectSpan.setAttribute("name","datasets-switcher"),this.datasetsSelect=document.createElement("select"),this.datasetsSelect.hidden=!0,this.datasetsSelectSpan.append(this.datasetsSelect),this.headerRight.append(this.datasetsSelectSpan),this.datasetsSelect.addEventListener("change",function(){e.showDataSet(this.value)}),this.controls.__settings=this.settingsControl,this.settingsControl.tab.classList.add(S("tab-settings")),this.settingsControl.tab.setAttribute("data-collector","__settings"),this.settingsControl.el.setAttribute("data-collector","__settings"),this.settingsControl.el.hidden=!0,this.maximizebtn.after(this.settingsControl.tab),this.settingsControl.tab.hidden=!1,this.settingsControl.tab.addEventListener("click",()=>{!this.isMinimized()&&this.activePanelName==="__settings"&&!this.isFullscreen()?this.minimize():(this.showTab("__settings"),this.settingsControl.get("widget").render())}),this.body.append(this.settingsControl.el)}setHeight(e){if(this.isFullscreen())return;const n=40,o=window.innerHeight-this.header.offsetHeight-10;e=Math.min(e,o),e=Math.max(e,n),this.body.style.height=`${e}px`,localStorage.setItem("phpdebugbar-height",e),this.recomputeBottomOffset()}restoreState(){if(this.isIframe)return;const e=localStorage.getItem("phpdebugbar-height");this.setHeight(Number.parseInt(e)||this.body.offsetHeight);const n=localStorage.getItem("phpdebugbar-open");if(n&&n==="0")this.close();else{const o=localStorage.getItem("phpdebugbar-visible");if(o&&o==="1"){const _=localStorage.getItem("phpdebugbar-tab");this.isTab(_)?this.showTab(_):this.showTab()}else this.minimize()}this.options.showFullscreenBtn&&sessionStorage.getItem("phpdebugbar-fullscreen")==="1"&&this.toggleFullscreen()}createTab(e,n,o){const _=new h({title:o||e.replace(/[_-]/g," ").charAt(0).toUpperCase()+e.slice(1),widget:n});return this.addTab(e,_)}addTab(e,n){if(this.isControl(e))throw new Error(`${e} already exists`);const o=this;return this.headerLeft.append(n.tab),n.tab.addEventListener("click",()=>{!o.isMinimized()&&o.activePanelName===e&&!o.isFullscreen()?o.minimize():(o.restore(),o.showTab(e))}),n.tab.setAttribute("data-empty",!0),n.tab.setAttribute("data-collector",e),n.el.setAttribute("data-collector",e),this.body.append(n.el),this.controls[e]=n,this.firstTabName===null&&(this.firstTabName=e),n}createIndicator(e,n,o,_){const w=new x({icon:n,tooltip:o});return this.addIndicator(e,w,_)}addIndicator(e,n,o){if(this.isControl(e))throw new Error(`${e} already exists`);return n.set("debugbar",this),o==="left"?this.headerLeft.prepend(n.el):this.headerRight.append(n.el),this.controls[e]=n,n}getControl(e){if(this.isControl(e))return this.controls[e]}isControl(e){return this.controls[e]!==void 0}isTab(e){return this.isControl(e)&&this.controls[e]instanceof h}isIndicator(e){return this.isControl(e)&&this.controls[e]instanceof x}reset(){this.minimize();for(const[e,n]of Object.entries(this.controls))this.isTab(e)&&n.tab.remove(),n.el.remove();this.controls={}}showTab(e){if(e||(this.activePanelName?e=this.activePanelName:e=this.firstTabName),!this.isTab(e))throw new Error(`Unknown tab '${e}'`);this.body.hidden=!1,this.recomputeBottomOffset();for(const[n,o]of Object.entries(this.controls))o instanceof h&&(n===e?o.show():o.hide());this.activePanelName=e,this.el.classList.remove(S("minimized")),localStorage.setItem("phpdebugbar-visible","1"),localStorage.setItem("phpdebugbar-tab",e),this.maximize()}minimize(){this.exitFullscreen();const e=S("active"),n=this.header.querySelectorAll(`:scope > div > .${e}`);for(const o of n)o.classList.remove(e);this.body.hidden=!0,this.minimizebtn.hidden=!0,this.maximizebtn.hidden=!1,this.recomputeBottomOffset(),localStorage.setItem("phpdebugbar-visible","0"),this.el.classList.add(S("minimized")),this.resize()}maximize(){this.header.hidden=!1,this.restorebtn.hidden=!0,this.body.hidden=!1,this.minimizebtn.hidden=!1,this.maximizebtn.hidden=!0,this.recomputeBottomOffset(),localStorage.setItem("phpdebugbar-visible","1"),localStorage.setItem("phpdebugbar-open","1"),this.el.classList.remove(S("minimized")),this.el.classList.remove(S("closed")),this.resize()}isMinimized(){return this.el.classList.contains(S("minimized"))}toggleFullscreen(){this.isFullscreen()?this.exitFullscreen():(this._preFullscreenHeight=this.body.offsetHeight,this.el.classList.add(S("fullscreen")),this.body.style.height="",sessionStorage.setItem("phpdebugbar-fullscreen","1"),this.recomputeBottomOffset())}exitFullscreen(){this.isFullscreen()&&(this.el.classList.remove(S("fullscreen")),this._preFullscreenHeight&&(this.body.style.height=`${this._preFullscreenHeight}px`),sessionStorage.removeItem("phpdebugbar-fullscreen"),this.recomputeBottomOffset())}isFullscreen(){return this.el.classList.contains(S("fullscreen"))}toggleFullscreenBtn(e){this.fullscreenbtn.hidden=!e,e||this.exitFullscreen()}close(){this.exitFullscreen(),this.header.hidden=!0,this.body.hidden=!0,this.restorebtn.hidden=!1,localStorage.setItem("phpdebugbar-open","0"),this.el.classList.add(S("closed")),this.recomputeBottomOffset()}isClosed(){return this.el.classList.contains(S("closed"))}restore(){const e=localStorage.getItem("phpdebugbar-tab");this.pendingDataSetId&&(this.dataChangeHandler(this.datasets[this.pendingDataSetId]),this.pendingDataSetId=null),this.isTab(e)?this.showTab(e):this.showTab()}recomputeBottomOffset(){if(this.options.bodyBottomInset){if(this.isClosed()){document.body.style.paddingBottom=this.bodyPaddingBottomHeight?`${this.bodyPaddingBottomHeight}px`:"",document.body.style.paddingTop=this.bodyPaddingTopHeight?`${this.bodyPaddingTopHeight}px`:"";return}if(this.options.toolbarPosition==="top"){const e=this.el.offsetHeight+(this.bodyPaddingTopHeight||0);document.body.style.paddingTop=`${e}px`,document.body.style.paddingBottom=this.bodyPaddingBottomHeight?`${this.bodyPaddingBottomHeight}px`:""}else{const e=this.el.offsetHeight+(this.bodyPaddingBottomHeight||0);document.body.style.paddingBottom=`${e}px`,document.body.style.paddingTop=this.bodyPaddingTopHeight?`${this.bodyPaddingTopHeight}px`:""}}}setDataMap(e){this.dataMap=e}addDataMap(e){Object.assign(this.dataMap,e)}setData(e){return this.datasets={},this.addDataSet(e)}addDataSet(e,n,o,_){if(!e||!e.__meta)return;if(this.isIframe&&window.top.PhpDebugBar&&window.top.PhpDebugBar.instance){window.top.PhpDebugBar.instance.addDataSet(e,n,`(iframe)${o||""}`,_);return}const w=Object.keys(this.datasets).length+1;n=n||w,e.__meta.nb=w,e.__meta.suffix=o,this.datasets[n]=e;const H=this.datesetTitleFormater.format(n,this.datasets[n],o,w);if(this.datasetSwitcherWidget)this.datasetSwitcherWidget.set("data",this.datasets);else{const F=document.createElement("option");F.value=n,F.textContent=H,this.datasetsSelect.append(F),this.datasetsSelect.hidden=!1}return(_===void 0||_)&&this.showDataSet(n),this.resize(),n}loadDataSet(e,n,o,_){if(!this.openHandler)throw new Error("loadDataSet() needs an open handler");const w=this;this.openHandler.load(e,H=>{w.addDataSet(H,e,n,_),w.resize(),o&&o(H)})}getDataSet(e){return this.datasets[e]}showDataSet(e){this.activeDatasetId=e,this.isClosed()?this.pendingDataSetId=e:(this.dataChangeHandler(this.datasets[e]),this.pendingDataSetId=null),this.datasetSwitcherWidget?this.datasetSwitcherWidget.set("activeId",e):this.datasetsSelect.value=e}dataChangeHandler(e){for(const[n,o]of Object.entries(this.dataMap)){const _=G(e,o[0],o[1]);if(n.includes(":")){const w=n.split(":");this.getControl(w[0]).set(w[1],_)}else this.getControl(n).set("data",_)}this.isMinimized()||this.showTab(),this.resize()}setOpenHandler(e){this.openHandler=e,this.openHandler.el.setAttribute("data-theme",this.el.getAttribute("data-theme")),this.openbtn.hidden=e==null}getOpenHandler(){return this.openHandler}enableAjaxHandlerTab(){this.datasetsSelectSpan&&(this.datasetsSelectSpan.hidden=!0),this.datasetSwitcherWidget=new s.Widgets.DatasetWidget({debugbar:this}),this.openbtn.after(this.datasetSwitcherWidget.el)}}s.DebugBar=d,d.Tab=h,d.Indicator=x;class y{constructor(e,n,o){this.debugbar=e,this.headerName=n||"phpdebugbar",this.autoShow=o===void 0?!0:o,this.defaultAutoShow=this.autoShow,localStorage.getItem("phpdebugbar-ajaxhandler-autoshow")!==null&&(this.autoShow=localStorage.getItem("phpdebugbar-ajaxhandler-autoshow")==="1"),e.controls.__settings&&e.controls.__settings.get("widget").set("autoshow",this.autoShow)}handle(e){const n=this.getHeader(e,`${this.headerName}-stack`);return n&&JSON.parse(n).forEach(_=>{this.debugbar.loadDataSet(_," (stacked)",null,!1)}),!!(this.loadFromId(e)||this.loadFromData(e))}getHeader(e,n){return e instanceof Response?e.headers.get(n):e instanceof XMLHttpRequest?e.getResponseHeader(n):null}setAutoShow(e){this.autoShow=e,localStorage.setItem("phpdebugbar-ajaxhandler-autoshow",e?"1":"0")}loadFromId(e){const n=this.extractIdFromHeaders(e);return n&&this.debugbar.openHandler?(this.debugbar.loadDataSet(n,"(ajax)",void 0,this.autoShow),!0):!1}extractIdFromHeaders(e){return this.getHeader(e,`${this.headerName}-id`)}loadFromData(e){const n=this.extractDataFromHeaders(e);if(!n)return!1;const o=this.parseHeaders(n);if(o.error)throw new Error(`Error loading debugbar data: ${o.error}`);return o.data&&this.debugbar.addDataSet(o.data,o.id,"(ajax)",this.autoShow),!0}extractDataFromHeaders(e){let n=this.getHeader(e,this.headerName);if(n){for(let o=1;;o++){const _=this.getHeader(e,`${this.headerName}-${o}`);if(!_)break;n+=_}return decodeURIComponent(n)}}parseHeaders(e){return JSON.parse(e)}bindToFetch(){const e=this,n=window.fetch.__debugbar_original||window.fetch,o=n.bind(window);function _(...w){var F;const H=o(...w);return(F=H==null?void 0:H.then)==null||F.call(H,U=>e.handle(U)).catch(()=>{}),H}_.__debugbar_wrapped=!0,_.__debugbar_original=n,window.fetch=_}bindToXHR(){const e=this,n=XMLHttpRequest.prototype,o=(n.open||{}).__debugbar_original||n.open;if(typeof o!="function")return;function _(w,H,F=!0,U=null,L=null){return this.__debugbar_listener_attached||(this.__debugbar_listener_attached=!0,this.addEventListener("readystatechange",()=>{this.readyState===4&&e.handle(this)})),o.call(this,w,H,F,U,L)}_.__debugbar_wrapped=!0,_.__debugbar_original=o,n.open=_}}s.AjaxHandler=y})();(function(){PhpDebugBar.Widgets={};const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-"),G=PhpDebugBar.Widgets.htmlize=function(U){return U.replace(/\n/g,"
").replace(/\s/g," ")};let S;const m=PhpDebugBar.Widgets.renderValue=function(U,L){return U&&typeof U=="object"&&"_sd"in U?(S||(S=new PhpDebugBar.Widgets.VarDumpRenderer),S.render(U)):typeof U!="string"?L?G(JSON.stringify(U,void 0,2)):JSON.stringify(U):U};PhpDebugBar.Widgets.renderValueInto=function(U,L,b){const A=m(L,b);A instanceof Node?U.append(A):U.insertAdjacentHTML("beforeend",A)};const h=PhpDebugBar.Widgets.editorLink=function(U){const L=document.createElement("span"),b=U.line?`#${U.line}`:"";if(L.classList.add(s("filename")),L.textContent=U.filename+b,U.path&&L.setAttribute("title",U.path+b),U.url){const A=document.createElement("a");A.classList.add(s("editor-link")),A.setAttribute(A.ajax?"title":"href",U.url),A.addEventListener("click",f=>{f.stopPropagation(),U.ajax&&(fetch(stmt.xdebug_link.url),f.preventDefault())}),L.append(A)}return L},x=PhpDebugBar.Widgets.highlight=function(U,L){if(typeof phpdebugbar_hljs=="undefined")return G(U);const b=phpdebugbar_hljs;return L&&b.getLanguage(L)?b.highlight(U,{language:L}).value:b.highlightAuto(U).value},l=PhpDebugBar.Widgets.createCodeBlock=function(U,L,b,A){const f=document.createElement("pre");f.classList.add(s("code-block"));const I=document.createElement("code");if(I.innerHTML=x(`${U} `,L),f.append(I),!Number.isNaN(Number.parseFloat(b))){const r=U.split(` `).length,u=document.createElement("ul");f.prepend(u);const c=Array.from(f.children);for(const E of c)E.classList.add(s("numbered-code"));for(let E=b;E100&&(r=`${r.substr(0,100)}...`);let u=null;b.textContent=r,b.addEventListener("click",()=>{if(window.getSelection().type==="Range")return"";b.classList.contains(s("pretty"))?(b.textContent=r,b.classList.remove(s("pretty"))):(u=u||l(f),b.classList.add(s("pretty")),b.innerHTML="",b.append(u))})}}PhpDebugBar.Widgets.VariableListWidget=g;class e extends y{get className(){return s("kvlist htmlvarlist")}itemRenderer(L,b,A,f){const I=document.createElement("i");I.innerHTML=A!=null?A:"";const r=document.createElement("span");r.setAttribute("title",I.textContent),r.innerHTML=A!=null?A:"",L.append(r),b.innerHTML=f&&f.value||f,f!=null&&f.xdebug_link&&b.append(h(f.xdebug_link))}}PhpDebugBar.Widgets.HtmlVariableListWidget=e;class n extends PhpDebugBar.Widget{get tagName(){return"div"}get className(){return s("tablevarlist")}render(){this.bindAttr("data",function(L){var E,k,N;if(this.el.innerHTML="",!this.has("data"))return;this.table=document.createElement("table"),this.table.classList.add(s("tablevar")),this.el.append(this.table);const b=document.createElement("tr");b.classList.add(s("header"));const A=document.createElement("td");b.append(A),this.table.append(b);let f=L.key_map||{value:"Value"};Array.isArray(f)&&(f=Object.fromEntries(f.map(i=>[i,null])));for(const[i,M]of Object.entries(f)){const P=document.createElement("td");if(P.textContent=M!=null?M:i,b.append(P),L.badges&&L.badges[i]){const R=document.createElement("span");R.textContent=L.badges[i],R.classList.add(s("badge")),P.append(R)}}const I=this;if(!L.data)return;let r=!1;for(const[i,M]of Object.entries(L.data)){const P=document.createElement("tr");P.classList.add(s("item")),I.table.append(P);const R=document.createElement("td");if(R.classList.add(s("key")),R.textContent=i,P.append(R),typeof M!="object"||M===null){const a=document.createElement("td");a.classList.add(s("value")),a.textContent=M!=null?M:"",P.append(a);continue}for(const a of Object.keys(f)){const p=document.createElement("td");p.classList.add(s("value")),p.textContent=(E=M[a])!=null?E:"",P.append(p)}if(M.xdebug_link){const a=document.createElement("td");a.classList.add(s("editor")),a.append(h(M.xdebug_link)),P.append(a),r||(r=!0,b.append(document.createElement("td")))}}if(!L.summary)return;const u=document.createElement("tr");u.classList.add(s("summary")),I.table.append(u);const c=document.createElement("td");if(c.classList.add(s("key")),u.append(c),typeof L.summary!="object"||L.summary===null){const i=document.createElement("td");i.classList.add(s("value")),i.textContent=(k=L.summary)!=null?k:"",u.append(i)}else for(const i of Object.keys(f)){const M=document.createElement("td");M.classList.add(s("value")),M.textContent=(N=L.summary[i])!=null?N:"",u.append(M)}r&&u.append(document.createElement("td"))})}}PhpDebugBar.Widgets.TableVariableListWidget=n;class o extends PhpDebugBar.Widget{get tagName(){return"iframe"}get className(){return s("iframe")}render(){this.el.setAttribute("seamless","seamless"),this.el.setAttribute("border","0"),this.el.setAttribute("width","100%"),this.el.setAttribute("height","100%"),this.bindAttr("data",function(L){this.el.setAttribute("src",L)})}}PhpDebugBar.Widgets.IFrameWidget=o;class _ extends PhpDebugBar.Widget{get className(){return s("messages")}render(){const L=this;this.list=new d({itemRenderer(A,f){let I;if(f.message_json)I=document.createElement("span"),I.classList.add(s("value")),PhpDebugBar.Widgets.renderValueInto(I,f.message_json),A.append(I);else if(f.message_html)I=document.createElement("span"),I.classList.add(s("value")),I.innerHTML=f.message_html,A.append(I);else{const r=f.message;if(I=document.createElement("span"),I.classList.add(s("value")),I.textContent=r,I.classList.add(s("truncated")),A.append(I),!f.is_string||I.scrollWidth>I.clientWidth){let u=f.message;f.is_string||(u=null),A.style.cursor="pointer",A.addEventListener("click",()=>{if(window.getSelection().type==="Range")return"";I.classList.contains(s("pretty"))?(I.textContent=r,I.classList.remove(s("pretty")),I.classList.add(s("truncated"))):(u=u||l(f.message),I.classList.add(s("pretty")),I.classList.remove(s("truncated")),I.innerHTML="",I.append(u))})}}if(f.collector){const r=document.createElement("span");r.classList.add(s("collector")),r.textContent=f.collector,A.prepend(r)}if(f.label){I.classList.add(s(f.label));const r=document.createElement("span");r.classList.add(s("label")),r.textContent=f.label,A.prepend(r)}if(f.context&&Object.keys(f.context).length>0){const r=document.createElement("span");r.setAttribute("title","Context"),r.classList.add(s("context-count")),r.textContent=Object.keys(f.context).length,A.prepend(r);const u=document.createElement("table");u.classList.add(s("params")),u.hidden=!0,u.innerHTML='Context';const c=f.context_json||{};for(const E in f.context)if(typeof f.context[E]!="function"){const k=document.createElement("tr"),N=document.createElement("td");N.classList.add(s("name")),N.textContent=E,k.append(N);const i=document.createElement("td");i.classList.add(s("value")),c[E]?PhpDebugBar.Widgets.renderValueInto(i,c[E]):i.innerHTML=f.context[E],k.append(i),u.append(k)}A.append(u),A.style.cursor="pointer",A.addEventListener("click",E=>{window.getSelection().type==="Range"||E.target.closest(".sf-dump")||(u.hidden=!u.hidden)})}f.xdebug_link&&A.prepend(h(f.xdebug_link))}}),this.el.append(this.list.el),this.toolbar=document.createElement("div"),this.toolbar.classList.add(s("toolbar")),this.toolbar.innerHTML='',this.el.append(this.toolbar);const b=document.createElement("input");b.type="text",b.name="search",b.setAttribute("aria-label","Search"),b.placeholder="Search",b.addEventListener("change",function(){L.set("search",this.value)}),this.toolbar.append(b),this.bindAttr("data",function(A){this.set({excludelabel:[],excludecollector:[],search:""});const f=this.toolbar.querySelectorAll(`.${s("filter")}`);for(const k of f)k.remove();const I=[],r=[],u=this,c=function(k,N){const i=document.createElement("a");i.classList.add(s("filter")),i.classList.add(s(k)),i.textContent=N,i.setAttribute("rel",N),i.addEventListener("click",function(){u.onFilterClick(this,k)}),u.toolbar.append(i)};if(A.forEach(k=>{I.includes(k.label||"none")||I.push(k.label||"none"),r.includes(k.collector||"none")||r.push(k.collector||"none")}),I.length>1&&I.forEach(k=>c("label",k)),r.length===1)return;const E=document.createElement("a");E.classList.add(s("filter")),E.style.visibility="hidden",u.toolbar.append(E),r.forEach(k=>c("collector",k))}),this.bindAttr(["excludelabel","excludecollector","search"],function(){const A=this.get("excludelabel")||[],f=this.get("excludecollector")||[],I=this.get("search");let r=!1;const u=[];I&&I===I.toLowerCase()&&(r=!0),this.get("data").forEach(c=>{const E=r?c.message.toLowerCase():c.message;!A.includes(c.label||void 0)&&!f.includes(c.collector||void 0)&&(!I||E.includes(I))&&u.push(c)}),this.list.set("data",u)})}onFilterClick(L,b){L.classList.toggle(s("excluded"));const A=[],f=`.${s("filter")}.${s("excluded")}.${s(b)}`,I=this.toolbar.querySelectorAll(f);for(const r of I)A.push(r.rel==="none"||!r.rel?void 0:r.rel);this.set(`exclude${b}`,A)}}PhpDebugBar.Widgets.MessagesWidget=_;class w extends PhpDebugBar.Widget{get tagName(){return"ul"}get className(){return s("timeline")}render(){this.bindAttr("data",function(L){const b=function(f){return f<.001?`${(f*1e6).toFixed()}\u03BCs`:f<.1?`${(f*1e3).toFixed(2)}ms`:f<1?`${(f*1e3).toFixed()}ms`:`${f.toFixed(2)}s`},A=function(I){if(I===0||I===null)return"0B";const r=I<0?"-":"",u=Math.abs(I),c=Math.log(u)/Math.log(1024),E=["B","KB","MB","GB","TB"];return r+Math.round(Bt(1024,c-Math.floor(c))*100)/100+E[Math.floor(c)]};if(this.el.innerHTML="",L.measures){let f={};for(let u=0;u1?k.length+"x ":"")+c.label.replace(/\s+/g," ")+(c.duration?` (${c.duration_str}${c.memory?`/${c.memory_str}`:""})`:""),N.append(M),c.collector){const P=document.createElement("span");P.classList.add(s("collector")),P.textContent=c.collector,N.append(P)}if(i.append(N),this.el.append(i),c.params&&Object.keys(c.params).length>0){const P=document.createElement("table");P.classList.add(s("params")),P.hidden=!0,P.innerHTML='Params';for(const R in c.params)if(typeof c.params[R]!="function"){const a=document.createElement("tr"),p=document.createElement("td");p.className=s("name"),p.textContent=R,a.append(p);const C=document.createElement("td");C.className=s("value"),PhpDebugBar.Widgets.renderValueInto(C,c.params[R]),a.append(C),P.append(a)}i.append(P),i.style.cursor="pointer",i.addEventListener("click",function(R){if(window.getSelection().type==="Range"||R.target.closest(".sf-dump"))return"";const a=this.querySelector("table");a.hidden=!a.hidden})}}f=Object.entries(f).map(([u,c])=>({label:u,data:c})).sort((u,c)=>c.data.duration-u.data.duration);const I=document.createElement("table");I.classList.add(s("params"));for(const u of f){const c=Math.min((u.data.duration*100/L.duration).toFixed(2),100),E=document.createElement("i");E.textContent=u.label.replace(/\s+/g," ");const k=E.innerHTML,N=document.createElement("tr");N.innerHTML=`${u.data.count} x ${k} (${c}%)
${b(u.data.duration)}${u.data.memory?`/${A(u.data.memory)}`:""}
`,I.append(N);const i=N.querySelector(`span.${s("value")}`);i.style.width=`${c}%`}const r=document.createElement("li");r.append(I),this.el.append(r)}})}}PhpDebugBar.Widgets.TimelineWidget=w;class H extends PhpDebugBar.Widget{get className(){return s("exceptions")}render(){this.list=new d({itemRenderer(L,b){const A=document.createElement("span");if(A.classList.add(s("message")),A.textContent=b.message,b.count>1){const f=document.createElement("span");f.classList.add(s("badge")),f.textContent=`${b.count}x`,A.prepend(f)}if(L.append(A),b.file&&L.append(h(b.xdebug_link||{filename:b.file,line:b.line})),b.type){const f=document.createElement("span");f.classList.add(s("type")),f.textContent=b.type,L.append(f)}if(b.surrounding_lines){const f=b.line-3<=0?1:b.line-3,I=l(b.surrounding_lines.join(""),"php",f,b.line);I.classList.add(s("file")),I.hidden=!0,L.append(I),L.addEventListener("click",r=>{window.getSelection().type==="Range"||r.target.closest(".sf-dump")||(I.hidden=!I.hidden)})}if(b.stack_trace_json||b.stack_trace_html){const f=document.createElement("span");if(f.classList.add(s("filename")),b.stack_trace_json){const r=b.stack_trace_json,u=r._sd;r._sd=0,PhpDebugBar.Widgets.renderValueInto(f,r),r._sd=u}else f.innerHTML=b.stack_trace_html;const I=f.querySelectorAll('samp[data-depth="1"]');for(const r of I){r.classList.replace("sf-dump-expanded","sf-dump-compact");const u=r.previousElementSibling;u&&u.lastElementChild&&(u.lastElementChild.textContent="\u25B6");const c=r.parentElement.querySelector(":scope > .sf-dump-note");c&&(c.innerHTML=`${c.innerHTML.replace(/^array:/,'Stack Trace: ')} lines`)}L.append(f)}else b.stack_trace&&b.stack_trace.split(` `).forEach(f=>{const I=document.createElement("div"),r=document.createElement("span");r.classList.add(s("filename")),r.textContent=f,I.append(r),L.append(I)})}}),this.el.append(this.list.el),this.bindAttr("data",function(L){if(this.list.set("data",L),L.length===1){const b=this.list.el.children[0];if(b){const A=b.querySelector(`.${s("file")}`);A&&(A.hidden=!1)}}})}}PhpDebugBar.Widgets.ExceptionsWidget=H;class F extends PhpDebugBar.Widget{get className(){return s("datasets-switcher-widget")}initialize(L){this.set(L);const b=this,A=this.get("debugbar");this.badge=document.createElement("div"),this.badge.classList.add(s("datasets-badge")),this.badge.hidden=!0,this.badgeCount=document.createElement("span"),this.badgeCount.classList.add(s("datasets-badge-count")),this.badge.append(this.badgeCount),this.badgeUrl=document.createElement("span"),this.badgeUrl.classList.add(s("datasets-badge-url")),this.badge.append(this.badgeUrl),this.panel=document.createElement("div"),this.panel.classList.add(s("datasets-panel")),this.panel.hidden=!0,A.el&&this.panel.setAttribute("data-theme",A.el.getAttribute("data-theme"));const f=document.createElement("div");f.classList.add(s("datasets-panel-toolbar"));const I=document.createElement("label");I.classList.add(s("datasets-autoshow")),this.autoshowCheckbox=document.createElement("input"),this.autoshowCheckbox.type="checkbox";const r=localStorage.getItem("phpdebugbar-ajaxhandler-autoshow");this.autoshowCheckbox.checked=r!==null?r==="1":A.ajaxHandler?A.ajaxHandler.autoShow:!0,this.autoshowCheckbox.addEventListener("change",function(){A.ajaxHandler&&A.ajaxHandler.setAutoShow(this.checked),A.controls.__settings&&A.controls.__settings.get("widget").set("autoshow",this.checked),A.controls.__datasets&&A.controls.__datasets.get("widget").set("autoshow",this.checked)}),I.append(this.autoshowCheckbox),I.append(document.createTextNode(" Autoshow")),f.append(I),this.refreshBtn=document.createElement("a"),this.refreshBtn.tabIndex=0,this.refreshBtn.classList.add(s("datasets-refresh-btn")),this.refreshBtn.innerHTML='',this.refreshBtn.title="Auto-scan for new datasets",this.isScanning=!1,this.refreshBtn.addEventListener("click",E=>{E.stopPropagation(),this.isScanning?(this.isScanning=!1,this.refreshBtn.classList.remove(s("active")),this.refreshBtn.title="Auto-scan for new datasets"):(this.isScanning=!0,this.refreshBtn.classList.add(s("active")),this.refreshBtn.title="Stop auto-scanning",this.scanForNewDatasets())}),f.append(this.refreshBtn);const u=document.createElement("a");u.tabIndex=0,u.classList.add(s("datasets-clear-btn")),u.textContent="Clear",u.addEventListener("click",()=>{const E=A.activeDatasetId,k=A.datasets[E];A.datasets={},k&&A.addDataSet(k,E,k.__meta.suffix,!0),this.panel.hidden=!0}),f.append(u),this.searchInput=document.createElement("input"),this.searchInput.type="search",this.searchInput.placeholder="Search",this.searchInput.classList.add(s("datasets-search")),this.searchInput.addEventListener("input",()=>{b.applySearchFilter()}),f.append(this.searchInput),this.panel.append(f),this.list=document.createElement("div"),this.list.classList.add(s("datasets-list")),this.panel.append(this.list),this.el.append(this.badge),document.body.append(this.panel);const c=()=>{const E=this.badge.getBoundingClientRect(),k=E.top,N=window.innerHeight-E.bottom,i=N>k;this.panel.style.position="fixed",this.panel.style.right=`${window.innerWidth-E.right}px`,this.panel.style.left="auto",i?(this.panel.style.top=`${E.bottom}px`,this.panel.style.bottom="auto",this.panel.style.maxHeight=`${N}px`):(this.panel.style.bottom=`${window.innerHeight-E.top}px`,this.panel.style.top="auto",this.panel.style.maxHeight=`${k}px`),this.refreshBtn.hidden=!A.openHandler};this.badge.addEventListener("click",E=>{E.target!==this.panel&&!this.panel.contains(E.target)&&(this.panel.hidden&&c(),this.panel.hidden=!this.panel.hidden)}),document.addEventListener("click",E=>{!this.badge.contains(E.target)&&!this.panel.contains(E.target)&&(this.panel.hidden=!0)})}render(){this.bindAttr("data",function(){this.updateBadge()}),this.bindAttr("activeId",function(){this.updateBadge()}),this.bindAttr("autoshow",function(){this.autoshowCheckbox&&(this.autoshowCheckbox.checked=this.get("autoshow"))})}updateBadge(){const L=this.get("debugbar"),b=this.get("data")||L.datasets,A=this.get("activeId")||L.activeDatasetId;if(!b){this.badge.hidden=!0;return}const f=Object.keys(b).length;if(f>=1){this.badge.hidden=!1;const I=b[A];if(I&&I.__meta){const u=I.__meta.uri||"",c=I.__meta.method||"GET";this.badgeUrl.textContent=`${c} ${u}`}f>1?(this.badgeCount.textContent=f,this.badgeCount.hidden=!1):this.badgeCount.hidden=!0,this.list.innerHTML="";const r=Object.keys(b).sort((u,c)=>{var N,i;const E=((N=b[u].__meta)==null?void 0:N.utime)||0;return(((i=b[c].__meta)==null?void 0:i.utime)||0)-E});for(const u of r){const c=b[u],E=document.createElement("div");E.classList.add(s("datasets-list-item"));const k=c.__meta.uri||"",N=c.__meta.method||"GET";E.setAttribute("data-url",k),E.setAttribute("data-method",N),u===A&&E.classList.add(s("active"));const i=document.createElement("span");i.classList.add(s("datasets-item-nb")),i.textContent=`#${c.__meta.nb}`,E.append(i);const M=document.createElement("span");M.classList.add(s("datasets-item-time")),M.textContent=c.__meta.datetime?c.__meta.datetime.split(" ")[1]:"",E.append(M);const P=document.createElement("div");P.classList.add(s("datasets-item-request"));const R=document.createElement("span");R.classList.add(s("datasets-item-method")),R.textContent=N,P.append(R);const a=document.createElement("span");if(a.classList.add(s("datasets-item-url")),a.textContent=k,P.append(a),c.__meta.suffix){const K=document.createElement("span");K.classList.add(s("datasets-item-suffix")),K.textContent=` ${c.__meta.suffix}`,P.append(K)}E.append(P);const p=document.createElement("div");p.classList.add(s("datasets-item-badges"));for(const[K,T]of Object.entries(L.dataMap)){const B=v(c,T[0],T[1]);if(K.includes(":")){const Q=K.split(":"),ee=Q[0];if(Q[1]==="badge"&&B>0){const ie=L.getControl(ee);if(ie){const se=document.createElement("span");if(se.classList.add(s("datasets-item-badge")),se.setAttribute("title",ie.get("title")),se.dataset.tab=ee,ie.icon){const ce=ie.icon.cloneNode(!0);ce.style.width="12px",ce.style.height="12px",se.append(ce)}const le=document.createElement("span");le.textContent=B,se.append(le),p.append(se),se.addEventListener("click",ce=>{ce.stopPropagation(),L.showDataSet(u),L.showTab(ee),this.panel.hidden=!0})}}}}E.append(p);const C=document.createElement("a");C.classList.add(s("datasets-item-copy-id")),C.title=`Copy Request ID: ${u}`,C.innerHTML='',C.addEventListener("click",K=>{K.stopPropagation();const T=document.createElement("textarea");T.value=u,T.style.position="fixed",T.style.opacity="0",document.body.append(T),T.select(),document.execCommand("copy"),T.remove();const B=C.querySelector("i");B.className="phpdebugbar-icon phpdebugbar-icon-circle-check",C.classList.add(s("copied")),setTimeout(()=>{B.className="phpdebugbar-icon phpdebugbar-icon-copy",C.classList.remove(s("copied"))},2e3)}),E.append(C),E.addEventListener("click",()=>{L.showDataSet(u),this.panel.hidden=!0}),this.list.append(E)}this.applySearchFilter()}else this.badge.hidden=!0}applySearchFilter(){const L=this.searchInput.value.toLowerCase().trim(),b=this.list.querySelectorAll(`.${s("datasets-list-item")}`);for(const A of b)if(L==="")A.hidden=!1;else{const f=A.getAttribute("data-url").toLowerCase(),r=`${A.getAttribute("data-method").toLowerCase()} ${f}`,c=L.split(/\s+/).filter(E=>E.length>0).every(E=>r.includes(E));A.hidden=!c}}scanForNewDatasets(){const L=this.get("debugbar");if(!this.isScanning||!L.openHandler)return;const b=L.datasets,A=Object.values(b).reduce((I,r)=>{var u;return Math.max(I,((u=r.__meta)==null?void 0:u.utime)||0)},0),f=()=>{this.isScanning&&setTimeout(()=>this.scanForNewDatasets(),1e3)};L.openHandler.find({utime:A},0,(I,r)=>{if(r){console.error("scanForNewDatasets: find() failed",r),this.isScanning=!1,this.refreshBtn.classList.remove(s("active")),this.refreshBtn.title="Error scanning";return}try{const u=I.filter(E=>E.utime>A&&!b[E.id]);u.reverse();const c=(E=0)=>{if(E>=u.length){f();return}const{id:k}=u[E],N=E===u.length-1;L.loadDataSet(k,"(scan)",()=>c(E+1),this.autoshowCheckbox.checked&&N)};u.length?c():f()}catch(u){console.error("scanForNewDatasets: unexpected error",u),this.refreshBtn.classList.remove(s("active")),this.refreshBtn.title="Error scanning",this.isScanning=!1}})}}PhpDebugBar.Widgets.DatasetWidget=F})();(function(){const s=function(G){return PhpDebugBar.utils.csscls(G,"phpdebugbar-openhandler-")};PhpDebugBar.OpenHandler=PhpDebugBar.Widget.extend({className:"phpdebugbar-openhandler",defaults:{items_per_page:20},render(){const G=this;document.body.append(this.el),this.el.style.display="none",this.closebtn=document.createElement("a"),this.closebtn.classList.add(s("closebtn")),this.closebtn.innerHTML='',this.brand=document.createElement("span"),this.brand.classList.add(s("brand")),this.brand.innerHTML='',this.table=document.createElement("tbody");const S=document.createElement("div");S.classList.add(s("header")),S.textContent="PHP DebugBar | Open",S.prepend(this.brand),S.append(this.closebtn),this.el.append(S);const m=document.createElement("table");m.innerHTML='IDDateMethodURLIPFilter data',m.append(this.table),this.el.append(m),this.actions=document.createElement("div"),this.actions.classList.add(s("actions")),this.el.append(this.actions),this.closebtn.addEventListener("click",()=>{G.hide()}),this.loadmorebtn=document.createElement("a"),this.loadmorebtn.textContent="Load more",this.actions.append(this.loadmorebtn),this.loadmorebtn.addEventListener("click",()=>{G.find(G.last_find_request,G.last_find_request.offset+G.get("items_per_page"),G.handleFind.bind(G))}),this.showonlycurrentbtn=document.createElement("a"),this.showonlycurrentbtn.textContent="Show only current URL",this.actions.append(this.showonlycurrentbtn),this.showonlycurrentbtn.addEventListener("click",()=>{G.uriInput.value=window.location.pathname,G.searchBtn.click()}),this.refreshbtn=document.createElement("a"),this.refreshbtn.textContent="Refresh",this.actions.append(this.refreshbtn),this.refreshbtn.addEventListener("click",()=>{G.refresh()}),this.clearbtn=document.createElement("a"),this.clearbtn.textContent="Clear storage",this.actions.append(this.clearbtn),this.clearbtn.addEventListener("click",()=>{G.clear(()=>{G.hide()})}),this.addSearch(),this.overlay=document.createElement("div"),this.overlay.classList.add(s("overlay")),this.overlay.style.display="none",document.body.append(this.overlay),this.overlay.addEventListener("click",()=>{G.hide()})},refresh(){this.table.innerHTML="",this.loadmorebtn.style.display="",this.find({},0,this.handleFind.bind(this))},addSearch(){const G=this,S=this.searchBtn=document.createElement("button");S.textContent="Search",S.type="submit",S.addEventListener("click",function(x){G.table.innerHTML="";const l={},v=new FormData(this.parentElement);for(const[d,y]of v.entries())y&&(l[d]=y);G.find(l,0,G.handleFind.bind(G)),x.preventDefault()});const m=document.createElement("form");m.innerHTML='
Filter results
',this.uriInput=document.createElement("input"),this.uriInput.type="text",this.uriInput.name="uri",this.uriInput.placeholder="URI, eg '/user/*'",m.append(this.uriInput),this.ipInput=document.createElement("input"),this.ipInput.type="text",this.ipInput.name="ip",this.ipInput.placeholder="IP",m.append(this.ipInput);const h=document.createElement("button");h.textContent="Reset",h.type="button",h.addEventListener("click",()=>{m.reset(),S.click()}),m.append(S),m.append(h),this.actions.append(m)},handleFind(G){const S=this;for(const m of G){const h=document.createElement("a");h.textContent="Load dataset",h.addEventListener("click",U=>{S.hide(),S.load(m.id,L=>{S.callback(m.id,L)}),U.preventDefault()});const x=document.createElement("a");x.textContent=m.method,x.addEventListener("click",U=>{S.table.innerHTML="",S.find({method:m.method},0,S.handleFind.bind(S)),U.preventDefault()});const l=document.createElement("a");l.textContent=m.uri,l.addEventListener("click",U=>{S.hide(),S.load(m.id,L=>{S.callback(m.id,L)}),U.preventDefault()});const v=document.createElement("a");v.textContent=m.ip,v.addEventListener("click",U=>{S.ipInput.value=m.ip,S.searchBtn.click(),U.preventDefault()});const d=document.createElement("a");d.textContent="Show URL",d.addEventListener("click",U=>{S.uriInput.value=m.uri,S.searchBtn.click(),U.preventDefault()});const y=document.createElement("tr"),g=document.createElement("td");g.classList.add(s("id-cell"));const e=document.createElement("span");e.classList.add(s("id-text")),e.textContent=m.id,e.title=m.id,g.append(e);const n=document.createElement("a");n.classList.add(s("copy-id")),n.title="Copy Request ID",n.innerHTML='',n.addEventListener("click",U=>{U.stopPropagation(),U.preventDefault();const L=document.createElement("textarea");L.value=m.id,L.style.position="fixed",L.style.opacity="0",document.body.append(L),L.select(),document.execCommand("copy"),L.remove();const b=n.querySelector("i");b.className="phpdebugbar-icon phpdebugbar-icon-circle-check",n.classList.add(s("copied")),setTimeout(()=>{b.className="phpdebugbar-icon phpdebugbar-icon-copy",n.classList.remove(s("copied"))},2e3)}),g.append(n),y.append(g);const o=document.createElement("td");o.textContent=m.datetime,y.append(o);const _=document.createElement("td");_.textContent=m.method,y.append(_);const w=document.createElement("td");w.append(l),y.append(w);const H=document.createElement("td");H.append(v),y.append(H);const F=document.createElement("td");F.append(d),y.append(F),S.table.append(y)}G.lengthh.json()).then(S).catch(h=>{S(null,h)})}})})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("mails")}render(){this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer(m,h){const x=document.createElement("span");x.classList.add(s("subject")),x.textContent=h.subject,m.append(x);const l=document.createElement("span");if(l.classList.add(s("to")),l.textContent=h.to,m.append(l),h.body||h.html){const v=document.createElement("span");v.classList.add(s("filename")),v.textContent="";const d=document.createElement("a");d.setAttribute("title","Mail Preview"),d.textContent="View Mail",d.classList.add(s("editor-link")),d.addEventListener("click",()=>{const g=window.open("about:blank","Mail Preview","width=650,height=440,scrollbars=yes").document;let e="";if(h.headers){const w=document.createElement("pre");w.style.border="1px solid #ddd",w.style.padding="5px";const H=document.createElement("code");H.textContent=h.headers,w.append(H),e=w.outerHTML}const n=document.createElement("pre");n.style.border="1px solid #ddd",n.style.padding="5px",n.textContent=h.body;let o=n.outerHTML,_="";if(h.html){const w=document.createElement("details"),H=document.createElement("summary");H.textContent="Text version",w.append(H),w.append(n),o=w.outerHTML;const F=document.createElement("iframe");F.setAttribute("width","100%"),F.setAttribute("height","400px"),F.setAttribute("sandbox",""),F.setAttribute("referrerpolicy","no-referrer"),F.setAttribute("srcdoc",h.html),_=F.outerHTML}g.open(),g.write(e+o+_),g.close()}),v.append(d),m.append(v)}if(h.headers){const v=document.createElement("pre");v.classList.add(s("headers"));const d=document.createElement("code");d.textContent=h.headers,v.append(d),v.hidden=!0,m.append(v),m.addEventListener("click",()=>{v.hidden=!v.hidden})}}}),this.el.append(this.list.el),this.bindAttr("data",function(m){this.list.set("data",m)})}}PhpDebugBar.Widgets.MailsWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("sqlqueries")}onFilterClick(m){m.classList.toggle(s("excluded"));const h=m.getAttribute("rel"),x=this.list.el.querySelectorAll(`li[connection="${h}"]`);for(const l of x)l.hidden=!l.hidden}onCopyToClipboard(m){const h=m.parentElement.querySelector("code"),x=function(){try{document.execCommand("copy")&&(m.classList.add(s("copy-clipboard-check")),setTimeout(()=>{m.classList.remove(s("copy-clipboard-check"))},2e3))}catch(v){console.log("Oops, unable to copy")}};(function(v){if(document.selection){const d=document.body.createTextRange();d.moveToElementText(v),d.select()}else if(window.getSelection){const d=document.createRange();d.selectNodeContents(v),window.getSelection().removeAllRanges(),window.getSelection().addRange(d)}x(),window.getSelection().removeAllRanges()})(h)}renderList(m,h,x){const l=document.createElement("thead"),v=document.createElement("tr"),d=document.createElement("th");d.colSpan=2,d.classList.add(s("name")),d.innerHTML=h,v.append(d),l.append(v),m.append(l);const y=document.createElement("tbody");for(const g in x){const e=typeof x[g]=="function"?`${x[g].name} {}`:x[g],n=document.createElement("tr");if(typeof e=="object"&&e!==null){const o=document.createElement("td");o.classList.add("phpdebugbar-text-muted"),o.textContent=e.index||g,n.append(o);const _=document.createElement("td");if(e.namespace&&_.append(`${e.namespace}::`),_.append(e.name||e.file),e.line){const w=document.createElement("span");w.classList.add("phpdebugbar-text-muted"),w.textContent=`:${e.line}`,_.append(w)}}else{const o=document.createElement("td");o.classList.add("phpdebugbar-text-muted"),o.textContent=g,n.append(o);const _=document.createElement("td");_.classList.add("phpdebugbar-text-muted"),_.textContent=e,n.append(_)}y.append(n)}m.append(y)}itemRenderer(m,h){if(h.type=h.type||"query",h.slow&&m.classList.add(s("sql-slow")),h.width_percent){const l=document.createElement("div");l.classList.add(s("bg-measure"));const v=document.createElement("div");v.classList.add(s("value")),v.style.left=`${h.start_percent}%`,v.style.width=`${Math.max(h.width_percent,.01)}%`,l.append(v),m.append(l)}if(h.duration_str){const l=document.createElement("span");l.setAttribute("title","Duration"),l.classList.add(s("duration")),l.textContent=h.duration_str,m.append(l)}if(h.memory_str){const l=document.createElement("span");l.setAttribute("title","Memory usage"),l.classList.add(s("memory")),l.textContent=h.memory_str,m.append(l)}if(typeof h.row_count!="undefined"){const l=document.createElement("span");l.setAttribute("title","Row count"),l.classList.add(s("row-count")),l.textContent=h.row_count,m.append(l)}if(typeof h.stmt_id!="undefined"&&h.stmt_id){const l=document.createElement("span");l.setAttribute("title","Prepared statement ID"),l.classList.add(s("stmt-id")),l.textContent=h.stmt_id,m.append(l)}if(h.connection){const l=document.createElement("span");if(l.setAttribute("title","Connection"),l.classList.add(s("database")),l.textContent=h.connection,m.append(l),m.setAttribute("connection",h.connection),!this.filters.includes(h.connection)){this.filters.push(h.connection);const v=document.createElement("a");v.classList.add(s("filter")),v.textContent=h.connection,v.setAttribute("rel",h.connection),v.addEventListener("click",()=>{this.onFilterClick(v)}),this.toolbar.append(v),this.filters.length>1&&(this.toolbar.hidden=!1)}}if(h.type==="query"){const l=document.createElement("span");l.setAttribute("title","Copy to clipboard"),l.classList.add(s("copy-clipboard")),l.style.cursor="pointer",l.innerHTML="​",l.addEventListener("click",v=>{this.onCopyToClipboard(l),v.stopPropagation()}),m.append(l)}if(h.xdebug_link?m.prepend(PhpDebugBar.Widgets.editorLink(h.xdebug_link)):typeof h.filename!="undefined"&&h.filename&&m.prepend(PhpDebugBar.Widgets.editorLink(h)),h.type!=="query"){const l=document.createElement("strong");l.classList.add(s("sql"),s(h.type)),l.textContent=h.sql,m.append(l)}else{const l=document.createElement("code");l.classList.add(s("sql")),l.innerHTML=PhpDebugBar.Widgets.highlight(h.sql,"sql"),m.append(l)}if(typeof h.is_success!="undefined"&&!h.is_success){m.classList.add(s("error"));const l=document.createElement("span");l.classList.add(s("error")),l.textContent=`[${h.error_code}] ${h.error_message}`,m.append(l)}if(h.type!=="query")return;const x=document.createElement("table");if(x.classList.add(s("params")),x.hidden=!0,h.params&&Object.keys(h.params).length>0&&this.renderList(x,"Params",h.params),h.backtrace&&Object.keys(h.backtrace).length>0){const l=[];for(const v of h.backtrace.values()){let d=v.name||v.file;v.line&&(d=`${d}:${v.line}`),l.push(d)}this.renderList(x,"Backtrace",l)}x.querySelectorAll("tr").length||(x.style.display="none"),m.append(x),m.style.cursor="pointer",m.addEventListener("click",l=>{if(window.getSelection().type==="Range"||l.target.closest(".sf-dump"))return"";x.hidden=!x.hidden;const v=m.querySelector("code");if(v&&typeof phpdebugbar_sqlformatter!="undefined"){let d=h.sql;x.hidden||(d=phpdebugbar_sqlformatter.format(h.sql)),v.innerHTML=PhpDebugBar.Widgets.highlight(d,"sql")}})}render(){this.status=document.createElement("div"),this.status.classList.add(s("status")),this.el.append(this.status),this.toolbar=document.createElement("div"),this.toolbar.classList.add(s("toolbar")),this.el.append(this.toolbar),this.filters=[];let m="none",h=null;this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer:(x,l)=>this.itemRenderer(x,l)}),this.el.append(this.list.el),this.bindAttr("data",function(x){if(x.length<=0||!x.statements)return!1;this.filters=[],this.toolbar.hidden=!0;const l=this.toolbar.querySelectorAll(`.${s("filter")}`);for(const g of l)g.remove();this.list.set("data",x.statements),this.status.innerHTML="";const v={};let d=0;for(let g=0;g0&&(e+=JSON.stringify(x.statements[g].params)),x.statements[g].connection&&(e+=`@${x.statements[g].connection}`),v[e]=v[e]||{keys:[]},v[e].keys.push(g)}for(const g in v)if(v[g].keys.length>1){d+=v[g].keys.length;for(let e=0;e{e.classList.toggle("shown-duplicated"),e.textContent=e.classList.contains("shown-duplicated")?"Show All":g;const n=`.${this.className} .${s("list-item")}:not(.${s("sql-duplicate")})`,o=document.querySelectorAll(n);for(const _ of o)_.hidden=!_.hidden}),y.append(e)}if(x.accumulated_duration_str){const g=document.createElement("span");g.setAttribute("title","Accumulated duration"),g.classList.add(s("duration")),g.textContent=x.accumulated_duration_str;const e=document.createElement("span");e.classList.add(s("sort-icon")),e.style.cursor="pointer",e.style.marginLeft="5px",e.textContent="Sort \u21C5",e.setAttribute("title","Sort by duration"),e.addEventListener("click",()=>{m==="none"?(m="desc",e.textContent="\u2193",h=[...x.statements],x.statements.sort((n,o)=>(o.duration||0)-(n.duration||0))):m==="desc"?(m="asc",e.textContent="\u2191",x.statements.sort((n,o)=>(n.duration||0)-(o.duration||0))):(m="none",e.textContent="\u21C5",h&&(x.statements=h,h=null)),this.list.set("data",x.statements)}),g.append(e),this.status.append(g)}if(x.memory_usage_str){const g=document.createElement("span");g.setAttribute("title","Memory usage"),g.classList.add(s("memory")),g.textContent=x.memory_usage_str,this.status.append(g)}})}}PhpDebugBar.Widgets.SQLQueriesWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("templates")}render(){this.status=document.createElement("div"),this.status.classList.add(s("status")),this.el.append(this.status),this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer(m,h){const x=document.createElement("span");if(x.classList.add(s("name")),h.html?x.innerHTML=h.html:x.textContent=h.name,m.append(x),h.xdebug_link&&m.append(PhpDebugBar.Widgets.editorLink(h.xdebug_link)),h.render_time_str){const l=document.createElement("span");l.setAttribute("title","Render time"),l.classList.add(s("render-time")),l.textContent=h.render_time_str,m.append(l)}if(h.memory_str){const l=document.createElement("span");l.setAttribute("title","Memory usage"),l.classList.add(s("memory")),l.textContent=h.memory_str,m.append(l)}if(typeof h.param_count!="undefined"){const l=document.createElement("span");l.setAttribute("title","Parameter count"),l.classList.add(s("param-count")),l.textContent=h.param_count,m.append(l)}if(typeof h.type!="undefined"&&h.type){const l=document.createElement("span");l.setAttribute("title","Type"),l.classList.add(s("type")),l.textContent=h.type,m.append(l)}if(typeof h.editorLink!="undefined"&&h.editorLink){const l=document.createElement("a");l.setAttribute("href",h.editorLink),l.classList.add(s("editor-link")),l.textContent="file",l.addEventListener("click",v=>{v.stopPropagation()}),m.append(l)}if(h.params&&Object.keys(h.params).length>0){const l=document.createElement("table");l.classList.add(s("params"));const v=document.createElement("thead");v.innerHTML='Params';const d=document.createElement("tbody");l.append(v,d);for(const y in h.params)if(typeof h.params[y]!="function"){const g=document.createElement("tr"),e=document.createElement("td");e.className=s("name"),e.textContent=y,g.append(e);const n=document.createElement("td");n.className=s("value"),PhpDebugBar.Widgets.renderValueInto(n,h.params[y]),g.append(n),d.append(g)}l.hidden=!0,m.append(l),m.style.cursor="pointer",m.addEventListener("click",y=>{window.getSelection().type==="Range"||y.target.closest(".sf-dump")||(l.hidden=!l.hidden)})}}}),this.el.append(this.list.el),this.callgraph=document.createElement("div"),this.callgraph.classList.add(s("callgraph")),this.el.append(this.callgraph),this.bindAttr("data",function(m){this.list.set("data",m.templates),this.status.innerHTML="",this.callgraph.innerHTML="";const h=m.sentence||"templates were rendered",x=document.createElement("span");if(x.textContent=`${m.nb_templates} ${h}`,this.status.append(x),m.accumulated_render_time_str){const l=document.createElement("span");l.setAttribute("title","Accumulated render time"),l.classList.add(s("render-time")),l.textContent=m.accumulated_render_time_str,this.status.append(l)}if(m.memory_usage_str){const l=document.createElement("span");l.setAttribute("title","Memory usage"),l.classList.add(s("memory")),l.textContent=m.memory_usage_str,this.status.append(l)}if(m.nb_blocks>0){const l=document.createElement("div");l.textContent=`${m.nb_blocks} blocks were rendered`,this.status.append(l)}if(m.nb_macros>0){const l=document.createElement("div");l.textContent=`${m.nb_macros} macros were rendered`,this.status.append(l)}typeof m.callgraph!="undefined"&&(this.callgraph.innerHTML=m.callgraph)})}}PhpDebugBar.Widgets.TemplatesWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("httpclient")}render(){this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer(m,h){const x=document.createElement("div");x.classList.add(s("request-summary")),x.style.display="flex",x.style.gap="10px",x.style.alignItems="center";const l=document.createElement("span");l.classList.add(s("method")),l.textContent=h.method,l.style.fontWeight="bold",l.style.minWidth="60px",x.append(l);const v=document.createElement("span");v.classList.add(s("url")),v.textContent=h.url,v.style.flex="1",v.style.overflow="hidden",v.style.textOverflow="ellipsis",v.style.whiteSpace="nowrap",x.append(v);const d=document.createElement("span");if(d.classList.add(s("status")),d.textContent=h.status,d.style.minWidth="40px",d.style.textAlign="center",typeof h.status=="number"&&(h.status>=200&&h.status<300?d.style.color="#4caf50":h.status>=300&&h.status<400?d.style.color="#ff9800":h.status>=400&&(d.style.color="#f44336")),x.append(d),h.duration!==null&&typeof h.duration!="undefined"){const y=document.createElement("span");y.classList.add(s("duration")),y.textContent=h.duration,y.style.minWidth="60px",y.style.textAlign="right",x.append(y)}if(m.append(x),h.details&&Object.keys(h.details).length>0){const y=document.createElement("table");y.classList.add(s("params"));const g=document.createElement("thead");g.innerHTML='Details';const e=document.createElement("tbody");y.append(g,e);for(const n in h.details)if(typeof h.details[n]!="function"){const o=document.createElement("tr"),_=document.createElement("td");_.className=s("name"),_.textContent=n,o.append(_);const w=document.createElement("td");w.className=s("value"),PhpDebugBar.Widgets.renderValueInto(w,h.details[n]),o.append(w),e.append(o)}y.hidden=!0,m.append(y),m.style.cursor="pointer",m.addEventListener("click",n=>{window.getSelection().type==="Range"||n.target.closest(".sf-dump")||(y.hidden=!y.hidden)})}}}),this.el.append(this.list.el),this.bindAttr("data",function(m){this.list.set("data",m)})}}PhpDebugBar.Widgets.HttpWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");document.documentElement.classList.add("sf-js-enabled");const G=new Map;let S=0;class m{constructor(d){this.expandedDepth=d&&d.expandedDepth!==void 0?d.expandedDepth:1}render(d){if(d&&typeof d=="object"&&"_sd"in d){const y=document.createElement("pre");y.className="sf-dump",y.setAttribute("data-indent-pad"," ");const g=this.expandedDepth;return typeof d._sd=="number"&&(this.expandedDepth=d._sd),y.innerHTML=this.nodeToHtml(d,0,"")+`