"use strict"
define("inspektor/app",["exports","inspektor/resolver","ember-load-initializers","inspektor/config/environment"],function(e,t,n,o){Object.defineProperty(e,"__esModule",{value:!0})
var s=Ember.Application.extend({modulePrefix:o.default.modulePrefix,podModulePrefix:o.default.podModulePrefix,Resolver:t.default});(0,n.default)(s,o.default.modulePrefix),e.default=s}),define("inspektor/components/account-info/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component,n=Ember.computed
e.default=t.extend({classNames:["account-info"],userAddress:null,username:n("userAddress",function(){return this.get("userAddress").split("@")[0]}),host:n("userAddress",function(){return"@"+this.get("userAddress").split("@")[1]})})}),define("inspektor/components/account-info/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"rn4KIRZr",block:'{"symbols":[],"statements":[[6,"span"],[9,"class","username"],[7],[1,[18,"username"],false],[8],[0,"\\n"],[6,"br"],[7],[8],[6,"span"],[9,"class","host"],[7],[1,[18,"host"],false],[8],[0,"\\n\\n"],[4,"link-to",["disconnect"],[["class"],["disconnect"]],{"statements":[[0,"disconnect"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/account-info/template.hbs"}})}),define("inspektor/components/breadcrumb-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component,n=Ember.Object,o=Ember.isEmpty
e.default=t.extend({tagName:"nav",classNames:["breadcrumb-nav"],currentDirPath:null,linkItems:function(){var e=this.get("currentDirPath")
if(o(e))return[]
var t=[]
return e.split("/").reject(function(e){return o(e)}).forEach(function(o){var s=e.match("(.*"+o+")/")[0]
t.pushObject(n.create({name:o,path:s}))}),t}.property("currentDirPath")})}),define("inspektor/components/breadcrumb-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"j3noKP+7",block:'{"symbols":["item"],"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],["/"]]]],null,{"statements":[[0,"Home"]],"parameters":[]},null],[8],[0,"\\n"],[4,"each",[[20,["linkItems"]]],null,{"statements":[[6,"span"],[9,"class","node"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/breadcrumb-nav/template.hbs"}})}),define("inspektor/components/categories-nav/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component
e.default=t.extend({categories:null})}),define("inspektor/components/categories-nav/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"4FB0addV",block:'{"symbols":["category"],"statements":[[4,"if",[[20,["categories"]]],null,{"statements":[[0,"  "],[6,"nav"],[7],[0,"\\n    "],[6,"ul"],[7],[0,"\\n"],[4,"each",[[20,["categories"]]],null,{"statements":[[0,"      "],[6,"li"],[7],[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[1,[19,1,["name"]],false]],"parameters":[]},null],[8],[0,"\\n"]],"parameters":[1]},null],[0,"    "],[8],[0,"\\n  "],[8],[0,"\\n"]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/categories-nav/template.hbs"}})}),define("inspektor/components/directory-listing/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component
e.default=t.extend({classNames:["directory-listing"],items:null,itemsSorted:function(){var e=this.get("items")
return e.reject(function(e){return"folder"!==e.type}).concat(e.reject(function(e){return"folder"===e.type}))}.property("items")})}),define("inspektor/components/directory-listing/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"K4sJaSiM",block:'{"symbols":["item"],"statements":[[6,"ul"],[9,"class","listing"],[7],[0,"\\n"],[4,"each",[[20,["itemsSorted"]]],null,{"statements":[[0,"  "],[6,"li"],[7],[0,"\\n"],[4,"if",[[19,1,["isFolder"]]],null,{"statements":[[4,"link-to",["index",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},{"statements":[[0,"      "],[2," TODO link to item "],[0,"\\n"],[4,"link-to",["inspect",[25,"query-params",null,[["path"],[[19,1,["path"]]]]]],null,{"statements":[[0,"        "],[6,"span"],[9,"class","icon"],[7],[1,[25,"item-icon",null,[["type"],[[19,1,["type"]]]]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","name"],[7],[1,[19,1,["name"]],false],[8],[0,"\\n        "],[6,"span"],[9,"class","size"],[7],[1,[25,"human-file-size",[[19,1,["size"]]],null],false],[8],[0,"\\n        "],[6,"span"],[9,"class","type"],[7],[1,[19,1,["type"]],false],[8],[0,"\\n"]],"parameters":[]},null]],"parameters":[]}],[0,"  "],[8],[0,"\\n"]],"parameters":[1]},null],[8]],"hasEval":false}',meta:{moduleName:"inspektor/components/directory-listing/template.hbs"}})}),define("inspektor/components/file-preview/component",["exports","npm:json-tree-view"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0})
var n=Ember.Component,o=Ember.inject.service,s=Ember.observer,r=Ember.computed.alias,i=Ember.run.scheduleOnce
e.default=n.extend({storage:o(),classNames:["file-preview"],fileLoaded:!1,fileContent:null,objectURL:null,metaData:null,isJSON:null,type:r("metaData.type"),isBinary:r("metaData.isBinary"),isImage:function(){return this.get("type").match(/^image\/.+$/)}.property("type"),isText:function(){return!this.get("isBinary")}.property("isBinary"),loadFile:function(){var e=this,t=this.get("metaData.path")
this.get("storage.client").getFile(t).then(function(t){if(e.get("isImage")){var n=new window.Uint8Array(t.data),o=new window.Blob([n],{type:t.contentType})
e.set("objectURL",window.URL.createObjectURL(o))}else e.set("fileContent",t.data)
e.set("fileLoaded",!0)})}.on("didInsertElement"),onFileLoaded:s("fileLoaded",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&i("afterRender",this,"renderJsonTree")}),onJsonViewChanged:s("jsonShowTree",function(){this.get("fileLoaded")&&this.get("isJSON")&&this.get("jsonShowTree")&&i("afterRender",this,"renderJsonTree")}),renderJsonTree:function(){var e=JSON.parse(this.get("fileContent")),n=new t.default("content",e)
n.on("change",function(e,t,n,o){console.log("change",t,n,"=>",o)}),n.on("rename",function(e,t,n,o){console.log("rename",t,n,"=>",o)}),n.on("delete",function(e,t){console.log("delete",t)}),n.on("append",function(e,t,n,o){console.log("append",t,n,"=>",o)}),n.on("click",function(e,t,n){console.log("click",t,"=",n)}),n.on("expand",function(e,t,n){console.log("expand",t,"=",n)}),n.on("collapse",function(e,t,n){console.log("collapse",t,"=",n)}),n.on("refresh",function(e,t,n){console.log("refresh",t,"=",n)}),document.getElementById("json-tree-view").appendChild(n.dom),window.jsonview=n,n.expand(!0),n.withRootName=!1,n.readonly=!0,this.set("jsonTreeView",n)}})}),define("inspektor/components/file-preview/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"7Q1kHSb6",block:'{"symbols":[],"statements":[[4,"if",[[20,["fileLoaded"]]],null,{"statements":[[4,"if",[[20,["isBinary"]]],null,{"statements":[[4,"if",[[20,["isImage"]]],null,{"statements":[[0,"      "],[6,"img"],[10,"src",[18,"objectURL"],null],[10,"alt",[20,["metaData","name"]],null],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"      "],[6,"p"],[7],[0,"No preview available for this content type."],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null],[0,"\\n"],[4,"if",[[20,["isText"]]],null,{"statements":[[4,"if",[[20,["isJSON"]]],null,{"statements":[[4,"if",[[20,["jsonShowTree"]]],null,{"statements":[[0,"        "],[6,"div"],[9,"id","json-tree-view"],[7],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"        "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},{"statements":[[0,"      "],[6,"code"],[7],[1,[18,"fileContent"],false],[8],[0,"\\n"]],"parameters":[]}]],"parameters":[]},null]],"parameters":[]},null]],"hasEval":false}',meta:{moduleName:"inspektor/components/file-preview/template.hbs"}})}),define("inspektor/components/item-icon/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Component
e.default=t.extend({tagName:"img",classNames:["item-icon"],attributeBindings:["src:src"],type:null,isFolder:function(){return"folder"===this.get("type")}.property("type"),src:function(){var e=this.get("type")
return"/img/file-icons/"+(this.get("isFolder")?"folder.svg":e.match(/json/i)?"code-curly.svg":"file.svg")}.property()})}),define("inspektor/components/item-icon/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"0RA2e2SD",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/components/item-icon/template.hbs"}})}),define("inspektor/controllers/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Controller,n=Ember.Object,o=Ember.computed,s=Ember.observer,r=Ember.inject.service,i=Ember.computed.alias,a=Ember.isEmpty
e.default=t.extend({storage:r(),connecting:i("storage.connecting"),connected:i("storage.connected"),userAddress:i("storage.userAddress"),rootListing:i("storage.rootListing"),currentDirPath:null,connectedClass:o("connected",function(){return this.get("connected")?"connected":"disconnected"}),categories:function(){var e=[],t=this.get("rootListing")
return a(t)?e:(t.forEach(function(t){t.isFolder&&e.push(n.create({name:t.name.replace("/",""),type:t.type,path:t.name}))}),e)}.property("rootListing"),connectedChange:s("connected",function(){this.get("connected")||this.set("currentDirPath",null)})})}),define("inspektor/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Controller,n=Ember.inject.controller,o=Ember.inject.service,s=Ember.computed,r=Ember.observer,i=Ember.computed.alias,a=Ember.isPresent,l=Ember.isEmpty,c=Ember.RSVP.all
e.default=t.extend({application:n(),storage:o(),connected:i("storage.connected"),rootListing:i("storage.rootListing"),currentDirPath:i("application.currentDirPath"),queryParams:["path"],currentListing:function(){return a(this.get("model.currentListing"))?this.get("model.currentListing").sortBy("name"):this.get("rootListing")}.property("rootListing.[]","model.[]"),documents:s("currentListing.[]",function(){return l(this.get("currentListing"))?[]:this.get("currentListing").reject(function(e){return"/"===e.path.substr(-1)})}),currentListingContainsDocuments:s("documents.[]",function(){return a(this.get("documents"))}),documentCount:s("documents.[]",function(){return a(this.get("documents"))?this.get("documents").length:0}),parentDir:s("currentDirPath",function(){var e=this.get("currentDirPath").split("/").reject(function(e){return l(e)})
return e.splice(0,e.length-1).join("/")+"/"}),connectedChange:r("connected",function(){this.get("connected")||(this.set("model",null),this.set("path",null))}),actions:{deleteDocuments:function(){var e=this,t="Delete all "+this.get("documentCount")+" documents/files in the current directory?"
if(!window.confirm(t))return!1
var n=this.get("storage.client"),o=this.get("documents").map(function(e){return console.debug("removing "+e.path),n.remove(e.path)})
c(o).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("parentDir")}})})}}})}),define("inspektor/controllers/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Controller,n=Ember.inject.controller,o=Ember.inject.service,s=Ember.computed,r=Ember.computed.alias,i=Ember.isEmpty
e.default=t.extend({application:n(),storage:o(),currentDirPath:r("application.currentDirPath"),queryParams:["path"],documentIsJSON:s("model.documentMetaData.type",function(){return!i(this.get("model.documentMetaData"))&&!!this.get("model.documentMetaData.type").match(/application\/json/i)}),jsonView:"tree",jsonShowTree:s.equal("jsonView","tree"),jsonShowSource:s.equal("jsonView","source"),metadataHidden:!1,actions:{showJsonTree:function(){this.set("jsonView","tree")},showJsonSource:function(){this.set("jsonView","source")},toggleMetadata:function(){this.toggleProperty("metadataHidden")},deleteItem:function(){var e=this
window.confirm("Delete?")&&this.get("storage.client").remove(this.get("path")).then(function(){e.transitionToRoute("index",{queryParams:{path:e.get("currentDirPath")}})})}}})}),define("inspektor/helpers/app-version",["exports","inspektor/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?s.match(n.versionRegExp)[0]:t.hideVersion?s.match(n.shaRegExp)[0]:s}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=o
var s=t.default.APP.version
e.default=Ember.Helper.helper(o)}),define("inspektor/helpers/human-file-size",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Helper.helper
e.default=t(function(e){if(e<1024)return e+" bytes"
var t=-1
do{e/=1024,t++}while(e>1024)
return String(Math.max(e,.1).toFixed(1)+" "+["KB","MB","GB","TB","PB","EB","ZB","YB"][t])})}),define("inspektor/helpers/pluralize",["exports","ember-inflector/lib/helpers/pluralize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/helpers/singularize",["exports","ember-inflector/lib/helpers/singularize"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/initializers/app-version",["exports","ember-cli-app-version/initializer-factory","inspektor/config/environment"],function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0})
var o=n.default.APP,s=o.name,r=o.version
e.default={name:"App Version",initialize:(0,t.default)(s,r)}}),define("inspektor/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("inspektor/initializers/data-adapter",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"data-adapter",before:"store",initialize:function(){}}}),define("inspektor/initializers/ember-data",["exports","ember-data/setup-container","ember-data"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}}),define("inspektor/initializers/export-application-global",["exports","inspektor/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,s=t.default.exportApplicationGlobal
o="string"==typeof s?s: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("inspektor/initializers/injectStore",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"injectStore",before:"store",initialize:function(){}}}),define("inspektor/initializers/store",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"store",after:"ember-data",initialize:function(){}}}),define("inspektor/initializers/transforms",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"transforms",before:"store",initialize:function(){}}}),define("inspektor/instance-initializers/body-class",["exports","ember-body-class/instance-initializers/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"initialize",{enumerable:!0,get:function(){return t.initialize}})}),define("inspektor/instance-initializers/ember-data",["exports","ember-data/instance-initializers/initialize-store-service"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ember-data",initialize:t.default}})
define("inspektor/resolver",["exports","ember-resolver"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default}),define("inspektor/router",["exports","inspektor/config/environment"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0})
var n=Ember.Router.extend({location:t.default.locationType,rootURL:t.default.rootURL})
n.map(function(){this.route("inspect"),this.route("connect"),this.route("disconnect")}),e.default=n}),define("inspektor/routes/application",["exports","ember-body-class/mixins/body-class"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0})
var n=Ember.Route,o=Ember.inject.service
e.default=n.extend(t.default,{storage:o(),beforeModel:function(){var e=this
this.get("storage.rs").on("error",function(t){console.debug("rs.on error",t),"Unauthorized"===t.name?e.handleUnauthorized():"DiscoveryError"===t.name||alert("An unknown error occured. Please check the browser console for details.")})},handleUnauthorized:function(){this.get("storage.unauthorized")||(this.get("storage").setProperties({unauthorized:!0,connecting:!1,connected:!1}),this.transitionTo("connect"))}})}),define("inspektor/routes/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service,o=Ember.run.later,s=Ember.RSVP.Promise
e.default=t.extend({storage:n(),beforeModel:function(){var e=this
return this.waitForConnectionState().then(function(){e.get("storage.connected")&&e.transitionTo("index")})},waitForConnectionState:function(){var e=this
return new s(function(t){function n(){e.get("storage.connecting")?o(n,20):t()}n()})}})}),define("inspektor/routes/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service
e.default=t.extend({storage:n(),beforeModel:function(){this.get("storage.rs").disconnect(),this.transitionTo("connect")}})}),define("inspektor/routes/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service,o=Ember.isEmpty,s=Ember.isPresent,r=Ember.run.later,i=Ember.RSVP.hash,a=Ember.RSVP.Promise
e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},beforeModel:function(){var e=this
return this.waitForConnectionState().then(function(){e.get("storage.disconnected")&&e.transitionTo("connect")})},model:function(e){var t=e.path
return o(e.path)?null:("/"!==t.substr(-1)&&(t+="/"),i({currentListing:this.get("storage").fetchListing(t),currentDirPath:t}))},setupController:function(e,t){this._super(e,t),o(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),s(t)&&(e.set("currentDirPath",t.currentDirPath),o(t.currentListing)&&this.transitionTo("index",{queryParams:{path:e.get("parentDir")}}))},waitForConnectionState:function(){var e=this
return new a(function(t){function n(){e.get("storage.connecting")?r(n,20):t()}n()})}})}),define("inspektor/routes/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0})
var t=Ember.Route,n=Ember.inject.service,o=Ember.isEmpty,s=Ember.isPresent
e.default=t.extend({storage:n(),queryParams:{path:{refreshModel:!0}},model:function(e){var t=e.path
o(e.path),t.substr(-1)
var n=t.match(/^(.*\/).+$/)[1],s=t.match(/^.*\/(.+)$/)[1]
return this.get("storage").fetchListing(n).then(function(e){return e.findBy("name",s)}).then(function(e){return{documentMetaData:e,currentDirPath:n}})},setupController:function(e,t){this._super(e,t),o(this.get("storage.categories"))&&this.get("storage.connected")&&this.get("storage").fetchRootListing(),s(t)&&e.set("currentDirPath",t.currentDirPath)}})}),define("inspektor/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("inspektor/services/storage",["exports","npm:remotestoragejs","npm:remotestorage-widget","inspektor/utils/simple-content-type"],function(e,t,n,o){Object.defineProperty(e,"__esModule",{value:!0})
var s=Ember.Object,r=Ember.Service,i=Ember.computed,a=Ember.observer,l=Ember.isEmpty
e.default=r.extend({rs:null,widget:null,connecting:!0,connected:!1,unauthorized:!1,userAddress:null,disconnected:i.not("connected"),client:null,rootListing:null,setup:function(){var e=this,o=new t.default({cache:!1})
o.access.claim("*","rw")
var s=new n.default(o,{skipInitial:!0})
s.attach(),o.on("ready",function(){console.debug("rs.on ready")}),o.on("connected",function(){console.debug("rs.on connected"),e.set("connecting",!1),e.set("connected",!0),e.set("userAddress",e.get("rs").remote.userAddress)}),o.on("not-connected",function(){console.debug("rs.on not-connected"),e.set("connecting",!1),e.set("connected",!1)}),o.on("disconnected",function(){console.debug("rs.on disconnected"),e.set("connecting",!1),e.set("connected",!1)}),o.on("connecting",function(){console.debug("rs.on connecting"),e.set("connecting",!0),e.set("connected",!1)}),o.on("authing",function(){console.debug("rs.on authing"),e.set("connecting",!0),e.set("connected",!1)}),this.set("rs",o),this.set("widget",s),this.set("client",o.scope("/"))}.on("init"),connectedChange:a("connected",function(){this.get("connected")?this.fetchRootListing():this.clearLocalData()}),clearLocalData:function(){this.setProperties({userAddress:null,rootListing:null})},fetchRootListing:function(){var e=this
this.fetchListing("").then(function(t){e.set("rootListing",t.sortBy("name"))})},fetchListing:function(e){var t=[]
return this.get("client").getListing(e).then(function(n){return l(n)?[]:(Object.keys(n).forEach(function(r){var i=n[r],a=i["Content-Type"]||"folder",l=!1
"folder"!==a&&(l=!!a.match(/charset=binary/),a=(0,o.default)(a)),t.push(s.create({name:r,type:a,isBinary:l,isFolder:"folder"===a,size:i["Content-Length"]||null,path:e+r,etag:i.ETag}))}),t)})}})}),define("inspektor/templates/application",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HpeupCPN",block:'{"symbols":[],"statements":[[6,"div"],[9,"id","app-container"],[10,"class",[18,"connectedClass"],null],[7],[0,"\\n  "],[6,"aside"],[7],[0,"\\n"],[4,"if",[[20,["connected"]]],null,{"statements":[[0,"      "],[1,[25,"account-info",null,[["userAddress"],[[20,["userAddress"]]]]],false],[0,"\\n      "],[1,[25,"categories-nav",null,[["categories"],[[20,["categories"]]]]],false],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n  "],[6,"main"],[7],[0,"\\n    "],[1,[18,"outlet"],false],[0,"\\n  "],[8],[0,"\\n"],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/application.hbs"}})}),define("inspektor/templates/connect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"VjXcIYnG",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"inspektor/templates/connect.hbs"}})}),define("inspektor/templates/disconnect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"2ZbVbnJi",block:'{"symbols":[],"statements":[[1,[18,"outlet"],false]],"hasEval":false}',meta:{moduleName:"inspektor/templates/disconnect.hbs"}})}),define("inspektor/templates/icons/arrow-from-left",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"s/1VIhvX",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 448 512"],[7],[6,"path"],[9,"d","M296 99.5l148.5 148c4.7 4.7 4.7 12.3 0 17L296 412.5c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17l116-115.4H76c-6.6 0-12-5.4-12-12v-10c0-6.6 5.4-12 12-12h311.9L272 123.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.6-4.7 12.2-4.7 16.9 0zM12 448h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12h-8C5.4 64 0 69.4 0 76v360c0 6.6 5.4 12 12 12z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/arrow-from-left.hbs"}})}),define("inspektor/templates/icons/arrow-from-right",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"7b6GDsFq",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 448 512"],[7],[6,"path"],[9,"d","M152 412.5L3.5 264.5c-4.7-4.7-4.7-12.3 0-17L152 99.5c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L60.1 239H372c6.6 0 12 5.4 12 12v10c0 6.6-5.4 12-12 12H60.1L176 388.4c4.7 4.7 4.7 12.3 0 17l-7.1 7.1c-4.6 4.7-12.2 4.7-16.9 0zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/arrow-from-right.hbs"}})}),define("inspektor/templates/icons/arrow-to-left",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"3oCofZ5I",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 448 512"],[7],[6,"path"],[9,"d","M216 412.5l-148.5-148c-4.7-4.7-4.7-12.3 0-17L216 99.5c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L124.1 239H436c6.6 0 12 5.4 12 12v10c0 6.6-5.4 12-12 12H124.1L240 388.4c4.7 4.7 4.7 12.3 0 17l-7.1 7.1c-4.6 4.7-12.2 4.7-16.9 0zM12 448h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12h-8C5.4 64 0 69.4 0 76v360c0 6.6 5.4 12 12 12z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/arrow-to-left.hbs"}})}),define("inspektor/templates/icons/arrow-to-right",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"b7VwZphx",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 448 512"],[7],[6,"path"],[9,"d","M215 99.5l-7.1 7.1c-4.7 4.7-4.7 12.3 0 17l116 115.4H12c-6.6 0-12 5.4-12 12v10c0 6.6 5.4 12 12 12h311.9L208 388.4c-4.7 4.7-4.7 12.3 0 17l7.1 7.1c4.7 4.7 12.3 4.7 17 0l148.5-148c4.7-4.7 4.7-12.3 0-17L232 99.5c-4.7-4.7-12.3-4.7-17 0zM448 76v360c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/arrow-to-right.hbs"}})}),define("inspektor/templates/icons/code",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"bFfC23lz",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 576 512"],[7],[6,"path"],[9,"d","M228.5 511.8l-25-7.1c-3.2-.9-5-4.2-4.1-7.4L340.1 4.4c.9-3.2 4.2-5 7.4-4.1l25 7.1c3.2.9 5 4.2 4.1 7.4L235.9 507.6c-.9 3.2-4.3 5.1-7.4 4.2zm-75.6-125.3l18.5-20.9c1.9-2.1 1.6-5.3-.5-7.1L49.9 256l121-102.5c2.1-1.8 2.4-5 .5-7.1l-18.5-20.9c-1.8-2.1-5-2.3-7.1-.4L1.7 252.3c-2.3 2-2.3 5.5 0 7.5L145.8 387c2.1 1.8 5.3 1.6 7.1-.5zm277.3.4l144.1-127.2c2.3-2 2.3-5.5 0-7.5L430.2 125.1c-2.1-1.8-5.2-1.6-7.1.4l-18.5 20.9c-1.9 2.1-1.6 5.3.5 7.1l121 102.5-121 102.5c-2.1 1.8-2.4 5-.5 7.1l18.5 20.9c1.8 2.1 5 2.3 7.1.4z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/code.hbs"}})}),define("inspektor/templates/icons/list",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"fyFf15Cp",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 512 512"],[7],[6,"path"],[9,"d","M506 114H134a6 6 0 0 1-6-6V84a6 6 0 0 1 6-6h372a6 6 0 0 1 6 6v24a6 6 0 0 1-6 6zm6 154v-24a6 6 0 0 0-6-6H134a6 6 0 0 0-6 6v24a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6zm0 160v-24a6 6 0 0 0-6-6H134a6 6 0 0 0-6 6v24a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6zM84 120V72c0-6.627-5.373-12-12-12H24c-6.627 0-12 5.373-12 12v48c0 6.627 5.373 12 12 12h48c6.627 0 12-5.373 12-12zm0 160v-48c0-6.627-5.373-12-12-12H24c-6.627 0-12 5.373-12 12v48c0 6.627 5.373 12 12 12h48c6.627 0 12-5.373 12-12zm0 160v-48c0-6.627-5.373-12-12-12H24c-6.627 0-12 5.373-12 12v48c0 6.627 5.373 12 12 12h48c6.627 0 12-5.373 12-12z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/list.hbs"}})}),define("inspektor/templates/icons/sitemap",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"cA57crKA",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 640 512"],[7],[6,"path"],[9,"d","M616 320h-72v-48c0-26.468-21.532-48-48-48H336v-32h56c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H248c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h56v32H144c-26.467 0-48 21.532-48 48v48H24c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24h-40v-48c0-8.822 7.178-16 16-16h160v64h-56c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24h-56v-64h160c8.822 0 16 7.178 16 16v48h-40c-13.255 0-24 10.745-24 24v144c0 13.255 10.745 24 24 24h144c13.255 0 24-10.745 24-24V344c0-13.255-10.745-24-24-24zm-456 32v128H32V352h128zm224 0v128H256V352h128zM256 160V32h128v128H256zm352 320H480V352h128v128z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/sitemap.hbs"}})}),define("inspektor/templates/icons/trash",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"TsIK9elf",block:'{"symbols":[],"statements":[[6,"svg"],[9,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[9,"viewBox","0 0 448 512"],[7],[6,"path"],[9,"d","M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"],[7],[8],[8]],"hasEval":false}',meta:{moduleName:"inspektor/templates/icons/trash.hbs"}})}),define("inspektor/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"KBOT7AIk",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["currentListingContainsDocuments"]]],null,{"statements":[[0,"    "],[6,"button"],[9,"class","delete-all"],[9,"title","Delete documents/files"],[3,"action",[[19,0,[]],"deleteDocuments"]],[7],[12,"icons/trash",[]],[8],[0,"\\n"]],"parameters":[]},null],[0,"  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[4,"if",[[20,["currentListing"]]],null,{"statements":[[0,"  "],[1,[25,"directory-listing",null,[["items"],[[20,["currentListing"]]]]],false],[0,"\\n"]],"parameters":[]},null]],"hasEval":true}',meta:{moduleName:"inspektor/templates/index.hbs"}})}),define("inspektor/templates/inspect",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.HTMLBars.template({id:"HLCozplA",block:'{"symbols":[],"statements":[[6,"header"],[7],[0,"\\n  "],[1,[25,"breadcrumb-nav",null,[["currentDirPath"],[[20,["currentDirPath"]]]]],false],[0,"\\n  "],[6,"nav"],[9,"class","actions"],[7],[0,"\\n"],[4,"if",[[20,["documentIsJSON"]]],null,{"statements":[[0,"      "],[6,"div"],[9,"class","button-group json-view"],[7],[0,"\\n"],[4,"if",[[20,["metadataHidden"]]],null,{"statements":[[0,"          "],[6,"button"],[9,"title","Show metadata"],[3,"action",[[19,0,[]],"toggleMetadata"]],[7],[0,"\\n            "],[12,"icons/arrow-from-right",[]],[0,"\\n          "],[8],[0,"\\n"]],"parameters":[]},{"statements":[[0,"          "],[6,"button"],[9,"title","Hide metadata"],[3,"action",[[19,0,[]],"toggleMetadata"]],[7],[0,"\\n            "],[12,"icons/arrow-to-right",[]],[0,"\\n          "],[8],[0,"\\n"]],"parameters":[]}],[0,"      "],[8],[0,"\\n      "],[6,"div"],[9,"class","button-group json-view"],[7],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowTree"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowTree"]],"active"],null]]]],[9,"title","Tree view"],[3,"action",[[19,0,[]],"showJsonTree"]],[7],[0,"\\n          "],[12,"icons/list",[]],[0,"\\n        "],[8],[0,"\\n        "],[6,"button"],[10,"disabled",[18,"jsonShowSource"],null],[10,"class",[26,[[25,"if",[[20,["jsonShowSource"]],"active"],null]]]],[9,"title","Show source"],[3,"action",[[19,0,[]],"showJsonSource"]],[7],[0,"\\n          "],[12,"icons/code",[]],[0,"\\n        "],[8],[0,"\\n      "],[8],[0,"\\n"]],"parameters":[]},null],[0,"    "],[6,"button"],[9,"class","delete"],[9,"title","Delete"],[3,"action",[[19,0,[]],"deleteItem"]],[7],[12,"icons/trash",[]],[8],[0,"\\n  "],[8],[0,"\\n"],[8],[0,"\\n\\n"],[6,"div"],[10,"class",[26,["inspect-details ",[25,"if",[[20,["metadataHidden"]],"hide-metadata"],null]]]],[7],[0,"\\n  "],[6,"section"],[9,"class","content"],[7],[0,"\\n    "],[1,[25,"file-preview",null,[["metaData","isJSON","jsonShowTree","jsonShowSource"],[[20,["model","documentMetaData"]],[20,["documentIsJSON"]],[20,["jsonShowTree"]],[20,["jsonShowSource"]]]]],false],[0,"\\n  "],[8],[0,"\\n\\n"],[4,"unless",[[20,["metadataHidden"]]],null,{"statements":[[0,"    "],[6,"section"],[9,"class","meta"],[7],[0,"\\n      "],[6,"dl"],[7],[0,"\\n        "],[6,"dt"],[7],[0,"Name"],[8],[0,"\\n        "],[6,"dd"],[7],[1,[20,["model","documentMetaData","name"]],false],[8],[0,"\\n        "],[6,"dt"],[7],[0,"Content type"],[8],[0,"\\n        "],[6,"dd"],[7],[1,[20,["model","documentMetaData","type"]],false],[8],[0,"\\n        "],[6,"dt"],[7],[0,"Size"],[8],[0,"\\n        "],[6,"dd"],[7],[1,[25,"human-file-size",[[20,["model","documentMetaData","size"]]],null],false],[8],[0,"\\n        "],[6,"dt"],[7],[0,"Revision (ETag)"],[8],[0,"\\n        "],[6,"dd"],[7],[1,[20,["model","documentMetaData","etag"]],false],[8],[0,"\\n      "],[8],[0,"\\n    "],[8],[0,"\\n"]],"parameters":[]},null],[8]],"hasEval":true}',meta:{moduleName:"inspektor/templates/inspect.hbs"}})}),define("inspektor/utils/simple-content-type",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.replace(/;.*$/,"")}}),define("inspektor/config/environment",[],function(){try{var e="inspektor/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(unescape(t))}
return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(t){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("inspektor/app").default.create({name:"inspektor",version:"0.7.1+8725b3ff"})
