FOSDEM-2025-keynote/lib/js/extra/headjs/site/assets/libs/qunit/qunit.min.js

2 lines
No EOL
25 KiB
JavaScript

(function(n){function b(n){f(this,n),this.assertions=[],this.testNumber=++b.count}function ct(){t.autorun=!0,t.currentModule&&s("moduleDone",i,{name:t.currentModule,failed:t.moduleStats.bad,passed:t.moduleStats.all-t.moduleStats.bad,total:t.moduleStats.all}),delete t.previousModule;var r,f,o=u("qunit-banner"),a=u("qunit-tests"),c=+new e-t.started,l=t.stats.all-t.stats.bad,v=["Tests completed in ",c," milliseconds.<br/>","<span class='passed'>",l,"<\/span> assertions of <span class='total'>",t.stats.all,"<\/span> passed, <span class='failed'>",t.stats.bad,"<\/span> failed."].join("");if(o&&(o.className=t.stats.bad?"qunit-fail":"qunit-pass"),a&&(u("qunit-testresult").innerHTML=v),t.altertitle&&typeof document!="undefined"&&document.title&&(document.title=[t.stats.bad?"✖":"✔",document.title.replace(/^[\u2714\u2716] /i,"")].join(" ")),t.reorder&&h.sessionStorage&&t.stats.bad===0)for(r=0;r<sessionStorage.length;r++)f=sessionStorage.key(r++),f.indexOf("qunit-test-")===0&&sessionStorage.removeItem(f);n.scrollTo&&n.scrollTo(0,0),s("done",i,{failed:t.stats.bad,passed:l,total:t.stats.all,runtime:c})}function nt(n){var r,i=t.filter&&t.filter.toLowerCase(),u=t.module&&t.module.toLowerCase(),f=(n.module+": "+n.testName).toLowerCase();return n.callback&&n.callback.validTest===nt?(delete n.callback.validTest,!0):t.testNumber?n.testNumber===t.testNumber:u&&(!n.module||n.module.toLowerCase()!==u)?!1:i?(r=i.charAt(0)!=="!",r||(i=i.slice(1)),f.indexOf(i)!==-1)?r:!r:!0}function k(n,t){t=t===undefined?3:t;var i,u,r;if(n.stacktrace)return n.stacktrace.split("\n")[t+3];if(n.stack){if(i=n.stack.split("\n"),/^error$/i.test(i[0])&&i.shift(),ut){for(u=[],r=t;r<i.length;r++){if(i[r].indexOf(ut)!==-1)break;u.push(i[r])}if(u.length)return u.join("\n")}return i[t]}if(n.sourceURL)return/qunit.js$/.test(n.sourceURL)?void 0:n.sourceURL+":"+n.line}function c(n){try{throw new Error;}catch(t){return k(t,n)}}function r(n){return n?(n=n+"",n.replace(/['"<>&]/g,function(n){switch(n){case"'":return"&#039;";case'"':return"&quot;";case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;"}})):""}function v(n,i){t.queue.push(n),t.autorun&&!t.blocking&&d(i)}function d(n){function i(){d(n)}var r=(new e).getTime();for(t.depth=t.depth?t.depth+1:1;t.queue.length&&!t.blocking;)if(!h.setTimeout||t.updateRate<=0||(new e).getTime()-r<t.updateRate)t.queue.shift()();else{w(i,13);break}t.depth--,!n||t.blocking||t.queue.length||t.depth!==0||ct()}function tt(){if(t.pollution=[],t.noglobals)for(var i in n)if(o.call(n,i)){if(/^qunit-test-output/.test(i))continue;t.pollution.push(i)}}function lt(){var n,r,u=t.pollution;tt(),n=et(t.pollution,u),n.length>0&&i.pushFailure("Introduced global variable(s): "+n.join(", ")),r=et(u,t.pollution),r.length>0&&i.pushFailure("Deleted global variable(s): "+r.join(", "))}function et(n,t){for(var r,u=n.slice(),i=0;i<u.length;i++)for(r=0;r<t.length;r++)if(u[i]===t[r]){u.splice(i,1),i--;break}return u}function f(t,i){for(var r in i)o.call(i,r)&&(r==="constructor"&&t===n||(i[r]===undefined?delete t[r]:t[r]=i[r]));return t}function l(n,t,i){n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent("on"+t,i)}function at(n,t,i){for(var r=n.length;r--;)l(n[r],t,i)}function it(n,t){return(" "+n.className+" ").indexOf(" "+t+" ")>-1}function rt(n,t){it(n,t)||(n.className+=(n.className?" ":"")+t)}function ot(n,t){for(var i=" "+n.className+" ";i.indexOf(" "+t+" ")>-1;)i=i.replace(" "+t+" "," ");n.className=typeof i.trim=="function"?i.trim():i.replace(/^\s+|\s+$/g,"")}function u(n){return!!(typeof document!="undefined"&&document&&document.getElementById)&&document.getElementById(n)}function a(n){return function(i){t[n].push(i)}}function s(n,r,u){var f,e;if(i.hasOwnProperty(n))i[n].call(r,u);else for(e=t[n],f=0;f<e.length;f++)e[f].call(r,u)}function vt(n,t){if(t.indexOf)return t.indexOf(n);for(var i=0,r=t.length;i<r;i++)if(t[i]===n)return i;return-1}var i,p,t,g,st=0,ut=(c(0)||"").replace(/(:\d+)+\)?/,"").replace(/.+\//,""),ft=Object.prototype.toString,o=Object.prototype.hasOwnProperty,e=n.Date,w=n.setTimeout,h={setTimeout:typeof n.setTimeout!="undefined",sessionStorage:function(){var n="qunit-test-string";try{return sessionStorage.setItem(n,n),sessionStorage.removeItem(n),!0}catch(t){return!1}}()},ht=function(n){var t,i,r=n.toString();return r.substring(0,7)==="[object"?(t=n.name?n.name.toString():"Error",i=n.message?n.message.toString():"",t&&i?t+": "+i:t?t:i?i:"Error"):r},y=function(n){var r,t,u=i.is("array",n)?[]:{};for(r in n)o.call(n,r)&&(t=n[r],u[r]=t===Object(t)?y(t):t);return u};b.count=0,b.prototype={init:function(){var t,r,n,f=u("qunit-tests");f&&(r=document.createElement("strong"),r.innerHTML=this.nameHtml,t=document.createElement("a"),t.innerHTML="Rerun",t.href=i.url({testNumber:this.testNumber}),n=document.createElement("li"),n.appendChild(r),n.appendChild(t),n.className="running",n.id=this.id="qunit-test-output"+st++,f.appendChild(n))},setup:function(){if(this.module===t.previousModule&&o.call(t,"previousModule")||(o.call(t,"previousModule")&&s("moduleDone",i,{name:t.previousModule,failed:t.moduleStats.bad,passed:t.moduleStats.all-t.moduleStats.bad,total:t.moduleStats.all}),t.previousModule=this.module,t.moduleStats={all:0,bad:0},s("moduleStart",i,{name:this.module})),t.current=this,this.testEnvironment=f({setup:function(){},teardown:function(){}},this.moduleTestEnvironment),this.started=+new e,s("testStart",i,{name:this.testName,module:this.module}),i.current_testEnvironment=this.testEnvironment,t.pollution||tt(),t.notrycatch){this.testEnvironment.setup.call(this.testEnvironment,i.assert);return}try{this.testEnvironment.setup.call(this.testEnvironment,i.assert)}catch(n){i.pushFailure("Setup failed on "+this.testName+": "+(n.message||n),k(n,1))}},run:function(){t.current=this;var r=u("qunit-testresult");if(r&&(r.innerHTML="Running: <br/>"+this.nameHtml),this.async&&i.stop(),this.callbackStarted=+new e,t.notrycatch){this.callback.call(this.testEnvironment,i.assert),this.callbackRuntime=+new e-this.callbackStarted;return}try{this.callback.call(this.testEnvironment,i.assert),this.callbackRuntime=+new e-this.callbackStarted}catch(n){this.callbackRuntime=+new e-this.callbackStarted,i.pushFailure("Died on test #"+(this.assertions.length+1)+" "+this.stack+": "+(n.message||n),k(n,0)),tt(),t.blocking&&i.start()}},teardown:function(){if(t.current=this,t.notrycatch){typeof this.callbackRuntime=="undefined"&&(this.callbackRuntime=+new e-this.callbackStarted),this.testEnvironment.teardown.call(this.testEnvironment,i.assert);return}try{this.testEnvironment.teardown.call(this.testEnvironment,i.assert)}catch(n){i.pushFailure("Teardown failed on "+this.testName+": "+(n.message||n),k(n,1))}lt()},finish:function(){t.current=this,t.requireExpects&&this.expected===null?i.pushFailure("Expected number of assertions to be defined, but expect() was not called.",this.stack):this.expected!==null&&this.expected!==this.assertions.length?i.pushFailure("Expected "+this.expected+" assertions, but "+this.assertions.length+" were run",this.stack):this.expected!==null||this.assertions.length||i.pushFailure("Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.",this.stack);var o,a,p,c,y,r,v,b=this,w=0,f=0,k=u("qunit-tests");if(this.runtime=+new e-this.started,t.stats.all+=this.assertions.length,t.moduleStats.all+=this.assertions.length,k){for(v=document.createElement("ol"),v.className="qunit-assert-list",o=0;o<this.assertions.length;o++)a=this.assertions[o],r=document.createElement("li"),r.className=a.result?"pass":"fail",r.innerHTML=a.message||(a.result?"okay":"failed"),v.appendChild(r),a.result?w++:(f++,t.stats.bad++,t.moduleStats.bad++);i.config.reorder&&h.sessionStorage&&(f?sessionStorage.setItem("qunit-test-"+this.module+"-"+this.testName,f):sessionStorage.removeItem("qunit-test-"+this.module+"-"+this.testName)),f===0&&rt(v,"qunit-collapsed"),c=document.createElement("strong"),c.innerHTML=this.nameHtml+" <b class='counts'>(<b class='failed'>"+f+"<\/b>, <b class='passed'>"+w+"<\/b>, "+this.assertions.length+")<\/b>",l(c,"click",function(){var n=c.parentNode.lastChild,t=it(n,"qunit-collapsed");(t?ot:rt)(n,"qunit-collapsed")}),l(c,"dblclick",function(t){var r=t&&t.target?t.target:n.event.srcElement;(r.nodeName.toLowerCase()==="span"||r.nodeName.toLowerCase()==="b")&&(r=r.parentNode),n.location&&r.nodeName.toLowerCase()==="strong"&&(n.location=i.url({testNumber:b.testNumber}))}),y=document.createElement("span"),y.className="runtime",y.innerHTML=this.runtime+" ms",r=u(this.id),r.className=f?"fail":"pass",r.removeChild(r.firstChild),p=r.firstChild,r.appendChild(c),r.appendChild(p),r.appendChild(y),r.appendChild(v)}else for(o=0;o<this.assertions.length;o++)this.assertions[o].result||(f++,t.stats.bad++,t.moduleStats.bad++);s("testDone",i,{name:this.testName,module:this.module,failed:f,passed:this.assertions.length-f,total:this.assertions.length,duration:this.runtime}),i.reset(),t.current=undefined},queue:function(){function r(){v(function(){n.setup()}),v(function(){n.run()}),v(function(){n.teardown()}),v(function(){n.finish()})}var t,n=this;v(function(){n.init()}),t=i.config.reorder&&h.sessionStorage&&+sessionStorage.getItem("qunit-test-"+this.module+"-"+this.testName),t?r():v(r,!0)}},i={module:function(n,i){t.currentModule=n,t.currentModuleTestEnvironment=i,t.modules[n]=!0},asyncTest:function(n,t,r){arguments.length===2&&(r=t,t=null),i.test(n,t,r,!0)},test:function(n,i,u,f){var e,o="<span class='test-name'>"+r(n)+"<\/span>";(arguments.length===2&&(u=i,i=null),t.currentModule&&(o="<span class='module-name'>"+r(t.currentModule)+"<\/span>: "+o),e=new b({nameHtml:o,testName:n,expected:i,async:f,callback:u,module:t.currentModule,moduleTestEnvironment:t.currentModuleTestEnvironment,stack:c(2)}),nt(e))&&e.queue()},expect:function(n){if(arguments.length===1)t.current.expected=n;else return t.current.expected},start:function(n){if(t.semaphore===undefined){i.begin(function(){w(function(){i.start(n)})});return}if(t.semaphore-=n||1,!(t.semaphore>0)){if(t.semaphore<0){t.semaphore=0,i.pushFailure("Called start() while already started (QUnit.config.semaphore was 0 already)",null,c(2));return}h.setTimeout?w(function(){t.semaphore>0||(t.timeout&&clearTimeout(t.timeout),t.blocking=!1,d(!0))},13):(t.blocking=!1,d(!0))}},stop:function(n){t.semaphore+=n||1,t.blocking=!0,t.testTimeout&&h.setTimeout&&(clearTimeout(t.timeout),t.timeout=w(function(){i.ok(!1,"Test timed out"),t.semaphore=1,i.start()},t.testTimeout))}},p={ok:function(n,u){if(!t.current)throw new Error("ok() assertion outside test context, was "+c(2));n=!!n,u=u||(n?"okay":"failed");var f,e={module:t.current.module,name:t.current.testName,result:n,message:u};u="<span class='test-message'>"+r(u)+"<\/span>",n||(f=c(2),f&&(e.source=f,u+="<table><tr class='test-source'><th>Source: <\/th><td><pre>"+r(f)+"<\/pre><\/td><\/tr><\/table>")),s("log",i,e),t.current.assertions.push({result:n,message:u})},equal:function(n,t,r){i.push(t==n,n,t,r)},notEqual:function(n,t,r){i.push(t!=n,n,t,r)},propEqual:function(n,t,r){n=y(n),t=y(t),i.push(i.equiv(n,t),n,t,r)},notPropEqual:function(n,t,r){n=y(n),t=y(t),i.push(!i.equiv(n,t),n,t,r)},deepEqual:function(n,t,r){i.push(i.equiv(n,t),n,t,r)},notDeepEqual:function(n,t,r){i.push(!i.equiv(n,t),n,t,r)},strictEqual:function(n,t,r){i.push(t===n,n,t,r)},notStrictEqual:function(n,t,r){i.push(t!==n,n,t,r)},throws:function(n,r,u){var f,o=r,e=!1;typeof r=="string"&&(u=r,r=null),t.current.ignoreGlobalErrors=!0;try{n.call(t.current.testEnvironment)}catch(s){f=s}t.current.ignoreGlobalErrors=!1,f?(r?i.objectType(r)==="regexp"?e=r.test(ht(f)):f instanceof r?e=!0:r.call({},f)===!0&&(o=null,e=!0):(e=!0,o=null),i.push(e,f,o,u)):i.pushFailure(u,null,"No exception was thrown.")}},f(i,p),i.raises=p.throws,i.equals=function(){i.push(!1,!1,!1,"QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead")},i.same=function(){i.push(!1,!1,!1,"QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead")},function(){function n(){}n.prototype=i,i=new n,i.constructor=n}(),t={queue:[],blocking:!0,hidepassed:!1,reorder:!0,altertitle:!0,requireExpects:!1,urlConfig:[{id:"noglobals",label:"Check for Globals",tooltip:"Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings."},{id:"notrycatch",label:"No try-catch",tooltip:"Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings."}],modules:{},begin:[],done:[],log:[],testStart:[],testDone:[],moduleStart:[],moduleDone:[]},typeof exports=="undefined"&&(f(n,i.constructor.prototype),n.QUnit=i),function(){var f,o=n.location||{search:"",protocol:"file:"},e=o.search.slice(1).split("&"),s=e.length,u={},r;if(e[0])for(f=0;f<s;f++)r=e[f].split("="),r[0]=decodeURIComponent(r[0]),r[1]=r[1]?decodeURIComponent(r[1]):!0,u[r[0]]=r[1];i.urlParams=u,t.filter=u.filter,t.module=u.module,t.testNumber=parseInt(u.testNumber,10)||null,i.isLocal=o.protocol==="file:"}(),f(i,{assert:p,config:t,init:function(){f(t,{stats:{all:0,bad:0},moduleStats:{all:0,bad:0},started:+new e,updateRate:1e3,blocking:!1,autostart:!0,autorun:!1,filter:"",queue:[],semaphore:1});var i,o,n,s=u("qunit");s&&(s.innerHTML="<h1 id='qunit-header'>"+r(document.title)+"<\/h1><h2 id='qunit-banner'><\/h2><div id='qunit-testrunner-toolbar'><\/div><h2 id='qunit-userAgent'><\/h2><ol id='qunit-tests'><\/ol>"),i=u("qunit-tests"),o=u("qunit-banner"),n=u("qunit-testresult"),i&&(i.innerHTML=""),o&&(o.className=""),n&&n.parentNode.removeChild(n),i&&(n=document.createElement("p"),n.id="qunit-testresult",n.className="result",i.parentNode.insertBefore(n,i),n.innerHTML="Running...<br/>&nbsp;")},reset:function(){var n=u("qunit-fixture");n&&(n.innerHTML=t.fixture)},triggerEvent:function(n,t,i){document.createEvent?(i=document.createEvent("MouseEvents"),i.initMouseEvent(t,!0,!0,n.ownerDocument.defaultView,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)):n.fireEvent&&n.fireEvent("on"+t)},is:function(n,t){return i.objectType(t)===n},objectType:function(n){if(typeof n=="undefined")return"undefined";if(n===null)return"null";var t=ft.call(n).match(/^\[object\s(.*)\]$/),i=t&&t[1]||"";switch(i){case"Number":return isNaN(n)?"nan":"number";case"String":case"Boolean":case"Array":case"Date":case"RegExp":case"Function":return i.toLowerCase()}return typeof n=="object"?"object":undefined},push:function(n,u,f,e){if(!t.current)throw new Error("assertion outside test context, was "+c());var o,h,l={module:t.current.module,name:t.current.testName,result:n,message:e,actual:u,expected:f};e=r(e)||(n?"okay":"failed"),e="<span class='test-message'>"+e+"<\/span>",o=e,n||(f=r(i.jsDump.parse(f)),u=r(i.jsDump.parse(u)),o+="<table><tr class='test-expected'><th>Expected: <\/th><td><pre>"+f+"<\/pre><\/td><\/tr>",u!==f&&(o+="<tr class='test-actual'><th>Result: <\/th><td><pre>"+u+"<\/pre><\/td><\/tr>",o+="<tr class='test-diff'><th>Diff: <\/th><td><pre>"+i.diff(f,u)+"<\/pre><\/td><\/tr>"),h=c(),h&&(l.source=h,o+="<tr class='test-source'><th>Source: <\/th><td><pre>"+r(h)+"<\/pre><\/td><\/tr>"),o+="<\/table>"),s("log",i,l),t.current.assertions.push({result:!!n,message:o})},pushFailure:function(n,u,f){if(!t.current)throw new Error("pushFailure() assertion outside test context, was "+c(2));var e,o={module:t.current.module,name:t.current.testName,result:!1,message:n};n=r(n)||"error",n="<span class='test-message'>"+n+"<\/span>",e=n,e+="<table>",f&&(e+="<tr class='test-actual'><th>Result: <\/th><td><pre>"+r(f)+"<\/pre><\/td><\/tr>"),u&&(o.source=u,e+="<tr class='test-source'><th>Source: <\/th><td><pre>"+r(u)+"<\/pre><\/td><\/tr>"),e+="<\/table>",s("log",i,o),t.current.assertions.push({result:!1,message:e})},url:function(t){t=f(f({},i.urlParams),t);var r,u="?";for(r in t)o.call(t,r)&&(u+=encodeURIComponent(r)+"="+encodeURIComponent(t[r])+"&");return n.location.protocol+"//"+n.location.host+n.location.pathname+u.slice(0,-1)},extend:f,id:u,addEvent:l,addClass:rt,hasClass:it,removeClass:ot}),f(i.constructor.prototype,{begin:a("begin"),done:a("done"),log:a("log"),testStart:a("testStart"),testDone:a("testDone"),moduleStart:a("moduleStart"),moduleDone:a("moduleDone")}),(typeof document=="undefined"||document.readyState==="complete")&&(t.autorun=!0),i.load=function(){s("begin",i,{});var w,c,o,p,it,d,g,a,nt,e,b,rt,v,tt=0,y=[],k="",ut="",ft=f({},t);for(i.init(),f(t,ft),t.blocking=!1,it=t.urlConfig.length,o=0;o<it;o++)e=t.urlConfig[o],typeof e=="string"&&(e={id:e,label:e,tooltip:"[no tooltip available]"}),t[e.id]=i.urlParams[e.id],ut+="<input id='qunit-urlconfig-"+r(e.id)+"' name='"+r(e.id)+"' type='checkbox'"+(t[e.id]?" checked='checked'":"")+" title='"+r(e.tooltip)+"'><label for='qunit-urlconfig-"+r(e.id)+"' title='"+r(e.tooltip)+"'>"+e.label+"<\/label>";for(o in t.modules)t.modules.hasOwnProperty(o)&&y.push(o);for(tt=y.length,y.sort(function(n,t){return n.localeCompare(t)}),k+="<label for='qunit-modulefilter'>Module: <\/label><select id='qunit-modulefilter' name='modulefilter'><option value='' "+(t.module===undefined?"selected='selected'":"")+">< All Modules ><\/option>",o=0;o<tt;o++)k+="<option value='"+r(encodeURIComponent(y[o]))+"' "+(t.module===y[o]?"selected='selected'":"")+">"+r(y[o])+"<\/option>";k+="<\/select>",nt=u("qunit-userAgent"),nt&&(nt.innerHTML=navigator.userAgent),w=u("qunit-header"),w&&(w.innerHTML="<a href='"+i.url({filter:undefined,module:undefined,testNumber:undefined})+"'>"+w.innerHTML+"<\/a> "),a=u("qunit-testrunner-toolbar"),a&&(c=document.createElement("input"),c.type="checkbox",c.id="qunit-filter-pass",l(c,"click",function(){var t,n=document.getElementById("qunit-tests");c.checked?n.className=n.className+" hidepass":(t=" "+n.className.replace(/[\n\t\r]/g," ")+" ",n.className=t.replace(/ hidepass /," ")),h.sessionStorage&&(c.checked?sessionStorage.setItem("qunit-filter-passed-tests","true"):sessionStorage.removeItem("qunit-filter-passed-tests"))}),(t.hidepassed||h.sessionStorage&&sessionStorage.getItem("qunit-filter-passed-tests"))&&(c.checked=!0,g=document.getElementById("qunit-tests"),g.className=g.className+" hidepass"),a.appendChild(c),p=document.createElement("label"),p.setAttribute("for","qunit-filter-pass"),p.setAttribute("title","Only show tests and assertions that fail. Stored in sessionStorage."),p.innerHTML="Hide passed tests",a.appendChild(p),b=document.createElement("span"),b.innerHTML=ut,rt=b.getElementsByTagName("input"),at(rt,"click",function(t){var r={},u=t.target||t.srcElement;r[u.name]=u.checked?!0:undefined,n.location=i.url(r)}),a.appendChild(b),tt>1&&(v=document.createElement("span"),v.setAttribute("id","qunit-modulefilter-container"),v.innerHTML=k,l(v.lastChild,"change",function(){var t=v.getElementsByTagName("select")[0],r=decodeURIComponent(t.options[t.selectedIndex].value);n.location=i.url({module:r===""?undefined:r,filter:undefined,testNumber:undefined})}),a.appendChild(v))),d=u("qunit-fixture"),d&&(t.fixture=d.innerHTML),t.autostart&&i.start()},l(n,"load",i.load),g=n.onerror,n.onerror=function(n,t,r){var u=!1;if(g&&(u=g(n,t,r)),u!==!0){if(i.config.current){if(i.config.current.ignoreGlobalErrors)return!0;i.pushFailure(n,t+":"+r)}else i.test("global failure",f(function(){i.pushFailure(n,t+":"+r)},{validTest:nt}));return!1}return u},i.equiv=function(){function e(n,t,r){var u=i.objectType(n);if(u)return i.objectType(t[u])==="function"?t[u].apply(t,r):t[u]}var r,u=[],n=[],t=[],f=Object.getPrototypeOf||function(n){return n.__proto__},o=function(){function e(n,t){return n instanceof t.constructor||t instanceof n.constructor?t==n:t===n}return{string:e,boolean:e,number:e,"null":e,undefined:e,nan:function(n){return isNaN(n)},date:function(n,t){return i.objectType(n)==="date"&&t.valueOf()===n.valueOf()},regexp:function(n,t){return i.objectType(n)==="regexp"&&t.source===n.source&&t.global===n.global&&t.ignoreCase===n.ignoreCase&&t.multiline===n.multiline&&t.sticky===n.sticky},"function":function(){var n=u[u.length-1];return n!==Object&&typeof n!="undefined"},array:function(u,f){var e,o,s,h,c,l;if(i.objectType(u)!=="array"||(s=f.length,s!==u.length))return!1;for(n.push(f),t.push(u),e=0;e<s;e++){for(h=!1,o=0;o<n.length;o++)if(c=n[o]===f[e],l=t[o]===u[e],c||l)if(f[e]===u[e]||c&&l)h=!0;else return n.pop(),t.pop(),!1;if(!h&&!r(f[e],u[e]))return n.pop(),t.pop(),!1}return n.pop(),t.pop(),!0},object:function(i,e){var o,s,h,c,l,a=!0,v=[],y=[];if(e.constructor!==i.constructor&&!(f(e)===null&&f(i)===Object.prototype||f(i)===null&&f(e)===Object.prototype))return!1;u.push(e.constructor),n.push(e),t.push(i);for(o in e){for(h=!1,s=0;s<n.length;s++)if(c=n[s]===e[o],l=t[s]===i[o],c||l)if(e[o]===i[o]||c&&l)h=!0;else{a=!1;break}if(v.push(o),!h&&!r(e[o],i[o])){a=!1;break}}n.pop(),t.pop(),u.pop();for(o in i)y.push(o);return a&&r(v.sort(),y.sort())}}}();return r=function(){var n=[].slice.apply(arguments);return n.length<2?!0:function(n,t){return n===t?!0:n===null||t===null||typeof n=="undefined"||typeof t=="undefined"||i.objectType(n)!==i.objectType(t)?!1:e(n,o,[t,n])}(n[0],n[1])&&r.apply(this,n.splice(1,n.length-1))}}(),i.jsDump=function(){function n(n){return'"'+n.toString().replace(/"/g,'\\"')+'"'}function t(n){return n+""}function r(n,t,i){var r=u.separator(),e=u.indent(),f=u.indent(1);return(t.join&&(t=t.join(","+r+f)),!t)?n+i:[n,f+t,e+i].join(r)}function f(n,t){var i=n.length,u=new Array(i);for(this.up();i--;)u[i]=this.parse(n[i],undefined,t);return this.down(),r("[",u,"]")}var e=/^function (\w+)/,u={parse:function(n,t,i){i=i||[];var r,f,u=this.parsers[t||this.typeOf(n)];return(t=typeof u,r=vt(n,i),r!==-1)?"recursion("+(r-i.length)+")":t==="function"?(i.push(n),f=u.call(this,n,i),i.pop(),f):t==="string"?u:this.parsers.error},typeOf:function(n){return n===null?"null":typeof n=="undefined"?"undefined":i.is("regexp",n)?"regexp":i.is("date",n)?"date":i.is("function",n)?"function":typeof n.setInterval!==undefined&&typeof n.document!="undefined"&&typeof n.nodeType=="undefined"?"window":n.nodeType===9?"document":n.nodeType?"node":ft.call(n)==="[object Array]"||typeof n.length=="number"&&typeof n.item!="undefined"&&(n.length?n.item(0)===n[0]:n.item(0)===null&&typeof n[0]=="undefined")?"array":n.constructor===Error.prototype.constructor?"error":typeof n},separator:function(){return this.multiline?this.HTML?"<br />":"\n":this.HTML?"&nbsp;":" "},indent:function(n){if(!this.multiline)return"";var t=this.indentChar;return this.HTML&&(t=t.replace(/\t/g," ").replace(/ /g,"&nbsp;")),new Array(this.depth+(n||0)).join(t)},up:function(n){this.depth+=n||1},down:function(n){this.depth-=n||1},setParser:function(n,t){this.parsers[n]=t},quote:n,literal:t,join:r,depth:1,parsers:{window:"[Window]",document:"[Document]",error:function(n){return'Error("'+n.message+'")'},unknown:"[Unknown]","null":"null",undefined:"undefined","function":function(n){var t="function",u="name"in n?n.name:(e.exec(n)||[])[1];return u&&(t+=" "+u),t+="( ",t=[t,i.jsDump.parse(n,"functionArgs"),"){"].join(""),r(t,i.jsDump.parse(n,"functionCode"),"}")},array:f,nodelist:f,arguments:f,object:function(n,t){var o=[],u,f,s,e;i.jsDump.up(),u=[];for(f in n)u.push(f);for(u.sort(),e=0;e<u.length;e++)f=u[e],s=n[f],o.push(i.jsDump.parse(f,"key")+": "+i.jsDump.parse(s,undefined,t));return i.jsDump.down(),r("{",o,"}")},node:function(n){var e,t,r,o=i.jsDump.HTML?"&lt;":"<",s=i.jsDump.HTML?"&gt;":">",h=n.nodeName.toLowerCase(),u=o+h,f=n.attributes;if(f)for(t=0,e=f.length;t<e;t++)r=f[t].nodeValue,r&&r!=="inherit"&&(u+=" "+f[t].nodeName+"="+i.jsDump.parse(r,"attribute"));return u+=s,(n.nodeType===3||n.nodeType===4)&&(u+=n.nodeValue),u+o+"/"+h+s},functionArgs:function(n){var i,t=n.length;if(!t)return"";for(i=new Array(t);t--;)i[t]=String.fromCharCode(97+t);return" "+i.join(", ")+" "},key:n,functionCode:"[code]",attribute:n,string:n,date:n,regexp:t,number:t,boolean:t},HTML:!1,indentChar:" ",multiline:!0};return u}(),i.diff=function(){function n(n,t){for(var r={},u={},i=0;i<t.length;i++)o.call(r,t[i])||(r[t[i]]={rows:[],o:null}),r[t[i]].rows.push(i);for(i=0;i<n.length;i++)o.call(u,n[i])||(u[n[i]]={rows:[],n:null}),u[n[i]].rows.push(i);for(i in r)o.call(r,i)&&r[i].rows.length===1&&o.call(u,i)&&u[i].rows.length===1&&(t[r[i].rows[0]]={text:t[r[i].rows[0]],row:u[i].rows[0]},n[u[i].rows[0]]={text:n[u[i].rows[0]],row:r[i].rows[0]});for(i=0;i<t.length-1;i++)t[i].text!=null&&t[i+1].text==null&&t[i].row+1<n.length&&n[t[i].row+1].text==null&&t[i+1]==n[t[i].row+1]&&(t[i+1]={text:t[i+1],row:t[i].row+1},n[t[i].row+1]={text:n[t[i].row+1],row:i+1});for(i=t.length-1;i>0;i--)t[i].text!=null&&t[i-1].text==null&&t[i].row>0&&n[t[i].row-1].text==null&&t[i-1]==n[t[i].row-1]&&(t[i-1]={text:t[i-1],row:t[i].row-1},n[t[i].row-1]={text:n[t[i].row-1],row:i-1});return{o:n,n:t}}return function(t,i){t=t.replace(/\s+$/,""),i=i.replace(/\s+$/,"");var u,s,e="",r=n(t===""?[]:t.split(/\s+/),i===""?[]:i.split(/\s+/)),f=t.match(/\s+/g),o=i.match(/\s+/g);if(f==null?f=[" "]:f.push(" "),o==null?o=[" "]:o.push(" "),r.n.length===0)for(u=0;u<r.o.length;u++)e+="<del>"+r.o[u]+f[u]+"<\/del>";else{if(r.n[0].text==null)for(i=0;i<r.o.length&&r.o[i].text==null;i++)e+="<del>"+r.o[i]+f[i]+"<\/del>";for(u=0;u<r.n.length;u++)if(r.n[u].text==null)e+="<ins>"+r.n[u]+o[u]+"<\/ins>";else{for(s="",i=r.n[u].row+1;i<r.o.length&&r.o[i].text==null;i++)s+="<del>"+r.o[i]+f[i]+"<\/del>";e+=" "+r.n[u].text+o[u]+s}}return e}}(),typeof exports!="undefined"&&f(exports,i.constructor.prototype)})(function(){return this}.call());
//# sourceMappingURL=qunit.min.js.map