__whitespace={" ":true,"\t":true,"\n":true,"\f":true,"\r":true};difflib={defaultJunkFunction:function(c){return __whitespace.hasOwnProperty(c);},stripLinebreaks:function(str){return str.replace(/^[\n\r]*|[\n\r]*$/g,"");},stringAsLines:function(str){var lfpos=str.indexOf("\n");var crpos=str.indexOf("\r");var linebreak=((lfpos>-1&&crpos>-1)||crpos<0)?"\n":"\r";var lines=str.split(linebreak);for(var i=0;ib[i])return 1;} return a.length==b.length?0:(a.length=200&&indices.length*100>n){populardict[elt]=1;delete b2j[elt];}else{indices.push(i);}}else{b2j[elt]=[i];}} for(var elt in populardict){if(populardict.hasOwnProperty(elt)){delete b2j[elt];}} var isjunk=this.isjunk;var junkdict={};if(isjunk){for(var elt in populardict){if(populardict.hasOwnProperty(elt)&&isjunk(elt)){junkdict[elt]=1;delete populardict[elt];}} for(var elt in b2j){if(b2j.hasOwnProperty(elt)&&isjunk(elt)){junkdict[elt]=1;delete b2j[elt];}}} this.isbjunk=difflib.__isindict(junkdict);this.isbpopular=difflib.__isindict(populardict);} this.find_longest_match=function(alo,ahi,blo,bhi){var a=this.a;var b=this.b;var b2j=this.b2j;var isbjunk=this.isbjunk;var besti=alo;var bestj=blo;var bestsize=0;var j=null;var j2len={};var nothing=[];for(var i=alo;i=bhi)break;newj2len[j]=k=difflib.__dictget(j2len,j-1,0)+1;if(k>bestsize){besti=i-k+1;bestj=j-k+1;bestsize=k;}}} j2len=newj2len;} while(besti>alo&&bestj>blo&&!isbjunk(b[bestj-1])&&a[besti-1]==b[bestj-1]){besti--;bestj--;bestsize++;} while(besti+bestsizealo&&bestj>blo&&isbjunk(b[bestj-1])&&a[besti-1]==b[bestj-1]){besti--;bestj--;bestsize++;} while(besti+bestsizenn){groups.push([tag,i1,Math.min(i2,i1+n),j1,Math.min(j2,j1+n)]);i1=Math.max(i1,i2-n);j1=Math.max(j1,j2-n);} groups.push([tag,i1,i2,j1,j2]);}} if(groups&&groups[groups.length-1][0]=='equal')groups.pop();return groups;} this.ratio=function(){matches=difflib.__reduce(function(sum,triple){return sum+triple[triple.length-1];},this.get_matching_blocks(),0);return difflib.__calculate_ratio(matches,this.a.length+this.b.length);} this.quick_ratio=function(){var fullbcount,elt;if(this.fullbcount==null){this.fullbcount=fullbcount={};for(var i=0;i0)matches++;} return difflib.__calculate_ratio(matches,this.a.length+this.b.length);} this.real_quick_ratio=function(){var la=this.a.length;var lb=this.b.length;return _calculate_ratio(Math.min(la,lb),la+lb);} this.isjunk=isjunk?isjunk:difflib.defaultJunkFunction;this.a=this.b=null;this.set_seqs(a,b);}};WebInspector.UIList=function() {WebInspector.VBox.call(this,true);this.registerRequiredCSS("sources/uiList.css");this._items=[];} WebInspector.UIList._Key=Symbol("ownerList");WebInspector.UIList.prototype={addItem:function(item,beforeItem) {item[WebInspector.UIList._Key]=this;var beforeElement=beforeItem?beforeItem.element:null;this.contentElement.insertBefore(item.element,beforeElement);var index=beforeItem?this._items.indexOf(beforeItem):this._items.length;console.assert(index>=0,"Anchor item not found in UIList");this._items.splice(index,0,item);},removeItem:function(item) {var index=this._items.indexOf(item);console.assert(index>=0);this._items.splice(index,1);item.element.remove();},clear:function() {this.contentElement.removeChildren();this._items=[];},__proto__:WebInspector.VBox.prototype} WebInspector.UIList.Item=function(title,subtitle,isLabel) {this.element=createElementWithClass("div","list-item");if(isLabel) this.element.classList.add("label");this.subtitleElement=this.element.createChild("div","subtitle");this.titleElement=this.element.createChild("div","title");this._hidden=false;this._isLabel=!!isLabel;this.setTitle(title);this.setSubtitle(subtitle);this.setSelected(false);} WebInspector.UIList.Item.prototype={nextSibling:function() {var list=this[WebInspector.UIList._Key];var index=list._items.indexOf(this);console.assert(index>=0);return list._items[index+1]||null;},title:function() {return this._title;},setTitle:function(x) {if(this._title===x) return;this._title=x;this.titleElement.textContent=x;},subtitle:function() {return this._subtitle;},setSubtitle:function(x) {if(this._subtitle===x) return;this._subtitle=x;this.subtitleElement.textContent=x;},isSelected:function() {return this._selected;},setSelected:function(x) {if(x) this.select();else this.deselect();},select:function() {if(this._selected) return;this._selected=true;this.element.classList.add("selected");},deselect:function() {if(!this._selected) return;this._selected=false;this.element.classList.remove("selected");},toggleSelected:function() {this.setSelected(!this.isSelected());},isHidden:function() {return this._hidden;},setHidden:function(x) {if(this._hidden===x) return;this._hidden=x;this.element.classList.toggle("hidden",x);},isLabel:function() {return this._isLabel;},setDimmed:function(x) {this.element.classList.toggle("dimmed",x);},discard:function() {}};WebInspector.AddSourceMapURLDialog=function(callback) {WebInspector.DialogDelegate.call(this);this.element.classList.add("go-to-line-dialog");this.element.createChild("label").textContent=WebInspector.UIString("Source map URL: ");this._input=this.element.createChild("input");this._input.setAttribute("type","text");this._goButton=this.element.createChild("button");this._goButton.textContent=WebInspector.UIString("Go");this._goButton.addEventListener("click",this._onGoClick.bind(this),false);this._callback=callback;} WebInspector.AddSourceMapURLDialog.show=function(element,callback) {WebInspector.Dialog.show(element,new WebInspector.AddSourceMapURLDialog(callback));} WebInspector.AddSourceMapURLDialog.prototype={focus:function() {WebInspector.setCurrentFocusElement(this._input);this._input.select();},_onGoClick:function() {this._apply();WebInspector.Dialog.hide();},_apply:function() {var value=this._input.value;this._callback(value);},onEnter:function() {this._apply();},__proto__:WebInspector.DialogDelegate.prototype};WebInspector.AsyncOperationsSidebarPane=function() {WebInspector.BreakpointsSidebarPaneBase.call(this,WebInspector.UIString("Async Operation Breakpoints"));this.element.classList.add("async-operations");this._updateEmptyElement();var refreshButton=new WebInspector.ToolbarButton(WebInspector.UIString("Refresh"),"refresh-toolbar-item");refreshButton.addEventListener("click",this._refreshButtonClicked.bind(this));this.toolbar().appendToolbarItem(refreshButton);this._asyncOperationsByTarget=new Map();this._operationIdToElement=new Map();this._revealBlackboxedCallFrames=false;this._linkifier=new WebInspector.Linkifier(new WebInspector.Linkifier.DefaultFormatter(30));this._popoverHelper=new WebInspector.PopoverHelper(this.element,this._getPopoverAnchor.bind(this),this._showPopover.bind(this));this._popoverHelper.setTimeout(250,250);this.element.addEventListener("click",this._hidePopover.bind(this),true);WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel,WebInspector.DebuggerModel.Events.AsyncOperationStarted,this._onAsyncOperationStarted,this);WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel,WebInspector.DebuggerModel.Events.AsyncOperationCompleted,this._onAsyncOperationCompleted,this);WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel,WebInspector.DebuggerModel.Events.DebuggerResumed,this._debuggerResumed,this);WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel,WebInspector.DebuggerModel.Events.GlobalObjectCleared,this._debuggerReset,this);WebInspector.context.addFlavorChangeListener(WebInspector.Target,this._targetChanged,this);WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this._refresh,this);WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this._asyncStackTracesStateChanged,this);WebInspector.targetManager.observeTargets(this);} WebInspector.AsyncOperationsSidebarPane.prototype={_operationIdSymbol:Symbol("operationId"),_checkedSymbol:Symbol("checked"),targetAdded:function(target) {},targetRemoved:function(target) {this._asyncOperationsByTarget.delete(target);if(this._target===target){this._clear();delete this._target;}},_targetChanged:function(event) {var target=(event.data);if(this._target===target) return;this._target=target;this._refresh();},operationById:function(target,operationId) {if(!target) return null;var operationsMap=this._asyncOperationsByTarget.get(target);if(!operationsMap) return null;return operationsMap.get(operationId)||null;},_asyncStackTracesStateChanged:function() {var enabled=WebInspector.moduleSetting("enableAsyncStackTraces").get();if(enabled){this._target=WebInspector.context.flavor(WebInspector.Target);}else if(this._target){this._asyncOperationsByTarget.delete(this._target);delete this._target;} this._updateEmptyElement();this._refresh();},_updateEmptyElement:function() {var enabled=WebInspector.moduleSetting("enableAsyncStackTraces").get();if(enabled){this.emptyElement.textContent=WebInspector.UIString("No Async Operations");}else{this.emptyElement.textContent=WebInspector.UIString("Async stack traces are disabled.");this.emptyElement.createTextChild(" ");var enableLink=this.emptyElement.createChild("span","link");enableLink.textContent=WebInspector.UIString("Enable");enableLink.addEventListener("click",enableAsyncStackTraces,true);} function enableAsyncStackTraces() {WebInspector.moduleSetting("enableAsyncStackTraces").set(true);}},wasShown:function() {if(!this._target&&WebInspector.moduleSetting("enableAsyncStackTraces").get()){this._target=WebInspector.context.flavor(WebInspector.Target);this._refresh();}},willHide:function() {this._hidePopover();},onResize:function() {this._hidePopover();},revealHiddenCallFrames:function(target) {if(this._target!==target||this._revealBlackboxedCallFrames) return;this._revealBlackboxedCallFrames=true;this._refresh();},highlightBreakpoint:function(operationId) {this._breakpointHitId=operationId;var element=this._operationIdToElement.get(operationId);if(!element) return;this.expand();element.classList.add("breakpoint-hit");},clearBreakpointHighlight:function() {if(!this._breakpointHitId) return;var element=this._operationIdToElement.get(this._breakpointHitId);if(element) element.classList.remove("breakpoint-hit");delete this._breakpointHitId;},_debuggerResumed:function(event) {var target=(event.target.target());if(this._target!==target||!this._revealBlackboxedCallFrames) return;this._revealBlackboxedCallFrames=false;this._refresh();},_debuggerReset:function(event) {var target=(event.target.target());this._asyncOperationsByTarget.delete(target);if(this._target===target) this._clear();},_refreshButtonClicked:function(event) {event.consume();this.expand();var debuggerModel=WebInspector.DebuggerModel.fromTarget(this._target);if(debuggerModel) debuggerModel.flushAsyncOperationEvents();},_onAsyncOperationStarted:function(event) {var target=(event.target.target());var operation=(event.data);var operationsMap=this._asyncOperationsByTarget.get(target);if(!operationsMap){operationsMap=new Map();this._asyncOperationsByTarget.set(target,operationsMap)} operationsMap.set(operation.id,operation);if(this._target===target) this._createAsyncOperationItem(operation);},_onAsyncOperationCompleted:function(event) {var target=(event.target.target());var operationId=(event.data);var operationsMap=this._asyncOperationsByTarget.get(target);if(operationsMap) operationsMap.delete(operationId);if(this._target===target){var element=this._operationIdToElement.get(operationId);if(element) this.removeListElement(element);this._operationIdToElement.delete(operationId);if(!this._operationIdToElement.size) this._clear();}},_refresh:function() {this._clear();if(!this._target) return;var operationsMap=this._asyncOperationsByTarget.get(this._target);if(!operationsMap||!operationsMap.size) return;for(var pair of operationsMap){var operation=(pair[1]);this._createAsyncOperationItem(operation);}},_createAsyncOperationItem:function(operation) {var element=createElementWithClass("li","async-operation");var title=operation.description||WebInspector.UIString("Async Operation");var label=createCheckboxLabel(title,operation[this._checkedSymbol]);label.checkboxElement.addEventListener("click",this._checkboxClicked.bind(this,operation.id),false);element.appendChild(label);var debuggerModel=WebInspector.DebuggerModel.fromTarget(this._target);var callFrame=WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace(debuggerModel,operation.stackTrace,operation.asyncStackTrace,this._revealBlackboxedCallFrames);if(callFrame) element.createChild("div").appendChild(this._linkifier.linkifyConsoleCallFrame(this._target,callFrame));element[this._operationIdSymbol]=operation.id;this._operationIdToElement.set(operation.id,element);this.addListElement(element,this.listElement.firstChild);if(operation.id===this._breakpointHitId){element.classList.add("breakpoint-hit");this.expand();}},_checkboxClicked:function(operationId,event) {var operation=this.operationById(this._target,operationId);if(!operation) return;var debuggerModel=WebInspector.DebuggerModel.fromTarget(this._target);if(!debuggerModel) return;operation[this._checkedSymbol]=event.target.checked;if(event.target.checked) debuggerModel.setAsyncOperationBreakpoint(operationId);else debuggerModel.removeAsyncOperationBreakpoint(operationId);},_clear:function() {this._hidePopover();this.reset();this._operationIdToElement.clear();this._linkifier.reset();},_hidePopover:function() {this._popoverHelper.hidePopover();},_getPopoverAnchor:function(element,event) {var anchor=(element.enclosingNodeOrSelfWithNodeName("a"));if(!anchor) return undefined;var operation=this._operationForPopover(anchor);return operation?anchor:undefined;},_showPopover:function(anchor,popover) {var operation=this._operationForPopover(anchor);if(!operation) return;var content=WebInspector.DOMPresentationUtils.buildStackTracePreviewContents(this._target,this._linkifier,operation.stackTrace,operation.asyncStackTrace);popover.setCanShrink(true);popover.showForAnchor(content,anchor);},_operationForPopover:function(element) {var asyncOperations=this._target&&this._asyncOperationsByTarget.get(this._target);if(!asyncOperations) return null;var anchor=element.enclosingNodeOrSelfWithClass("async-operation");if(!anchor) return null;var operationId=anchor[this._operationIdSymbol];var operation=operationId&&asyncOperations.get(operationId);if(!operation||!operation.stackTrace) return null;return operation;},__proto__:WebInspector.BreakpointsSidebarPaneBase.prototype};WebInspector.CallStackSidebarPane=function() {WebInspector.SidebarPane.call(this,WebInspector.UIString("Call Stack"));this.element.addEventListener("keydown",this._keyDown.bind(this),true);this.element.tabIndex=0;this.callFrameList=new WebInspector.UIList();this.callFrameList.show(this.element);WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this._asyncStackTracesStateChanged,this);WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this._blackboxingStateChanged,this);} WebInspector.CallStackSidebarPane.Events={CallFrameSelected:"CallFrameSelected",RevealHiddenCallFrames:"RevealHiddenCallFrames"} WebInspector.CallStackSidebarPane.prototype={update:function(details) {this.callFrameList.detach();this.callFrameList.clear();this.element.removeChildren();if(!details){var infoElement=this.element.createChild("div","callstack-info");infoElement.textContent=WebInspector.UIString("Not Paused");return;} this.callFrameList.show(this.element);this._debuggerModel=details.debuggerModel;var callFrames=details.callFrames;var asyncStackTrace=details.asyncStackTrace;delete this._statusMessageElement;delete this._hiddenCallFramesMessageElement;this.callFrames=[];this._hiddenCallFrames=0;this._appendSidebarCallFrames(callFrames);var topStackHidden=(this._hiddenCallFrames===this.callFrames.length);while(asyncStackTrace){var title=WebInspector.asyncStackTraceLabel(asyncStackTrace.description);var asyncCallFrame=new WebInspector.UIList.Item(title,"",true);asyncCallFrame.element.addEventListener("click",this._selectNextVisibleCallFrame.bind(this,this.callFrames.length,false),false);asyncCallFrame.element.addEventListener("contextmenu",this._asyncCallFrameContextMenu.bind(this,this.callFrames.length),true);this._appendSidebarCallFrames(asyncStackTrace.callFrames,asyncCallFrame);asyncStackTrace=asyncStackTrace.asyncStackTrace;} if(topStackHidden) this._revealHiddenCallFrames();if(this._hiddenCallFrames){var element=createElementWithClass("div","hidden-callframes-message");if(this._hiddenCallFrames===1) element.textContent=WebInspector.UIString("1 stack frame is hidden (black-boxed).");else element.textContent=WebInspector.UIString("%d stack frames are hidden (black-boxed).",this._hiddenCallFrames);element.createTextChild(" ");var showAllLink=element.createChild("span","link");showAllLink.textContent=WebInspector.UIString("Show");showAllLink.addEventListener("click",this._revealHiddenCallFrames.bind(this),false);this.element.insertBefore(element,this.element.firstChild);this._hiddenCallFramesMessageElement=element;}},_appendSidebarCallFrames:function(callFrames,asyncCallFrameItem) {if(asyncCallFrameItem) this.callFrameList.addItem(asyncCallFrameItem);var allCallFramesHidden=true;for(var i=0,n=callFrames.length;ithis._historyDepth) this._entries.shift();this._activeEntryIndex=this._entries.length-1;},rollback:function() {if(this.empty()) return false;var revealIndex=this._activeEntryIndex-1;while(revealIndex>=0&&!this._entries[revealIndex].valid()) --revealIndex;if(revealIndex<0) return false;this.readOnlyLock();this._entries[revealIndex].reveal();this.releaseReadOnlyLock();this._activeEntryIndex=revealIndex;return true;},rollover:function() {var revealIndex=this._activeEntryIndex+1;while(revealIndex=this._entries.length) return false;this.readOnlyLock();this._entries[revealIndex].reveal();this.releaseReadOnlyLock();this._activeEntryIndex=revealIndex;return true;},};;WebInspector.EditingLocationHistoryManager=function(sourcesView,currentSourceFrameCallback) {this._sourcesView=sourcesView;this._historyManager=new WebInspector.SimpleHistoryManager(WebInspector.EditingLocationHistoryManager.HistoryDepth);this._currentSourceFrameCallback=currentSourceFrameCallback;} WebInspector.EditingLocationHistoryManager.HistoryDepth=20;WebInspector.EditingLocationHistoryManager.prototype={trackSourceFrameCursorJumps:function(sourceFrame) {sourceFrame.addEventListener(WebInspector.SourceFrame.Events.JumpHappened,this._onJumpHappened.bind(this));},_onJumpHappened:function(event) {if(event.data.from) this._updateActiveState(event.data.from);if(event.data.to) this._pushActiveState(event.data.to);},rollback:function() {this._historyManager.rollback();},rollover:function() {this._historyManager.rollover();},updateCurrentState:function() {var sourceFrame=this._currentSourceFrameCallback();if(!sourceFrame) return;this._updateActiveState(sourceFrame.textEditor.selection());},pushNewState:function() {var sourceFrame=this._currentSourceFrameCallback();if(!sourceFrame) return;this._pushActiveState(sourceFrame.textEditor.selection());},_updateActiveState:function(selection) {var active=this._historyManager.active();if(!active) return;var sourceFrame=this._currentSourceFrameCallback();if(!sourceFrame) return;var entry=new WebInspector.EditingLocationHistoryEntry(this._sourcesView,this,sourceFrame,selection);active.merge(entry);},_pushActiveState:function(selection) {var sourceFrame=this._currentSourceFrameCallback();if(!sourceFrame) return;var entry=new WebInspector.EditingLocationHistoryEntry(this._sourcesView,this,sourceFrame,selection);this._historyManager.push(entry);},removeHistoryForSourceCode:function(uiSourceCode) {function filterOut(entry) {return entry._projectId===uiSourceCode.project().id()&&entry._path===uiSourceCode.path();} this._historyManager.filterOut(filterOut);},} WebInspector.EditingLocationHistoryEntry=function(sourcesView,editingLocationManager,sourceFrame,selection) {this._sourcesView=sourcesView;this._editingLocationManager=editingLocationManager;var uiSourceCode=sourceFrame.uiSourceCode();this._projectId=uiSourceCode.project().id();this._path=uiSourceCode.path();var position=this._positionFromSelection(selection);this._positionHandle=sourceFrame.textEditor.textEditorPositionHandle(position.lineNumber,position.columnNumber);} WebInspector.EditingLocationHistoryEntry.prototype={merge:function(entry) {if(this._projectId!==entry._projectId||this._path!==entry._path) return;this._positionHandle=entry._positionHandle;},_positionFromSelection:function(selection) {return{lineNumber:selection.endLine,columnNumber:selection.endColumn};},valid:function() {var position=this._positionHandle.resolve();var uiSourceCode=WebInspector.workspace.project(this._projectId).uiSourceCode(this._path);return!!(position&&uiSourceCode);},reveal:function() {var position=this._positionHandle.resolve();var uiSourceCode=WebInspector.workspace.project(this._projectId).uiSourceCode(this._path);if(!position||!uiSourceCode) return;this._editingLocationManager.updateCurrentState();this._sourcesView.showSourceLocation(uiSourceCode,position.lineNumber,position.columnNumber);}};WebInspector.EventListenerBreakpointsSidebarPane=function() {WebInspector.SidebarPane.call(this,WebInspector.UIString("Event Listener Breakpoints"));this.registerRequiredCSS("components/breakpointsList.css");this._eventListenerBreakpointsSetting=WebInspector.settings.createLocalSetting("eventListenerBreakpoints",[]);this._categoriesTreeOutline=new TreeOutline();this._categoriesTreeOutline.element.tabIndex=0;this._categoriesTreeOutline.element.classList.add("event-listener-breakpoints");this.element.appendChild(this._categoriesTreeOutline.element);this._categoryItems=[];this._createCategory(WebInspector.UIString("Animation"),["requestAnimationFrame","cancelAnimationFrame","animationFrameFired"],true);this._createCategory(WebInspector.UIString("Clipboard"),["copy","cut","paste","beforecopy","beforecut","beforepaste"]);this._createCategory(WebInspector.UIString("Control"),["resize","scroll","zoom","focus","blur","select","change","submit","reset"]);this._createCategory(WebInspector.UIString("Device"),["deviceorientation","devicemotion"]);this._createCategory(WebInspector.UIString("DOM Mutation"),["DOMActivate","DOMFocusIn","DOMFocusOut","DOMAttrModified","DOMCharacterDataModified","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","DOMContentLoaded"]);this._createCategory(WebInspector.UIString("Drag / drop"),["dragenter","dragover","dragleave","drop"]);this._createCategory(WebInspector.UIString("Keyboard"),["keydown","keyup","keypress","input"]);this._createCategory(WebInspector.UIString("Load"),["load","beforeunload","unload","abort","error","hashchange","popstate"]);this._createCategory(WebInspector.UIString("Media"),["play","pause","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange","loadstart","progress","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","waiting"],false,["audio","video"]);this._createCategory(WebInspector.UIString("Mouse"),["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout","mouseenter","mouseleave","mousewheel","wheel","contextmenu"]);this._createCategory(WebInspector.UIString("Parse"),["setInnerHTML"],true);this._createCategory(WebInspector.UIString("Pointer"),["pointerover","pointerout","pointerenter","pointerleave","pointerdown","pointerup","pointermove","pointercancel","gotpointercapture","lostpointercapture"],true);this._createCategory(WebInspector.UIString("Promise"),["newPromise","promiseResolved","promiseRejected"],true);this._createCategory(WebInspector.UIString("Script"),["scriptFirstStatement"],true);this._createCategory(WebInspector.UIString("Timer"),["setTimer","clearTimer","timerFired"],true);this._createCategory(WebInspector.UIString("Touch"),["touchstart","touchmove","touchend","touchcancel"]);this._createCategory(WebInspector.UIString("WebGL"),["webglErrorFired","webglWarningFired"],true);this._createCategory(WebInspector.UIString("Window"),["close"],true);this._createCategory(WebInspector.UIString("XHR"),["readystatechange","load","loadstart","loadend","abort","error","progress","timeout"],false,["XMLHttpRequest","XMLHttpRequestUpload"]);WebInspector.targetManager.observeTargets(this);} WebInspector.EventListenerBreakpointsSidebarPane.categoryListener="listener:";WebInspector.EventListenerBreakpointsSidebarPane.categoryInstrumentation="instrumentation:";WebInspector.EventListenerBreakpointsSidebarPane.eventTargetAny="*";WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI=function(eventName,auxData) {if(!WebInspector.EventListenerBreakpointsSidebarPane._eventNamesForUI){WebInspector.EventListenerBreakpointsSidebarPane._eventNamesForUI={"instrumentation:setTimer":WebInspector.UIString("Set Timer"),"instrumentation:clearTimer":WebInspector.UIString("Clear Timer"),"instrumentation:timerFired":WebInspector.UIString("Timer Fired"),"instrumentation:newPromise":WebInspector.UIString("Promise Created"),"instrumentation:promiseResolved":WebInspector.UIString("Promise Resolved"),"instrumentation:promiseRejected":WebInspector.UIString("Promise Rejected"),"instrumentation:scriptFirstStatement":WebInspector.UIString("Script First Statement"),"instrumentation:requestAnimationFrame":WebInspector.UIString("Request Animation Frame"),"instrumentation:cancelAnimationFrame":WebInspector.UIString("Cancel Animation Frame"),"instrumentation:animationFrameFired":WebInspector.UIString("Animation Frame Fired"),"instrumentation:webglErrorFired":WebInspector.UIString("WebGL Error Fired"),"instrumentation:webglWarningFired":WebInspector.UIString("WebGL Warning Fired"),"instrumentation:setInnerHTML":WebInspector.UIString("Set innerHTML"),};} if(auxData){if(eventName==="instrumentation:webglErrorFired"&&auxData["webglErrorName"]){var errorName=auxData["webglErrorName"];errorName=errorName.replace(/^.*(0x[0-9a-f]+).*$/i,"$1");return WebInspector.UIString("WebGL Error Fired (%s)",errorName);}} return WebInspector.EventListenerBreakpointsSidebarPane._eventNamesForUI[eventName]||eventName.substring(eventName.indexOf(":")+1);} WebInspector.EventListenerBreakpointsSidebarPane.prototype={targetAdded:function(target) {this._restoreBreakpoints(target);},targetRemoved:function(target){},_createCategory:function(name,eventNames,isInstrumentationEvent,targetNames) {var labelNode=createCheckboxLabel(name);var categoryItem={};categoryItem.element=new TreeElement(labelNode);this._categoriesTreeOutline.appendChild(categoryItem.element);categoryItem.element.listItemElement.classList.add("event-category");categoryItem.element.selectable=true;categoryItem.checkbox=labelNode.checkboxElement;categoryItem.checkbox.addEventListener("click",this._categoryCheckboxClicked.bind(this,categoryItem),true);categoryItem.targetNames=this._stringArrayToLowerCase(targetNames||[WebInspector.EventListenerBreakpointsSidebarPane.eventTargetAny]);categoryItem.children={};var category=(isInstrumentationEvent?WebInspector.EventListenerBreakpointsSidebarPane.categoryInstrumentation:WebInspector.EventListenerBreakpointsSidebarPane.categoryListener);for(var i=0;i=skipCharScore){sequence[i*m+j]=consecutiveMatch+1;score[i*m+j]=(prevCharScore+pickCharScore);}else{sequence[i*m+j]=0;score[i*m+j]=skipCharScore;}}} if(matchIndexes) this._restoreMatchIndexes(sequence,n,m,matchIndexes);return score[n*m-1];},_testWordStart:function(data,j) {var prevChar=data.charAt(j-1);return j===0||prevChar==="_"||prevChar==="-"||prevChar==="/"||(data[j-1]!==this._dataUpperCase[j-1]&&data[j]===this._dataUpperCase[j]);},_restoreMatchIndexes:function(sequence,n,m,out) {var i=n-1,j=m-1;while(i>=0&&j>=0){switch(sequence[i*m+j]){case 0:--j;break;default:out.push(j);--i;--j;break;}} out.reverse();},_singleCharScore:function(query,data,i,j) {var isWordStart=this._testWordStart(data,j);var isFileName=j>this._fileNameIndex;var isPathTokenStart=j===0||data[j-1]==="/";var isCapsMatch=query[i]===data[j]&&query[i]==this._queryUpperCase[i];var score=10;if(isPathTokenStart) score+=4;if(isWordStart) score+=2;if(isCapsMatch) score+=6;if(isFileName) score+=4;if(j===this._fileNameIndex+1&&i===0) score+=5;if(isFileName&&isWordStart) score+=3;return score;},_sequenceCharScore:function(query,data,i,j,sequenceLength) {var isFileName=j>this._fileNameIndex;var isPathTokenStart=j===0||data[j-1]==="/";var score=10;if(isFileName) score+=4;if(isPathTokenStart) score+=5;score+=sequenceLength*4;return score;},_match:function(query,data,i,j,consecutiveMatch) {if(this._queryUpperCase[i]!==this._dataUpperCase[j]) return 0;if(!consecutiveMatch) return this._singleCharScore(query,data,i,j);else return this._sequenceCharScore(query,data,i,j-consecutiveMatch,consecutiveMatch);}};WebInspector.FilteredItemSelectionDialog=function(delegate) {WebInspector.DialogDelegate.call(this);this.element.className="filtered-item-list-dialog";this.element.addEventListener("keydown",this._onKeyDown.bind(this),false);this.element.appendChild(WebInspector.Widget.createStyleElement("sources/filteredItemSelectionDialog.css"));this._promptElement=this.element.createChild("input","monospace");this._promptElement.addEventListener("input",this._onInput.bind(this),false);this._promptElement.type="text";this._promptElement.setAttribute("spellcheck","false");this._filteredItems=[];this._viewportControl=new WebInspector.ViewportControl(this);this._itemElementsContainer=this._viewportControl.element;this._itemElementsContainer.classList.add("container");this._itemElementsContainer.classList.add("monospace");this._itemElementsContainer.addEventListener("click",this._onClick.bind(this),false);this.element.appendChild(this._itemElementsContainer);this._delegate=delegate;this._delegate.setRefreshCallback(this._itemsLoaded.bind(this));this._itemsLoaded();} WebInspector.FilteredItemSelectionDialog.prototype={position:function(element,relativeToElement) {const shadow=10;const shadowPadding=20;var container=WebInspector.Dialog.modalHostView().element;var preferredWidth=Math.max(relativeToElement.offsetWidth*2/3,500);var width=Math.min(preferredWidth,container.offsetWidth-2*shadowPadding);var preferredHeight=Math.max(relativeToElement.offsetHeight*2/3,204);var height=Math.min(preferredHeight,container.offsetHeight-2*shadowPadding);this.element.style.width=width+"px";var box=relativeToElement.boxInWindow(window).relativeToElement(container);var positionX=box.x+Math.max((box.width-width-2*shadowPadding)/2,shadow);positionX=Math.max(shadow,Math.min(container.offsetWidth-width-2*shadowPadding,positionX));var positionY=box.y+Math.max((box.height-height-2*shadowPadding)/2,shadow);positionY=Math.max(shadow,Math.min(container.offsetHeight-height-2*shadowPadding,positionY));element.positionAt(positionX,positionY,container);this._dialogHeight=height;this._updateShowMatchingItems();this._viewportControl.refresh();},focus:function() {WebInspector.setCurrentFocusElement(this._promptElement);if(this._filteredItems.length&&this._viewportControl.lastVisibleIndex()===-1) this._viewportControl.refresh();},willHide:function() {if(this._isHiding) return;this._isHiding=true;this._delegate.dispose();if(this._filterTimer) clearTimeout(this._filterTimer);},renderAsTwoRows:function() {this._renderAsTwoRows=true;},onEnter:function() {if(!this._delegate.itemCount()) return;var selectedIndex=this._shouldShowMatchingItems()&&this._selectedIndexInFilteredminBestScore||bestScores.lengthbestItemsToCollect){overflowItems.push(bestItems.peekLast());bestScores.length=bestItemsToCollect;bestItems.length=bestItemsToCollect;} minBestScore=bestScores.peekLast();}else filteredItems.push(i);} if(i=this._filteredItems.length) newSelectedIndex=this._filteredItems.length-1;this._updateSelection(newSelectedIndex,true);event.consume(true);break;case WebInspector.KeyboardShortcut.Keys.Up.code:if(--newSelectedIndex<0) newSelectedIndex=0;this._updateSelection(newSelectedIndex,false);event.consume(true);break;case WebInspector.KeyboardShortcut.Keys.PageDown.code:newSelectedIndex=Math.min(newSelectedIndex+this._rowsPerViewport(),this._filteredItems.length-1);this._updateSelection(newSelectedIndex,true);event.consume(true);break;case WebInspector.KeyboardShortcut.Keys.PageUp.code:newSelectedIndex=Math.max(newSelectedIndex-this._rowsPerViewport(),0);this._updateSelection(newSelectedIndex,false);event.consume(true);break;default:}},_scheduleFilter:function() {if(this._filterTimer) return;this._filterTimer=setTimeout(this._filterItems.bind(this),0);},_updateSelection:function(index,makeLast) {if(!this._filteredItems.length) return;if(this._selectedElement) this._selectedElement.classList.remove("selected");this._viewportControl.scrollItemIntoView(index,makeLast);this._selectedIndexInFiltered=index;this._selectedElement=this._viewportControl.renderedElementAt(index);if(this._selectedElement) this._selectedElement.classList.add("selected");},_onClick:function(event) {var itemElement=event.target.enclosingNodeOrSelfWithClass("filtered-item-list-dialog-item");if(!itemElement) return;this._delegate.selectItem(itemElement._index,this._promptElement.value.trim());WebInspector.Dialog.hide();},itemCount:function() {return this._filteredItems.length;},fastHeight:function(index) {if(!this._rowHeight){var delegateIndex=this._filteredItems[index];var element=this._createItemElement(delegateIndex);this._rowHeight=WebInspector.measurePreferredSize(element,this._viewportControl.contentElement()).height;} return this._rowHeight;},itemElement:function(index) {var delegateIndex=this._filteredItems[index];var element=this._createItemElement(delegateIndex);return new WebInspector.StaticViewportElement(element);},minimumRowHeight:function() {return this.fastHeight(0);},__proto__:WebInspector.DialogDelegate.prototype} WebInspector.SelectionDialogContentProvider=function() {} WebInspector.SelectionDialogContentProvider.prototype={setRefreshCallback:function(refreshCallback) {this._refreshCallback=refreshCallback;},shouldShowMatchingItems:function(query) {return true;},itemCount:function() {return 0;},itemKeyAt:function(itemIndex) {return"";},itemScoreAt:function(itemIndex,query) {return 1;},renderItem:function(itemIndex,query,titleElement,subtitleElement) {},highlightRanges:function(element,query) {if(!query) return false;function rangesForMatch(text,query) {var sm=new difflib.SequenceMatcher(query,text);var opcodes=sm.get_opcodes();var ranges=[];for(var i=0;i=0) this._selectItemCallback(lineNumber,this._functionItems[itemIndex].column);},dispose:function() {if(this._outlineWorker){this._outlineWorker.terminate();delete this._outlineWorker;}},__proto__:WebInspector.SelectionDialogContentProvider.prototype} WebInspector.SelectUISourceCodeDialog=function(defaultScores) {WebInspector.SelectionDialogContentProvider.call(this);this._populate();this._defaultScores=defaultScores;this._scorer=new WebInspector.FilePathScoreFunction("");WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded,this._uiSourceCodeAdded,this);WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved,this._projectRemoved,this);} WebInspector.SelectUISourceCodeDialog.prototype={_projectRemoved:function(event) {var project=(event.data);this._populate(project);this.refresh();},_populate:function(skipProject) {this._uiSourceCodes=[];var projects=WebInspector.workspace.projects().filter(this.filterProject.bind(this));for(var i=0;ifileNameIndex){for(var i=0;i=0;--i){var infobar=infobars[i];if(!infobar) continue;this.element.insertBefore(infobar.element,this.element.children[0]);infobar._attached(this);} this.doResize();},dispose:function() {this._textEditor.dispose();this.detach();},__proto__:WebInspector.SourceFrame.prototype} WebInspector.UISourceCodeFrame.Infobar=function(type,message,disableSetting) {WebInspector.Infobar.call(this,type,disableSetting);this.setCloseCallback(this.dispose.bind(this));this.element.classList.add("source-frame-infobar");this._rows=this.element.createChild("div","source-frame-infobar-rows");this._mainRow=this._rows.createChild("div","source-frame-infobar-main-row");this._mainRow.createChild("span","source-frame-infobar-row-message").textContent=message;this._toggleElement=this._mainRow.createChild("div","source-frame-infobar-toggle link");this._toggleElement.addEventListener("click",this._onToggleDetails.bind(this),false);this._detailsContainer=this._rows.createChild("div","source-frame-infobar-details-container");this._updateToggleElement();} WebInspector.UISourceCodeFrame.Infobar.prototype={_onResize:function() {if(this._uiSourceCodeFrame) this._uiSourceCodeFrame.doResize();},_onToggleDetails:function() {this._toggled=!this._toggled;this._updateToggleElement();this._onResize();},_updateToggleElement:function() {this._toggleElement.textContent=this._toggled?WebInspector.UIString("less"):WebInspector.UIString("more");this._detailsContainer.classList.toggle("hidden",!this._toggled);},_attached:function(uiSourceCodeFrame) {this._uiSourceCodeFrame=uiSourceCodeFrame;this.setVisible(true);},createDetailsRowMessage:function(message) {var infobarDetailsRow=this._detailsContainer.createChild("div","source-frame-infobar-details-row");var detailsRowMessage=infobarDetailsRow.createChild("span","source-frame-infobar-row-message");detailsRowMessage.textContent=message||"";return detailsRowMessage;},dispose:function() {this.element.remove();this._onResize();delete this._uiSourceCodeFrame;},__proto__:WebInspector.Infobar.prototype};WebInspector.JavaScriptBreakpointsSidebarPane=function(breakpointManager,showSourceLineDelegate) {WebInspector.SidebarPane.call(this,WebInspector.UIString("Breakpoints"));this.registerRequiredCSS("components/breakpointsList.css");this._breakpointManager=breakpointManager;this._showSourceLineDelegate=showSourceLineDelegate;this.listElement=createElementWithClass("ol","breakpoint-list");this.emptyElement=this.element.createChild("div","info");this.emptyElement.textContent=WebInspector.UIString("No Breakpoints");this._items=new Map();var breakpointLocations=this._breakpointManager.allBreakpointLocations();for(var i=0;i100?columnNumber:0;snippetElement.textContent=lineText.substr(snippetStartIndex).trimEnd(maxSnippetLength);}} uiLocation.uiSourceCode.requestContent(didRequestContent);element._data=uiLocation;var currentElement=this.listElement.firstChild;while(currentElement){if(currentElement._data&&this._compareBreakpoints(currentElement._data,element._data)>0) break;currentElement=currentElement.nextSibling;} this._addListElement(element,currentElement);var breakpointItem={element:element,checkbox:checkboxLabel.checkboxElement};this._items.set(breakpoint,breakpointItem);this.expand();},_breakpointRemoved:function(event) {var breakpoint=(event.data.breakpoint);var breakpointItem=this._items.get(breakpoint);if(!breakpointItem) return;this._items.remove(breakpoint);this._removeListElement(breakpointItem.element);},highlightBreakpoint:function(breakpoint) {var breakpointItem=this._items.get(breakpoint);if(!breakpointItem) return;breakpointItem.element.classList.add("breakpoint-hit");this._highlightedBreakpointItem=breakpointItem;},clearBreakpointHighlight:function() {if(this._highlightedBreakpointItem){this._highlightedBreakpointItem.element.classList.remove("breakpoint-hit");delete this._highlightedBreakpointItem;}},_breakpointClicked:function(uiLocation,event) {this._showSourceLineDelegate(uiLocation.uiSourceCode,uiLocation.lineNumber);},_breakpointCheckboxClicked:function(breakpoint,event) {event.consume();breakpoint.setEnabled(event.target.checkboxElement.checked);},_breakpointContextMenu:function(breakpoint,event) {var breakpoints=this._items.valuesArray();var contextMenu=new WebInspector.ContextMenu(event);contextMenu.appendItem(WebInspector.UIString.capitalize("Remove ^breakpoint"),breakpoint.remove.bind(breakpoint));if(breakpoints.length>1){var removeAllTitle=WebInspector.UIString.capitalize("Remove ^all ^breakpoints");contextMenu.appendItem(removeAllTitle,this._breakpointManager.removeAllBreakpoints.bind(this._breakpointManager));} contextMenu.appendSeparator();this._appendBreakpointActiveItem(contextMenu);function enabledBreakpointCount(breakpoints) {var count=0;for(var i=0;i1){var enableBreakpointCount=enabledBreakpointCount(breakpoints);var enableTitle=WebInspector.UIString.capitalize("Enable ^all ^breakpoints");var disableTitle=WebInspector.UIString.capitalize("Disable ^all ^breakpoints");contextMenu.appendSeparator();contextMenu.appendItem(enableTitle,this._breakpointManager.toggleAllBreakpoints.bind(this._breakpointManager,true),!(enableBreakpointCount!=breakpoints.length));contextMenu.appendItem(disableTitle,this._breakpointManager.toggleAllBreakpoints.bind(this._breakpointManager,false),!(enableBreakpointCount>1));} contextMenu.show();},_addListElement:function(element,beforeElement) {if(beforeElement) this.listElement.insertBefore(element,beforeElement);else{if(!this.listElement.firstChild){this.element.removeChild(this.emptyElement);this.element.appendChild(this.listElement);} this.listElement.appendChild(element);}},_removeListElement:function(element) {this.listElement.removeChild(element);if(!this.listElement.firstChild){this.element.removeChild(this.listElement);this.element.appendChild(this.emptyElement);}},_compare:function(x,y) {if(x!==y) return xtextSelection.endColumn) return;var leftCorner=this.textEditor.cursorPositionToCoordinates(textSelection.startLine,textSelection.startColumn);var rightCorner=this.textEditor.cursorPositionToCoordinates(textSelection.endLine,textSelection.endColumn);var anchorBox=new AnchorBox(leftCorner.x,leftCorner.y,rightCorner.x-leftCorner.x,leftCorner.height);anchorBox.highlight={lineNumber:textSelection.startLine,startColumn:textSelection.startColumn,endColumn:textSelection.endColumn-1};anchorBox.forSelection=true;return anchorBox;} var token=this.textEditor.tokenAtTextPosition(textPosition.startLine,textPosition.startColumn);if(!token||!token.type) return;var lineNumber=textPosition.startLine;var line=this.textEditor.line(lineNumber);var tokenContent=line.substring(token.startColumn,token.endColumn);var isIdentifier=this._isIdentifier(token.type);if(!isIdentifier&&(token.type!=="js-keyword"||tokenContent!=="this")) return;var leftCorner=this.textEditor.cursorPositionToCoordinates(lineNumber,token.startColumn);var rightCorner=this.textEditor.cursorPositionToCoordinates(lineNumber,token.endColumn-1);var anchorBox=new AnchorBox(leftCorner.x,leftCorner.y,rightCorner.x-leftCorner.x,leftCorner.height);anchorBox.highlight={lineNumber:lineNumber,startColumn:token.startColumn,endColumn:token.endColumn-1};return anchorBox;},_resolveObjectForPopover:function(anchorBox,showCallback,objectGroupName) {var target=WebInspector.context.flavor(WebInspector.Target);var debuggerModel=WebInspector.DebuggerModel.fromTarget(target);if(!debuggerModel||!debuggerModel.isPaused()){this._popoverHelper.hidePopover();return;} var lineNumber=anchorBox.highlight.lineNumber;var startHighlight=anchorBox.highlight.startColumn;var endHighlight=anchorBox.highlight.endColumn;var line=this.textEditor.line(lineNumber);if(!anchorBox.forSelection){while(startHighlight>1&&line.charAt(startHighlight-1)==='.'){var token=this.textEditor.tokenAtTextPosition(lineNumber,startHighlight-2);if(!token||!token.type){this._popoverHelper.hidePopover();return;} startHighlight=token.startColumn;}} var evaluationText=line.substring(startHighlight,endHighlight+1);var selectedCallFrame=debuggerModel.selectedCallFrame();selectedCallFrame.evaluate(evaluationText,objectGroupName,false,true,false,false,showObjectPopover.bind(this));function showObjectPopover(result,wasThrown) {var target=WebInspector.context.flavor(WebInspector.Target);if(selectedCallFrame.target()!=target||!debuggerModel.isPaused()||!result){this._popoverHelper.hidePopover();return;} this._popoverAnchorBox=anchorBox;showCallback(target.runtimeModel.createRemoteObject(result),wasThrown,this._popoverAnchorBox);if(this._popoverAnchorBox){var highlightRange=new WebInspector.TextRange(lineNumber,startHighlight,lineNumber,endHighlight);this._popoverAnchorBox._highlightDescriptor=this.textEditor.highlightRange(highlightRange,"source-frame-eval-expression");}}},_onHidePopover:function() {if(!this._popoverAnchorBox) return;if(this._popoverAnchorBox._highlightDescriptor) this.textEditor.removeHighlight(this._popoverAnchorBox._highlightDescriptor);delete this._popoverAnchorBox;},_addBreakpointDecoration:function(lineNumber,columnNumber,condition,enabled,mutedWhileEditing) {var breakpoint={condition:condition,enabled:enabled,columnNumber:columnNumber};this.textEditor.setAttribute(lineNumber,"breakpoint",breakpoint);var disabled=!enabled||mutedWhileEditing;this.textEditor.addBreakpoint(lineNumber,disabled,!!condition);},_removeBreakpointDecoration:function(lineNumber) {this.textEditor.removeAttribute(lineNumber,"breakpoint");this.textEditor.removeBreakpoint(lineNumber);},_onKeyDown:function(event) {if(event.keyIdentifier==="U+001B"){if(this._popoverHelper.isPopoverVisible()){this._popoverHelper.hidePopover();event.consume();}}},_editBreakpointCondition:function(lineNumber,breakpoint) {this._conditionElement=this._createConditionElement(lineNumber);this.textEditor.addDecoration(lineNumber,this._conditionElement);function finishEditing(committed,element,newText) {this.textEditor.removeDecoration(lineNumber,this._conditionElement);delete this._conditionEditorElement;delete this._conditionElement;if(!committed) return;if(breakpoint) breakpoint.setCondition(newText);else this._createNewBreakpoint(lineNumber,0,newText,true);} var config=new WebInspector.InplaceEditor.Config(finishEditing.bind(this,true),finishEditing.bind(this,false));WebInspector.InplaceEditor.startEditing(this._conditionEditorElement,config);this._conditionEditorElement.value=breakpoint?breakpoint.condition():"";this._conditionEditorElement.select();},_createConditionElement:function(lineNumber) {var conditionElement=createElementWithClass("div","source-frame-breakpoint-condition");var labelElement=conditionElement.createChild("label","source-frame-breakpoint-message");labelElement.htmlFor="source-frame-breakpoint-condition";labelElement.createTextChild(WebInspector.UIString("The breakpoint on line %d will stop only if this expression is true:",lineNumber+1));var editorElement=conditionElement.createChild("input","monospace");editorElement.id="source-frame-breakpoint-condition";editorElement.type="text";this._conditionEditorElement=editorElement;return conditionElement;},setExecutionLocation:function(uiLocation) {this._executionLocation=uiLocation;if(!this.loaded) return;this.textEditor.setExecutionLocation(uiLocation.lineNumber,uiLocation.columnNumber);if(this.isShowing()){setImmediate(this._generateValuesInSource.bind(this));}},_generateValuesInSource:function() {if(!Runtime.experiments.isEnabled("inlineVariableValues")||!WebInspector.moduleSetting("inlineVariableValues").get()) return;var executionContext=WebInspector.context.flavor(WebInspector.ExecutionContext);if(!executionContext) return;var callFrame=executionContext.debuggerModel.selectedCallFrame();if(!callFrame) return;var localScope=callFrame.localScope();var functionLocation=callFrame.functionLocation();if(localScope&&functionLocation) localScope.object().getAllProperties(false,this._prepareScopeVariables.bind(this,callFrame));if(this._clearValueWidgetsTimer){clearTimeout(this._clearValueWidgetsTimer);delete this._clearValueWidgetsTimer;}},_prepareScopeVariables:function(callFrame,properties,internalProperties) {if(!properties||!properties.length||properties.length>500){this._clearValueWidgets();return;} var functionUILocation=WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation((callFrame.functionLocation()));var executionUILocation=WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(callFrame.location());if(functionUILocation.uiSourceCode!==this._uiSourceCode||executionUILocation.uiSourceCode!==this._uiSourceCode){this._clearValueWidgets();return;} var fromLine=functionUILocation.lineNumber;var fromColumn=functionUILocation.columnNumber;var toLine=executionUILocation.lineNumber;if(this._valueWidgets){for(var line of this._valueWidgets.keys()) toLine=Math.max(toLine,line+1);} if(fromLine>=toLine||toLine-fromLine>500){this._clearValueWidgets();return;} var valuesMap=new Map();for(var property of properties) valuesMap.set(property.name,property.value);var namesPerLine=new Map();var tokenizer=new WebInspector.CodeMirrorUtils.TokenizerFactory().createTokenizer("text/javascript");tokenizer(this.textEditor.line(fromLine).substring(fromColumn),processToken.bind(this,fromLine));for(var i=fromLine+1;i10) break;if(namesPerLine.get(i-1)&&namesPerLine.get(i-1).has(name)) continue;if(renderedNameCount) widget.createTextChild(", ");var nameValuePair=widget.createChild("span");widget.__nameToToken.set(name,nameValuePair);nameValuePair.createTextChild(name+" = ");var value=valuesMap.get(name);var propertyCount=value.preview?value.preview.properties.length:0;var entryCount=value.preview&&value.preview.entries?value.preview.entries.length:0;if(value.preview&&propertyCount+entryCount<10) formatter.appendObjectPreview(nameValuePair,value.preview);else nameValuePair.appendChild(WebInspector.ObjectPropertiesSection.createValueElement(value,false));++renderedNameCount;} var widgetChanged=true;if(oldWidget){widgetChanged=false;for(var name of widget.__nameToToken.keys()){var oldText=oldWidget.__nameToToken.get(name)?oldWidget.__nameToToken.get(name).textContent:"";var newText=widget.__nameToToken.get(name)?widget.__nameToToken.get(name).textContent:"";if(newText!==oldText){widgetChanged=true;WebInspector.runCSSAnimationOnce((widget.__nameToToken.get(name)),"source-frame-value-update-highlight");}} if(widgetChanged){this._valueWidgets.delete(i);this.textEditor.removeDecoration(i,oldWidget);}} if(widgetChanged){this._valueWidgets.set(i,widget);this.textEditor.addDecoration(i,widget);}}},clearExecutionLine:function() {if(this.loaded&&this._executionLocation) this.textEditor.clearExecutionLine();delete this._executionLocation;this._clearValueWidgetsTimer=setTimeout(this._clearValueWidgets.bind(this),1000);},_clearValueWidgets:function() {delete this._clearValueWidgetsTimer;for(var line of this._valueWidgets.keys()) this.textEditor.removeDecoration(line,this._valueWidgets.get(line));this._valueWidgets.clear();},_shouldIgnoreExternalBreakpointEvents:function() {if(this._supportsEnabledBreakpointsWhileEditing()) return false;if(this._muted) return true;var scriptFiles=this._scriptFileForTarget.valuesArray();for(var i=0;i0) token=this.textEditor.tokenAtTextPosition(selection.startLine,selection.startColumn-1);if(!token) return false;} if(token.type!=="css-number") return false;var cssUnitRange=new WebInspector.TextRange(selection.startLine,token.startColumn,selection.startLine,token.endColumn);var cssUnitText=this.textEditor.copyRange(cssUnitRange);var newUnitText=this._modifyUnit(cssUnitText,change);if(!newUnitText) return false;this.textEditor.editRange(cssUnitRange,newUnitText);selection.startColumn=token.startColumn;selection.endColumn=selection.startColumn+newUnitText.length;this.textEditor.setSelection(selection);return true;},__proto__:WebInspector.UISourceCodeFrame.prototype} WebInspector.CSSSourceFrame.AutocompleteDelegate=function() {this._simpleDelegate=new WebInspector.SimpleAutocompleteDelegate(".-$");} WebInspector.CSSSourceFrame._backtrackDepth=10;WebInspector.CSSSourceFrame.AutocompleteDelegate.prototype={initialize:function(editor) {this._simpleDelegate.initialize(editor);},dispose:function() {this._simpleDelegate.dispose();},substituteRange:function(editor,lineNumber,columnNumber) {return this._simpleDelegate.substituteRange(editor,lineNumber,columnNumber);},_backtrackPropertyToken:function(editor,lineNumber,columnNumber) {var tokenPosition=columnNumber;var line=editor.line(lineNumber);var seenColumn=false;for(var i=0;i=0;++i){var token=editor.tokenAtTextPosition(lineNumber,tokenPosition);if(!token) return null;if(token.type==="css-property") return seenColumn?token:null;if(token.type&&!(token.type.indexOf("whitespace")!==-1||token.type.startsWith("css-comment"))) return null;if(!token.type&&line.substring(token.startColumn,token.endColumn)===":"){if(!seenColumn) seenColumn=true;else return null;} tokenPosition=token.startColumn-1;} return null;},wordsWithPrefix:function(editor,prefixRange,substituteRange) {var prefix=editor.copyRange(prefixRange);if(prefix.startsWith("$")) return this._simpleDelegate.wordsWithPrefix(editor,prefixRange,substituteRange);var propertyToken=this._backtrackPropertyToken(editor,prefixRange.startLine,prefixRange.startColumn-1);if(!propertyToken) return this._simpleDelegate.wordsWithPrefix(editor,prefixRange,substituteRange);var line=editor.line(prefixRange.startLine);var tokenContent=line.substring(propertyToken.startColumn,propertyToken.endColumn);var keywords=WebInspector.CSSMetadata.keywordsForProperty(tokenContent);return keywords.startsWith(prefix);},};WebInspector.NavigatorView=function() {WebInspector.VBox.call(this);this.registerRequiredCSS("sources/navigatorView.css");this.element.classList.add("navigator-container");var scriptsOutlineElement=this.element.createChild("div","navigator");this._scriptsTree=new TreeOutline();this._scriptsTree.setComparator(WebInspector.NavigatorView._treeElementsCompare);this._scriptsTree.element.classList.add("outline-disclosure");scriptsOutlineElement.appendChild(this._scriptsTree.element);this.setDefaultFocusedElement(this._scriptsTree.element);this._uiSourceCodeNodes=new Map();this._subfolderNodes=new Map();this._rootNode=new WebInspector.NavigatorRootTreeNode(this);this._rootNode.populate();this.element.addEventListener("contextmenu",this.handleContextMenu.bind(this),false);} WebInspector.NavigatorView.Events={ItemSelected:"ItemSelected",ItemRenamed:"ItemRenamed",} WebInspector.NavigatorView.Types={Root:"Root",Domain:"Domain",Folder:"Folder",UISourceCode:"UISourceCode",FileSystem:"FileSystem"} WebInspector.NavigatorView.iconClassForType=function(type) {if(type===WebInspector.NavigatorView.Types.Domain) return"navigator-domain-tree-item";if(type===WebInspector.NavigatorView.Types.FileSystem) return"navigator-folder-tree-item";return"navigator-folder-tree-item";} WebInspector.NavigatorView.appendAddFolderItem=function(contextMenu) {function addFolder() {WebInspector.isolatedFileSystemManager.addFileSystem();} var addFolderLabel=WebInspector.UIString.capitalize("Add ^folder to ^workspace");contextMenu.appendItem(addFolderLabel,addFolder);} WebInspector.NavigatorView.prototype={setWorkspace:function(workspace) {this._workspace=workspace;this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded,this._uiSourceCodeAdded,this);this._workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved,this._uiSourceCodeRemoved,this);this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved,this._projectRemoved.bind(this),this);},wasShown:function() {if(this._loaded) return;this._loaded=true;this._workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this));},accept:function(uiSourceCode) {return!uiSourceCode.project().isServiceProject();},_addUISourceCode:function(uiSourceCode) {if(!this.accept(uiSourceCode)) return;var projectNode=this._projectNode(uiSourceCode.project());var folderNode=this._folderNode(projectNode,uiSourceCode.parentPath());var uiSourceCodeNode=new WebInspector.NavigatorUISourceCodeTreeNode(this,uiSourceCode);this._uiSourceCodeNodes.set(uiSourceCode,uiSourceCodeNode);folderNode.appendChild(uiSourceCodeNode);},_uiSourceCodeAdded:function(event) {var uiSourceCode=(event.data);this._addUISourceCode(uiSourceCode);},_uiSourceCodeRemoved:function(event) {var uiSourceCode=(event.data);this._removeUISourceCode(uiSourceCode);},_projectRemoved:function(event) {var project=(event.data);project.removeEventListener(WebInspector.Project.Events.DisplayNameUpdated,this._updateProjectNodeTitle,this);var uiSourceCodes=project.uiSourceCodes();for(var i=0;itypeWeight2) result=1;else if(typeWeight10){rootElement.insertChild(uiSourceCodeItem,i);break;}} if(i===rootElement.childCount()) rootElement.appendChild(uiSourceCodeItem);this._uiSourceCodeItems.set(uiSourceCode,uiSourceCodeItem);var revisionCount=uiSourceCode.history.length;for(var i=revisionCount-1;i>=0;--i){var revision=uiSourceCode.history[i];var historyItem=new WebInspector.RevisionHistoryTreeElement(revision,uiSourceCode.history[i-1],i!==revisionCount-1);uiSourceCodeItem.appendChild(historyItem);} var linkItem=new TreeElement();linkItem.selectable=false;uiSourceCodeItem.appendChild(linkItem);var revertToOriginal=linkItem.listItemElement.createChild("span","revision-history-link revision-history-link-row");revertToOriginal.textContent=WebInspector.UIString("apply original content");revertToOriginal.addEventListener("click",this._revertToOriginal.bind(this,uiSourceCode));var clearHistoryElement=uiSourceCodeItem.listItemElement.createChild("span","revision-history-link");clearHistoryElement.textContent=WebInspector.UIString("revert");clearHistoryElement.addEventListener("click",this._clearHistory.bind(this,uiSourceCode));return uiSourceCodeItem;},_revertToOriginal:function(uiSourceCode) {uiSourceCode.revertToOriginal();},_clearHistory:function(uiSourceCode) {uiSourceCode.revertAndClearHistory(this._removeUISourceCode.bind(this));},_revisionAdded:function(event) {var uiSourceCode=(event.data.uiSourceCode);var uiSourceCodeItem=this._uiSourceCodeItems.get(uiSourceCode);if(!uiSourceCodeItem){uiSourceCodeItem=this._createUISourceCodeItem(uiSourceCode);return;} var historyLength=uiSourceCode.history.length;var historyItem=new WebInspector.RevisionHistoryTreeElement(uiSourceCode.history[historyLength-1],uiSourceCode.history[historyLength-2],false);if(uiSourceCodeItem.firstChild()) uiSourceCodeItem.firstChild().allowRevert();uiSourceCodeItem.insertChild(historyItem,0);},_revealUISourceCode:function(uiSourceCode) {var uiSourceCodeItem=this._uiSourceCodeItems.get(uiSourceCode);if(uiSourceCodeItem){uiSourceCodeItem.reveal();uiSourceCodeItem.expand();}},_uiSourceCodeRemoved:function(event) {var uiSourceCode=(event.data);this._removeUISourceCode(uiSourceCode);},_removeUISourceCode:function(uiSourceCode) {var uiSourceCodeItem=this._uiSourceCodeItems.get(uiSourceCode);if(!uiSourceCodeItem) return;this._treeOutline.removeChild(uiSourceCodeItem);this._uiSourceCodeItems.remove(uiSourceCode);},_projectRemoved:function(event) {var project=event.data;project.uiSourceCodes().forEach(this._removeUISourceCode.bind(this));},__proto__:WebInspector.VBox.prototype} WebInspector.RevisionHistoryTreeElement=function(revision,baseRevision,allowRevert) {TreeElement.call(this,revision.timestamp.toLocaleTimeString(),true);this.selectable=false;this._revision=revision;this._baseRevision=baseRevision;this._revertElement=createElement("span");this._revertElement.className="revision-history-link";this._revertElement.textContent=WebInspector.UIString("apply revision content");this._revertElement.addEventListener("click",this._revision.revertToThis.bind(this._revision),false);if(!allowRevert) this._revertElement.classList.add("hidden");} WebInspector.RevisionHistoryTreeElement.prototype={onattach:function() {this.listItemElement.classList.add("revision-history-revision");},onpopulate:function() {this.listItemElement.appendChild(this._revertElement);this.childrenListElement.classList.add("source-code");if(this._baseRevision) this._baseRevision.requestContent(step1.bind(this));else this._revision.uiSourceCode.requestOriginalContent(step1.bind(this));function step1(baseContent) {this._revision.requestContent(step2.bind(this,baseContent));} function step2(baseContent,newContent) {var baseLines=difflib.stringAsLines(baseContent);var newLines=difflib.stringAsLines(newContent);var sm=new difflib.SequenceMatcher(baseLines,newLines);var opcodes=sm.get_opcodes();var lastWasSeparator=false;for(var idx=0;idx",exception));} var returnValue=callFrame.returnValue();if(returnValue) extraProperties.push(new WebInspector.RemoteObjectProperty("",returnValue));} break;case DebuggerAgent.ScopeType.Closure:title=WebInspector.UIString("Closure");emptyPlaceholder=WebInspector.UIString("No Variables");break;case DebuggerAgent.ScopeType.Catch:title=WebInspector.UIString("Catch");break;case DebuggerAgent.ScopeType.Block:title=WebInspector.UIString("Block");break;case DebuggerAgent.ScopeType.Script:title=WebInspector.UIString("Script");break;case DebuggerAgent.ScopeType.With:title=WebInspector.UIString("With Block");break;case DebuggerAgent.ScopeType.Global:title=WebInspector.UIString("Global");break;} var subtitle=scope.description();if(!title||title===subtitle) subtitle=undefined;var titleElement=createElementWithClass("div");titleElement.createChild("div","scope-chain-sidebar-pane-section-subtitle").textContent=subtitle;titleElement.createChild("div","scope-chain-sidebar-pane-section-title").textContent=title;var section=new WebInspector.ObjectPropertiesSection(scope.object(),titleElement,emptyPlaceholder,true,extraProperties);section[WebInspector.ScopeChainSidebarPane._pathSymbol]=title+":"+(subtitle?subtitle+":":"");section.addEventListener(TreeOutline.Events.ElementAttached,this._elementAttached,this);section.addEventListener(TreeOutline.Events.ElementExpanded,this._elementExpanded,this);section.addEventListener(TreeOutline.Events.ElementCollapsed,this._elementCollapsed,this);if(scope.type()===DebuggerAgent.ScopeType.Global) section.objectTreeElement().collapse();else if(!foundLocalScope||scope.type()===DebuggerAgent.ScopeType.Local||this._expandedSections.has(title)) section.objectTreeElement().expand();section.element.classList.add("scope-chain-sidebar-pane-section");this._sections.push(section);this.element.appendChild(section.element);}},_elementAttached:function(event) {var element=(event.data);if(element.isExpandable()&&this._expandedProperties.has(this._propertyPath(element))) element.expand();},_elementExpanded:function(event) {var element=(event.data);this._expandedProperties.add(this._propertyPath(element));},_elementCollapsed:function(event) {var element=(event.data);this._expandedProperties.delete(this._propertyPath(element));},_propertyPath:function(treeElement) {return treeElement.treeOutline[WebInspector.ScopeChainSidebarPane._pathSymbol]+WebInspector.ObjectPropertyTreeElement.prototype.propertyPath.call(treeElement);},__proto__:WebInspector.SidebarPane.prototype};WebInspector.ServiceWorkersSidebarPane=function() {WebInspector.SidebarPane.call(this,WebInspector.UIString("\u2699 Service Workers"));this.registerRequiredCSS("sources/serviceWorkersSidebar.css");this._bodyElement=this.element.createChild("div","vbox");this.setVisible(false);this._manager=null;WebInspector.targetManager.observeTargets(this,WebInspector.Target.Type.Page);this._placeholderElement=createElementWithClass("div","info");this._placeholderElement.textContent=WebInspector.UIString("No service workers control this page");} WebInspector.ServiceWorkersSidebarPane.prototype={targetAdded:function(target) {if(this._manager) return;this._manager=target.serviceWorkerManager;this._updateVisibility();target.serviceWorkerManager.addEventListener(WebInspector.ServiceWorkerManager.Events.WorkersUpdated,this._update,this);},targetRemoved:function(target) {target.serviceWorkerManager.removeEventListener(WebInspector.ServiceWorkerManager.Events.WorkersUpdated,this._update,this);this._updateVisibility();},_update:function() {this._updateVisibility();this._bodyElement.removeChildren();if(!this.isShowing()||!this._manager) return;if(!this._manager.hasWorkers()){this._bodyElement.appendChild(this._placeholderElement);return;} for(var worker of this._manager.workers()){var workerElement=this._bodyElement.createChild("div","service-worker");var leftBox=workerElement.createChild("div","vbox flex-auto");leftBox.appendChild(WebInspector.linkifyURLAsNode(worker.url(),worker.name()));var scopeElement=leftBox.createChild("span","service-worker-scope");scopeElement.textContent=worker.scope();scopeElement.title=worker.scope();workerElement.appendChild(createTextButton(WebInspector.UIString("Unregister"),worker.stop.bind(worker)));}},_updateVisibility:function() {this._wasVisibleAtLeastOnce=this._wasVisibleAtLeastOnce||!!this._manager&&this._manager.hasWorkers();this.setVisible(this._wasVisibleAtLeastOnce);},wasShown:function() {this._update();},__proto__:WebInspector.SidebarPane.prototype};WebInspector.SourcesNavigator=function(workspace) {WebInspector.Object.call(this);this._workspace=workspace;this._tabbedPane=new WebInspector.TabbedPane();this._tabbedPane.setShrinkableTabs(true);this._tabbedPane.element.classList.add("navigator-tabbed-pane");this._tabbedPaneController=new WebInspector.ExtensibleTabbedPaneController(this._tabbedPane,"navigator-view",this._navigatorViewCreated.bind(this));this._navigatorViews=new Map();} WebInspector.SourcesNavigator.Events={SourceSelected:"SourceSelected",SourceRenamed:"SourceRenamed"} WebInspector.SourcesNavigator.prototype={_navigatorViewCreated:function(id,view) {var navigatorView=(view);navigatorView.addEventListener(WebInspector.NavigatorView.Events.ItemSelected,this._sourceSelected,this);navigatorView.addEventListener(WebInspector.NavigatorView.Events.ItemRenamed,this._sourceRenamed,this);this._navigatorViews.set(id,navigatorView);navigatorView.setWorkspace(this._workspace);},get view() {return this._tabbedPane;},revealUISourceCode:function(uiSourceCode) {var ids=this._tabbedPaneController.viewIds();var promises=[];for(var i=0;i=0) this._selectItemCallback(lineNumber,rule.columnNumber);},dispose:function() {this._cssParser.dispose();},__proto__:WebInspector.SelectionDialogContentProvider.prototype};WebInspector.TabbedEditorContainerDelegate=function(){} WebInspector.TabbedEditorContainerDelegate.prototype={viewForFile:function(uiSourceCode){},} WebInspector.TabbedEditorContainer=function(delegate,setting,placeholderText) {WebInspector.Object.call(this);this._delegate=delegate;this._tabbedPane=new WebInspector.TabbedPane();this._tabbedPane.setPlaceholderText(placeholderText);this._tabbedPane.setTabDelegate(new WebInspector.EditorContainerTabDelegate(this));this._tabbedPane.setCloseableTabs(true);this._tabbedPane.insertBeforeTabStrip(createElementWithClass("div","sources-editor-tabstrip-left"));this._tabbedPane.appendAfterTabStrip(createElementWithClass("div","sources-editor-tabstrip-right"));this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabClosed,this._tabClosed,this);this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected,this._tabSelected,this);this._tabIds=new Map();this._files={};this._previouslyViewedFilesSetting=setting;this._history=WebInspector.TabbedEditorContainer.History.fromObject(this._previouslyViewedFilesSetting.get());} WebInspector.TabbedEditorContainer.Events={EditorSelected:"EditorSelected",EditorClosed:"EditorClosed"} WebInspector.TabbedEditorContainer._tabId=0;WebInspector.TabbedEditorContainer.maximalPreviouslyViewedFilesCount=30;WebInspector.TabbedEditorContainer.prototype={get view() {return this._tabbedPane;},get visibleView() {return this._tabbedPane.visibleView;},fileViews:function() {return(this._tabbedPane.tabViews());},show:function(parentElement) {this._tabbedPane.show(parentElement);},showFile:function(uiSourceCode) {this._innerShowFile(uiSourceCode,true);},closeFile:function(uiSourceCode) {var tabId=this._tabIds.get(uiSourceCode);if(!tabId) return;this._closeTabs([tabId]);},historyUISourceCodes:function() {var uriToUISourceCode={};for(var id in this._files){var uiSourceCode=this._files[id];uriToUISourceCode[uiSourceCode.uri()]=uiSourceCode;} var result=[];var uris=this._history._urls();for(var i=0;i=0;--i){var index=this.index(urls[i]);var item;if(index!==-1){item=this._items[index];this._items.splice(index,1);}else item=new WebInspector.TabbedEditorContainer.HistoryItem(urls[i]);this._items.unshift(item);this._rebuildItemIndex();}},remove:function(url) {var index=this.index(url);if(index!==-1){this._items.splice(index,1);this._rebuildItemIndex();}},save:function(setting) {setting.set(this._serializeToObject());},_serializeToObject:function() {var serializedHistory=[];for(var i=0;i1) contextMenu.appendItem(WebInspector.UIString.capitalize("Delete ^all ^watch ^expressions"),this._deleteAllButtonClicked.bind(this));for(var watchExpression of this._watchExpressions) if(watchExpression.element().containsEventPoint(event)) watchExpression._populateContextMenu(contextMenu,event);},_deleteAllButtonClicked:function() {this._watchExpressions=[];this._saveExpressions();this._rebuildWatchExpressions();},__proto__:WebInspector.SidebarPane.prototype} WebInspector.WatchExpression=function(expression) {this._expression=expression;this._element=createElementWithClass("div","watch-expression monospace");this._editing=false;this._createWatchExpression(null,false);this.update();} WebInspector.WatchExpression._watchObjectGroupId="watch-group";WebInspector.WatchExpression.Events={ExpressionUpdated:"ExpressionUpdated"} WebInspector.WatchExpression.prototype={element:function() {return this._element;},expression:function() {return this._expression;},update:function() {var currentExecutionContext=WebInspector.context.flavor(WebInspector.ExecutionContext);if(currentExecutionContext&&this._expression) currentExecutionContext.evaluate(this._expression,WebInspector.WatchExpression._watchObjectGroupId,false,true,false,false,this._createWatchExpression.bind(this));},startEditing:function() {this._editing=true;this._element.removeChild(this._objectPresentationElement);var newDiv=this._element.createChild("div");newDiv.textContent=this._nameElement.textContent;this._textPrompt=new WebInspector.ObjectPropertyPrompt();this._textPrompt.renderAsBlock();var proxyElement=this._textPrompt.attachAndStartEditing(newDiv,this._finishEditing.bind(this));proxyElement.classList.add("watch-expression-text-prompt-proxy");proxyElement.addEventListener("keydown",this._promptKeyDown.bind(this),false);this._element.getComponentSelection().setBaseAndExtent(newDiv,0,newDiv,1);},isEditing:function() {return!!this._editing;},_finishEditing:function(event,canceled) {if(event) event.consume(true);this._editing=false;this._textPrompt.detach();var newExpression=canceled?this._expression:this._textPrompt.text();delete this._textPrompt;this._element.removeChildren();this._element.appendChild(this._objectPresentationElement);this._updateExpression(newExpression);},_dblClickOnWatchExpression:function(event) {event.consume();if(!this.isEditing()) this.startEditing();},_updateExpression:function(newExpression) {this._expression=newExpression;this.update();this.dispatchEventToListeners(WebInspector.WatchExpression.Events.ExpressionUpdated);},_deleteWatchExpression:function(event) {event.consume(true);this._updateExpression(null);},_createWatchExpression:function(result,wasThrown) {this._result=result;var headerElement=createElementWithClass("div","watch-expression-header");var deleteButton=headerElement.createChild("button","watch-expression-delete-button");deleteButton.title=WebInspector.UIString("Delete watch expression");deleteButton.addEventListener("click",this._deleteWatchExpression.bind(this),false);var titleElement=headerElement.createChild("div","watch-expression-title");this._nameElement=WebInspector.ObjectPropertiesSection.createNameElement(this._expression);if(wasThrown||!result){this._valueElement=createElementWithClass("span","error-message value");titleElement.classList.add("dimmed");this._valueElement.textContent=WebInspector.UIString("");}else{this._valueElement=WebInspector.ObjectPropertiesSection.createValueElementWithCustomSupport(result,wasThrown,titleElement);} var separatorElement=createElementWithClass("span","watch-expressions-separator");separatorElement.textContent=": ";titleElement.appendChildren(this._nameElement,separatorElement,this._valueElement);this._element.removeChildren();this._objectPropertiesSection=null;if(!wasThrown&&result&&result.hasChildren&&!result.customPreview()){this._objectPropertiesSection=new WebInspector.ObjectPropertiesSection(result,headerElement);this._objectPresentationElement=this._objectPropertiesSection.element;var objectTreeElement=this._objectPropertiesSection.objectTreeElement();objectTreeElement.toggleOnClick=false;objectTreeElement.listItemElement.addEventListener("click",this._onSectionClick.bind(this),false);objectTreeElement.listItemElement.addEventListener("dblclick",this._dblClickOnWatchExpression.bind(this));}else{this._objectPresentationElement=headerElement;this._objectPresentationElement.addEventListener("dblclick",this._dblClickOnWatchExpression.bind(this));} this._element.appendChild(this._objectPresentationElement);},_onSectionClick:function(event) {event.consume(true);if(event.detail==1){this._preventClickTimeout=setTimeout(handleClick.bind(this),333);}else{clearTimeout(this._preventClickTimeout);delete this._preventClickTimeout;} function handleClick() {if(!this._objectPropertiesSection) return;var objectTreeElement=this._objectPropertiesSection.objectTreeElement();if(objectTreeElement.expanded) objectTreeElement.collapse();else objectTreeElement.expand();}},_promptKeyDown:function(event) {if(isEnterKey(event)||isEscKey(event)) this._finishEditing(event,isEscKey(event));},_populateContextMenu:function(contextMenu,event) {if(!this.isEditing()) contextMenu.appendItem(WebInspector.UIString.capitalize("Delete ^watch ^expression"),this._updateExpression.bind(this,null));if(!this.isEditing()&&this._result&&(this._result.type==="number"||this._result.type==="string")) contextMenu.appendItem(WebInspector.UIString.capitalize("Copy ^value"),this._copyValueButtonClicked.bind(this));if(this._valueElement.containsEventPoint(event)) contextMenu.appendApplicableItems(this._result);},_copyValueButtonClicked:function() {InspectorFrontendHost.copyText(this._valueElement.textContent);},__proto__:WebInspector.Object.prototype};WebInspector.ThreadsSidebarPane=function() {WebInspector.SidebarPane.call(this,WebInspector.UIString("Threads"));this.setVisible(false);this._debuggerModelToListItems=new Map();this._listItemsToTargets=new Map();this._selectedListItem=null;this.threadList=new WebInspector.UIList();this.threadList.show(this.element);WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel,WebInspector.DebuggerModel.Events.DebuggerPaused,this._onDebuggerStateChanged,this);WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel,WebInspector.DebuggerModel.Events.DebuggerResumed,this._onDebuggerStateChanged,this);WebInspector.context.addFlavorChangeListener(WebInspector.Target,this._targetChanged,this);WebInspector.targetManager.observeTargets(this);} WebInspector.ThreadsSidebarPane.prototype={targetAdded:function(target) {var debuggerModel=WebInspector.DebuggerModel.fromTarget(target) if(!debuggerModel){this._updateVisibility();return;} var listItem=new WebInspector.UIList.Item(target.name(),"");listItem.element.addEventListener("click",this._onListItemClick.bind(this,listItem),false);var currentTarget=WebInspector.context.flavor(WebInspector.Target);if(currentTarget===target) this._selectListItem(listItem);this._debuggerModelToListItems.set(debuggerModel,listItem);this._listItemsToTargets.set(listItem,target);this.threadList.addItem(listItem);this._updateDebuggerState(debuggerModel);this._updateVisibility();},_updateVisibility:function() {this._wasVisibleAtLeastOnce=this._wasVisibleAtLeastOnce||this._debuggerModelToListItems.size>1;this.setVisible(this._wasVisibleAtLeastOnce);},targetRemoved:function(target) {var debuggerModel=WebInspector.DebuggerModel.fromTarget(target) if(!debuggerModel) return;var listItem=this._debuggerModelToListItems.remove(debuggerModel);if(listItem){this._listItemsToTargets.remove(listItem);this.threadList.removeItem(listItem);} this._updateVisibility();},_targetChanged:function(event) {var newTarget=(event.data);var debuggerModel=WebInspector.DebuggerModel.fromTarget(newTarget) if(!debuggerModel) return;var listItem=(this._debuggerModelToListItems.get(debuggerModel));this._selectListItem(listItem);},_onDebuggerStateChanged:function(event) {var debuggerModel=(event.target);this._updateDebuggerState(debuggerModel);},_updateDebuggerState:function(debuggerModel) {var listItem=this._debuggerModelToListItems.get(debuggerModel);listItem.setSubtitle(WebInspector.UIString(debuggerModel.isPaused()?"paused":""));},_selectListItem:function(listItem) {if(listItem===this._selectedListItem) return;if(this._selectedListItem) this._selectedListItem.setSelected(false);this._selectedListItem=listItem;listItem.setSelected(true);},_onListItemClick:function(listItem) {WebInspector.context.setFlavor(WebInspector.Target,this._listItemsToTargets.get(listItem));listItem.element.scrollIntoViewIfNeeded();},__proto__:WebInspector.SidebarPane.prototype};WebInspector.FormatterScriptMapping=function(debuggerModel,editorAction) {this._debuggerModel=debuggerModel;this._editorAction=editorAction;} WebInspector.FormatterScriptMapping.prototype={rawLocationToUILocation:function(rawLocation) {var debuggerModelLocation=(rawLocation);var script=debuggerModelLocation.script();var uiSourceCode=this._editorAction._uiSourceCodes.get(script);if(!uiSourceCode) return null;var formatData=this._editorAction._formatData.get(uiSourceCode);if(!formatData) return null;var mapping=formatData.mapping;var lineNumber=debuggerModelLocation.lineNumber;var columnNumber=debuggerModelLocation.columnNumber||0;var formattedLocation=mapping.originalToFormatted(lineNumber,columnNumber);return uiSourceCode.uiLocation(formattedLocation[0],formattedLocation[1]);},uiLocationToRawLocation:function(uiSourceCode,lineNumber,columnNumber) {var formatData=this._editorAction._formatData.get(uiSourceCode);if(!formatData) return null;var originalLocation=formatData.mapping.formattedToOriginal(lineNumber,columnNumber);for(var i=0;ipositions2[index+1]) convertedPosition=positions2[index+1];return convertedPosition;}};WebInspector.SourcesView=function(workspace,sourcesPanel) {WebInspector.VBox.call(this);this.registerRequiredCSS("sources/sourcesView.css");this.element.id="sources-panel-sources-view";this.setMinimumAndPreferredSizes(50,52,150,100);this._workspace=workspace;this._sourcesPanel=sourcesPanel;this._searchableView=new WebInspector.SearchableView(this,"sourcesViewSearchConfig");this._searchableView.setMinimalSearchQuerySize(0);this._searchableView.show(this.element);this._sourceFramesByUISourceCode=new Map();var tabbedEditorPlaceholderText=WebInspector.isMac()?WebInspector.UIString("Hit Cmd+P to open a file"):WebInspector.UIString("Hit Ctrl+P to open a file");this._editorContainer=new WebInspector.TabbedEditorContainer(this,WebInspector.settings.createLocalSetting("previouslyViewedFiles",[]),tabbedEditorPlaceholderText);this._editorContainer.show(this._searchableView.element);this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorSelected,this._editorSelected,this);this._editorContainer.addEventListener(WebInspector.TabbedEditorContainer.Events.EditorClosed,this._editorClosed,this);this._historyManager=new WebInspector.EditingLocationHistoryManager(this,this.currentSourceFrame.bind(this));this._toolbarContainerElement=this.element.createChild("div","sources-toolbar");this._toolbarEditorActions=new WebInspector.Toolbar(this._toolbarContainerElement);self.runtime.instancesPromise(WebInspector.SourcesView.EditorAction).then(appendButtonsForExtensions.bind(this));function appendButtonsForExtensions(actions) {for(var i=0;i=files.length){if(!callbacksLeft){progress.done();callback();return;} return;} ++callbacksLeft;var uiSourceCode=files[fileIndex++];setTimeout(searchInNextFile.bind(this,uiSourceCode),0);} function contentLoaded(uiSourceCode,content) {function matchesComparator(a,b) {return a.lineNumber-b.lineNumber;} progress.worked(1);var matches=[];var queries=this._searchConfig.queries();if(content!==null){for(var i=0;i");this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a \"%s\" async operation.",description));this.sidebarPanes.asyncOperationBreakpoints.highlightBreakpoint(operationId);}}else{if(details.callFrames.length) WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(details.callFrames[0],didGetUILocation.bind(this));else console.warn("ScriptsPanel paused, but callFrames.length is zero.");} this._splitWidget.showBoth(true);this._toggleDebuggerSidebarButton.disabled=true;window.focus();InspectorFrontendHost.bringToFront();},_debuggerResumed:function(event) {var debuggerModel=(event.target);var target=debuggerModel.target();if(WebInspector.context.flavor(WebInspector.Target)!==target) return;this._paused=false;this._clearInterface();this._toggleDebuggerSidebarButton.disabled=false;this._switchToPausedTargetTimeout=setTimeout(this._switchToPausedTarget.bind(this,debuggerModel),500);},_debuggerWasEnabled:function(event) {var target=(event.target.target());if(WebInspector.context.flavor(WebInspector.Target)!==target) return;this._updateDebuggerButtons();},_debuggerReset:function(event) {this._debuggerResumed(event);},get visibleView() {return this._sourcesView.visibleView();},showUISourceCode:function(uiSourceCode,lineNumber,columnNumber) {this._showEditor();this._sourcesView.showSourceLocation(uiSourceCode,lineNumber,columnNumber);},_showEditor:function() {WebInspector.inspectorView.setCurrentPanel(this);},showUILocation:function(uiLocation) {this.showUISourceCode(uiLocation.uiSourceCode,uiLocation.lineNumber,uiLocation.columnNumber);},_revealInNavigator:function(uiSourceCode) {this._navigator.revealUISourceCode(uiSourceCode);},setIgnoreExecutionLineEvents:function(ignoreExecutionLineEvents) {this._ignoreExecutionLineEvents=ignoreExecutionLineEvents;},_executionLineChanged:function(uiLocation) {this._sourcesView.clearCurrentExecutionLine();this._sourcesView.setExecutionLocation(uiLocation);if(this._ignoreExecutionLineEvents) return;this._sourcesView.showSourceLocation(uiLocation.uiSourceCode,uiLocation.lineNumber,uiLocation.columnNumber,undefined,true);},_callFrameSelected:function(event) {var callFrame=(event.data);if(!callFrame||callFrame.target()!==WebInspector.context.flavor(WebInspector.Target)) return;this._selectCallFrame(callFrame);},_selectCallFrame:function(callFrame) {this.sidebarPanes.scopechain.update(callFrame);this.sidebarPanes.watchExpressions.refreshExpressions();this.sidebarPanes.callstack.setSelectedCallFrame(callFrame);WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(callFrame,this._executionLineChanged.bind(this));},_sourceSelected:function(event) {var uiSourceCode=(event.data.uiSourceCode);this._sourcesView.showSourceLocation(uiSourceCode,undefined,undefined,!event.data.focusSource)},_sourceRenamed:function(event) {var uiSourceCode=(event.data);this._sourcesView.sourceRenamed(uiSourceCode);},_pauseOnExceptionEnabledChanged:function() {var enabled=WebInspector.moduleSetting("pauseOnExceptionEnabled").get();this._pauseOnExceptionButton.setToggled(enabled);this._pauseOnExceptionButton.setTitle(WebInspector.UIString(enabled?"Don't pause on exceptions.":"Pause on exceptions."));this._debugToolbarDrawer.classList.toggle("expanded",enabled);},_updateDebuggerButtons:function() {var currentTarget=WebInspector.context.flavor(WebInspector.Target);var currentDebuggerModel=WebInspector.DebuggerModel.fromTarget(currentTarget);if(!currentDebuggerModel){this._pauseButton.setEnabled(false);this._stepOverButton.setEnabled(false);this._stepIntoButton.setEnabled(false);this._stepOutButton.setEnabled(false);}else if(this._paused){this._updateButtonTitle(this._pauseButton,WebInspector.UIString("Resume script execution (%s)."));this._pauseButton.setToggled(true);this._pauseButton.setLongClickOptionsEnabled((function(){return[this._longResumeButton];}).bind(this));this._pauseButton.setEnabled(true);this._stepOverButton.setEnabled(true);this._stepIntoButton.setEnabled(true);this._stepOutButton.setEnabled(true);}else{this._updateButtonTitle(this._pauseButton,WebInspector.UIString("Pause script execution (%s).")) this._pauseButton.setToggled(false);this._pauseButton.setLongClickOptionsEnabled(null);this._pauseButton.setEnabled(!currentDebuggerModel.isPausing());this._stepOverButton.setEnabled(false);this._stepIntoButton.setEnabled(false);this._stepOutButton.setEnabled(false);}},_clearInterface:function() {this.sidebarPanes.callstack.update(null);this.sidebarPanes.scopechain.update(null);this.sidebarPanes.jsBreakpoints.clearBreakpointHighlight();WebInspector.domBreakpointsSidebarPane.clearBreakpointHighlight();this.sidebarPanes.eventListenerBreakpoints.clearBreakpointHighlight();this.sidebarPanes.xhrBreakpoints.clearBreakpointHighlight();if(this.sidebarPanes.asyncOperationBreakpoints) this.sidebarPanes.asyncOperationBreakpoints.clearBreakpointHighlight();this._sourcesView.clearCurrentExecutionLine();this._updateDebuggerButtons();if(this._switchToPausedTargetTimeout) clearTimeout(this._switchToPausedTargetTimeout);},_switchToPausedTarget:function(debuggerModel) {delete this._switchToPausedTargetTimeout;if(this._paused) return;var target=WebInspector.context.flavor(WebInspector.Target);if(debuggerModel.isPaused()) return;var debuggerModels=WebInspector.DebuggerModel.instances();for(var i=0;i ol {\n min-width: 100%;\n min-height: 100%;\n display: inline-block;\n position: relative\n}\n\n.navigator li {\n height: 18px;\n line-height: 17px;\n white-space: nowrap;\n}\n\n.navigator :focus li.selected {\n color: white;\n}\n\n.navigator li.selected .selection {\n height: 18px;\n}\n\n.navigator > ol.being-edited li.selected .selection {\n background-color: rgb(56, 121, 217);\n}\n\n.navigator > ol.being-edited li.selected {\n overflow: visible;\n}\n\n.navigator .icon {\n width: 16px;\n height: 16px;\n float: left;\n}\n\n.navigator .base-navigator-tree-element-title {\n display: inline-block;\n position: relative;\n padding-left: 2px;\n}\n\n.navigator .base-navigator-tree-element-title.editing {\n margin: auto;\n}\n\n.navigator-tabbed-pane {\n flex: auto;\n}\n\n.navigator-tabbed-pane .navigator {\n padding-left: 0;\n transform: translateZ(0);\n}\n\n/*# sourceURL=sources/navigatorView.css */";Runtime.cachedResources["sources/revisionHistory.css"]="/*\n * Copyright (C) 2012 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n.outline-disclosure.revision-history-drawer {\n -webkit-padding-start: 0;\n overflow: auto;\n}\n\n.outline-disclosure.revision-history-drawer ol {\n margin-top: 2px;\n -webkit-padding-start: 0;\n padding-left: 0 !important;\n}\n\n.outline-disclosure.revision-history-drawer > ol {\n padding-left: 0;\n}\n\n.outline-disclosure.revision-history-drawer li {\n padding-left: 6px;\n margin-top: 0;\n margin-bottom: 0;\n height: 13px;\n}\n\n.outline-disclosure.revision-history-drawer li.parent {\n margin-left: 4px;\n}\n\n.revision-history-link {\n text-decoration: underline;\n cursor: pointer;\n color: #00e;\n padding: 0 4px;\n}\n\n.revision-history-link-row {\n padding-left: 16px;\n}\n\n.outline-disclosure.revision-history-drawer .revision-history-line {\n padding-left: 0;\n -webkit-user-select: text;\n}\n\n.revision-history-drawer .webkit-line-number {\n border-right: 1px solid #BBB;\n background-color: #F0F0F0;\n}\n\n.revision-history-drawer li.revision-history-revision {\n padding-left: 16px;\n}\n\n.revision-history-line-added {\n background-color: rgb(153, 238, 153);\n}\n\n.revision-history-line-removed {\n background-color: rgb(255, 221, 221);\n}\n\n.revision-history-line-separator .webkit-line-number {\n color: transparent;\n}\n\n.revision-history-line {\n white-space: nowrap;\n}\n\n/*# sourceURL=sources/revisionHistory.css */";Runtime.cachedResources["sources/serviceWorkersSidebar.css"]="/*\n * Copyright 2015 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.service-worker {\n padding: 5px 5px 5px 8px;\n border-bottom: 1px solid #aaa;\n display: flex;\n align-items: center;\n}\n\n.service-worker:last-child {\n border-bottom: none;\n}\n\n.service-worker-scope {\n color: #777;\n flex: auto;\n margin: 5px 5px 0 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n/*# sourceURL=sources/serviceWorkersSidebar.css */";Runtime.cachedResources["sources/sourcesPanel.css"]="/*\n * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2009 Anthony Ricaud \n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n.scripts-debug-toolbar {\n position: absolute;\n top: 0;\n width: 100%;\n background-color: #f3f3f3;\n border-bottom: 1px solid #ccc;\n overflow: hidden;\n}\n\n.scripts-debug-toolbar-drawer {\n flex: 0 0 52px;\n -webkit-transition: margin-top 0.1s ease-in-out;\n margin-top: -26px;\n padding-top: 25px;\n background-color: white;\n overflow: hidden;\n}\n\n.material .scripts-debug-toolbar-drawer {\n flex: 0 0 54px;\n margin-top: -27px;\n padding-top: 26px;\n}\n\n.scripts-debug-toolbar-drawer.expanded {\n margin-top: 0;\n}\n\n.scripts-debug-toolbar-drawer > label {\n display: flex;\n padding-left: 3px;\n height: 28px;\n}\n\n.sources-editor-tabstrip-left {\n width: 22px;\n}\n\n.sources-editor-tabstrip-right {\n width: 36px;\n}\n\n.function-location-link {\n float: right;\n margin-left: 10px;\n}\n\n.function-popover-title {\n border-bottom: 1px solid #AAA;\n margin-bottom: 3px;\n padding-bottom: 2px;\n}\n\n.function-popover-title .function-name {\n font-weight: bold;\n}\n\n.panel.sources .sidebar-pane-stack {\n overflow: auto;\n}\n\n.source-frame-breakpoint-condition {\n z-index: 30;\n padding: 4px;\n background-color: rgb(203, 226, 255);\n border-radius: 7px;\n border: 2px solid rgb(169, 172, 203);\n width: 90%;\n pointer-events: auto;\n}\n\n.source-frame-breakpoint-message {\n background-color: transparent;\n font-weight: normal;\n font-size: 11px;\n text-align: left;\n text-shadow: none;\n color: rgb(85, 85, 85);\n cursor: default;\n margin: 0 0 2px 0;\n}\n\n#source-frame-breakpoint-condition {\n margin: 0;\n border: 1px inset rgb(190, 190, 190) !important;\n width: 100%;\n box-shadow: none !important;\n outline: none !important;\n -webkit-user-modify: read-write;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.cursor-auto {\n cursor: auto;\n}\n\n.callstack-info {\n text-align: center;\n font-style: italic;\n font-size: 90%;\n padding: 6px;\n color: #888;\n pointer-events: none;\n}\n\n.callstack-info.status {\n border-top: 1px solid rgb(189, 189, 189);\n background-color: rgb(255, 255, 194);\n}\n\n.watch-expression-delete-button {\n width: 10px;\n height: 10px;\n background-image: url(Images/deleteIcon.png);\n background-position: 0 0;\n background-color: transparent;\n background-repeat: no-repeat;\n border: 0 none transparent;\n position: absolute;\n right: 3px;\n display: none;\n}\n\n.watch-expression-header:hover .watch-expression-delete-button {\n display: inline;\n}\n\n.watch-expressions {\n overflow-x: hidden;\n padding: 3px 6px 6px 0px;\n}\n\n.watch-expressions .dimmed {\n opacity: 0.6;\n}\n\n.watch-expression-title {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n line-height: 12px;\n margin-left: 11px;\n}\n\n.watch-expression {\n position: relative;\n padding: 1px 0px 1px 6px;\n}\n\n.watch-expressions .name {\n color: rgb(136, 19, 145);\n flex: none;\n white-space: nowrap;\n text-overflow: ellipsis ;\n overflow: hidden;\n}\n\n.watch-expressions-separator {\n flex: none;\n}\n\n.watch-expressions .value {\n white-space: nowrap;\n display: inline;\n}\n\n.watch-expression .text-prompt {\n text-overflow: clip;\n overflow: hidden;\n white-space: nowrap;\n padding-left: 4px;\n -webkit-user-select: text;\n}\n\n.watch-expression-text-prompt-proxy {\n margin-left: 12px;\n}\n\n.watch-expression-header:hover {\n background-color: #F0F0F0;\n padding-right: 14px;\n}\n\n.sidebar-pane-stack .watch-expressions {\n margin-top: 0px;\n}\n\n.scope-chain-sidebar-pane-section-subtitle {\n float: right;\n margin-left: 5px;\n max-width: 55%;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.scope-chain-sidebar-pane-section-title {\n font-weight: normal;\n word-wrap: break-word;\n white-space: normal;\n}\n\n.scope-chain-sidebar-pane-section {\n padding: 2px 4px 2px 4px;\n}\n\n.scope-chain-sidebar-pane-section-subtitle {\n float: right;\n margin-left: 5px;\n max-width: 55%;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.scope-chain-sidebar-pane-section-title {\n font-weight: normal;\n word-wrap: break-word;\n white-space: normal;\n}\n\n.scope-chain-sidebar-pane-section {\n padding: 2px 4px 2px 4px;\n}\n/*# sourceURL=sources/sourcesPanel.css */";Runtime.cachedResources["sources/sourcesSearch.css"]="/*\n * Copyright 2014 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.search-drawer-header {\n flex: none;\n padding: 4px;\n display: flex;\n}\n\n.search-drawer-header input[type=\"text\"].search-config-search {\n -webkit-appearance: none;\n padding: 0 3px;\n margin: 0;\n border: 1px solid rgb(163, 163, 163);\n height: 20px;\n border-radius: 2px;\n color: #303030;\n}\n\n.search-drawer-header input[type=\"search\"].search-config-search:focus {\n border: 1px solid rgb(190, 190, 190);\n outline: none;\n}\n\n:host-context(.platform-mac) .search-drawer-header input[type=\"search\"].search-config-search {\n top: 1px;\n}\n\n.search-drawer-header label.search-config-label {\n margin: auto 0;\n margin-left: 8px;\n color: #303030;\n display: flex;\n}\n\n.search-toolbar-summary {\n background-color: #eee;\n border-top: 1px solid #ccc;\n padding-left: 5px;\n flex: 0 0 19px;\n display: flex;\n padding-right: 5px;\n}\n\n.search-toolbar-summary .search-message {\n padding-top: 2px;\n}\n\n.search-toolbar-summary .search-message-spacer {\n flex-grow: 1;\n}\n\n#search-results-pane-file-based li {\n list-style: none;\n}\n\n#search-results-pane-file-based ol {\n -webkit-padding-start: 0;\n margin-top: 0;\n}\n\n#search-results-pane-file-based ol.children {\n display: none;\n}\n\n#search-results-pane-file-based ol.children.expanded {\n display: block;\n}\n\n#search-results-pane-file-based li.parent::before {\n -webkit-user-select: none;\n background-image: url(Images/toolbarButtonGlyphs.png);\n background-size: 352px 144px;\n opacity: 0.5;\n width: 12px;\n content: \"a\";\n color: transparent;\n margin-left: -5px;\n padding-right: 4px;\n display: inline-block;\n box-sizing: border-box;\n}\n\n@media (-webkit-min-device-pixel-ratio: 1.5) {\n#search-results-pane-file-based li.parent::before {\n background-image: url(Images/toolbarButtonGlyphs_2x.png);\n}\n} /* media */\n\n#search-results-pane-file-based li.parent::before {\n background-position: -4px -96px;\n}\n\n#search-results-pane-file-based li.parent.expanded::before {\n background-position: -20px -96px;\n}\n\n#search-results-pane-file-based .search-result {\n font-size: 11px;\n padding: 2px 0 2px 10px;\n word-wrap: normal;\n white-space: pre;\n cursor: pointer;\n}\n\n#search-results-pane-file-based .search-result:hover {\n background-color: rgba(121, 121, 121, 0.1);\n}\n\n#search-results-pane-file-based .search-result .search-result-file-name {\n font-weight: bold;\n color: #222;\n}\n\n#search-results-pane-file-based .search-result .search-result-matches-count {\n margin-left: 5px;\n color: #222;\n}\n\n#search-results-pane-file-based .show-more-matches {\n padding: 4px 0;\n color: #222;\n cursor: pointer;\n font-size: 11px;\n margin-left: 20px;\n}\n\n#search-results-pane-file-based .show-more-matches:hover {\n text-decoration: underline;\n}\n\n#search-results-pane-file-based .search-match {\n word-wrap: normal;\n white-space: pre;\n}\n\n#search-results-pane-file-based .search-match .search-match-line-number {\n color: rgb(128, 128, 128);\n text-align: right;\n vertical-align: top;\n word-break: normal;\n padding-right: 4px;\n padding-left: 6px;\n margin-right: 5px;\n border-right: 1px solid #BBB;\n}\n\n#search-results-pane-file-based .search-match:not(:hover) .search-match-line-number {\n background-color: #F0F0F0;\n}\n\n#search-results-pane-file-based .search-match:hover {\n background-color: rgba(56, 121, 217, 0.1);\n}\n\n#search-results-pane-file-based .search-match .highlighted-match {\n background-color: #F1EA00;\n}\n\n#search-results-pane-file-based a {\n text-decoration: none;\n display: block;\n}\n\n#search-results-pane-file-based .search-match .search-match-content {\n color: #000;\n}\n\n.search-view .search-results {\n overflow-y: auto;\n display: flex;\n flex: auto;\n}\n\n.search-results .empty-view {\n pointer-events: none;\n}\n\n.empty-view {\n font-size: 24px;\n color: rgb(75%, 75%, 75%);\n font-weight: bold;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/*# sourceURL=sources/sourcesSearch.css */";Runtime.cachedResources["sources/sourcesView.css"]="/*\n * Copyright (C) 2013 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#sources-panel-sources-view {\n flex: auto;\n position: relative;\n}\n\n#sources-panel-sources-view .sources-toolbar {\n display: flex;\n flex: 0 0 27px;\n background-color: #f3f3f3;\n border-top: 1px solid #dadada;\n overflow: hidden;\n}\n\n.sources-toolbar .toolbar {\n cursor: default;\n}\n\n.source-frame-debugger-script {\n background-color: rgba(255, 255, 194, 0.5);\n}\n\n.source-frame-unsaved-committed-changes {\n background-color: rgba(255, 225, 205, 0.40);\n}\n\n.source-frame-infobar {\n flex: none;\n display: flex;\n -webkit-user-select: text;\n}\n\n.source-frame-infobar-animation {\n -webkit-animation: source-frame-infobar-reveal 0.1s;\n}\n@-webkit-keyframes source-frame-infobar-reveal {\n from { margin-top: -24px; }\n to { margin-top: 0; }\n}\n\n.source-frame-infobar-main-row {\n display: flex;\n flex-direction: row;\n flex: auto;\n overflow: hidden;\n}\n\n.source-frame-infobar-details-container {\n display: flex;\n flex-direction: column;\n}\n\n.source-frame-infobar-details-row {\n display: flex;\n flex: none;\n margin-top: 2px;\n}\n\n.source-frame-infobar-row-message {\n overflow: hidden;\n}\n\n.source-frame-infobar-toggle {\n flex: 1 0 auto;\n padding: 0 4px;\n -webkit-user-select: none;\n}\n\n.source-frame-infobar-details-url {\n flex: 0 1000 auto;\n}\n\n@-webkit-keyframes source-frame-value-update-highlight-animation {\n from {\n background-color: inherit;\n color: inherit;\n }\n 10% {\n background-color: rgb(158, 54, 153);\n color: white;\n }\n to {\n background-color: inherit;\n color: inherit;\n }\n}\n\n.source-frame-value-update-highlight {\n -webkit-animation: source-frame-value-update-highlight-animation 0.8s 1 cubic-bezier(0, 0, 0.2, 1);\n border-radius: 2px;\n}\n\n/*# sourceURL=sources/sourcesView.css */";