From 579a0f16c4f3ad2bcc8a283081d214fbe1ee3a59 Mon Sep 17 00:00:00 2001 From: alexwl Date: Sat, 6 Oct 2018 01:15:16 +0300 Subject: Generate links to hyperlinked source code on Hackage instead of links to documentation --- javascript/app/utils/go-to-definition.js | 17 +- ...de-explorer-060c353f5a98a943d1b8f634eb163900.js | 204 ++++++++++++++++++++ ...de-explorer-f7f4bfc85d03709e38fddce7106b4991.js | 206 --------------------- javascript/release/index.html | 4 +- 4 files changed, 211 insertions(+), 220 deletions(-) create mode 100644 javascript/release/assets/haskell-code-explorer-060c353f5a98a943d1b8f634eb163900.js delete mode 100644 javascript/release/assets/haskell-code-explorer-f7f4bfc85d03709e38fddce7106b4991.js diff --git a/javascript/app/utils/go-to-definition.js b/javascript/app/utils/go-to-definition.js index e05f6bf..7063ec0 100644 --- a/javascript/app/utils/go-to-definition.js +++ b/javascript/app/utils/go-to-definition.js @@ -9,21 +9,14 @@ function exactLocationToUrl(exactLocation) { } function hackageUrl(packageId,locationInfo) { - const dasherizedModuleName = locationInfo.moduleName.replace(/\./g,'-'); - let key; - if(locationInfo.entity === "Val") { - key = "v"; - } else { - key = "t"; - } let hash = ""; - if(locationInfo.entity === "Val" || locationInfo.entity === "Typ") { - hash = "#"+key+":"+locationInfo.haddockAnchorId; - } - return "https://hackage.haskell.org/package/"+packageId+"/docs/"+dasherizedModuleName+".html"+hash; + if (locationInfo.entity !== "Mod") { + hash = "#" + encodeURIComponent(locationInfo.name); + } + return "https://hackage.haskell.org/package/"+packageId+"/docs/src/"+locationInfo.moduleName+".html"+hash; } -function openUrl(buttonId,url) { +function openUrl(buttonId,url) { if(buttonId === 2) {//middle mouse button window.open(url, '_blank'); } else if(buttonId == 1) {//left mouse button diff --git a/javascript/release/assets/haskell-code-explorer-060c353f5a98a943d1b8f634eb163900.js b/javascript/release/assets/haskell-code-explorer-060c353f5a98a943d1b8f634eb163900.js new file mode 100644 index 0000000..a34876c --- /dev/null +++ b/javascript/release/assets/haskell-code-explorer-060c353f5a98a943d1b8f634eb163900.js @@ -0,0 +1,204 @@ +"use strict" +define("haskell-code-explorer/app",["exports","ember-resolver","ember-load-initializers","haskell-code-explorer/config/environment"],function(e,t,n,o){Object.defineProperty(e,"__esModule",{value:!0}) +var r +r=Ember.Application.extend({modulePrefix:o.default.modulePrefix,Resolver:t.default}),(0,n.default)(r,o.default.modulePrefix),e.default=r}),define("haskell-code-explorer/components/bottom-panel",["exports"],function(e){function t(e){var t=Math.floor(e.$containerElement.height()/2) +e.$().css({display:"block",top:t+"px"}),e.$topPanelElement.css({height:t+"px"})}function n(e){var t=Math.floor(e.$containerElement.height()/2) +e.$().css({display:"none",height:t+"px"}),e.$topPanelElement.css({height:"100%"})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({classNames:["bottom-panel"],didInsertElement:function(){var e=this +this._super.apply(this,arguments),this.$topPanelElement=Ember.$(this.get("topPanelElementId")),this.$containerElement=Ember.$(this.get("containerElementId")),Ember.run.next(this,function(){Ember.$(e.element).resizable({handles:"n",maxHeight:700,minHeight:200,resize:function(t,n){Ember.run.next(e,function(){e.$topPanelElement.css({height:e.$containerElement.height()-n.size.height})})}})})},visibilityObserver:Ember.observer("visible",function(){this.get("visible")?t(this):n(this)}),actions:{close:function(){this.set("visible",!1)}}})}),define("haskell-code-explorer/components/expression-info",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({})}),define("haskell-code-explorer/components/file-tree",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) +var t=function e(t,o){return o.contents.map(function(o){var r={} +return r.text=o.name,r.data=o,o.path&&(r.id=o.path,r.a_attr={href:"/package/"+t+"/show/"+o.path}),"Dir"===o.tag?(r.children=e(t,o),r.state={opened:n(o)}):o.isHaskellModule?(r.icon="/assets/haskell.ico",r.isHaskellModule=!0):(r.icon="jstree-file",r.isHaskellModule=!1),r})},n=function e(t){return t.contents.some(function(t){return"File"===t.tag?t.isHaskellModule:e(t)})} +e.default=Ember.Component.extend({query:null,didInsertElement:function(){var e=this +this._super.apply(this,arguments) +var n=this.element.getElementsByClassName("file-tree")[0],o=Ember.$(n).jstree({core:{data:t(this.get("packageId"),this.get("directoryTree"))},plugins:["search"],search:{case_insensitive:!0,show_only_matches:!0,show_only_matches_children:!0}}) +o.on("select_node.jstree",function(t,n){var o=n.node.data +"Dir"!=o.tag&&e.sendAction("openFile",o.path)}) +var r=o.jstree(!0) +if(this.get("currentFile")){r.select_node(this.get("currentFile")) +var i=r.get_node(this.get("currentFile"),!0)[0] +i&&i.scrollIntoView()}this.jstree=r},currentFileObserver:Ember.observer("currentFile",function(){var e=this +Ember.run.next(function(){e.jstree.deselect_all(),e.jstree.select_node(e.get("currentFile"))})}),queryObserver:Ember.observer("query",function(){this.get("query")?this.jstree.search(this.get("query")):this.jstree.clear_search()}),actions:{hide:function(){this.get("hide")()}}})}),define("haskell-code-explorer/components/haskell-module",["exports","haskell-code-explorer/utils/go-to-definition","haskell-code-explorer/utils/line-selection"],function(e,t,n){function o(e,t){return e.line===t.line?e.column===t.column?0:e.column>t.column?1:-1:e.line>t.line?1:-1}function r(e,t,n){if(e[t.line]&&e[n.line]){if(t.line===n.line)return e[t.line].slice(t.column-1,n.column-1) +for(var o=e[t.line],r=[],i=t.line+1;i0){var r=null +o.forEach(function(o){var i=c(o,n.get("identifiers"),n.get("occurrences"),n.get("path"),n.get("colorTheme"),n.get("name")) +o.style.cssText=i,o.onmouseup=function(e){if(r&&clearTimeout(r),window.getSelection().isCollapsed){var i=n.get("identifiers")[o.dataset.identifier],l=n.get("occurrences")[o.dataset.occurrence],s=parseInt(o.parentNode.dataset.line) +"ModuleId"===l.sort.tag?(0,t.goToDefinition)(n.get("store"),l.sort.contents,e.which,s):!i||1!==e.which&&2!==e.which||(l.isBinder?"External"===i.sort&&n.get("findReferences")(n.get("packageId"),i.externalId,i.demangledOccName):(0,t.goToDefinition)(n.get("store"),i.locationInfo,e.which,s))}},o.onmouseover=function(){l(e,o,!0),r&&clearTimeout(r),r=setTimeout(function(){Ember.run.next(n,function(){var e=n.get("identifiers")[o.dataset.identifier],t=n.get("occurrences")[o.dataset.occurrence] +console.log(t),console.log(e),n.set("selectedIdentifier",o),n.set("currentLineNumber",parseInt(o.parentNode.dataset.line)||1),n.set("identifierInfo",e),n.set("identifierOccurrence",t),n.set("hasSelectedExpression",!1),n.set("isHoveredOverIdentifier",!0)})},250)},o.onmouseout=function(){l(e,o,!1),r&&clearTimeout(r),r=setTimeout(function(){Ember.run.next(n,function(){n.set("isHoveredOverIdentifier",!1)})},250)}}),n.timer=r}}function u(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}function p(e,t){var n=Array.prototype.slice.call(e.querySelectorAll("td.line-content")) +if(n.length>0){var i=[""] +n.forEach(function(e){i.push(e.textContent)}) +var l=["#text","SPAN","TD"],s=!1,a=!1,c=function(){Ember.run.next(function(){if(!s&&!a){a=!0,setTimeout(function(){a=!1},400),t.set("hasSelectedExpression",!1) +var n=window.getSelection() +if(n.anchorNode&&n.focusNode&&u(e,n.anchorNode)&&u(e,n.focusNode)&&-1!==l.indexOf(n.anchorNode.nodeName)&&-1!==l.indexOf(n.focusNode.nodeName)&&!n.isCollapsed){var c=document.createRange() +c.setStart(n.anchorNode,n.anchorOffset),c.setEnd(n.focusNode,n.focusOffset) +var d=c.collapsed,p=void 0,f=void 0,m=void 0,h=void 0 +d?(p=n.focusNode,f=n.focusOffset,m=n.anchorNode,h=n.anchorOffset):(p=n.anchorNode,f=n.anchorOffset,m=n.focusNode,h=n.focusOffset) +var b=void 0,g=void 0,v=void 0,x=void 0,y=void 0 +if("#text"===p.nodeName){var k=p.parentNode +if(g=parseInt(k.dataset.start)+f,b=parseInt(k.parentNode.dataset.line),f===p.textContent.length&&null===k.nextSibling){for(var E=p.parentNode.parentNode.parentNode,I=E.nextSibling;""===I.children[1].textContent;)I=I.nextSibling +y=I.children[1].children[0]}else y=0!==f&&k.nextSibling?k.nextSibling:k}else if("SPAN"===p.nodeName){g=1,b=parseInt(p.parentNode.dataset.line) +for(var P=p.parentNode.parentNode,_=P.nextSibling;""===_.children[1].textContent;)_=_.nextSibling +y=_.children[1].children[0]}else if("TD"===p.nodeName){if(f>0){var O=p.children[f-1] +g=parseInt(O.dataset.start)}else g=1 +b=parseInt(p.id.slice(2)),y=p.children[0]}if("#text"===m.nodeName)x=parseInt(m.parentNode.dataset.start)+h,v=parseInt(m.parentNode.parentNode.dataset.line) +else if("SPAN"===m.nodeName)x=1,v=parseInt(m.parentNode.dataset.line) +else if("TD"===m.nodeName){if(h>0){var w=m.children[h-1] +x=parseInt(w.dataset.start)}else x=1 +v=parseInt(m.id.slice(2))}var C=t.get("store").loadExpressions(t.get("packageId"),t.get("path"),b,g,v,x) +s=!0,C.then(function(e){Ember.run.next(function(){if(e&&e.length>0){e.sort(function(e,t){return o(e.srcSpan.start,t.srcSpan.start)<=0&&o(e.srcSpan.end,t.srcSpan.end)>=0?-1:1}) +var n=e.reduce(function(e,t){var n=Ember.copy(t),o=r(i,t.srcSpan.start,t.srcSpan.end) +return o?(n.sourceCode=o,e.concat(n)):e},[]) +n.length>0&&(t.set("selectedIdentifier",y),t.set("expressions",n),t.set("currentLineNumber",parseInt(y.parentNode.dataset.line)||1),t.set("hasSelectedExpression",!0))}s=!1})})}}})} +e.addEventListener("mouseup",c),t._onmouseup=c}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),selectedIdentifier:null,isHoveredOverIdentifier:!1,hasSelectedExpression:!1,showDeclarations:!0,showDeclarationsLabel:Ember.computed("showDeclarations",function(){return this.get("showDeclarations")?"Hide":"Show"}),queryObserver:Ember.observer("query",function(){var e=this +Ember.run.debounce(this,function(){var t=new RegExp(e.get("query"),"i"),n=e.get("declarations").filter(function(e){return-1!=e.name.search(t)}) +Ember.run.next(function(){e.set("filteredDeclarations",n)})},300)}),identifierLocationInfo:Ember.computed("identifierInfo","identifierOccurrence",function(){var e=this.get("identifierOccurrence"),t=this.get("identifierInfo") +if(e)return"ModuleId"===e.sort.tag?e.sort.contents:t?t.locationInfo:null}),themeObserver:Ember.observer("colorTheme",function(){var e=this +Ember.run.next(this,function(){e.cleanup(),e.didInsertElement()})}),fileObserver:Ember.observer("path",function(){var e=this +Ember.run.next(this,function(){e.cleanup(),e.didInsertElement()})}),cleanup:function(){this.timer&&clearTimeout(this.timer),this._onhashchange&&window.removeEventListener("hashchange",this._onhashchange),this._onkeydown&&document.removeEventListener("keydown",this._onkeydown),this._onkeyup&&document.removeEventListener("keyup",this._onkeyup),this._onmouseup&&this.sourceCodeContainerElement.removeEventListener("mouseup",this._onmouseup),this.set("selectedIdentifier",null),this.set("isHoveredOverIdentifier",!1),this.set("hasSelectedExpression",!1),this.set("showDeclarations",!0)},didReceiveAttrs:function(){this.set("filteredDeclarations",this.get("declarations"))},didInsertElement:function(){var e=this +this._super.apply(this,arguments) +var t=this.element.querySelector(".source-code-container") +t.innerHTML=this.get("html"),this.sourceCodeContainerElement=t,this.element.parentNode.scrollTop=0 +var o=this.element.querySelector(".declarations-content") +this.set("query",""),o&&(o.scrollTop=0),Ember.run.next(this,function(){d(t,e),(0,n.initializeLineSelection)(t,e),p(t,e)})},willDestroyElement:function(){this.cleanup()},actions:{goToLine:function(e){window.location.hash="L"+e},toggleShowDeclarations:function(){this.toggleProperty("showDeclarations")}}})}),define("haskell-code-explorer/components/identifier-info",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),downloadedDocumentation:null,didInsertElement:function(){var e=this,n=function(n){if(n.target.dataset.location){var o=void 0 +try{o=JSON.parse(n.target.dataset.location)}catch(e){console.log(e)}o&&(0,t.goToDefinition)(e.get("store"),o,n.which,e.get("currentLineNumber"))}} +this.element.addEventListener("mouseup",n),this._onmouseup=n},willDestroyElement:function(){this._onmouseup&&this.element.removeEventListener("mouseup",this._onmouseup)},isNaughtyRecSel:Ember.computed("identifierInfo",function(){var e=this.get("identifierInfo") +return!!e&&"RecSelIdNaughty"===e.details}),isExternalIdentifier:Ember.computed("identifierInfo",function(){var e=this.get("identifierInfo") +return!!e&&"External"===e.sort}),identifierObserver:Ember.observer("identifierInfo",function(){var e=this +this.set("downloadedDocumentation","") +var t=this.get("identifierInfo") +if(t){var n=t.locationInfo +if("ApproximateLocation"===n.tag){var o=n.packageId.name+"-"+n.packageId.version,r=t +this.get("store").loadDefinitionSite(o,n.moduleName,n.componentId,n.entity,n.name).then(function(t){Ember.run.next(e,function(){r===e.get("identifierInfo")&&e.set("downloadedDocumentation",t.documentation)})})}}})})}),define("haskell-code-explorer/components/identifier-name",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),name:Ember.computed("identifierElement",function(){var e=this.get("identifierElement") +if(e)return e.innerText}),style:Ember.computed("identifierElement",function(){var e=this.get("identifierElement") +if(e)return new Ember.String.htmlSafe("color:"+e.style.color)}),locationInfo:Ember.computed("identifierInfo","identifierOccurrence",function(){return"ModuleId"===this.get("identifierOccurrence.sort.tag")?this.get("identifierOccurrence.sort.contents"):this.get("identifierInfo.locationInfo")}),location:Ember.computed("locationInfo",function(){var e=this.get("locationInfo") +return e?"ExactLocation"===e.tag?e.modulePath:"ApproximateLocation"===e.tag?"Mod"===e.entity?e.packageId.name+"-"+e.packageId.version:e.packageId.name+"-"+e.packageId.version+" "+e.moduleName:e.contents:""}),isExternalIdentifier:Ember.computed("identifierInfo",function(){return"External"===this.get("identifierInfo.sort")}),actions:{goToDefinition:function(e){return(0,t.goToDefinition)(this.get("store"),this.get("locationInfo"),e.which,this.get("currentLineNumber")),!1},findReferences:function(e,t){this.get("findReferences")(t,e.externalId,e.demangledOccName)}}})}),define("haskell-code-explorer/components/infinite-list",["exports"],function(e){function t(e){e.set("renderedElements",e.get("elements").slice(0,e.get("perPage"))),n=1}Object.defineProperty(e,"__esModule",{value:!0}) +var n=void 0,o=!1 +e.default=Ember.Component.extend({renderedElements:[],init:function(){this._super.apply(this,arguments),t(this)},elementsObserver:Ember.observer("elements",function(){t(this) +var e=document.getElementById(this.get("containerElementId")) +e&&(e.scrollTop=0)}),didInsertElement:function(){var e=document.getElementById(this.get("containerElementId")) +if(e){var t=this +e.onscroll=function(){var r=t.get("perPage"),i=t.get("elements") +!o&&n*rt.element.offsetHeight-100&&(o=!0,Ember.run.next(t,function(){var e=i.slice(n*r,(n+1)*r) +t.get("renderedElements").pushObjects(e),n++,o=!1}))}}}})}),define("haskell-code-explorer/components/info-window",["exports"],function(e){function t(e){var t=e.get("targetElement") +if(t){var n=e.element.offsetHeight,o=t.offsetHeight,r=t.parentNode,i=document.querySelector("#"+e.get("containerElementId")),l=t.getBoundingClientRect().top,s=void 0 +s=i?i.getBoundingClientRect().top:0 +var a=void 0 +a=l0&&(-1!==e?e===n-1?this.set("highlightedItemIndex",0):this.set("highlightedItemIndex",e+1):this.set("highlightedItemIndex",0))},onUp:function(){this.showAutocompleteList() +var e=this.get("highlightedItemIndex"),t=this.get("items"),n=t.length +n>0&&(-1!==e?0===e?this.set("highlightedItemIndex",n-1):this.set("highlightedItemIndex",e-1):this.set("highlightedItemIndex",n-1))},hideAutocompleteList:function(){this.set("highlightedItemIndex",-1),this.$autocompleteContainer.css({display:"none"})},showAutocompleteList:function(){this.$autocompleteContainer.css({display:"block"})},queryObserver:Ember.observer("query",function(){var e=this +if(this.get("query")){var t=this.get("maxItems")?this.get("maxItems"):10,n=this.get("createSearchUrlFunction")(this.get("query"))+"?per_page="+t +Ember.run.debounce(this,function(){e.get("store").loadFromUrlPaginated(n).then(function(t){Ember.run.next(function(){e.set("items",t.items)})})},400),this.showAutocompleteList()}else this.hideAutocompleteList(),this.set("items",[])}),actions:{onSubmit:function(){this.hideAutocompleteList(),this.get("onSubmit")(this.get("query"))},goToDefinition:function(e){this.hideAutocompleteList(),this.get("selectItem")(e)}}})}),define("haskell-code-explorer/components/instance-info",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),style:Ember.computed("nestedLevel",function(){return new Ember.String.htmlSafe("margin-left :"+10*this.get("nestedLevel")+"px")}),nextNestedLevel:Ember.computed("nestedLevel",function(){return this.get("nestedLevel")+1}),actions:{goToDefinition:function(e){return(0,t.goToDefinition)(this.get("store"),this.get("instance.location"),e.which,this.get("currentLineNumber")),!1}}})}),define("haskell-code-explorer/components/labeled-radio-button",["exports","ember-radio-button/components/labeled-radio-button"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("haskell-code-explorer/components/paginated-list",["exports"],function(e){function t(e,t,n){e.loadFromUrlPaginated(n).then(function(e){Ember.run.next(function(){t.set("total",e.total),t.set("items",e.items),t.set("first",e.linkHeader.first),t.set("next",e.linkHeader.next),t.set("prev",e.linkHeader.prev),t.set("last",e.linkHeader.last) +var o=n.match(/(&|\?)page=(\d+)/),r=n.match(/(&|\?)per_page=(\d+)/),i=o?o[2]:1,l=r?r[2]:20;(e.linkHeader.next||e.linkHeader.prev)&&(t.set("firstItemOnPage",(i-1)*l+1),e.linkHeader.last?t.set("lastItemOnPage",i*l):t.set("lastItemOnPage",e.total))})})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),init:function(){this._super.apply(this,arguments),this.get("url")&&t(this.get("store"),this,this.get("url"))},urlObserver:Ember.observer("url",function(){t(this.get("store"),this,this.get("url")),this.element.querySelector(".paginated-list-content").scrollTop=0}),actions:{update:function(e){this.element.querySelector(".paginated-list-content").scrollTop=0,t(this.get("store"),this,e)}}})}),define("haskell-code-explorer/components/radio-button-input",["exports","ember-radio-button/components/radio-button-input"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("haskell-code-explorer/components/radio-button",["exports","ember-radio-button/components/radio-button"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("haskell-code-explorer/components/resizable-panel",["exports"],function(e){function t(e,t){e.$alsoResizeElement.css({left:0}),e.$().css({width:0}),e.set("hidden",!0),e.$(".show-left-panel-button").show(),t&&e.set("hiddenByUser",!0)}function n(e,t){e.$alsoResizeElement.css({left:300}),e.$().css({width:300}),e.set("hidden",!1),e.$(".show-left-panel-button").hide(),t&&e.set("hiddenByUser",!1)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({hidden:!1,hiddenByUser:!1,didInsertElement:function(){var e=this +this._super.apply(this,arguments),Ember.run.next(this,function(){var o=function(){if(!e.get("hiddenByUser")){var o=window.innerWidth +!e.get("hidden")&&o<700?t(e,!1):e.get("hidden")&&o>700&&n(e,!1)}} +e._onresize=o,window.addEventListener("resize",o) +var r=Ember.$(e.get("alsoResizeElementId")) +Ember.$(e.element).resizable({maxWidth:800,minWidth:200,handles:"e",resize:function(t,n){Ember.run.next(e,function(){r.css({left:n.size.width})})}}),e.$alsoResizeElement=r})},hideButtonLabel:Ember.computed("hidden",function(){return this.get("hidden")?">":"<"}),willDestroyElement:function(){this._onresize&&window.removeEventListener("resize",this._onresize)},actions:{hide:function(){this.get("hidden")?n(this,!0):t(this,!0)}}})}),define("haskell-code-explorer/components/text-file",["exports","haskell-code-explorer/utils/line-selection"],function(e,t){function n(e){return e.replace(/[\"&<>]/g,function(e){return{'"':""","&":"&","<":"<",">":">"}[e]})}function o(e){var t=0 +return""+e.split("\n").map(function(e){return""}).join("")+"
"+t+""+n(e)+"
"}Object.defineProperty(e,"__esModule",{value:!0}) +var r=["markdown","mdown","mkdn","mkd","md"] +e.default=Ember.Component.extend({isMarkdown:Ember.computed("path",function(){var e=this.get("path").split(".").pop() +return r.any(function(t){return e===t})}),html:Ember.computed("path","isMarkdown",function(){return this.get("isMarkdown")?this.markdownConverter.makeHtml(this.get("text")):o(this.get("text"))}),init:function(){this._super.apply(this,arguments),this.markdownConverter=new showdown.Converter},didInsertElement:function(){var e=this.element.querySelector(".source-code-container");(0,t.initializeLineSelection)(e,this),this.element.parentNode.scrollTop=0},willDestroyElement:function(){this.cleanup()},cleanup:function(){this._onhashchange&&window.removeEventListener("hashchange",this._onhashchange),this._onkeydown&&document.removeEventListener("keydown",this._onkeydown),this._onkeyup&&document.removeEventListener("keyup",this._onkeyup)},pathObserver:Ember.observer("path",function(){var e=this +Ember.run.next(this,function(){e.cleanup(),e.didInsertElement()})})})}),define("haskell-code-explorer/components/type-component",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),tagName:"span",classNames:["type-component"],contextMenu:function(){return this.get("identifiers")&&this.get("internalId")&&this.set("expanded",!0),!1},linkClass:Ember.computed("identifierInfo",function(){return this.get("identifierInfo")?"link":""}),identifierInfo:Ember.computed("internalId",function(){return this.get("internalId")?this.get("identifiers")[this.get("internalId")]:null}),actions:{onmouseup:function(e){if(this.get("identifierInfo")&&3!==e.which){var n=this.get("identifierInfo").locationInfo +return(0,t.goToDefinition)(this.get("store"),n,e.which,this.get("currentLineNumber")),!1}}}})}),define("haskell-code-explorer/components/type-signature-text",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({tagName:"span"})}),define("haskell-code-explorer/components/type-signature",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({tagName:"span",expandTypeSynonyms:!1,expandTypeSynonymsLabel:Ember.computed("expandTypeSynonyms",function(){return this.get("expandTypeSynonyms")?"Show type synonyms":"Expand type synonyms"}),components:Ember.computed("type","expandTypeSynonyms",function(){return this.get("expandTypeSynonyms")&&this.get("type.componentsExpanded")?this.get("type.componentsExpanded"):this.get("type.components")}),typeObserver:Ember.observer("type",function(){this.set("expandTypeSynonyms",!1)}),actions:{toggleExpandTypeSynonyms:function(){this.toggleProperty("expandTypeSynonyms")}}})}),define("haskell-code-explorer/controllers/application",["exports","haskell-code-explorer/utils/color-themes"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({settings:Ember.inject.service("settings"),themes:Object.values(t.themes),init:function(){this._super.apply(this,arguments),(0,t.updateColorThemeCss)(this.get("settings").get("colorTheme"))},currentTheme:Ember.computed("settings",function(){return this.get("settings.colorTheme.id")}),actions:{themeChanged:function(e){var n=t.themes[e] +this.get("settings").set("colorTheme",n),(0,t.updateColorThemeCss)(n)}}})}),define("haskell-code-explorer/controllers/package",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({store:Ember.inject.service("store"),currentFile:null,loadItemsFunction:null,query:null,actions:{searchIdentifier:function(e){e&&(this.set("currentFile",null),document.title=this.get("model.id"),this.transitionToRoute("package.search",e))},showIdentifier:function(e){return(0,t.goToDefinition)(this.get("store"),e.locationInfo,1,null),!1}}})}),define("haskell-code-explorer/controllers/package/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({modulesFiltered:Ember.computed("model","query",function(){var e=this.get("query"),t=Object.keys(this.get("model.modules")).sort() +if(e){var n=new RegExp(e,"i") +return t.filter(function(e){return-1!=e.search(n)})}return t})})}),define("haskell-code-explorer/controllers/package/search",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({store:Ember.inject.service("store"),actions:{goToDefinition:function(e,n){return(0,t.goToDefinition)(this.get("store"),e,n.which,null),!1}}})}),define("haskell-code-explorer/controllers/package/show/file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({settings:Ember.inject.service("settings"),actions:{findReferences:function(e,t,n){this.send("updateReferences",e,t,n)}}})}),define("haskell-code-explorer/controllers/packages",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({queryObserver:Ember.observer("query",function(){var e=this +Ember.run.debounce(this,function(){var t=new RegExp(e.get("query"),"i"),n=e.get("model").filter(function(e){return-1!=e.name.search(t)}) +Ember.run.next(function(){e.set("packages",n)})},300)})})}),define("haskell-code-explorer/helpers/and",["exports","ember-truth-helpers/helpers/and"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"and",{enumerable:!0,get:function(){return t.and}})}),define("haskell-code-explorer/helpers/app-version",["exports","haskell-code-explorer/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} +return t.hideSha?r.match(n.versionRegExp)[0]:t.hideVersion?r.match(n.shaRegExp)[0]:r}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=o +var r=t.default.APP.version +e.default=Ember.Helper.helper(o)}),define("haskell-code-explorer/helpers/eq",["exports","ember-truth-helpers/helpers/equal"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"equal",{enumerable:!0,get:function(){return t.equal}})}),define("haskell-code-explorer/helpers/gt",["exports","ember-truth-helpers/helpers/gt"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"gt",{enumerable:!0,get:function(){return t.gt}})}) +define("haskell-code-explorer/helpers/gte",["exports","ember-truth-helpers/helpers/gte"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"gte",{enumerable:!0,get:function(){return t.gte}})}),define("haskell-code-explorer/helpers/is-array",["exports","ember-truth-helpers/helpers/is-array"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return t.isArray}})}),define("haskell-code-explorer/helpers/is-equal",["exports","ember-truth-helpers/helpers/is-equal"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"isEqual",{enumerable:!0,get:function(){return t.isEqual}})}),define("haskell-code-explorer/helpers/lt",["exports","ember-truth-helpers/helpers/lt"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"lt",{enumerable:!0,get:function(){return t.lt}})}),define("haskell-code-explorer/helpers/lte",["exports","ember-truth-helpers/helpers/lte"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"lte",{enumerable:!0,get:function(){return t.lte}})}),define("haskell-code-explorer/helpers/not-eq",["exports","ember-truth-helpers/helpers/not-equal"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"notEq",{enumerable:!0,get:function(){return t.notEq}})}),define("haskell-code-explorer/helpers/not",["exports","ember-truth-helpers/helpers/not"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"not",{enumerable:!0,get:function(){return t.not}})}),define("haskell-code-explorer/helpers/or",["exports","ember-truth-helpers/helpers/or"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"or",{enumerable:!0,get:function(){return t.or}})}),define("haskell-code-explorer/helpers/xor",["exports","ember-truth-helpers/helpers/xor"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"xor",{enumerable:!0,get:function(){return t.xor}})}),define("haskell-code-explorer/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","haskell-code-explorer/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) +var o=void 0,r=void 0 +n.default.APP&&(o=n.default.APP.name,r=n.default.APP.version),e.default={name:"App Version",initialize:(0,t.default)(o,r)}}),define("haskell-code-explorer/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] +e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("haskell-code-explorer/initializers/export-application-global",["exports","haskell-code-explorer/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] +if(!1!==t.default.exportApplicationGlobal){var n +if("undefined"!=typeof window)n=window +else if("undefined"!=typeof global)n=global +else{if("undefined"==typeof self)return +n=self}var o,r=t.default.exportApplicationGlobal +o="string"==typeof r?r:Ember.String.classify(t.default.modulePrefix),n[o]||(n[o]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[o]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("haskell-code-explorer/router",["exports","haskell-code-explorer/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) +var n=Ember.Router.extend({location:t.default.locationType}) +n.map(function(){this.route("packages",{path:""}),this.route("package",{path:"/package/:packageId"},function(){this.route("show",function(){this.route("file",{path:"*filePath"},function(){})}),this.route("search",{path:"/search/:query"})}),this.route("bad-url",{path:"/*badurl"})}),e.default=n}),define("haskell-code-explorer/routes/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({})}),define("haskell-code-explorer/routes/package",["exports","haskell-code-explorer/utils/api-urls"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({store:Ember.inject.service("store"),model:function(e){var t=this +return this.get("store").loadPackage(e.packageId).catch(function(e){console.log(e),t.transitionTo("/package-not-found")})},afterModel:function(e){document.title=e.id},setupController:function(e,n){this._super(e,n) +var o=this.modelFor("package").id +e.set("bottomPanelVisible",!1),e.set("createSearchUrlFunction",function(e){return t.urls.identifierSearchUrl(o,e)})},actions:{openFile:function(e){this.transitionTo("package.show.file",e)},fileOpened:function(e){this.get("controller")&&this.set("controller.currentFile",e)},updateReferences:function(e,n,o){this.set("controller.packageId",e),this.set("controller.externalId",n),this.set("controller.occName",o),this.set("controller.bottomPanelVisible",!0),this.set("controller.referencesUrl",t.urls.referencesUrl(e,n)+"?per_page=50")}}})}),define("haskell-code-explorer/routes/package/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({afterModel:function(e,t){t.send("fileOpened",null)}})}),define("haskell-code-explorer/routes/package/search",["exports","haskell-code-explorer/utils/api-urls","haskell-code-explorer/utils/go-to-definition"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({store:Ember.inject.service("store"),model:function(e){return{query:e.query,url:t.urls.identifierSearchUrl(this.modelFor("package").id,e.query)+"?per_page=20"}},afterModel:function(){var e=this,t=function(t){if(t.target.dataset.location){var o=void 0 +try{o=JSON.parse(t.target.dataset.location)}catch(e){console.log(e)}o&&(0,n.goToDefinition)(e.get("store"),o,t.which)}} +this._onmouseup=t,document.addEventListener("mouseup",t)},deactivate:function(){this._onmouseup&&document.removeEventListener("mouseup",this._onmouseup)}})}),define("haskell-code-explorer/routes/package/show/file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({store:Ember.inject.service(),model:function(e){var t=this,n=this.modelFor("package") +return n.modules[e.filePath]?this.get("store").loadHaskellModule(n.id,e.filePath).catch(function(e){console.log(e),t.transitionTo("/not-found")}):this.get("store").loadFile(n.id,e.filePath).then(function(e){return document.title=n.id,e}).catch(function(e){console.log(e),t.transitionTo("/not-found")})},afterModel:function(e){document.title=e.id+" - "+this.modelFor("package").id},actions:{didTransition:function(){this.send("fileOpened",this.currentModel.id)}}})}),define("haskell-code-explorer/routes/package/show/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({afterModel:function(e,t){t.send("fileOpened",null)}})}),define("haskell-code-explorer/routes/packages",["exports","haskell-code-explorer/utils/api-urls","haskell-code-explorer/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({model:function(){return Ember.$.getJSON(t.urls.packagesUrl)},setupController:function(e,t){this._super(e,t),e.set("packages",t)},afterModel:function(){document.title=n.default.APP.title}})}),define("haskell-code-explorer/services/settings",["exports","haskell-code-explorer/utils/color-themes"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Service.extend({init:function(){if(this._super.apply(this,arguments),localStorage){var e=localStorage.getItem("colorThemeId"),n=t.themes[e] +e&&this.set("colorTheme",n)}},colorTheme:t.themes.darkTheme,settingsObserver:Ember.observer("colorTheme",function(){localStorage&&localStorage.setItem("colorThemeId",this.get("colorTheme").id)})})}),define("haskell-code-explorer/services/store",["exports","haskell-code-explorer/utils/api-urls"],function(e,t){function n(e){return'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)?e.substring(1,e.length-1):e}function o(e){if(!e)return{} +for(var t=/<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g,o=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,r=e.match(t),i=new Object,l=0;l"),a=s[0].substring(1),c=s[1],d=new Object +d.href=a +for(var u=c.match(o),p=0;p"],[9]],"parameters":[]},null],[0,"\\n "],[4,"if",[[22,["last"]]],null,{"statements":[[6,"button"],[10,"button",""],[10,"class","btn btn-outline-secondary btn-sm"],[3,"action",[[21,0,[]],"update",[22,["last","href"]]]],[8],[0,">>"],[9]],"parameters":[]},null],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[9],[0,"\\n"],[6,"div"],[10,"class","paginated-list-content"],[8],[0,"\\n "],[13,1,[[22,["items"]]]],[0," \\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/paginated-list.hbs"}})}),define("haskell-code-explorer/templates/components/resizable-panel",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"tpKUpnLR",block:'{"symbols":["&default"],"statements":[[6,"div"],[10,"class","absolute-container"],[8],[13,1,[[26,"action",[[21,0,[]],"hide"],null]]],[0,"\\n "],[6,"div"],[11,"onclick",[26,"action",[[21,0,[]],"hide"],null]],[10,"class","show-left-panel-button"],[8],[0,"\\n "],[1,[20,"hideButtonLabel"],true],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/resizable-panel.hbs"}})}),define("haskell-code-explorer/templates/components/text-file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"yYFMOyZb",block:'{"symbols":[],"statements":[[6,"div"],[10,"class","source-code-container"],[8],[0,"\\n"],[1,[20,"html"],true],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/text-file.hbs"}})}),define("haskell-code-explorer/templates/components/type-component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"nSuhY152",block:'{"symbols":[],"statements":[[4,"if",[[26,"and",[[22,["expanded"]],[22,["identifierInfo"]]],null]],null,{"statements":[[0,"("]],"parameters":[]},null],[0,"\\n"],[6,"span"],[11,"class",[27,["source-code ",[20,"linkClass"]]]],[11,"onmouseup",[26,"action",[[21,0,[]],"onmouseup"],null]],[8],[1,[20,"occName"],false],[9],[0,"\\n"],[4,"if",[[26,"and",[[22,["expanded"]],[22,["identifierInfo"]]],null]],null,{"statements":[[0," :: "],[1,[26,"type-signature",null,[["type","identifiers","noExpand"],[[22,["identifierInfo","idType"]],[22,["identifiers"]],true]]],false],[0,")"]],"parameters":[]},null],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/type-component.hbs"}})}),define("haskell-code-explorer/templates/components/type-signature-text",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"+rUvtMa3",block:'{"symbols":["typeComponent"],"statements":[[4,"each",[[22,["components"]]],null,{"statements":[[4,"if",[[26,"eq",[[21,1,["tag"]],"Text"],null]],null,{"statements":[[1,[21,1,["contents"]],false]],"parameters":[]},{"statements":[[1,[21,1,["name"]],false]],"parameters":[]}]],"parameters":[1]},null],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/type-signature-text.hbs"}})}),define("haskell-code-explorer/templates/components/type-signature",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"SdJzinj9",block:'{"symbols":["typeComponent"],"statements":[[4,"each",[[22,["components"]]],null,{"statements":[[4,"if",[[26,"eq",[[21,1,["tag"]],"Text"],null]],null,{"statements":[[6,"span"],[10,"class","source-code"],[8],[1,[21,1,["contents"]],false],[9]],"parameters":[]},{"statements":[[1,[26,"type-component",null,[["occName","internalId","identifiers","currentLineNumber"],[[21,1,["name"]],[21,1,["internalId"]],[22,["identifiers"]],[22,["currentLineNumber"]]]]],false]],"parameters":[]}]],"parameters":[1]},null],[0,"\\n"],[4,"unless",[[22,["noExpand"]]],null,{"statements":[[4,"if",[[22,["type","componentsExpanded"]]],null,{"statements":[[0," "],[6,"div"],[10,"style","margin-top:5px"],[8],[0,"\\n "],[6,"button"],[10,"class","btn btn-outline-secondary btn-sm"],[3,"action",[[21,0,[]],"toggleExpandTypeSynonyms"]],[8],[1,[20,"expandTypeSynonymsLabel"],false],[0,"\\n "],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/type-signature.hbs"}})}),define("haskell-code-explorer/templates/package",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"wmOuG9eh",block:'{"symbols":["section","files","file","reference","hide","identifier"],"statements":[[6,"div"],[10,"class","flex-container"],[8],[0,"\\n "],[6,"div"],[10,"class","package-header"],[8],[0,"\\n "],[6,"span"],[10,"class","package-header-package-name"],[8],[4,"link-to",["package",[22,["model"]]],null,{"statements":[[1,[22,["model","id"]],false]],"parameters":[]},null],[9],[0," \\n "],[6,"span"],[10,"class","package-header-input"],[8],[0,"\\n"],[4,"input-with-autocomplete",null,[["onSubmit","createSearchUrlFunction","maxItems","selectItem","placeholder"],[[26,"action",[[21,0,[]],"searchIdentifier"],null],[22,["createSearchUrlFunction"]],10,[26,"action",[[21,0,[]],"showIdentifier"],null],"Identifier"]],{"statements":[[0," "],[6,"span"],[10,"class","source-code-font"],[8],[1,[21,6,["demangledOccName"]],false],[0," :: "],[1,[26,"type-signature-text",null,[["components"],[[21,6,["idType","components"]]]]],false],[9],[0,"\\n "],[6,"div"],[10,"class","module-name"],[8],[0,"\\n"],[4,"if",[[21,6,["locationInfo","modulePath"]]],null,{"statements":[[0," "],[1,[21,6,["locationInfo","modulePath"]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[21,6,["locationInfo","moduleName"]],false],[0,"\\n"]],"parameters":[]}],[0," "],[9],[0,"\\n"]],"parameters":[6]},null],[0," "],[9],[0,"\\n"],[4,"if",[[22,["currentFile"]]],null,{"statements":[[0," "],[6,"span"],[10,"class","package-header-filename"],[8],[0,"\\n "],[1,[20,"currentFile"],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[0," "],[9],[0,"\\n "],[6,"div"],[10,"class","package-content"],[8],[0,"\\n"],[4,"resizable-panel",null,[["class","alsoResizeElementId"],["left-panel","#right-panel"]],{"statements":[[0," "],[6,"div"],[10,"class","file-tree-container"],[8],[0,"\\n "],[1,[26,"file-tree",null,[["directoryTree","openFile","currentFile","packageId","hide"],[[22,["model","directoryTree"]],"openFile",[22,["currentFile"]],[22,["model","id"]],[21,5,[]]]]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[5]},null],[0," "],[6,"div"],[10,"id","right-panel"],[10,"class","right-panel"],[8],[0,"\\n "],[6,"div"],[10,"id","file-container"],[10,"class","file-container"],[8],[0," \\n "],[1,[20,"outlet"],false],[0," \\n "],[9],[0,"\\n"],[4,"bottom-panel",null,[["visible","topPanelElementId","containerElementId"],[[22,["bottomPanelVisible"]],"#file-container","#right-panel"]],{"statements":[[4,"if",[[26,"eq",[[21,1,[]],"header"],null]],null,{"statements":[[0," References to "],[6,"b"],[8],[6,"span"],[10,"class","source-code"],[8],[1,[20,"occName"],false],[9],[9],[0," in "],[6,"span"],[10,"class","source-code"],[8],[1,[20,"packageId"],false],[9],[0,"\\n"]],"parameters":[]},{"statements":[[4,"paginated-list",null,[["url"],[[22,["referencesUrl"]]]],{"statements":[[0," "],[6,"ul"],[8],[0,"\\n"],[4,"each",[[21,2,[]]],null,{"statements":[[0," "],[6,"li"],[8],[0,"\\n "],[6,"div"],[10,"class","file-name"],[8],[6,"a"],[11,"href",[27,["/package/",[20,"packageId"],"/show/",[21,3,["name"]]]]],[8],[1,[21,3,["name"]],false],[9],[9],[0,"\\n"],[4,"each",[[21,3,["references"]]],null,{"statements":[[0," "],[6,"a"],[10,"class","source-code source-code-snippet"],[11,"href",[27,["/package/",[20,"packageId"],"/show/",[21,3,["name"]],"#L",[21,4,["idSrcSpan","line"]]]]],[8],[1,[21,4,["sourceCodeHtml"]],true],[9],[0,"\\n"]],"parameters":[4]},null],[0," "],[9],[0,"\\n"]],"parameters":[3]},null],[0," "],[9],[0,"\\n"]],"parameters":[2]},null]],"parameters":[]}]],"parameters":[1]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package.hbs"}})}),define("haskell-code-explorer/templates/package/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"NL2mPZNK",block:'{"symbols":["module"],"statements":[[6,"div"],[10,"class","package-modules"],[8],[0,"\\n "],[6,"div"],[10,"class","module-search-input"],[8],[0,"\\n "],[1,[26,"input",null,[["class","type","value","placeholder"],["form-control","text",[22,["query"]],"Module name"]]],false],[0," \\n "],[9],[0," \\n "],[6,"ul"],[10,"class","modules"],[8],[0,"\\n"],[4,"each",[[22,["modulesFiltered"]]],null,{"statements":[[0," "],[6,"li"],[8],[0,"\\n "],[6,"a"],[11,"href",[27,["/package/",[22,["model","id"]],"/show/",[21,1,[]]]]],[8],[1,[21,1,[]],false],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[1]},null],[0," "],[9],[0," \\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/index.hbs"}})}),define("haskell-code-explorer/templates/package/search",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"tnwltDLx",block:'{"symbols":["identifiers","identifier"],"statements":[[6,"div"],[10,"class","search-results-header"],[8],[0,"\\n Query : "],[1,[22,["model","query"]],false],[0,"\\n"],[9],[0,"\\n"],[6,"div"],[10,"class","search-results-content"],[8],[0,"\\n"],[4,"paginated-list",null,[["url"],[[22,["model","url"]]]],{"statements":[[0," "],[6,"ul"],[8],[0,"\\n"],[4,"each",[[21,1,[]]],null,{"statements":[[0," "],[6,"li"],[10,"class","search-result"],[8],[0," \\n "],[6,"span"],[10,"class","source-code"],[8],[1,[21,2,["demangledOccName"]],false],[0," :: "],[1,[26,"type-signature-text",null,[["components"],[[21,2,["idType","components"]]]]],false],[9],[0,"\\n "],[6,"div"],[8],[6,"a"],[10,"href","#"],[11,"onmouseup",[26,"action",[[21,0,[]],"goToDefinition",[21,2,["locationInfo"]]],null]],[8],[0,"Go to definition"],[9],[9],[0,"\\n "],[6,"div"],[10,"class","identifier-module"],[8],[0,"\\n"],[4,"if",[[21,2,["locationInfo","modulePath"]]],null,{"statements":[[0," Defined in "],[6,"a"],[11,"href",[27,["/package/",[21,2,["locationInfo","packageId","name"]],"-",[21,2,["locationInfo","packageId","version"]],"/show/",[21,2,["locationInfo","modulePath"]]]]],[8],[1,[21,2,["locationInfo","modulePath"]],false],[9],[0,"\\n"]],"parameters":[]},null],[0," "],[9],[0,"\\n "],[6,"div"],[8],[1,[21,2,["doc"]],true],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[2]},null],[0," "],[9],[0,"\\n"]],"parameters":[1]},null],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/search.hbs"}})}),define("haskell-code-explorer/templates/package/show",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"aR1d98il",block:'{"symbols":[],"statements":[[1,[20,"outlet"],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/show.hbs"}})}),define("haskell-code-explorer/templates/package/show/file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"n+gY0z10",block:'{"symbols":[],"statements":[[4,"if",[[22,["model","isHaskellModule"]]],null,{"statements":[[0," "],[1,[26,"haskell-module",null,[["path","name","packageId","componentId","html","identifiers","occurrences","colorTheme","declarations","findReferences"],[[22,["model","id"]],[22,["model","name"]],[22,["model","packageId"]],[22,["model","componentId"]],[22,["model","sourceCodeHtml"]],[22,["model","identifiers"]],[22,["model","occurrences"]],[22,["settings","colorTheme"]],[22,["model","declarations"]],[26,"action",[[21,0,[]],"findReferences"],null]]]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[26,"text-file",null,[["text","path"],[[22,["model","text"]],[22,["model","id"]]]]],false],[0,"\\n"]],"parameters":[]}]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/show/file.hbs"}})}),define("haskell-code-explorer/templates/packages",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"b/AToiBD",block:'{"symbols":["package","version","index"],"statements":[[6,"div"],[10,"class","flex-container container"],[8],[0,"\\n "],[6,"div"],[8],[0," \\n "],[2,"

Haskell code explorer

"],[0,"\\n "],[6,"div"],[10,"class","package-search-form"],[8],[0,"\\n "],[1,[26,"input",null,[["class","type","value","placeholder"],["form-control","text",[22,["query"]],"Package name"]]],false],[0,"\\n "],[6,"span"],[8],[0,"Number of packages : "],[1,[22,["packages","length"]],false],[9],[0,"\\n "],[9],[0,"\\n "],[9],[0,"\\n "],[6,"div"],[10,"id","packages"],[10,"class","packages"],[8],[0,"\\n "],[6,"ul"],[8],[0,"\\n"],[4,"infinite-list",null,[["containerElementId","elements","perPage"],["packages",[22,["packages"]],80]],{"statements":[[0," "],[6,"li"],[8],[0,"\\n"],[4,"each",[[21,1,["versions"]]],null,{"statements":[[4,"link-to",["package",[26,"concat",[[21,1,["name"]],"-",[21,2,[]]],null]],null,{"statements":[[4,"if",[[26,"gt",[[21,3,[]],0],null]],null,{"statements":[[0," "],[1,[21,2,[]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[21,1,["name"]],false],[0,"-"],[1,[21,2,[]],false],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null]],"parameters":[2,3]},null],[0," "],[9],[0,"\\n"]],"parameters":[1]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/packages.hbs"}})}),define("haskell-code-explorer/utils/api-urls",["exports","haskell-code-explorer/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.urls=void 0 +e.urls={packageInfoUrl:function(e){return t.default.APP.staticUrlPrefix+"/"+e+"/"+t.default.APP.haskellCodeExplorerDirectory+"/packageInfo.json"},fileUrl:function(e,n){return t.default.APP.staticUrlPrefix+"/"+e+"/"+n},haskellModuleUrl:function(e,n){return t.default.APP.staticUrlPrefix+"/"+e+"/"+t.default.APP.haskellCodeExplorerDirectory+"/"+encodeURIComponent(encodeURIComponent(n))+".json"},packagesUrl:t.default.APP.apiUrlPrefix+"/packages",identifierDefinitionSiteUrl:function(e,n,o,r,i){return t.default.APP.apiUrlPrefix+"/definitionSite/"+e+"/"+o+"/"+n+"/"+r+"/"+encodeURIComponent(i).replace(/\./g,"%2E")},modulePathUrl:function(e,n,o){return t.default.APP.apiUrlPrefix+"/modulePath/"+e+"/"+o+"/"+n},expressionsUrl:function(e,n,o,r,i,l){return t.default.APP.apiUrlPrefix+"/expressions/"+e+"/"+encodeURIComponent(n)+"/"+o+"/"+r+"/"+i+"/"+l},referencesUrl:function(e,n){return t.default.APP.apiUrlPrefix+"/references/"+e+"/"+encodeURIComponent(n)},identifierSearchUrl:function(e,n){return t.default.APP.apiUrlPrefix+"/identifiers/"+e+"/"+encodeURIComponent(n).replace(/\./g,"%2E")}}}),define("haskell-code-explorer/utils/color-themes",["exports"],function(e){function t(e){return"\n body { \n color: "+e.defaultColor+" !important;\n background-color: "+e.backgroundColor+" !important;\n }\n input {\n color: "+e.defaultColor+" !important;\n background-color: "+e.backgroundColor+" !important;\n border-color: "+e.borderColor+" !important;\n }\n .package-content {\n border-top: 1px solid "+e.borderColor+" !important;\n }\n .header a {\n color : "+e.menuLinkColor+" !important;\n }\n a {\n color: "+e.typeColor+" !important;\n }\n span.link {\n color: "+e.typeColor+" !important;\n }\n .header {\n background-color: "+e.menuColor+" !important;\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .declarations-content {\n background-color: "+e.navigationPanelColor+" !important;\n border: 1px solid "+e.borderColor+" !important;\n }\n .declarations-header {\n background-color: "+e.navigationPanelColor+" !important;\n border: 1px solid "+e.borderColor+" !important; \n }\n li.declaration {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .left-panel {\n background-color: "+e.navigationPanelColor+" !important;\n border-right: 1px solid "+e.borderColor+" !important;\n }\n .show-left-panel-button {\n background-color: "+e.navigationPanelColor+" !important;\n border-right:1px solid "+e.borderColor+" !important;\n border-bottom:1px solid "+e.borderColor+" !important;\n }\n .right-panel {\n background-color: "+e.backgroundColor+" !important;\n }\n a.jstree-anchor {\n color: "+e.defaultColor+" !important;\n }\n .declaration > a {\n color: "+e.defaultColor+" !important;\n }\n .highlighted-line {\n background : "+e.highlightedLineColor+" !important;\n }\n table.source-code {\n background-color: "+e.backgroundColor+" !important;\n color: "+e.defaultColor+" !important;\n }\n .jstree-clicked {\n background-color: "+e.backgroundColor+" !important;\n }\n .jstree-hovered {\n background-color: "+e.backgroundColor+" !important;\n }\n ul.autocomplete-items {\n background-color: "+e.backgroundColor+" !important;\n border-top: 1px solid "+e.borderColor+" !important;\n border-left: 1px solid "+e.borderColor+" !important;\n border-right: 1px solid "+e.borderColor+" !important;\n }\n ul.autocomplete-items > li { \n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n ul.autocomplete-items > li:hover { \n background-color: "+e.highlightedLineColor+" !important;\n }\n ul.autocomplete-items > li.highlighted { \n background-color: "+e.highlightedLineColor+" !important;\n }\n .source-code-snippet {\n color: "+e.defaultColor+" !important;\n border-bottom: 1px solid "+e.borderColor+" !important;\n } \n .source-code-snippet:hover {\n background-color: "+e.highlightedLineColor+" !important;\n }\n .bottom-panel {\n background-color: "+e.backgroundColor+" !important;\n border-top: 1px solid "+e.borderColor+" !important;\n }\n .bottom-panel-header {\n border-bottom: 1px solid "+e.borderColor+" !important; \n }\n .paginated-list-header {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n li.search-result {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .search-results-header {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .info-window-content {\n border-top: 1px solid "+e.borderColor+" !important;\n }\n .info-window {\n border: 1px solid "+e.borderColor+" !important;\n background-color:"+e.infoWindowColor+" !important;\n color: "+e.defaultColor+" !important;\n }\n .type-info {\n border-top: 1px solid "+e.borderColor+" !important;\n }"}function n(e){var n=document.createElement("style") +n.type="text/css",n.innerHTML=t(e),n.id="color-theme" +var o=document.querySelector("style#color-theme") +o&&o.parentElement.removeChild(o),document.getElementsByTagName("head")[0].appendChild(n)}Object.defineProperty(e,"__esModule",{value:!0}) +var o={id:"darkTheme",name:"Dark theme",description:"Dark theme (Monokai based)",defaultColor:"#F8F8F2",backgroundColor:"#272822",typeColor:"#66D9EF",literalColor:"#E6DB74",topLevelIdFromCurrentModule:"#A6E22E",localIdentifierColor:["#F0A3FF","#0075DC","#993F00","#2BCE48","#FFCC99","#808080","#94FFB5","#8F7C00","#C20088","#FFA405","#FFA8BB","#426600","#FF0010","#5EF1F2","#00998F","#E0FF66","#FFFF80","#FFFF00","#FF5005"],menuColor:"#3c3b37",menuLinkColor:"#F8F8F2",infoWindowColor:"#3c3b37",navigationPanelColor:"#3c3b37",linkColor:"#0366d6",borderColor:"#535557",highlightedLineColor:"#4a4a4a"},r={id:"lightTheme",name:"Light theme",description:"Light theme (Github based)",defaultColor:"#24292e",backgroundColor:"#ffffff",typeColor:"#005cc5",literalColor:"#032f62",topLevelIdFromCurrentModule:"#6f42c1",localIdentifierColor:["#005C31","#2BCE48","#808080","#8F7C00","#C20088","#FFA405","#ffa8bb","#426600","#FF0010","#09d7d8","#00998F","#990000","#FF5005"],menuColor:"#f2f4f8",menuLinkColor:"#24292e",infoWindowColor:"#f2f4f8",navigationPanelColor:"#f2f4f8",linkColor:"#0366d6",borderColor:"#e1e4e8",highlightedLineColor:"#eaeaea"},i={darkTheme:o,lightTheme:r} +e.updateColorThemeCss=n,e.colorThemeToCss=t,e.themes=i}),define("haskell-code-explorer/utils/go-to-definition",["exports"],function(e){function t(e){var t=e.modulePath,n=e.packageId.name+"-"+e.packageId.version,o="" +return 1!=e.startLine&&(o="#L"+e.startLine),"/package/"+n+"/show/"+t+o}function n(e,t){var n="" +return"Mod"!==t.entity&&(n="#"+encodeURIComponent(t.name)),"https://hackage.haskell.org/package/"+e+"/docs/src/"+t.moduleName+".html"+n}function o(e,t){return 2===e?window.open(t,"_blank"):1==e&&(window.location=t),!1}function r(e){if(e){var t=window.location.origin+window.location.pathname+"#L"+e +location.href!=t&&(window.location.hash="#L"+e)}}function i(e,i,l,s){if("ExactLocation"===i.tag){var a=t(i) +i.startLine!==s&&r(s),o(l,a)}else if("ApproximateLocation"===i.tag){var c=i.packageId.name+"-"+i.packageId.version +"Mod"===i.entity?e.loadDefinitionSite(c,i.moduleName,i.componentId,i.entity,i.moduleName).then(function(e){var t=e.location.packageId.name+"-"+e.location.packageId.version +o(l,"/package/"+t+"/show/"+e.location.modulePath)}).catch(function(){o(l,n(c,i))}):e.loadDefinitionSite(c,i.moduleName,i.componentId,i.entity,i.name).then(function(e){if("ExactLocation"===e.location.tag){var a=t(e.location) +i.startLine!==s&&r(s),o(l,a)}else r(s),o(l,n(c,i))}).catch(function(e){console.log(e),r(s),o(l,n(c,i))})}else alert("No location info")}Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinition=i,e.openUrl=o}),define("haskell-code-explorer/utils/line-selection",["exports"],function(e){function t(e,t){var o=Array.prototype.slice.call(e.querySelectorAll("td.line-number")) +if(o.length>0){var i=function(){n(e)} +window.addEventListener("hashchange",i),t._onhashchange=i +var l=void 0,s=function(e){16===e.keyCode&&(l=!0)},a=function(e){16===e.keyCode&&(l=!1)} +document.addEventListener("keydown",s),document.addEventListener("keyup",a),t._onkeydown=s,t._onkeyup=a +var c=void 0,d=void 0 +o.forEach(function(t){t.onclick=function(){var t=parseInt(this.textContent) +l&&c?c!=t&&(d=t,co&&(n.scrollTop=n.scrollTop-(o/2-20))}function r(e,t,n){Array.prototype.slice.call(e.querySelectorAll("td.line-content")).forEach(function(e){var o=parseInt(e.id.substring(2)) +o>=t&&o<=n?e.classList.add("highlighted-line"):e.classList.remove("highlighted-line")})}Object.defineProperty(e,"__esModule",{value:!0}),e.initializeLineSelection=t,e.highlightLines=r,e.highlightSelectedLines=n}),define("haskell-code-explorer/config/environment",[],function(){try{var e="haskell-code-explorer/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n=JSON.parse(unescape(t)),o={default:n} +return Object.defineProperty(o,"__esModule",{value:!0}),o}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("haskell-code-explorer/app").default.create({staticUrlPrefix:"/files",apiUrlPrefix:"/api",haskellCodeExplorerDirectory:".haskell-code-explorer",title:"Haskell code explorer",name:"haskell-code-explorer",version:"0.0.1+a221abf4"}) diff --git a/javascript/release/assets/haskell-code-explorer-f7f4bfc85d03709e38fddce7106b4991.js b/javascript/release/assets/haskell-code-explorer-f7f4bfc85d03709e38fddce7106b4991.js deleted file mode 100644 index a9b9578..0000000 --- a/javascript/release/assets/haskell-code-explorer-f7f4bfc85d03709e38fddce7106b4991.js +++ /dev/null @@ -1,206 +0,0 @@ -"use strict" -define("haskell-code-explorer/app",["exports","ember-resolver","ember-load-initializers","haskell-code-explorer/config/environment"],function(e,t,n,o){Object.defineProperty(e,"__esModule",{value:!0}) -var r -r=Ember.Application.extend({modulePrefix:o.default.modulePrefix,Resolver:t.default}),(0,n.default)(r,o.default.modulePrefix),e.default=r}),define("haskell-code-explorer/components/bottom-panel",["exports"],function(e){function t(e){var t=Math.floor(e.$containerElement.height()/2) -e.$().css({display:"block",top:t+"px"}),e.$topPanelElement.css({height:t+"px"})}function n(e){var t=Math.floor(e.$containerElement.height()/2) -e.$().css({display:"none",height:t+"px"}),e.$topPanelElement.css({height:"100%"})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({classNames:["bottom-panel"],didInsertElement:function(){var e=this -this._super.apply(this,arguments),this.$topPanelElement=Ember.$(this.get("topPanelElementId")),this.$containerElement=Ember.$(this.get("containerElementId")),Ember.run.next(this,function(){Ember.$(e.element).resizable({handles:"n",maxHeight:700,minHeight:200,resize:function(t,n){Ember.run.next(e,function(){e.$topPanelElement.css({height:e.$containerElement.height()-n.size.height})})}})})},visibilityObserver:Ember.observer("visible",function(){this.get("visible")?t(this):n(this)}),actions:{close:function(){this.set("visible",!1)}}})}),define("haskell-code-explorer/components/expression-info",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({})}),define("haskell-code-explorer/components/file-tree",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}) -var t=function e(t,o){return o.contents.map(function(o){var r={} -return r.text=o.name,r.data=o,o.path&&(r.id=o.path,r.a_attr={href:"/package/"+t+"/show/"+o.path}),"Dir"===o.tag?(r.children=e(t,o),r.state={opened:n(o)}):o.isHaskellModule?(r.icon="/assets/haskell.ico",r.isHaskellModule=!0):(r.icon="jstree-file",r.isHaskellModule=!1),r})},n=function e(t){return t.contents.some(function(t){return"File"===t.tag?t.isHaskellModule:e(t)})} -e.default=Ember.Component.extend({query:null,didInsertElement:function(){var e=this -this._super.apply(this,arguments) -var n=this.element.getElementsByClassName("file-tree")[0],o=Ember.$(n).jstree({core:{data:t(this.get("packageId"),this.get("directoryTree"))},plugins:["search"],search:{case_insensitive:!0,show_only_matches:!0,show_only_matches_children:!0}}) -o.on("select_node.jstree",function(t,n){var o=n.node.data -"Dir"!=o.tag&&e.sendAction("openFile",o.path)}) -var r=o.jstree(!0) -if(this.get("currentFile")){r.select_node(this.get("currentFile")) -var i=r.get_node(this.get("currentFile"),!0)[0] -i&&i.scrollIntoView()}this.jstree=r},currentFileObserver:Ember.observer("currentFile",function(){var e=this -Ember.run.next(function(){e.jstree.deselect_all(),e.jstree.select_node(e.get("currentFile"))})}),queryObserver:Ember.observer("query",function(){this.get("query")?this.jstree.search(this.get("query")):this.jstree.clear_search()}),actions:{hide:function(){this.get("hide")()}}})}),define("haskell-code-explorer/components/haskell-module",["exports","haskell-code-explorer/utils/go-to-definition","haskell-code-explorer/utils/line-selection"],function(e,t,n){function o(e,t){return e.line===t.line?e.column===t.column?0:e.column>t.column?1:-1:e.line>t.line?1:-1}function r(e,t,n){if(e[t.line]&&e[n.line]){if(t.line===n.line)return e[t.line].slice(t.column-1,n.column-1) -for(var o=e[t.line],r=[],i=t.line+1;i0){var r=null -o.forEach(function(o){var i=c(o,n.get("identifiers"),n.get("occurrences"),n.get("path"),n.get("colorTheme"),n.get("name")) -o.style.cssText=i,o.onmouseup=function(e){if(r&&clearTimeout(r),window.getSelection().isCollapsed){var i=n.get("identifiers")[o.dataset.identifier],l=n.get("occurrences")[o.dataset.occurrence],s=parseInt(o.parentNode.dataset.line) -"ModuleId"===l.sort.tag?(0,t.goToDefinition)(n.get("store"),l.sort.contents,e.which,s):!i||1!==e.which&&2!==e.which||(l.isBinder?"External"===i.sort&&n.get("findReferences")(n.get("packageId"),i.externalId,i.demangledOccName):(0,t.goToDefinition)(n.get("store"),i.locationInfo,e.which,s))}},o.onmouseover=function(){l(e,o,!0),r&&clearTimeout(r),r=setTimeout(function(){Ember.run.next(n,function(){var e=n.get("identifiers")[o.dataset.identifier],t=n.get("occurrences")[o.dataset.occurrence] -console.log(t),console.log(e),n.set("selectedIdentifier",o),n.set("currentLineNumber",parseInt(o.parentNode.dataset.line)||1),n.set("identifierInfo",e),n.set("identifierOccurrence",t),n.set("hasSelectedExpression",!1),n.set("isHoveredOverIdentifier",!0)})},250)},o.onmouseout=function(){l(e,o,!1),r&&clearTimeout(r),r=setTimeout(function(){Ember.run.next(n,function(){n.set("isHoveredOverIdentifier",!1)})},250)}}),n.timer=r}}function u(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}function p(e,t){var n=Array.prototype.slice.call(e.querySelectorAll("td.line-content")) -if(n.length>0){var i=[""] -n.forEach(function(e){i.push(e.textContent)}) -var l=["#text","SPAN","TD"],s=!1,a=!1,c=function(){Ember.run.next(function(){if(!s&&!a){a=!0,setTimeout(function(){a=!1},400),t.set("hasSelectedExpression",!1) -var n=window.getSelection() -if(n.anchorNode&&n.focusNode&&u(e,n.anchorNode)&&u(e,n.focusNode)&&-1!==l.indexOf(n.anchorNode.nodeName)&&-1!==l.indexOf(n.focusNode.nodeName)&&!n.isCollapsed){var c=document.createRange() -c.setStart(n.anchorNode,n.anchorOffset),c.setEnd(n.focusNode,n.focusOffset) -var d=c.collapsed,p=void 0,f=void 0,m=void 0,h=void 0 -d?(p=n.focusNode,f=n.focusOffset,m=n.anchorNode,h=n.anchorOffset):(p=n.anchorNode,f=n.anchorOffset,m=n.focusNode,h=n.focusOffset) -var b=void 0,g=void 0,v=void 0,x=void 0,y=void 0 -if("#text"===p.nodeName){var k=p.parentNode -if(g=parseInt(k.dataset.start)+f,b=parseInt(k.parentNode.dataset.line),f===p.textContent.length&&null===k.nextSibling){for(var E=p.parentNode.parentNode.parentNode,I=E.nextSibling;""===I.children[1].textContent;)I=I.nextSibling -y=I.children[1].children[0]}else y=0!==f&&k.nextSibling?k.nextSibling:k}else if("SPAN"===p.nodeName){g=1,b=parseInt(p.parentNode.dataset.line) -for(var P=p.parentNode.parentNode,_=P.nextSibling;""===_.children[1].textContent;)_=_.nextSibling -y=_.children[1].children[0]}else if("TD"===p.nodeName){if(f>0){var O=p.children[f-1] -g=parseInt(O.dataset.start)}else g=1 -b=parseInt(p.id.slice(2)),y=p.children[0]}if("#text"===m.nodeName)x=parseInt(m.parentNode.dataset.start)+h,v=parseInt(m.parentNode.parentNode.dataset.line) -else if("SPAN"===m.nodeName)x=1,v=parseInt(m.parentNode.dataset.line) -else if("TD"===m.nodeName){if(h>0){var w=m.children[h-1] -x=parseInt(w.dataset.start)}else x=1 -v=parseInt(m.id.slice(2))}var C=t.get("store").loadExpressions(t.get("packageId"),t.get("path"),b,g,v,x) -s=!0,C.then(function(e){Ember.run.next(function(){if(e&&e.length>0){e.sort(function(e,t){return o(e.srcSpan.start,t.srcSpan.start)<=0&&o(e.srcSpan.end,t.srcSpan.end)>=0?-1:1}) -var n=e.reduce(function(e,t){var n=Ember.copy(t),o=r(i,t.srcSpan.start,t.srcSpan.end) -return o?(n.sourceCode=o,e.concat(n)):e},[]) -n.length>0&&(t.set("selectedIdentifier",y),t.set("expressions",n),t.set("currentLineNumber",parseInt(y.parentNode.dataset.line)||1),t.set("hasSelectedExpression",!0))}s=!1})})}}})} -e.addEventListener("mouseup",c),t._onmouseup=c}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),selectedIdentifier:null,isHoveredOverIdentifier:!1,hasSelectedExpression:!1,showDeclarations:!0,showDeclarationsLabel:Ember.computed("showDeclarations",function(){return this.get("showDeclarations")?"Hide":"Show"}),queryObserver:Ember.observer("query",function(){var e=this -Ember.run.debounce(this,function(){var t=new RegExp(e.get("query"),"i"),n=e.get("declarations").filter(function(e){return-1!=e.name.search(t)}) -Ember.run.next(function(){e.set("filteredDeclarations",n)})},300)}),identifierLocationInfo:Ember.computed("identifierInfo","identifierOccurrence",function(){var e=this.get("identifierOccurrence"),t=this.get("identifierInfo") -if(e)return"ModuleId"===e.sort.tag?e.sort.contents:t?t.locationInfo:null}),themeObserver:Ember.observer("colorTheme",function(){var e=this -Ember.run.next(this,function(){e.cleanup(),e.didInsertElement()})}),fileObserver:Ember.observer("path",function(){var e=this -Ember.run.next(this,function(){e.cleanup(),e.didInsertElement()})}),cleanup:function(){this.timer&&clearTimeout(this.timer),this._onhashchange&&window.removeEventListener("hashchange",this._onhashchange),this._onkeydown&&document.removeEventListener("keydown",this._onkeydown),this._onkeyup&&document.removeEventListener("keyup",this._onkeyup),this._onmouseup&&this.sourceCodeContainerElement.removeEventListener("mouseup",this._onmouseup),this.set("selectedIdentifier",null),this.set("isHoveredOverIdentifier",!1),this.set("hasSelectedExpression",!1),this.set("showDeclarations",!0)},didReceiveAttrs:function(){this.set("filteredDeclarations",this.get("declarations"))},didInsertElement:function(){var e=this -this._super.apply(this,arguments) -var t=this.element.querySelector(".source-code-container") -t.innerHTML=this.get("html"),this.sourceCodeContainerElement=t,this.element.parentNode.scrollTop=0 -var o=this.element.querySelector(".declarations-content") -this.set("query",""),o&&(o.scrollTop=0),Ember.run.next(this,function(){d(t,e),(0,n.initializeLineSelection)(t,e),p(t,e)})},willDestroyElement:function(){this.cleanup()},actions:{goToLine:function(e){window.location.hash="L"+e},toggleShowDeclarations:function(){this.toggleProperty("showDeclarations")}}})}),define("haskell-code-explorer/components/identifier-info",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),downloadedDocumentation:null,didInsertElement:function(){var e=this,n=function(n){if(n.target.dataset.location){var o=void 0 -try{o=JSON.parse(n.target.dataset.location)}catch(e){console.log(e)}o&&(0,t.goToDefinition)(e.get("store"),o,n.which,e.get("currentLineNumber"))}} -this.element.addEventListener("mouseup",n),this._onmouseup=n},willDestroyElement:function(){this._onmouseup&&this.element.removeEventListener("mouseup",this._onmouseup)},isNaughtyRecSel:Ember.computed("identifierInfo",function(){var e=this.get("identifierInfo") -return!!e&&"RecSelIdNaughty"===e.details}),isExternalIdentifier:Ember.computed("identifierInfo",function(){var e=this.get("identifierInfo") -return!!e&&"External"===e.sort}),identifierObserver:Ember.observer("identifierInfo",function(){var e=this -this.set("downloadedDocumentation","") -var t=this.get("identifierInfo") -if(t){var n=t.locationInfo -if("ApproximateLocation"===n.tag){var o=n.packageId.name+"-"+n.packageId.version,r=t -this.get("store").loadDefinitionSite(o,n.moduleName,n.componentId,n.entity,n.name).then(function(t){Ember.run.next(e,function(){r===e.get("identifierInfo")&&e.set("downloadedDocumentation",t.documentation)})})}}})})}),define("haskell-code-explorer/components/identifier-name",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),name:Ember.computed("identifierElement",function(){var e=this.get("identifierElement") -if(e)return e.innerText}),style:Ember.computed("identifierElement",function(){var e=this.get("identifierElement") -if(e)return new Ember.String.htmlSafe("color:"+e.style.color)}),locationInfo:Ember.computed("identifierInfo","identifierOccurrence",function(){return"ModuleId"===this.get("identifierOccurrence.sort.tag")?this.get("identifierOccurrence.sort.contents"):this.get("identifierInfo.locationInfo")}),location:Ember.computed("locationInfo",function(){var e=this.get("locationInfo") -return e?"ExactLocation"===e.tag?e.modulePath:"ApproximateLocation"===e.tag?"Mod"===e.entity?e.packageId.name+"-"+e.packageId.version:e.packageId.name+"-"+e.packageId.version+" "+e.moduleName:e.contents:""}),isExternalIdentifier:Ember.computed("identifierInfo",function(){return"External"===this.get("identifierInfo.sort")}),actions:{goToDefinition:function(e){return(0,t.goToDefinition)(this.get("store"),this.get("locationInfo"),e.which,this.get("currentLineNumber")),!1},findReferences:function(e,t){this.get("findReferences")(t,e.externalId,e.demangledOccName)}}})}),define("haskell-code-explorer/components/infinite-list",["exports"],function(e){function t(e){e.set("renderedElements",e.get("elements").slice(0,e.get("perPage"))),n=1}Object.defineProperty(e,"__esModule",{value:!0}) -var n=void 0,o=!1 -e.default=Ember.Component.extend({renderedElements:[],init:function(){this._super.apply(this,arguments),t(this)},elementsObserver:Ember.observer("elements",function(){t(this) -var e=document.getElementById(this.get("containerElementId")) -e&&(e.scrollTop=0)}),didInsertElement:function(){var e=document.getElementById(this.get("containerElementId")) -if(e){var t=this -e.onscroll=function(){var r=t.get("perPage"),i=t.get("elements") -!o&&n*rt.element.offsetHeight-100&&(o=!0,Ember.run.next(t,function(){var e=i.slice(n*r,(n+1)*r) -t.get("renderedElements").pushObjects(e),n++,o=!1}))}}}})}),define("haskell-code-explorer/components/info-window",["exports"],function(e){function t(e){var t=e.get("targetElement") -if(t){var n=e.element.offsetHeight,o=t.offsetHeight,r=t.parentNode,i=document.querySelector("#"+e.get("containerElementId")),l=t.getBoundingClientRect().top,s=void 0 -s=i?i.getBoundingClientRect().top:0 -var a=void 0 -a=l0&&(-1!==e?e===n-1?this.set("highlightedItemIndex",0):this.set("highlightedItemIndex",e+1):this.set("highlightedItemIndex",0))},onUp:function(){this.showAutocompleteList() -var e=this.get("highlightedItemIndex"),t=this.get("items"),n=t.length -n>0&&(-1!==e?0===e?this.set("highlightedItemIndex",n-1):this.set("highlightedItemIndex",e-1):this.set("highlightedItemIndex",n-1))},hideAutocompleteList:function(){this.set("highlightedItemIndex",-1),this.$autocompleteContainer.css({display:"none"})},showAutocompleteList:function(){this.$autocompleteContainer.css({display:"block"})},queryObserver:Ember.observer("query",function(){var e=this -if(this.get("query")){var t=this.get("maxItems")?this.get("maxItems"):10,n=this.get("createSearchUrlFunction")(this.get("query"))+"?per_page="+t -Ember.run.debounce(this,function(){e.get("store").loadFromUrlPaginated(n).then(function(t){Ember.run.next(function(){e.set("items",t.items)})})},400),this.showAutocompleteList()}else this.hideAutocompleteList(),this.set("items",[])}),actions:{onSubmit:function(){this.hideAutocompleteList(),this.get("onSubmit")(this.get("query"))},goToDefinition:function(e){this.hideAutocompleteList(),this.get("selectItem")(e)}}})}),define("haskell-code-explorer/components/instance-info",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),style:Ember.computed("nestedLevel",function(){return new Ember.String.htmlSafe("margin-left :"+10*this.get("nestedLevel")+"px")}),nextNestedLevel:Ember.computed("nestedLevel",function(){return this.get("nestedLevel")+1}),actions:{goToDefinition:function(e){return(0,t.goToDefinition)(this.get("store"),this.get("instance.location"),e.which,this.get("currentLineNumber")),!1}}})}),define("haskell-code-explorer/components/labeled-radio-button",["exports","ember-radio-button/components/labeled-radio-button"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("haskell-code-explorer/components/paginated-list",["exports"],function(e){function t(e,t,n){e.loadFromUrlPaginated(n).then(function(e){Ember.run.next(function(){t.set("total",e.total),t.set("items",e.items),t.set("first",e.linkHeader.first),t.set("next",e.linkHeader.next),t.set("prev",e.linkHeader.prev),t.set("last",e.linkHeader.last) -var o=n.match(/(&|\?)page=(\d+)/),r=n.match(/(&|\?)per_page=(\d+)/),i=o?o[2]:1,l=r?r[2]:20;(e.linkHeader.next||e.linkHeader.prev)&&(t.set("firstItemOnPage",(i-1)*l+1),e.linkHeader.last?t.set("lastItemOnPage",i*l):t.set("lastItemOnPage",e.total))})})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),init:function(){this._super.apply(this,arguments),this.get("url")&&t(this.get("store"),this,this.get("url"))},urlObserver:Ember.observer("url",function(){t(this.get("store"),this,this.get("url")),this.element.querySelector(".paginated-list-content").scrollTop=0}),actions:{update:function(e){this.element.querySelector(".paginated-list-content").scrollTop=0,t(this.get("store"),this,e)}}})}),define("haskell-code-explorer/components/radio-button-input",["exports","ember-radio-button/components/radio-button-input"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("haskell-code-explorer/components/radio-button",["exports","ember-radio-button/components/radio-button"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("haskell-code-explorer/components/resizable-panel",["exports"],function(e){function t(e,t){e.$alsoResizeElement.css({left:0}),e.$().css({width:0}),e.set("hidden",!0),e.$(".show-left-panel-button").show(),t&&e.set("hiddenByUser",!0)}function n(e,t){e.$alsoResizeElement.css({left:300}),e.$().css({width:300}),e.set("hidden",!1),e.$(".show-left-panel-button").hide(),t&&e.set("hiddenByUser",!1)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({hidden:!1,hiddenByUser:!1,didInsertElement:function(){var e=this -this._super.apply(this,arguments),Ember.run.next(this,function(){var o=function(){if(!e.get("hiddenByUser")){var o=window.innerWidth -!e.get("hidden")&&o<700?t(e,!1):e.get("hidden")&&o>700&&n(e,!1)}} -e._onresize=o,window.addEventListener("resize",o) -var r=Ember.$(e.get("alsoResizeElementId")) -Ember.$(e.element).resizable({maxWidth:800,minWidth:200,handles:"e",resize:function(t,n){Ember.run.next(e,function(){r.css({left:n.size.width})})}}),e.$alsoResizeElement=r})},hideButtonLabel:Ember.computed("hidden",function(){return this.get("hidden")?">":"<"}),willDestroyElement:function(){this._onresize&&window.removeEventListener("resize",this._onresize)},actions:{hide:function(){this.get("hidden")?n(this,!0):t(this,!0)}}})}),define("haskell-code-explorer/components/text-file",["exports","haskell-code-explorer/utils/line-selection"],function(e,t){function n(e){return e.replace(/[\"&<>]/g,function(e){return{'"':""","&":"&","<":"<",">":">"}[e]})}function o(e){var t=0 -return""+e.split("\n").map(function(e){return""}).join("")+"
"+t+""+n(e)+"
"}Object.defineProperty(e,"__esModule",{value:!0}) -var r=["markdown","mdown","mkdn","mkd","md"] -e.default=Ember.Component.extend({isMarkdown:Ember.computed("path",function(){var e=this.get("path").split(".").pop() -return r.any(function(t){return e===t})}),html:Ember.computed("path","isMarkdown",function(){return this.get("isMarkdown")?this.markdownConverter.makeHtml(this.get("text")):o(this.get("text"))}),init:function(){this._super.apply(this,arguments),this.markdownConverter=new showdown.Converter},didInsertElement:function(){var e=this.element.querySelector(".source-code-container");(0,t.initializeLineSelection)(e,this),this.element.parentNode.scrollTop=0},willDestroyElement:function(){this.cleanup()},cleanup:function(){this._onhashchange&&window.removeEventListener("hashchange",this._onhashchange),this._onkeydown&&document.removeEventListener("keydown",this._onkeydown),this._onkeyup&&document.removeEventListener("keyup",this._onkeyup)},pathObserver:Ember.observer("path",function(){var e=this -Ember.run.next(this,function(){e.cleanup(),e.didInsertElement()})})})}),define("haskell-code-explorer/components/type-component",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({store:Ember.inject.service("store"),tagName:"span",classNames:["type-component"],contextMenu:function(){return this.get("identifiers")&&this.get("internalId")&&this.set("expanded",!0),!1},linkClass:Ember.computed("identifierInfo",function(){return this.get("identifierInfo")?"link":""}),identifierInfo:Ember.computed("internalId",function(){return this.get("internalId")?this.get("identifiers")[this.get("internalId")]:null}),actions:{onmouseup:function(e){if(this.get("identifierInfo")&&3!==e.which){var n=this.get("identifierInfo").locationInfo -return(0,t.goToDefinition)(this.get("store"),n,e.which,this.get("currentLineNumber")),!1}}}})}),define("haskell-code-explorer/components/type-signature-text",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({tagName:"span"})}),define("haskell-code-explorer/components/type-signature",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({tagName:"span",expandTypeSynonyms:!1,expandTypeSynonymsLabel:Ember.computed("expandTypeSynonyms",function(){return this.get("expandTypeSynonyms")?"Show type synonyms":"Expand type synonyms"}),components:Ember.computed("type","expandTypeSynonyms",function(){return this.get("expandTypeSynonyms")&&this.get("type.componentsExpanded")?this.get("type.componentsExpanded"):this.get("type.components")}),typeObserver:Ember.observer("type",function(){this.set("expandTypeSynonyms",!1)}),actions:{toggleExpandTypeSynonyms:function(){this.toggleProperty("expandTypeSynonyms")}}})}),define("haskell-code-explorer/controllers/application",["exports","haskell-code-explorer/utils/color-themes"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({settings:Ember.inject.service("settings"),themes:Object.values(t.themes),init:function(){this._super.apply(this,arguments),(0,t.updateColorThemeCss)(this.get("settings").get("colorTheme"))},currentTheme:Ember.computed("settings",function(){return this.get("settings.colorTheme.id")}),actions:{themeChanged:function(e){var n=t.themes[e] -this.get("settings").set("colorTheme",n),(0,t.updateColorThemeCss)(n)}}})}),define("haskell-code-explorer/controllers/package",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({store:Ember.inject.service("store"),currentFile:null,loadItemsFunction:null,query:null,actions:{searchIdentifier:function(e){e&&(this.set("currentFile",null),document.title=this.get("model.id"),this.transitionToRoute("package.search",e))},showIdentifier:function(e){return(0,t.goToDefinition)(this.get("store"),e.locationInfo,1,null),!1}}})}),define("haskell-code-explorer/controllers/package/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({modulesFiltered:Ember.computed("model","query",function(){var e=this.get("query"),t=Object.keys(this.get("model.modules")).sort() -if(e){var n=new RegExp(e,"i") -return t.filter(function(e){return-1!=e.search(n)})}return t})})}),define("haskell-code-explorer/controllers/package/search",["exports","haskell-code-explorer/utils/go-to-definition"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({store:Ember.inject.service("store"),actions:{goToDefinition:function(e,n){return(0,t.goToDefinition)(this.get("store"),e,n.which,null),!1}}})}),define("haskell-code-explorer/controllers/package/show/file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({settings:Ember.inject.service("settings"),actions:{findReferences:function(e,t,n){this.send("updateReferences",e,t,n)}}})}),define("haskell-code-explorer/controllers/packages",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Controller.extend({queryObserver:Ember.observer("query",function(){var e=this -Ember.run.debounce(this,function(){var t=new RegExp(e.get("query"),"i"),n=e.get("model").filter(function(e){return-1!=e.name.search(t)}) -Ember.run.next(function(){e.set("packages",n)})},300)})})}),define("haskell-code-explorer/helpers/and",["exports","ember-truth-helpers/helpers/and"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"and",{enumerable:!0,get:function(){return t.and}})}),define("haskell-code-explorer/helpers/app-version",["exports","haskell-code-explorer/config/environment","ember-cli-app-version/utils/regexp"],function(e,t,n){function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} -return t.hideSha?r.match(n.versionRegExp)[0]:t.hideVersion?r.match(n.shaRegExp)[0]:r}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=o -var r=t.default.APP.version -e.default=Ember.Helper.helper(o)}),define("haskell-code-explorer/helpers/eq",["exports","ember-truth-helpers/helpers/equal"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"equal",{enumerable:!0,get:function(){return t.equal}})}),define("haskell-code-explorer/helpers/gt",["exports","ember-truth-helpers/helpers/gt"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"gt",{enumerable:!0,get:function(){return t.gt}})}) -define("haskell-code-explorer/helpers/gte",["exports","ember-truth-helpers/helpers/gte"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"gte",{enumerable:!0,get:function(){return t.gte}})}),define("haskell-code-explorer/helpers/is-array",["exports","ember-truth-helpers/helpers/is-array"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return t.isArray}})}),define("haskell-code-explorer/helpers/is-equal",["exports","ember-truth-helpers/helpers/is-equal"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"isEqual",{enumerable:!0,get:function(){return t.isEqual}})}),define("haskell-code-explorer/helpers/lt",["exports","ember-truth-helpers/helpers/lt"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"lt",{enumerable:!0,get:function(){return t.lt}})}),define("haskell-code-explorer/helpers/lte",["exports","ember-truth-helpers/helpers/lte"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"lte",{enumerable:!0,get:function(){return t.lte}})}),define("haskell-code-explorer/helpers/not-eq",["exports","ember-truth-helpers/helpers/not-equal"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"notEq",{enumerable:!0,get:function(){return t.notEq}})}),define("haskell-code-explorer/helpers/not",["exports","ember-truth-helpers/helpers/not"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"not",{enumerable:!0,get:function(){return t.not}})}),define("haskell-code-explorer/helpers/or",["exports","ember-truth-helpers/helpers/or"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"or",{enumerable:!0,get:function(){return t.or}})}),define("haskell-code-explorer/helpers/xor",["exports","ember-truth-helpers/helpers/xor"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"xor",{enumerable:!0,get:function(){return t.xor}})}),define("haskell-code-explorer/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","haskell-code-explorer/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}) -var o=void 0,r=void 0 -n.default.APP&&(o=n.default.APP.name,r=n.default.APP.version),e.default={name:"App Version",initialize:(0,t.default)(o,r)}}),define("haskell-code-explorer/initializers/container-debug-adapter",["exports","ember-resolver/resolvers/classic/container-debug-adapter"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"container-debug-adapter",initialize:function(){var e=arguments[1]||arguments[0] -e.register("container-debug-adapter:main",t.default),e.inject("container-debug-adapter:main","namespace","application:main")}}}),define("haskell-code-explorer/initializers/export-application-global",["exports","haskell-code-explorer/config/environment"],function(e,t){function n(){var e=arguments[1]||arguments[0] -if(!1!==t.default.exportApplicationGlobal){var n -if("undefined"!=typeof window)n=window -else if("undefined"!=typeof global)n=global -else{if("undefined"==typeof self)return -n=self}var o,r=t.default.exportApplicationGlobal -o="string"==typeof r?r:Ember.String.classify(t.default.modulePrefix),n[o]||(n[o]=e,e.reopen({willDestroy:function(){this._super.apply(this,arguments),delete n[o]}}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.initialize=n,e.default={name:"export-application-global",initialize:n}}),define("haskell-code-explorer/router",["exports","haskell-code-explorer/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}) -var n=Ember.Router.extend({location:t.default.locationType}) -n.map(function(){this.route("packages",{path:""}),this.route("package",{path:"/package/:packageId"},function(){this.route("show",function(){this.route("file",{path:"*filePath"},function(){})}),this.route("search",{path:"/search/:query"})}),this.route("bad-url",{path:"/*badurl"})}),e.default=n}),define("haskell-code-explorer/routes/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({})}),define("haskell-code-explorer/routes/package",["exports","haskell-code-explorer/utils/api-urls"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({store:Ember.inject.service("store"),model:function(e){var t=this -return this.get("store").loadPackage(e.packageId).catch(function(e){console.log(e),t.transitionTo("/package-not-found")})},afterModel:function(e){document.title=e.id},setupController:function(e,n){this._super(e,n) -var o=this.modelFor("package").id -e.set("bottomPanelVisible",!1),e.set("createSearchUrlFunction",function(e){return t.urls.identifierSearchUrl(o,e)})},actions:{openFile:function(e){this.transitionTo("package.show.file",e)},fileOpened:function(e){this.get("controller")&&this.set("controller.currentFile",e)},updateReferences:function(e,n,o){this.set("controller.packageId",e),this.set("controller.externalId",n),this.set("controller.occName",o),this.set("controller.bottomPanelVisible",!0),this.set("controller.referencesUrl",t.urls.referencesUrl(e,n)+"?per_page=50")}}})}),define("haskell-code-explorer/routes/package/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({afterModel:function(e,t){t.send("fileOpened",null)}})}),define("haskell-code-explorer/routes/package/search",["exports","haskell-code-explorer/utils/api-urls","haskell-code-explorer/utils/go-to-definition"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({store:Ember.inject.service("store"),model:function(e){return{query:e.query,url:t.urls.identifierSearchUrl(this.modelFor("package").id,e.query)+"?per_page=20"}},afterModel:function(){var e=this,t=function(t){if(t.target.dataset.location){var o=void 0 -try{o=JSON.parse(t.target.dataset.location)}catch(e){console.log(e)}o&&(0,n.goToDefinition)(e.get("store"),o,t.which)}} -this._onmouseup=t,document.addEventListener("mouseup",t)},deactivate:function(){this._onmouseup&&document.removeEventListener("mouseup",this._onmouseup)}})}),define("haskell-code-explorer/routes/package/show/file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({store:Ember.inject.service(),model:function(e){var t=this,n=this.modelFor("package") -return n.modules[e.filePath]?this.get("store").loadHaskellModule(n.id,e.filePath).catch(function(e){console.log(e),t.transitionTo("/not-found")}):this.get("store").loadFile(n.id,e.filePath).then(function(e){return document.title=n.id,e}).catch(function(e){console.log(e),t.transitionTo("/not-found")})},afterModel:function(e){document.title=e.id+" - "+this.modelFor("package").id},actions:{didTransition:function(){this.send("fileOpened",this.currentModel.id)}}})}),define("haskell-code-explorer/routes/package/show/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({afterModel:function(e,t){t.send("fileOpened",null)}})}),define("haskell-code-explorer/routes/packages",["exports","haskell-code-explorer/utils/api-urls","haskell-code-explorer/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Route.extend({model:function(){return Ember.$.getJSON(t.urls.packagesUrl)},setupController:function(e,t){this._super(e,t),e.set("packages",t)},afterModel:function(){document.title=n.default.APP.title}})}),define("haskell-code-explorer/services/settings",["exports","haskell-code-explorer/utils/color-themes"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Service.extend({init:function(){if(this._super.apply(this,arguments),localStorage){var e=localStorage.getItem("colorThemeId"),n=t.themes[e] -e&&this.set("colorTheme",n)}},colorTheme:t.themes.darkTheme,settingsObserver:Ember.observer("colorTheme",function(){localStorage&&localStorage.setItem("colorThemeId",this.get("colorTheme").id)})})}),define("haskell-code-explorer/services/store",["exports","haskell-code-explorer/utils/api-urls"],function(e,t){function n(e){return'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)?e.substring(1,e.length-1):e}function o(e){if(!e)return{} -for(var t=/<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g,o=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,r=e.match(t),i=new Object,l=0;l"),a=s[0].substring(1),c=s[1],d=new Object -d.href=a -for(var u=c.match(o),p=0;p"],[9]],"parameters":[]},null],[0,"\\n "],[4,"if",[[22,["last"]]],null,{"statements":[[6,"button"],[10,"button",""],[10,"class","btn btn-outline-secondary btn-sm"],[3,"action",[[21,0,[]],"update",[22,["last","href"]]]],[8],[0,">>"],[9]],"parameters":[]},null],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[9],[0,"\\n"],[6,"div"],[10,"class","paginated-list-content"],[8],[0,"\\n "],[13,1,[[22,["items"]]]],[0," \\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/paginated-list.hbs"}})}),define("haskell-code-explorer/templates/components/resizable-panel",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"tpKUpnLR",block:'{"symbols":["&default"],"statements":[[6,"div"],[10,"class","absolute-container"],[8],[13,1,[[26,"action",[[21,0,[]],"hide"],null]]],[0,"\\n "],[6,"div"],[11,"onclick",[26,"action",[[21,0,[]],"hide"],null]],[10,"class","show-left-panel-button"],[8],[0,"\\n "],[1,[20,"hideButtonLabel"],true],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/resizable-panel.hbs"}})}),define("haskell-code-explorer/templates/components/text-file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"yYFMOyZb",block:'{"symbols":[],"statements":[[6,"div"],[10,"class","source-code-container"],[8],[0,"\\n"],[1,[20,"html"],true],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/text-file.hbs"}})}),define("haskell-code-explorer/templates/components/type-component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"nSuhY152",block:'{"symbols":[],"statements":[[4,"if",[[26,"and",[[22,["expanded"]],[22,["identifierInfo"]]],null]],null,{"statements":[[0,"("]],"parameters":[]},null],[0,"\\n"],[6,"span"],[11,"class",[27,["source-code ",[20,"linkClass"]]]],[11,"onmouseup",[26,"action",[[21,0,[]],"onmouseup"],null]],[8],[1,[20,"occName"],false],[9],[0,"\\n"],[4,"if",[[26,"and",[[22,["expanded"]],[22,["identifierInfo"]]],null]],null,{"statements":[[0," :: "],[1,[26,"type-signature",null,[["type","identifiers","noExpand"],[[22,["identifierInfo","idType"]],[22,["identifiers"]],true]]],false],[0,")"]],"parameters":[]},null],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/type-component.hbs"}})}),define("haskell-code-explorer/templates/components/type-signature-text",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"+rUvtMa3",block:'{"symbols":["typeComponent"],"statements":[[4,"each",[[22,["components"]]],null,{"statements":[[4,"if",[[26,"eq",[[21,1,["tag"]],"Text"],null]],null,{"statements":[[1,[21,1,["contents"]],false]],"parameters":[]},{"statements":[[1,[21,1,["name"]],false]],"parameters":[]}]],"parameters":[1]},null],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/type-signature-text.hbs"}})}),define("haskell-code-explorer/templates/components/type-signature",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"SdJzinj9",block:'{"symbols":["typeComponent"],"statements":[[4,"each",[[22,["components"]]],null,{"statements":[[4,"if",[[26,"eq",[[21,1,["tag"]],"Text"],null]],null,{"statements":[[6,"span"],[10,"class","source-code"],[8],[1,[21,1,["contents"]],false],[9]],"parameters":[]},{"statements":[[1,[26,"type-component",null,[["occName","internalId","identifiers","currentLineNumber"],[[21,1,["name"]],[21,1,["internalId"]],[22,["identifiers"]],[22,["currentLineNumber"]]]]],false]],"parameters":[]}]],"parameters":[1]},null],[0,"\\n"],[4,"unless",[[22,["noExpand"]]],null,{"statements":[[4,"if",[[22,["type","componentsExpanded"]]],null,{"statements":[[0," "],[6,"div"],[10,"style","margin-top:5px"],[8],[0,"\\n "],[6,"button"],[10,"class","btn btn-outline-secondary btn-sm"],[3,"action",[[21,0,[]],"toggleExpandTypeSynonyms"]],[8],[1,[20,"expandTypeSynonymsLabel"],false],[0,"\\n "],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/components/type-signature.hbs"}})}),define("haskell-code-explorer/templates/package",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"wmOuG9eh",block:'{"symbols":["section","files","file","reference","hide","identifier"],"statements":[[6,"div"],[10,"class","flex-container"],[8],[0,"\\n "],[6,"div"],[10,"class","package-header"],[8],[0,"\\n "],[6,"span"],[10,"class","package-header-package-name"],[8],[4,"link-to",["package",[22,["model"]]],null,{"statements":[[1,[22,["model","id"]],false]],"parameters":[]},null],[9],[0," \\n "],[6,"span"],[10,"class","package-header-input"],[8],[0,"\\n"],[4,"input-with-autocomplete",null,[["onSubmit","createSearchUrlFunction","maxItems","selectItem","placeholder"],[[26,"action",[[21,0,[]],"searchIdentifier"],null],[22,["createSearchUrlFunction"]],10,[26,"action",[[21,0,[]],"showIdentifier"],null],"Identifier"]],{"statements":[[0," "],[6,"span"],[10,"class","source-code-font"],[8],[1,[21,6,["demangledOccName"]],false],[0," :: "],[1,[26,"type-signature-text",null,[["components"],[[21,6,["idType","components"]]]]],false],[9],[0,"\\n "],[6,"div"],[10,"class","module-name"],[8],[0,"\\n"],[4,"if",[[21,6,["locationInfo","modulePath"]]],null,{"statements":[[0," "],[1,[21,6,["locationInfo","modulePath"]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[21,6,["locationInfo","moduleName"]],false],[0,"\\n"]],"parameters":[]}],[0," "],[9],[0,"\\n"]],"parameters":[6]},null],[0," "],[9],[0,"\\n"],[4,"if",[[22,["currentFile"]]],null,{"statements":[[0," "],[6,"span"],[10,"class","package-header-filename"],[8],[0,"\\n "],[1,[20,"currentFile"],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[]},null],[0," "],[9],[0,"\\n "],[6,"div"],[10,"class","package-content"],[8],[0,"\\n"],[4,"resizable-panel",null,[["class","alsoResizeElementId"],["left-panel","#right-panel"]],{"statements":[[0," "],[6,"div"],[10,"class","file-tree-container"],[8],[0,"\\n "],[1,[26,"file-tree",null,[["directoryTree","openFile","currentFile","packageId","hide"],[[22,["model","directoryTree"]],"openFile",[22,["currentFile"]],[22,["model","id"]],[21,5,[]]]]],false],[0,"\\n "],[9],[0,"\\n"]],"parameters":[5]},null],[0," "],[6,"div"],[10,"id","right-panel"],[10,"class","right-panel"],[8],[0,"\\n "],[6,"div"],[10,"id","file-container"],[10,"class","file-container"],[8],[0," \\n "],[1,[20,"outlet"],false],[0," \\n "],[9],[0,"\\n"],[4,"bottom-panel",null,[["visible","topPanelElementId","containerElementId"],[[22,["bottomPanelVisible"]],"#file-container","#right-panel"]],{"statements":[[4,"if",[[26,"eq",[[21,1,[]],"header"],null]],null,{"statements":[[0," References to "],[6,"b"],[8],[6,"span"],[10,"class","source-code"],[8],[1,[20,"occName"],false],[9],[9],[0," in "],[6,"span"],[10,"class","source-code"],[8],[1,[20,"packageId"],false],[9],[0,"\\n"]],"parameters":[]},{"statements":[[4,"paginated-list",null,[["url"],[[22,["referencesUrl"]]]],{"statements":[[0," "],[6,"ul"],[8],[0,"\\n"],[4,"each",[[21,2,[]]],null,{"statements":[[0," "],[6,"li"],[8],[0,"\\n "],[6,"div"],[10,"class","file-name"],[8],[6,"a"],[11,"href",[27,["/package/",[20,"packageId"],"/show/",[21,3,["name"]]]]],[8],[1,[21,3,["name"]],false],[9],[9],[0,"\\n"],[4,"each",[[21,3,["references"]]],null,{"statements":[[0," "],[6,"a"],[10,"class","source-code source-code-snippet"],[11,"href",[27,["/package/",[20,"packageId"],"/show/",[21,3,["name"]],"#L",[21,4,["idSrcSpan","line"]]]]],[8],[1,[21,4,["sourceCodeHtml"]],true],[9],[0,"\\n"]],"parameters":[4]},null],[0," "],[9],[0,"\\n"]],"parameters":[3]},null],[0," "],[9],[0,"\\n"]],"parameters":[2]},null]],"parameters":[]}]],"parameters":[1]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package.hbs"}})}),define("haskell-code-explorer/templates/package/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"NL2mPZNK",block:'{"symbols":["module"],"statements":[[6,"div"],[10,"class","package-modules"],[8],[0,"\\n "],[6,"div"],[10,"class","module-search-input"],[8],[0,"\\n "],[1,[26,"input",null,[["class","type","value","placeholder"],["form-control","text",[22,["query"]],"Module name"]]],false],[0," \\n "],[9],[0," \\n "],[6,"ul"],[10,"class","modules"],[8],[0,"\\n"],[4,"each",[[22,["modulesFiltered"]]],null,{"statements":[[0," "],[6,"li"],[8],[0,"\\n "],[6,"a"],[11,"href",[27,["/package/",[22,["model","id"]],"/show/",[21,1,[]]]]],[8],[1,[21,1,[]],false],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[1]},null],[0," "],[9],[0," \\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/index.hbs"}})}),define("haskell-code-explorer/templates/package/search",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"tnwltDLx",block:'{"symbols":["identifiers","identifier"],"statements":[[6,"div"],[10,"class","search-results-header"],[8],[0,"\\n Query : "],[1,[22,["model","query"]],false],[0,"\\n"],[9],[0,"\\n"],[6,"div"],[10,"class","search-results-content"],[8],[0,"\\n"],[4,"paginated-list",null,[["url"],[[22,["model","url"]]]],{"statements":[[0," "],[6,"ul"],[8],[0,"\\n"],[4,"each",[[21,1,[]]],null,{"statements":[[0," "],[6,"li"],[10,"class","search-result"],[8],[0," \\n "],[6,"span"],[10,"class","source-code"],[8],[1,[21,2,["demangledOccName"]],false],[0," :: "],[1,[26,"type-signature-text",null,[["components"],[[21,2,["idType","components"]]]]],false],[9],[0,"\\n "],[6,"div"],[8],[6,"a"],[10,"href","#"],[11,"onmouseup",[26,"action",[[21,0,[]],"goToDefinition",[21,2,["locationInfo"]]],null]],[8],[0,"Go to definition"],[9],[9],[0,"\\n "],[6,"div"],[10,"class","identifier-module"],[8],[0,"\\n"],[4,"if",[[21,2,["locationInfo","modulePath"]]],null,{"statements":[[0," Defined in "],[6,"a"],[11,"href",[27,["/package/",[21,2,["locationInfo","packageId","name"]],"-",[21,2,["locationInfo","packageId","version"]],"/show/",[21,2,["locationInfo","modulePath"]]]]],[8],[1,[21,2,["locationInfo","modulePath"]],false],[9],[0,"\\n"]],"parameters":[]},null],[0," "],[9],[0,"\\n "],[6,"div"],[8],[1,[21,2,["doc"]],true],[9],[0,"\\n "],[9],[0,"\\n"]],"parameters":[2]},null],[0," "],[9],[0,"\\n"]],"parameters":[1]},null],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/search.hbs"}})}),define("haskell-code-explorer/templates/package/show",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"aR1d98il",block:'{"symbols":[],"statements":[[1,[20,"outlet"],false],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/show.hbs"}})}),define("haskell-code-explorer/templates/package/show/file",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"n+gY0z10",block:'{"symbols":[],"statements":[[4,"if",[[22,["model","isHaskellModule"]]],null,{"statements":[[0," "],[1,[26,"haskell-module",null,[["path","name","packageId","componentId","html","identifiers","occurrences","colorTheme","declarations","findReferences"],[[22,["model","id"]],[22,["model","name"]],[22,["model","packageId"]],[22,["model","componentId"]],[22,["model","sourceCodeHtml"]],[22,["model","identifiers"]],[22,["model","occurrences"]],[22,["settings","colorTheme"]],[22,["model","declarations"]],[26,"action",[[21,0,[]],"findReferences"],null]]]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[26,"text-file",null,[["text","path"],[[22,["model","text"]],[22,["model","id"]]]]],false],[0,"\\n"]],"parameters":[]}]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/package/show/file.hbs"}})}),define("haskell-code-explorer/templates/packages",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"b/AToiBD",block:'{"symbols":["package","version","index"],"statements":[[6,"div"],[10,"class","flex-container container"],[8],[0,"\\n "],[6,"div"],[8],[0," \\n "],[2,"

Haskell code explorer

"],[0,"\\n "],[6,"div"],[10,"class","package-search-form"],[8],[0,"\\n "],[1,[26,"input",null,[["class","type","value","placeholder"],["form-control","text",[22,["query"]],"Package name"]]],false],[0,"\\n "],[6,"span"],[8],[0,"Number of packages : "],[1,[22,["packages","length"]],false],[9],[0,"\\n "],[9],[0,"\\n "],[9],[0,"\\n "],[6,"div"],[10,"id","packages"],[10,"class","packages"],[8],[0,"\\n "],[6,"ul"],[8],[0,"\\n"],[4,"infinite-list",null,[["containerElementId","elements","perPage"],["packages",[22,["packages"]],80]],{"statements":[[0," "],[6,"li"],[8],[0,"\\n"],[4,"each",[[21,1,["versions"]]],null,{"statements":[[4,"link-to",["package",[26,"concat",[[21,1,["name"]],"-",[21,2,[]]],null]],null,{"statements":[[4,"if",[[26,"gt",[[21,3,[]],0],null]],null,{"statements":[[0," "],[1,[21,2,[]],false],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[21,1,["name"]],false],[0,"-"],[1,[21,2,[]],false],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null]],"parameters":[2,3]},null],[0," "],[9],[0,"\\n"]],"parameters":[1]},null],[0," "],[9],[0,"\\n "],[9],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"haskell-code-explorer/templates/packages.hbs"}})}),define("haskell-code-explorer/utils/api-urls",["exports","haskell-code-explorer/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.urls=void 0 -e.urls={packageInfoUrl:function(e){return t.default.APP.staticUrlPrefix+"/"+e+"/"+t.default.APP.haskellCodeExplorerDirectory+"/packageInfo.json"},fileUrl:function(e,n){return t.default.APP.staticUrlPrefix+"/"+e+"/"+n},haskellModuleUrl:function(e,n){return t.default.APP.staticUrlPrefix+"/"+e+"/"+t.default.APP.haskellCodeExplorerDirectory+"/"+encodeURIComponent(encodeURIComponent(n))+".json"},packagesUrl:t.default.APP.apiUrlPrefix+"/packages",identifierDefinitionSiteUrl:function(e,n,o,r,i){return t.default.APP.apiUrlPrefix+"/definitionSite/"+e+"/"+o+"/"+n+"/"+r+"/"+encodeURIComponent(i).replace(/\./g,"%2E")},modulePathUrl:function(e,n,o){return t.default.APP.apiUrlPrefix+"/modulePath/"+e+"/"+o+"/"+n},expressionsUrl:function(e,n,o,r,i,l){return t.default.APP.apiUrlPrefix+"/expressions/"+e+"/"+encodeURIComponent(n)+"/"+o+"/"+r+"/"+i+"/"+l},referencesUrl:function(e,n){return t.default.APP.apiUrlPrefix+"/references/"+e+"/"+encodeURIComponent(n)},identifierSearchUrl:function(e,n){return t.default.APP.apiUrlPrefix+"/identifiers/"+e+"/"+encodeURIComponent(n).replace(/\./g,"%2E")}}}),define("haskell-code-explorer/utils/color-themes",["exports"],function(e){function t(e){return"\n body { \n color: "+e.defaultColor+" !important;\n background-color: "+e.backgroundColor+" !important;\n }\n input {\n color: "+e.defaultColor+" !important;\n background-color: "+e.backgroundColor+" !important;\n border-color: "+e.borderColor+" !important;\n }\n .package-content {\n border-top: 1px solid "+e.borderColor+" !important;\n }\n .header a {\n color : "+e.menuLinkColor+" !important;\n }\n a {\n color: "+e.typeColor+" !important;\n }\n span.link {\n color: "+e.typeColor+" !important;\n }\n .header {\n background-color: "+e.menuColor+" !important;\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .declarations-content {\n background-color: "+e.navigationPanelColor+" !important;\n border: 1px solid "+e.borderColor+" !important;\n }\n .declarations-header {\n background-color: "+e.navigationPanelColor+" !important;\n border: 1px solid "+e.borderColor+" !important; \n }\n li.declaration {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .left-panel {\n background-color: "+e.navigationPanelColor+" !important;\n border-right: 1px solid "+e.borderColor+" !important;\n }\n .show-left-panel-button {\n background-color: "+e.navigationPanelColor+" !important;\n border-right:1px solid "+e.borderColor+" !important;\n border-bottom:1px solid "+e.borderColor+" !important;\n }\n .right-panel {\n background-color: "+e.backgroundColor+" !important;\n }\n a.jstree-anchor {\n color: "+e.defaultColor+" !important;\n }\n .declaration > a {\n color: "+e.defaultColor+" !important;\n }\n .highlighted-line {\n background : "+e.highlightedLineColor+" !important;\n }\n table.source-code {\n background-color: "+e.backgroundColor+" !important;\n color: "+e.defaultColor+" !important;\n }\n .jstree-clicked {\n background-color: "+e.backgroundColor+" !important;\n }\n .jstree-hovered {\n background-color: "+e.backgroundColor+" !important;\n }\n ul.autocomplete-items {\n background-color: "+e.backgroundColor+" !important;\n border-top: 1px solid "+e.borderColor+" !important;\n border-left: 1px solid "+e.borderColor+" !important;\n border-right: 1px solid "+e.borderColor+" !important;\n }\n ul.autocomplete-items > li { \n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n ul.autocomplete-items > li:hover { \n background-color: "+e.highlightedLineColor+" !important;\n }\n ul.autocomplete-items > li.highlighted { \n background-color: "+e.highlightedLineColor+" !important;\n }\n .source-code-snippet {\n color: "+e.defaultColor+" !important;\n border-bottom: 1px solid "+e.borderColor+" !important;\n } \n .source-code-snippet:hover {\n background-color: "+e.highlightedLineColor+" !important;\n }\n .bottom-panel {\n background-color: "+e.backgroundColor+" !important;\n border-top: 1px solid "+e.borderColor+" !important;\n }\n .bottom-panel-header {\n border-bottom: 1px solid "+e.borderColor+" !important; \n }\n .paginated-list-header {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n li.search-result {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .search-results-header {\n border-bottom: 1px solid "+e.borderColor+" !important;\n }\n .info-window-content {\n border-top: 1px solid "+e.borderColor+" !important;\n }\n .info-window {\n border: 1px solid "+e.borderColor+" !important;\n background-color:"+e.infoWindowColor+" !important;\n color: "+e.defaultColor+" !important;\n }\n .type-info {\n border-top: 1px solid "+e.borderColor+" !important;\n }"}function n(e){var n=document.createElement("style") -n.type="text/css",n.innerHTML=t(e),n.id="color-theme" -var o=document.querySelector("style#color-theme") -o&&o.parentElement.removeChild(o),document.getElementsByTagName("head")[0].appendChild(n)}Object.defineProperty(e,"__esModule",{value:!0}) -var o={id:"darkTheme",name:"Dark theme",description:"Dark theme (Monokai based)",defaultColor:"#F8F8F2",backgroundColor:"#272822",typeColor:"#66D9EF",literalColor:"#E6DB74",topLevelIdFromCurrentModule:"#A6E22E",localIdentifierColor:["#F0A3FF","#0075DC","#993F00","#2BCE48","#FFCC99","#808080","#94FFB5","#8F7C00","#C20088","#FFA405","#FFA8BB","#426600","#FF0010","#5EF1F2","#00998F","#E0FF66","#FFFF80","#FFFF00","#FF5005"],menuColor:"#3c3b37",menuLinkColor:"#F8F8F2",infoWindowColor:"#3c3b37",navigationPanelColor:"#3c3b37",linkColor:"#0366d6",borderColor:"#535557",highlightedLineColor:"#4a4a4a"},r={id:"lightTheme",name:"Light theme",description:"Light theme (Github based)",defaultColor:"#24292e",backgroundColor:"#ffffff",typeColor:"#005cc5",literalColor:"#032f62",topLevelIdFromCurrentModule:"#6f42c1",localIdentifierColor:["#005C31","#2BCE48","#808080","#8F7C00","#C20088","#FFA405","#ffa8bb","#426600","#FF0010","#09d7d8","#00998F","#990000","#FF5005"],menuColor:"#f2f4f8",menuLinkColor:"#24292e",infoWindowColor:"#f2f4f8",navigationPanelColor:"#f2f4f8",linkColor:"#0366d6",borderColor:"#e1e4e8",highlightedLineColor:"#eaeaea"},i={darkTheme:o,lightTheme:r} -e.updateColorThemeCss=n,e.colorThemeToCss=t,e.themes=i}),define("haskell-code-explorer/utils/go-to-definition",["exports"],function(e){function t(e){var t=e.modulePath,n=e.packageId.name+"-"+e.packageId.version,o="" -return 1!=e.startLine&&(o="#L"+e.startLine),"/package/"+n+"/show/"+t+o}function n(e,t){var n=t.moduleName.replace(/\./g,"-"),o=void 0 -o="Val"===t.entity?"v":"t" -var r="" -return"Val"!==t.entity&&"Typ"!==t.entity||(r="#"+o+":"+t.haddockAnchorId),"https://hackage.haskell.org/package/"+e+"/docs/"+n+".html"+r}function o(e,t){return 2===e?window.open(t,"_blank"):1==e&&(window.location=t),!1}function r(e){if(e){var t=window.location.origin+window.location.pathname+"#L"+e -location.href!=t&&(window.location.hash="#L"+e)}}function i(e,i,l,s){if("ExactLocation"===i.tag){var a=t(i) -i.startLine!==s&&r(s),o(l,a)}else if("ApproximateLocation"===i.tag){var c=i.packageId.name+"-"+i.packageId.version -"Mod"===i.entity?e.loadDefinitionSite(c,i.moduleName,i.componentId,i.entity,i.moduleName).then(function(e){var t=e.location.packageId.name+"-"+e.location.packageId.version -o(l,"/package/"+t+"/show/"+e.location.modulePath)}).catch(function(){o(l,n(c,i))}):e.loadDefinitionSite(c,i.moduleName,i.componentId,i.entity,i.name).then(function(e){if("ExactLocation"===e.location.tag){var a=t(e.location) -i.startLine!==s&&r(s),o(l,a)}else r(s),o(l,n(c,i))}).catch(function(e){console.log(e),r(s),o(l,n(c,i))})}else alert("No location info")}Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinition=i,e.openUrl=o}),define("haskell-code-explorer/utils/line-selection",["exports"],function(e){function t(e,t){var o=Array.prototype.slice.call(e.querySelectorAll("td.line-number")) -if(o.length>0){var i=function(){n(e)} -window.addEventListener("hashchange",i),t._onhashchange=i -var l=void 0,s=function(e){16===e.keyCode&&(l=!0)},a=function(e){16===e.keyCode&&(l=!1)} -document.addEventListener("keydown",s),document.addEventListener("keyup",a),t._onkeydown=s,t._onkeyup=a -var c=void 0,d=void 0 -o.forEach(function(t){t.onclick=function(){var t=parseInt(this.textContent) -l&&c?c!=t&&(d=t,co&&(n.scrollTop=n.scrollTop-(o/2-20))}function r(e,t,n){Array.prototype.slice.call(e.querySelectorAll("td.line-content")).forEach(function(e){var o=parseInt(e.id.substring(2)) -o>=t&&o<=n?e.classList.add("highlighted-line"):e.classList.remove("highlighted-line")})}Object.defineProperty(e,"__esModule",{value:!0}),e.initializeLineSelection=t,e.highlightLines=r,e.highlightSelectedLines=n}),define("haskell-code-explorer/config/environment",[],function(){try{var e="haskell-code-explorer/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n=JSON.parse(unescape(t)),o={default:n} -return Object.defineProperty(o,"__esModule",{value:!0}),o}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("haskell-code-explorer/app").default.create({staticUrlPrefix:"/files",apiUrlPrefix:"/api",haskellCodeExplorerDirectory:".haskell-code-explorer",title:"Haskell code explorer",name:"haskell-code-explorer",version:"0.0.1+d2b1a420"}) diff --git a/javascript/release/index.html b/javascript/release/index.html index dae96fa..0f76738 100644 --- a/javascript/release/index.html +++ b/javascript/release/index.html @@ -8,7 +8,7 @@ - + @@ -18,7 +18,7 @@ - + -- cgit v1.2.3