/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(c,i){typeof define==="function"&&define.amd?define("orion/Deferred",i):typeof exports==="object"?module.exports=i():(c.orion=c.orion||{},c.orion.Deferred=i())})(this,function(){function c(){for(var f;f=d.shift();)f();e=!1}function i(f){d.push(f);e||(e=!0,setTimeout(c,0))}function j(d){return function(){d.apply(void 0,arguments)}}function h(){function f(){for(var b;b=o.shift();){var a=b.deferred,g=l==="fulfilled"?"resolve":"reject";if(typeof b[g]==="function")try{var f=(0,b[g])(q),c=f&&(typeof f===
"object"||typeof f==="function")&&f.then;if(typeof c==="function")if(f===a.promise)a.reject(new TypeError);else{var e=f.cancel;typeof e==="function"?a._protected(d).parentCancel=e.bind(f):delete a._protected(d).parentCancel;c.call(f,j(a.resolve),j(a.reject),j(a.progress))}else a.resolve(f)}catch(h){a.reject(h)}else a[g](q)}}function c(a){delete g.parentCancel;l="rejected";q=a;o.length&&i(f)}function e(b){function d(a){return function(b){t||(t=!0,a(b))}}var t=!1;delete g.parentCancel;try{var s=b&&
(typeof b==="object"||typeof b==="function")&&b.then;if(typeof s==="function")if(b===a)c(new TypeError);else{l="assumed";var k=b&&b.cancel;if(typeof k!=="function"){var j=new h,b=j.promise;try{s(j.resolve,j.reject,j.progress)}catch(r){j.reject(r)}k=b.cancel;s=b.then}q=b;s.call(b,d(e),d(c));g.parentCancel=k.bind(b)}else l="fulfilled",q=b,o.length&&i(f)}catch(w){d(c)(w)}}function k(){var a=g.parentCancel;if(a)delete g.parentCancel,a();else if(!l)a=Error("Cancel"),a.name="Cancel",c(a)}var q,l,o=[],a=
this,g={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==d)throw Error("protected");return g}});this.resolve=function(b){l||e(b);return a};this.reject=function(b){l||c(b);return a};this.progress=function(b){l||o.forEach(function(a){if(a.progress)try{a.progress(b)}catch(g){}});return a.promise};this.cancel=function(){g.parentCancel?setTimeout(k,0):k();return a};this.then=function(b,g,c){b={resolve:b,reject:g,progress:c,deferred:new h};o.push(b);b.deferred._protected(d).parentCancel=
a.promise.cancel.bind(a);(l==="fulfilled"||l==="rejected")&&i(f);return b.deferred.promise};this.promise={then:a.then,cancel:a.cancel}}var d=[],e=!1;h.all=function(d,c){function e(g,b){j||(l[g]=b,--i===0&&a.resolve(l))}function k(g,b){if(!j){if(c)try{e(g,c(b));return}catch(d){b=d}a.reject(b)}}var i=d.length,l=[],j=!1,a=new h;a.then(void 0,function(){j=!0;d.forEach(function(a){a.cancel&&a.cancel()})});i===0?a.resolve(l):d.forEach(function(a,b){a.then(e.bind(void 0,b),k.bind(void 0,b))});return a.promise};
h.when=function(d,c,e,j){var i;if(!(d&&typeof d.then==="function"))i=new h,i.resolve(d),d=i.promise;return d.then(c,e,j)};return h});
(function(c,i){typeof define==="function"&&define.amd?define("orion/plugin",["orion/Deferred"],i):typeof exports==="object"?module.exports=i(require("orion/Deferred")):(c.orion=c.orion||{},c.orion.PluginProvider=i(c.orion.Deferred))})(this,function(c){function i(c,h){this.__objectId=c;this.__methods=h}return function(j){function h(b){a&&(typeof ArrayBuffer==="undefined"&&(b=JSON.stringify(b)),a===self?a.postMessage(b):a.postMessage(b,"*"))}function d(){var a=[];Object.keys(u).forEach(function(b){var g=
u[b];a.push({serviceId:b,names:g.names,methods:g.methods,properties:g.properties})});return{headers:l||{},services:a}}function e(a,b){if(b&&b instanceof XMLHttpRequest){var g,d;try{g=b.status,d=b.statusText}catch(c){g=0,d=""}return{status:g||0,statusText:d}}return b}function f(a){var b=a?JSON.parse(JSON.stringify(a,e)):a;if(a instanceof Error)b.__isError=!0,b.message=b.message||a.message,b.name=b.name||a.name;return b}function n(d){if(!a)return(new c).reject(Error("plugin not connected"));d.id=String(g++);
var f=new c;s[d.id]=f;f.then(null,function(a){o&&a instanceof Error&&a.name==="Cancel"&&r({requestId:d.id,method:"cancel",params:a.message?[a.message]:[]})});var e=Object.prototype.toString;d.params.forEach(function(a,g){if(e.call(a)==="[object Object]"&&!(a instanceof i)){var c,p;for(c in a)e.call(a[c])==="[object Function]"&&(p=p||[],p.push(c));if(p){var h=b++;v[h]=a;c=function(){delete v[h]};f.then(c,c);d.params[g]=new i(h,p)}}});r(d);return f.promise}function m(a,b){a||a===0?r({id:a,result:null,
error:b}):console.log(b)}function k(a,b,g,d){d.forEach(function(a,b){if(a&&typeof a.__objectId!=="undefined"){var g={};a.__methods.forEach(function(b){g[b]=function(){return n({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});d[b]=g}});var c=typeof a===void 0?null:{id:a,result:null,error:null};try{var e=g.apply(b,d);if(c)e&&typeof e.then==="function"?(t[a]=e,e.then(function(b){delete t[a];c.result=b;r(c)},function(b){if(t[a])delete t[a],c.error=f(b),r(c)},function(){r({responseId:a,
method:"progress",params:Array.prototype.slice.call(arguments)})})):(c.result=e,r(c))}catch(p){if(c)c.error=f(p),r(c)}}function q(b){if(b.source===a){b=typeof b.data!=="string"?b.data:JSON.parse(b.data);try{if(b.method){var g=b.method,d=b.params||[];if("serviceId"in b){var c=u[b.serviceId];c||m(b.id,"service not found");c=c.implementation;g in c?k(b.id,c,c[g],d):m(b.id,"method not found")}else if("objectId"in b){var e=v[b.objectId];e||m(b.id,"object not found");!g in e?k(b.id,e,e[g],d):m(b.id,"method not found")}else if("requestId"in
b){var f=t[b.requestId];f&&g==="cancel"&&f.cancel&&f.cancel.apply(f,d)}else if("responseId"in b){var p=s[b.responseId];p&&g==="progress"&&p.progress&&p.progress.apply(p,d)}else throw Error("Bad method: "+b.method);}else{var h=s[String(b.id)];delete s[String(b.id)];b.error?h.reject(b.error):h.resolve(b.result)}}catch(i){console.log("Plugin._messageHandler "+i)}}}var l=j,o=!1,a=null,g=0,b=0,p=0,t={},s={},v={},u={},r=h;this.updateHeaders=function(a){if(o)throw Error("Cannot update headers. Plugin Provider is connected");
l=a};this.registerServiceProvider=this.registerService=function(a,b,g){if(o)throw Error("Cannot register service. Plugin Provider is connected");typeof a==="string"?a=[a]:Array.isArray(a)||(a=[]);var d=null,c=[];for(d in b)typeof b[d]==="function"&&c.push(d);u[p++]={names:a,methods:c,implementation:b,properties:g||{},listeners:{}}};this.connect=function(b,g){if(!o){if(typeof window==="undefined")a=self;else if(window!==window.parent)a=window.parent;else if(window.opener!==null)a=window.opener;else{g&&
g("No valid plugin target");return}addEventListener("message",q,!1);var c={method:"plugin",params:[d()]};h(c);o=!0}b&&b()};this.disconnect=function(){o&&(removeEventListener("message",q),a=null,o=!1)}}});
define("orion/i18nUtil",["require","orion/Deferred"],function(c,i){function j(d){if(d=localStorage.getItem("orion/messageBundle/"+d))if(d=JSON.parse(d),d._expires&&d._expires>(new Date).getTime())return delete d._expires,d;return null}var h={};return{getMessageBundle:function(d){function e(e){e?c(["i18n!"+d],function(c){if(c){var e=d;c._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+e,JSON.stringify(c));delete c._expires}n.resolve(c)}):f(Error(d))}function f(d){n.reject(d)}
if(h[d])return h[d];var n=new i;h[d]=n;var m=j(d);if(m)return n.resolve(m),n;try{c([d],e,f)}catch(k){c(["orion/i18n!"+d],e,f)}return n},formatMessage:function(d){var c=arguments;return d.replace(/\$\{([^\}]+)\}/g,function(d,h){return c[(h<<0)+1]})}}});
define("orion/xhr",["orion/Deferred"],function(c){function i(c,h,d,e){var f=typeof d.response!=="undefined"?d.response:d.responseText,i;try{i=d.status}catch(m){i=0}c={args:h,response:f,responseText:typeof f==="string"?f:null,status:i,url:c,xhr:d};if(typeof e!=="undefined")c.error=e;return c}return function(j,h,d){var d=d||{},e=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,f=new c,n=d.headers||{},m=d.log||!1,k;typeof n["X-Requested-With"]==="undefined"&&(n["X-Requested-With"]="XMLHttpRequest");
if(typeof d.data!=="undefined"&&(j==="POST"||j==="PUT"))k=d.data;var q=!1,l=!1;f.promise.then(void 0,function(a){q=!0;!l&&a instanceof Error&&a.name==="Cancel"&&e.abort()});e.onabort=function(){l=!0;if(!q){var a=Error("Cancel");a.name="Cancel";f.reject(a)}};e.onload=function(){var a=i(h,d,e);200<=e.status&&e.status<400?f.resolve(a):(f.reject(a),m&&typeof console!=="undefined"&&console.log(Error(e.statusText)))};e.onerror=function(){var a=i(h,d,e);f.reject(a);m&&typeof console!=="undefined"&&console.log(Error(e.statusText))};
e.onprogress=function(a){a.xhr=e;f.progress(a)};try{e.open(j,h,!0);if(typeof d.responseType==="string")e.responseType=d.responseType;if(typeof d.timeout==="number")if(typeof e.timeout==="number")e.timeout=d.timeout,e.addEventListener("timeout",function(){f.reject(i(h,d,e,"Timeout exceeded"))});else{var o=setTimeout(function(){f.reject(i(h,d,e,"Timeout exceeded"))},d.timeout);f.promise.then(clearTimeout.bind(null,o),clearTimeout.bind(null,o))}Object.keys(n).forEach(function(a){e.setRequestHeader(a,
n[a])});e.send(k||null)}catch(a){f.reject(i(h,d,e,a))}return f.promise}});define("orion/regex",[],function(){return{escape:function(c){return c.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(c){return(c=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(c))?{pattern:c[1],flags:c[2]}:null}}});
define("plugins/site/siteServiceImpl",["require","orion/i18nUtil","orion/xhr","orion/regex"],function(c,i,j,h){function d(a){var g=document.createElement("a");g.href=a;return g.href}function e(){var a=c.toUrl("._"),a=d(a);return a.substring(0,a.length-2)}function f(a){return a.indexOf(":")!==-1?a.substring(a.indexOf(window.location.host)+window.location.host.length):a}function n(a){a&&typeof a==="object"&&Object.keys(a).forEach(function(g){var b=a[g];g.indexOf("Location")!==-1?(o.href=b,a[g]=o.href):
n(b)});return a}function m(a,g){for(var b,c=a.split("/"),d=c[1],e=0;e<g.length;e++){var f=g[e];if(f.Id===d){c[1]=f.Name;b=c.join("/");break}}return b}function k(a,g,b){if(b&&typeof b.data!=="undefined")b.data=JSON.stringify(b.data);return j.apply(null,Array.prototype.slice.call(arguments)).then(function(a){return JSON.parse(a.response||null)})}function q(a){this.projects={};this.getProjects=function(g){var b={"Orion-Version":"1"};this.projects[g]||(this.projects[g]=k("GET",a,{headers:b}).then(function(a){for(var a=
a.Workspaces,c,d=0;d<a.length;d++)if(c=a[d],c.Id===g)break;return k("GET",c.Location,{headers:b}).then(function(a){return a.Children||[]})}));return this.projects[g]}}function l(a,c,b){this.filePrefix=a;this.cache=new q(c);this.makeAbsolute=c&&c.indexOf("://")!==-1;this.selfHostingRules=b;var d=b.Rules,k=b.Types.File,j=b.Types.API;this._generateSelfHostingMappings=function(a){var b="http://localhost"+f(e());return d.map(function(c){var d;d=c.type===k?i.formatMessage.apply(i,[c.targetPattern].concat(a)):
i.formatMessage(c.targetPattern,b);return{Source:c.source,Target:d}})};this._matchesSelfHostingTemplate=function(a,b){var c=/(\$\{[^}]+?\})/,g=h.escape("http://localhost")+"(:\\d+)?"+h.escape(f(e()));return d.every(function(d){return b.Mappings.some(function(b){if(b.Source===d.source){var e;d.type===k?e=h.escape(a)+".*?":d.type===j&&(e=g);var f=[];d.targetPattern.split(c).forEach(function(a){c.test(a)?f.push(e):f.push(h.escape(a))});return RegExp(f.join("")).test(b.Target)}return!1})})}}var o=document.createElement("a");
l.prototype={getSiteConfigurations:function(){var a=c.toUrl("site._"),a=a.substring(0,a.length-2);return k("GET",a,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){return a.SiteConfigurations}).then(function(a){this.makeAbsolute&&n(a);return a}.bind(this))},loadSiteConfiguration:function(a){return k("GET",a,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){this.makeAbsolute&&n(a);return a}.bind(this))},createSiteConfiguration:function(a,d,b,e,f){a={Name:a,Workspace:d,HostHint:a.replace(/ /g,
"-").replace(/[^A-Za-z0-9-_]/g,"").toLowerCase()};if(b)a.Mappings=b;if(e)a.HostHint=e;if(f)a.HostingStatus=f;b=c.toUrl("site._");b=b.substring(0,b.length-2);return k("POST",b,{data:a,headers:{"Content-Type":"application/json; charset=utf-8","Orion-Version":"1"},timeout:15E3}).then(function(a){this.makeAbsolute&&n(a);return a}.bind(this))},updateSiteConfiguration:function(a,c){return k("PUT",a,{data:c,headers:{"Content-Type":"application/json; charset=utf-8","Orion-Version":"1"},timeout:15E3}).then(function(a){this.makeAbsolute&&
n(a);return a}.bind(this))},deleteSiteConfiguration:function(a){return k("DELETE",a,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){this.makeAbsolute&&n(a);return a}.bind(this))},toInternalForm:function(a){var c=f(this.filePrefix),a=f(a),b;a.indexOf(c)===0&&(b=a.substring(c.length));b[b.length-1]==="/"&&(b=b.substring(0,b.length-1));return b},toFileLocation:function(a){var g=c.toUrl(this.filePrefix+a+"._"),g=g.substring(0,g.length-2);(function(a){return a.filter(function(a){return a!==
""})})(a.split("/")).length===1&&(g+="/");return f(d(g))},getMappingObject:function(a,c,b){var d=this.toInternalForm(c);return this.cache.getProjects(a.Workspace).then(function(a){a=m(d,a);return{Source:b,Target:d,FriendlyPath:a||b}})},getMappingProposals:function(a){var c=this;return this.cache.getProjects(a.Workspace).then(function(a){return a.map(function(a){return{Source:"/"+a.Name,Target:c.toInternalForm(a.Location),FriendlyPath:"/"+a.Name}})})},updateMappingsDisplayStrings:function(a){return this.cache.getProjects(a.Workspace).then(function(c){for(var b=
a.Mappings,d=0;d<b.length;d++){var e=b[d];if(/^\//.test(e.Target))e.FriendlyPath=m(e.Target,c)}return a})},parseInternalForm:function(a,c){return/^\//.test(c)?this.cache.getProjects(a.Workspace).then(function(a){for(var d=c.split("/"),e=0;e<a.length;e++){var f=a[e];if(d[1]===f.Name)return d[1]=f.Id,d.join("/")}}):null},isSelfHostingSite:function(a){var c=this;return this.cache.getProjects(a.Workspace).then(function(b){return b.some(function(b){b=c.toInternalForm(b.Location);return c._matchesSelfHostingTemplate(b,
a)})})},convertToSelfHosting:function(a,c){var b=this._generateSelfHostingMappings(c.map(this.toInternalForm.bind(this)));a.Mappings=b;return a},getURLOnSite:function(a,c){var b=a.Mappings,d=this.toInternalForm(c.Location);if(!b)return null;for(var e=0;e<b.length;e++){var f=b[e];if(f.Target===d)return a.HostingStatus.URL+(f.Source[0]!=="/"?"/":"")+f.Source+(c.Directory?"/":"")}return null}};return{SiteImpl:l}});
define("plugins/site/selfHostingRules",[],function(){return{Rules:[{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.ui/web/index.html"},{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.ui/web"},{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.core/web"},{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.editor/web"},{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.cf/web"},{type:1,source:"/file",
targetPattern:"${0}file"},{type:1,source:"/prefs",targetPattern:"${0}prefs"},{type:1,source:"/workspace",targetPattern:"${0}workspace"},{type:1,source:"/users",targetPattern:"${0}users"},{type:1,source:"/authenticationPlugin.html",targetPattern:"${0}authenticationPlugin.html"},{type:1,source:"/login",targetPattern:"${0}login"},{type:1,source:"/loginstatic",targetPattern:"${0}loginstatic"},{type:1,source:"/useremailconfirmation",targetPattern:"${0}useremailconfirmation"},{type:1,source:"/site",targetPattern:"${0}site"},
{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.git/web"},{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.javascript/web"},{type:1,source:"/gitapi",targetPattern:"${0}gitapi"},{type:0,source:"/",targetPattern:"${0}/bundles/org.eclipse.orion.client.users/web"},{type:1,source:"/xfer",targetPattern:"${0}xfer"},{type:1,source:"/filesearch",targetPattern:"${0}filesearch"},{type:1,source:"/index.jsp",targetPattern:"${0}index.jsp"},{type:1,source:"/plugins/git",
targetPattern:"${0}plugins/git"},{type:1,source:"/plugins/user",targetPattern:"${0}plugins/user"},{type:1,source:"/logout",targetPattern:"${0}logout"},{type:1,source:"/mixlogin/manageopenids",targetPattern:"${0}mixlogin/manageopenids"},{type:1,source:"/openids",targetPattern:"${0}openids"},{type:1,source:"/task",targetPattern:"${0}task"},{type:1,source:"/help",targetPattern:"${0}help"},{type:1,source:"/docker",targetPattern:"${0}docker"}],Types:{File:0,API:1}}});
define('built-sitePlugin.js',["orion/plugin","plugins/site/siteServiceImpl","plugins/site/selfHostingRules"],function(c,i,j){function h(c){var d=document.createElement("a");d.href=c;c=d.href;try{if(window.location.host===parent.location.host&&window.location.protocol===parent.location.protocol)return c.substring(parent.location.href.indexOf(parent.location.host)+parent.location.host.length)}catch(e){}return c}function d(c){return[{source:"Location|Directory"},{source:"Location",match:"^"+c}]}
var e=h("../../site"),f=h("../../file"),n=h("../../workspace"),m=document.createElement("a");m.href="../../mixloginstatic/LoginWindow.html";c=new c({name:"Orion Site Service",version:"1.0",description:"This plugin provides virtual site support for hosting client web applications from your Orion workspace.",login:m.href});m=document.createElement("a");m.href="/";c.registerService("orion.page.link.category",null,{id:"sites",nameKey:"Sites",nls:"orion/nls/messages",imageClass:"core-sprite-sites",order:50,
uriTemplate:"{+OrionHome}/sites/"});c.registerService("orion.page.link",null,{nameKey:"Sites",id:"orion.sites",nls:"orion/nls/messages",category:"sites","default":!0,order:10,uriTemplate:"{+OrionHome}/sites/sites.html"});c.registerService("orion.page.link",null,{nameKey:"Sites",id:"orion.sites.2",nls:"orion/nls/messages",category:"sites",order:10,uriTemplate:"{+OrionHome}/sites/sites.html"});c.registerService("orion.navigate.command",null,{id:"orion.site."+m.hostname+".viewon",nameKey:"View on Site",
tooltipKey:"View this file or folder on a web site hosted by Orion",nls:"orion/nls/messages",forceSingleItem:!0,category:"sites",validationProperties:d(f),uriTemplate:"{+OrionHome}/sites/view.html#,file={,Location}"});c.registerService("orion.page.link.related",null,{id:"orion.site."+m.hostname+".viewon",nameKey:"View on Site",tooltipKey:"View this file or folder on a web site hosted by Orion",nls:"orion/nls/messages",category:"sites",validationProperties:d(f),uriTemplate:"{+OrionHome}/sites/view.html#,file={,Location}"});
c.registerService("orion.site",new i.SiteImpl(f,n,j),{id:"orion.site."+m.hostname,name:"Orion Sites at "+m.hostname,pattern:e,filePattern:f,canSelfHost:!0,selfHostingConfig:{folders:[{name:"org.eclipse.orion.client",labelKey:"orionClientLabel",nls:"orion/sites/nls/messages"}]}});c.connect()});