diff --git a/404.html b/404.html index bded580..7ed76a5 100644 --- a/404.html +++ b/404.html @@ -1,52 +1,52 @@ - - - - - - - - - - - - - Error - - - - - -
-

404.


-

That's an error.

-

Click here to go back

-
- - - - - - - - + + + + + + + + + + + + + Error + + + + + +
+

404.


+

That's an error.

+

Click here to go back

+
+ + + + + + + + diff --git a/408.html b/408.html index d0f1b1e..f0f0710 100644 --- a/408.html +++ b/408.html @@ -1,52 +1,52 @@ - - - - - - - - - - - - - Error - - - - - -
-

408.


-

That's an error.

-

Click here to go back

-
- - - - - - - - + + + + + + + + + + + + + Error + + + + + +
+

408.


+

That's an error.

+

Click here to go back

+
+ + + + + + + + diff --git a/README.md b/README.md index d5c2736..f4e7752 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# Guusvanmeerveld.github.io -This website is being made by just me, because I really like building website and working with html and javascript. It's also a project for school so that is why I am really doing my best for this project. +# Guusvanmeerveld.github.io +This website is being made by just me, because I really like building website and working with html and javascript. It's also a project for school so that is why I am really doing my best for this project. diff --git a/contact/css.css b/contact/css.css index 54ca7ce..864c9ba 100644 --- a/contact/css.css +++ b/contact/css.css @@ -1,73 +1,73 @@ -.main { - width: 100%; - float: left; -} -.main h1 { - text-align: center; - font-size: 6rem; - margin-top: 5%; -} -.form { - margin: 6rem auto; - width: 50%; - background-color: #454752; - position: relative; - border-radius: 7px; - box-shadow: 0px 0px 15px -3px rgba(0,0,0,1); - padding: 1rem; -} -.form h3 { - display: block; - width: 90%; - margin: 0 auto; - margin-bottom: 1rem; -} -.form span { - color:#c42222; -} -.submit { - width: 90%; - height: 40px; - display: block; - margin: -2rem auto 1rem auto; -} -.dataInput { - width: 90%; - display: block; - margin: 0 auto; - margin-bottom: 2rem; -} -.dataInput:focus { - outline: 0; -} -.info { - background-color: #33353d; - box-shadow: 0 -1px 6px 1px hsla(0, 0%, 0%, 0.8); - width: 100%; - padding-top: 2rem; - float: left; -} -.info h2 { - margin: 0; - margin-top: 4rem; - margin-left: 10%; -} -.info ul { - list-style-type: none; - display: inline-block; - margin: 3.5rem 0 3rem 10%; - padding: 0; - font-family: 'Open Sans' -} -.info h4 { - color: gray; -} -@media screen and (min-width:0px) and (max-width:1000px) { - .main h1 { - font-size: 4rem!important; - margin-top: 15%!important; - } - .form { - width: 90%!important; - } -} +.main { + width: 100%; + float: left; +} +.main h1 { + text-align: center; + font-size: 6rem; + margin-top: 5%; +} +.form { + margin: 6rem auto; + width: 50%; + background-color: #454752; + position: relative; + border-radius: 7px; + box-shadow: 0px 0px 15px -3px rgba(0,0,0,1); + padding: 1rem; +} +.form h3 { + display: block; + width: 90%; + margin: 0 auto; + margin-bottom: 1rem; +} +.form span { + color:#c42222; +} +.submit { + width: 90%; + height: 40px; + display: block; + margin: -2rem auto 1rem auto; +} +.dataInput { + width: 90%; + display: block; + margin: 0 auto; + margin-bottom: 2rem; +} +.dataInput:focus { + outline: 0; +} +.info { + background-color: #33353d; + box-shadow: 0 -1px 6px 1px hsla(0, 0%, 0%, 0.8); + width: 100%; + padding-top: 2rem; + float: left; +} +.info h2 { + margin: 0; + margin-top: 4rem; + margin-left: 10%; +} +.info ul { + list-style-type: none; + display: inline-block; + margin: 3.5rem 0 3rem 10%; + padding: 0; + font-family: 'Open Sans' +} +.info h4 { + color: gray; +} +@media screen and (min-width:0px) and (max-width:1000px) { + .main h1 { + font-size: 4rem!important; + margin-top: 15%!important; + } + .form { + width: 90%!important; + } +} diff --git a/feedback/css.css b/feedback/css.css index 160d6ea..4fa5814 100644 --- a/feedback/css.css +++ b/feedback/css.css @@ -1,49 +1,49 @@ -.feedbackContent { - background-color: #33353d; - float: left; - margin-top: 55px; - width: 100%; -} -.feedback { - display: inline-block; - padding: 14vh 0 14vh 5%; - width: 50%; - vertical-align: top; - border-right: #454752 4px solid; - border-bottom: #454752 4px solid; -} -.user { - display: inline-block; - min-width: 8rem; -} -.user h3 { - text-align: center; -} -.userImg { - width: 8rem; - height: 8rem; - margin-left: calc(50% - 4rem); - margin-bottom: 2rem; -} -.userFeedback { - font-family: 'Open Sans'; - display: inline-block; - vertical-align: top; - margin-left: 2rem; - padding-left: 1rem; - border-left: #ededed 2px solid; - width: 30rem; - word-wrap: break-word; -} -@media screen and (min-width:0px) and (max-width:1525px) { - .feedback { - display: block; - width: 100%; - padding: 5vh 0 5vh; - border-right: 0; - border-bottom: #454752 4px solid; - } - .user { - margin-left: calc(50% - 20rem); - } -} +.feedbackContent { + background-color: #33353d; + float: left; + margin-top: 55px; + width: 100%; +} +.feedback { + display: inline-block; + padding: 14vh 0 14vh 5%; + width: 50%; + vertical-align: top; + border-right: #454752 4px solid; + border-bottom: #454752 4px solid; +} +.user { + display: inline-block; + min-width: 8rem; +} +.user h3 { + text-align: center; +} +.userImg { + width: 8rem; + height: 8rem; + margin-left: calc(50% - 4rem); + margin-bottom: 2rem; +} +.userFeedback { + font-family: 'Open Sans'; + display: inline-block; + vertical-align: top; + margin-left: 2rem; + padding-left: 1rem; + border-left: #ededed 2px solid; + width: 30rem; + word-wrap: break-word; +} +@media screen and (min-width:0px) and (max-width:1525px) { + .feedback { + display: block; + width: 100%; + padding: 5vh 0 5vh; + border-right: 0; + border-bottom: #454752 4px solid; + } + .user { + margin-left: calc(50% - 20rem); + } +} diff --git a/minify/js.js b/minify/js.js index d086785..64980bc 100644 --- a/minify/js.js +++ b/minify/js.js @@ -4,6 +4,6 @@ var g = document.querySelector.bind(document); function selectCode(source) { switch (source){ case: html - + } } diff --git a/playground/css.css b/playground/css.css index 0fe5f5c..a1f8c55 100644 --- a/playground/css.css +++ b/playground/css.css @@ -1,62 +1,62 @@ -.content { - width: 100%; - height: 61.7rem; - margin-top: 55px; -} -.content div { - float: left; -} -.codeContent { - height: 100%; - width: 50%; - background-color: #222226; -} -.codeContent textarea { - height: 100%; - font-family: 'Open Sans', sans-serif; - width: 100%; -} -.codeContent div { - margin-left: calc(50% - 45%); - width: 90%; - height: 85%; -} -.codeContent button { - background-color: #3b3c45; - border: 0; - color: white; - margin-top: 2rem; - float: left; - transition: background-color .3s; - width: 6rem; - height: 3rem; -} -.codeContent button:hover { - background-color: #27282e; -} -.codeContent button:focus { - outline: 0; -} -.options { - float: right!important; -} -#htmlOutput { - background-color: white; - height: 100%; - border: 0; - width: 50%; - float: left; -} -@media screen and (min-width:0px) and (max-width:1079px) { - .codeContent { - display: block!important; - width: 100%; - } - .codeContent button { - width: 4rem!important; - font-size: 11px; - } - iframe { - width: 100%!important; - } -} +.content { + width: 100%; + height: 61.7rem; + margin-top: 55px; +} +.content div { + float: left; +} +.codeContent { + height: 100%; + width: 50%; + background-color: #222226; +} +.codeContent textarea { + height: 100%; + font-family: 'Open Sans', sans-serif; + width: 100%; +} +.codeContent div { + margin-left: calc(50% - 45%); + width: 90%; + height: 85%; +} +.codeContent button { + background-color: #3b3c45; + border: 0; + color: white; + margin-top: 2rem; + float: left; + transition: background-color .3s; + width: 6rem; + height: 3rem; +} +.codeContent button:hover { + background-color: #27282e; +} +.codeContent button:focus { + outline: 0; +} +.options { + float: right!important; +} +#htmlOutput { + background-color: white; + height: 100%; + border: 0; + width: 50%; + float: left; +} +@media screen and (min-width:0px) and (max-width:1079px) { + .codeContent { + display: block!important; + width: 100%; + } + .codeContent button { + width: 4rem!important; + font-size: 11px; + } + iframe { + width: 100%!important; + } +} diff --git a/playground/emmet.min.js b/playground/emmet.min.js index 60723c8..cffdc42 100644 --- a/playground/emmet.min.js +++ b/playground/emmet.min.js @@ -1,336 +1,336 @@ -var _=function(){function e(a,b,c){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual&&k.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&k.isFunction(b.isEqual))return b.isEqual(a);var g=f.call(a);if(g!=f.call(b))return!1;switch(g){case "[object String]":return a==String(b);case "[object Number]":return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case "[object Date]":case "[object Boolean]":return+a==+b;case "[object RegExp]":return a.source== -b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if(typeof a!="object"||typeof b!="object")return!1;for(var d=c.length;d--;)if(c[d]==a)return!0;c.push(a);var d=0,j=!0;if(g=="[object Array]"){if(d=a.length,j=d==b.length)for(;d--;)if(!(j=d in a==d in b&&e(a[d],b[d],c)))break}else{if("constructor"in a!="constructor"in b||a.constructor!=b.constructor)return!1;for(var l in a)if(k.has(a,l)&&(d++,!(j=k.has(b,l)&&e(a[l],b[l],c))))break;if(j){for(l in b)if(k.has(b,l)&&!d--)break; -j=!d}}c.pop();return j}var d=this,h=d._,i={},b=Array.prototype,c=Object.prototype,a=b.slice,g=b.unshift,f=c.toString,j=c.hasOwnProperty,l=b.forEach,n=b.map,m=b.reduce,o=b.reduceRight,p=b.filter,r=b.every,q=b.some,u=b.indexOf,s=b.lastIndexOf,c=Array.isArray,v=Object.keys,w=Function.prototype.bind,k=function(a){return new x(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=k;exports._=k}else d._=k;k.VERSION="1.3.3";var t=k.each=k.forEach=function(a, -b,c){if(a!=null)if(l&&a.forEach===l)a.forEach(b,c);else if(a.length===+a.length)for(var f=0,d=a.length;f2;a==null&&(a=[]);if(m&& -a.reduce===m)return f&&(b=k.bind(b,f)),d?a.reduce(b,c):a.reduce(b);t(a,function(a,g,k){d?c=b.call(f,c,a,g,k):(c=a,d=!0)});if(!d)throw new TypeError("Reduce of empty array with no initial value");return c};k.reduceRight=k.foldr=function(a,b,c,f){var d=arguments.length>2;a==null&&(a=[]);if(o&&a.reduceRight===o)return f&&(b=k.bind(b,f)),d?a.reduceRight(b,c):a.reduceRight(b);var g=k.toArray(a).reverse();f&&!d&&(b=k.bind(b,f));return d?k.reduce(g,b,c,f):k.reduce(g,b)};k.find=k.detect=function(a,b,c){var f; -D(a,function(a,d,g){if(b.call(c,a,d,g))return f=a,!0});return f};k.filter=k.select=function(a,b,c){var f=[];if(a==null)return f;if(p&&a.filter===p)return a.filter(b,c);t(a,function(a,d,g){b.call(c,a,d,g)&&(f[f.length]=a)});return f};k.reject=function(a,b,c){var f=[];if(a==null)return f;t(a,function(a,d,g){b.call(c,a,d,g)||(f[f.length]=a)});return f};k.every=k.all=function(a,b,c){var f=!0;if(a==null)return f;if(r&&a.every===r)return a.every(b,c);t(a,function(a,d,g){if(!(f=f&&b.call(c,a,d,g)))return i}); -return!!f};var D=k.some=k.any=function(a,b,c){b||(b=k.identity);var f=!1;if(a==null)return f;if(q&&a.some===q)return a.some(b,c);t(a,function(a,d,g){if(f||(f=b.call(c,a,d,g)))return i});return!!f};k.include=k.contains=function(a,b){var c=!1;return a==null?c:u&&a.indexOf===u?a.indexOf(b)!=-1:c=D(a,function(a){return a===b})};k.invoke=function(b,c){var f=a.call(arguments,2);return k.map(b,function(a){return(k.isFunction(c)?c||a:a[c]).apply(a,f)})};k.pluck=function(a,b){return k.map(a,function(a){return a[b]})}; -k.max=function(a,b,c){if(!b&&k.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!b&&k.isEmpty(a))return-Infinity;var f={computed:-Infinity};t(a,function(a,d,g){d=b?b.call(c,a,d,g):a;d>=f.computed&&(f={value:a,computed:d})});return f.value};k.min=function(a,b,c){if(!b&&k.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!b&&k.isEmpty(a))return Infinity;var f={computed:Infinity};t(a,function(a,d,g){d=b?b.call(c,a,d,g):a;df?1:0}),"value")};k.groupBy=function(a,b){var c={},f=k.isFunction(b)?b:function(a){return a[b]};t(a,function(a,b){var d=f(a,b);(c[d]||(c[d]=[])).push(a)}); -return c};k.sortedIndex=function(a,b,c){c||(c=k.identity);for(var f=0,d=a.length;f>1;c(a[g])=0})})};k.difference=function(b){var c=k.flatten(a.call(arguments,1),!0);return k.filter(b,function(a){return!k.include(c,a)})};k.zip=function(){for(var b=a.call(arguments),c=k.max(k.pluck(b,"length")), -f=Array(c),d=0;d=0;c--)b=[a[c].apply(this,b)];return b[0]}};k.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};k.keys=v||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],c;for(c in a)k.has(a,c)&&(b[b.length]=c);return b};k.values=function(a){return k.map(a,k.identity)};k.functions=k.methods=function(a){var b=[],c;for(c in a)k.isFunction(a[c])&&b.push(c);return b.sort()};k.extend=function(b){t(a.call(arguments, -1),function(a){for(var c in a)b[c]=a[c]});return b};k.pick=function(b){var c={};t(k.flatten(a.call(arguments,1)),function(a){a in b&&(c[a]=b[a])});return c};k.defaults=function(b){t(a.call(arguments,1),function(a){for(var c in a)b[c]==null&&(b[c]=a[c])});return b};k.clone=function(a){return!k.isObject(a)?a:k.isArray(a)?a.slice():k.extend({},a)};k.tap=function(a,b){b(a);return a};k.isEqual=function(a,b){return e(a,b,[])};k.isEmpty=function(a){if(a==null)return!0;if(k.isArray(a)||k.isString(a))return a.length=== -0;for(var b in a)if(k.has(a,b))return!1;return!0};k.isElement=function(a){return!!(a&&a.nodeType==1)};k.isArray=c||function(a){return f.call(a)=="[object Array]"};k.isObject=function(a){return a===Object(a)};k.isArguments=function(a){return f.call(a)=="[object Arguments]"};if(!k.isArguments(arguments))k.isArguments=function(a){return!(!a||!k.has(a,"callee"))};k.isFunction=function(a){return f.call(a)=="[object Function]"};k.isString=function(a){return f.call(a)=="[object String]"};k.isNumber=function(a){return f.call(a)== -"[object Number]"};k.isFinite=function(a){return k.isNumber(a)&&isFinite(a)};k.isNaN=function(a){return a!==a};k.isBoolean=function(a){return a===!0||a===!1||f.call(a)=="[object Boolean]"};k.isDate=function(a){return f.call(a)=="[object Date]"};k.isRegExp=function(a){return f.call(a)=="[object RegExp]"};k.isNull=function(a){return a===null};k.isUndefined=function(a){return a===void 0};k.has=function(a,b){return j.call(a,b)};k.noConflict=function(){d._=h;return this};k.identity=function(a){return a}; -k.times=function(a,b,c){for(var f=0;f/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};k.result=function(a,b){if(a==null)return null;var c=a[b];return k.isFunction(c)?c.call(a):c};k.mixin=function(a){t(k.functions(a),function(b){F(b,k[b]=a[b])})};var G=0;k.uniqueId=function(a){var b=G++;return a?a+b:b};k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g, -escape:/<%-([\s\S]+?)%>/g};var z=/.^/,y={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},A;for(A in y)y[y[A]]=A;var H=/\\|'|\r|\n|\t|\u2028|\u2029/g,I=/\\(\\|'|r|n|t|u2028|u2029)/g,B=function(a){return a.replace(I,function(a,b){return y[b]})};k.template=function(a,b,c){c=k.defaults(c||{},k.templateSettings);a="__p+='"+a.replace(H,function(a){return"\\"+y[a]}).replace(c.escape||z,function(a,b){return"'+\n_.escape("+B(b)+")+\n'"}).replace(c.interpolate||z,function(a,b){return"'+\n("+ -B(b)+")+\n'"}).replace(c.evaluate||z,function(a,b){return"';\n"+B(b)+"\n;__p+='"})+"';\n";c.variable||(a="with(obj||{}){\n"+a+"}\n");var a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return __p;\n",f=new Function(c.variable||"obj","_",a);if(b)return f(b,k);b=function(a){return f.call(this,a,k)};b.source="function("+(c.variable||"obj")+"){\n"+a+"}";return b};k.chain=function(a){return k(a).chain()};var x=function(a){this._wrapped=a};k.prototype=x.prototype; -var C=function(a,b){return b?k(a).chain():a},F=function(b,c){x.prototype[b]=function(){var b=a.call(arguments);g.call(b,this._wrapped);return C(c.apply(k,b),this._chain)}};k.mixin(k);t(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=b[a];x.prototype[a]=function(){var b=this._wrapped;c.apply(b,arguments);var f=b.length;(a=="shift"||a=="splice")&&f===0&&delete b[0];return C(b,this._chain)}});t(["concat","join","slice"],function(a){var c=b[a];x.prototype[a]=function(){return C(c.apply(this._wrapped, -arguments),this._chain)}});x.prototype.chain=function(){this._chain=!0;return this};x.prototype.value=function(){return this._wrapped};return k}.call({}),emmet=function(e){function d(a,b,d){var l;l=b&&b.hasOwnProperty("constructor")?b.constructor:function(){a.apply(this,arguments)};_.extend(l,a);c.prototype=a.prototype;l.prototype=new c;b&&_.extend(l.prototype,b);d&&_.extend(l,d);l.prototype.constructor=l;l.__super__=a.prototype;return l}function h(c){!(c in b)&&a&&a(c);return b[c]}if(typeof _=="undefined")try{_= -e.require("underscore")}catch(i){}if(typeof _=="undefined")throw"Cannot access to Underscore.js lib";var b={_:_},c=function(){},a=null;return{define:function(a,c){a in b||(b[a]=_.isFunction(c)?this.exec(c):c)},require:h,exec:function(a,b){return a.call(b||e,_.bind(h,this),_,this)},extend:function(a,b){var c=d(this,a,b);c.extend=this.extend;if(a.hasOwnProperty("toString"))c.prototype.toString=a.toString;return c},expandAbbreviation:function(a,b,c,d){if(!a)return"";var b=b||"html",e=h("filters"),i= -h("abbreviationParser"),c=h("profile").get(c,b);h("tabStops").resetTabstopIndex();a=e.extractFromAbbreviation(a);d=i.parse(a[0],{syntax:b,contextNode:d});b=e.composeList(b,c,a[1]);e.apply(d,b,c);return d.toString()},defaultSyntax:function(){return"html"},defaultProfile:function(){return"plain"},log:function(){e.console&&e.console.log&&e.console.log.apply(e.console,arguments)},setModuleLoader:function(b){a=b}}}(this); -if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=emmet;exports.emmet=emmet}typeof define!=="undefined"&&define(emmet); -emmet.define("abbreviationParser",function(e,d){function h(){this.parent=null;this.children=[];this._attributes=[];this.abbreviation="";this.counter=1;this._name=null;this._text="";this.repeatCount=1;this.hasImplicitRepeat=!1;this._data={};this.padding=this.content=this.end=this.start=""}function i(a){return a.substring(1,a.length-1)}function b(a){for(var a=e("utils").trim(a),c=new h,f=c.addChild(),g,j=e("stringStream").create(a),a=1E3,l;!j.eol()&&--a>0;)switch(g=j.peek(),g){case "(":j.start=j.pos; -if(j.skipToPair("(",")"))g=b(i(j.current())),(l=j.match(/^\*(\d+)?/,!0))&&f._setRepeat(l[1]),d.each(g.children,function(a){f.addChild(a)});else throw'Invalid abbreviation: mo matching ")" found for character at '+j.pos;break;case ">":f=f.addChild();j.next();break;case "+":f=f.parent.addChild();j.next();break;case "^":g=f.parent||f;f=(g.parent||g).addChild();j.next();break;default:j.start=j.pos,j.eatWhile(function(a){if(a=="["||a=="{"){if(j.skipToPair(a,p[a]))return j.backUp(1),!0;throw'Invalid abbreviation: mo matching "'+ -p[a]+'" found for character at '+j.pos;}return a=="+"?(j.next(),a=j.eol()||~"+>^*".indexOf(j.peek()),j.backUp(1),a):a!="("&&n(a)}),f.setAbbreviation(j.current()),j.start=j.pos}if(a<1)throw"Endless loop detected";return c}function c(a){var a=e("utils").trim(a),b=[],a=e("stringStream").create(a);for(a.eatSpace();!a.eol();)if(a.start=a.pos,a.eatWhile(o)){var c=a.current(),f="";if(a.peek()=="="){a.next();a.start=a.pos;var d=a.peek();if(d=='"'||d=="'"){a.next();a:{for(var f=a,g=void 0;g=f.next();)if(g=== -d){f=!0;break a}f=!1}if(f)f=a.current(),f=f.substring(1,f.length-1);else throw"Invalid attribute value";}else if(a.eatWhile(/[^\s\]]/))f=a.current();else throw"Invalid attribute value";}b.push({name:c,value:f});a.eatSpace()}else break;return b}function a(a){for(var b=[],f={"#":"id",".":"class"},d=null,j=e("stringStream").create(a);!j.eol();)switch(j.peek()){case "#":case ".":if(d===null)d=j.pos;var l=f[j.peek()];j.next();j.start=j.pos;j.eatWhile(o);b.push({name:l,value:j.current()});break;case "[":if(d=== -null)d=j.pos;j.start=j.pos;if(!j.skipToPair("[","]"))throw"Invalid attribute set definition";b=b.concat(c(i(j.current())));break;default:j.next()}return!b.length?null:{element:a.substring(0,d),attributes:g(b)}}function g(a){var a=d.map(a,function(a){return d.clone(a)}),b={};return d.filter(a,function(a){if(!(a.name in b))return b[a.name]=a;var c=b[a.name];a.name.toLowerCase()=="class"?c.value+=(c.value.length?" ":"")+a.value:c.value=a.value;return!1})}function f(a){if(!~a.indexOf("{"))return null; -for(var b=e("stringStream").create(a);!b.eol();)switch(b.peek()){case "[":case "(":b.skipToPair(b.peek(),p[b.peek()]);break;case "{":return b.start=b.pos,b.skipToPair("{","}"),{element:a.substring(0,b.start),text:i(b.current())};default:b.next()}}function j(a){for(var b=a.children.length-1,c,f,g;b>=0;b--)if(f=a.children[b],f.isRepeating()){g=c=f.repeatCount;f.repeatCount=1;f.updateProperty("counter",1);for(f.updateProperty("maxCount",g);--c>0;)f.parent.addChild(f.clone(),b+1).updateProperty("counter", -c+1).updateProperty("maxCount",g)}d.each(a.children,j);return a}function l(a){for(var b=a.children.length-1;b>=0;b--){var c=a.children[b];c.isGroup()?c.replace(l(c).children):c.isEmpty()&&c.remove()}d.each(a.children,l);return a}function n(a){var b=a.charCodeAt(0);return b>64&&b<91||b>96&&b<123||b>47&&b<58||"#.*:$-_!@|%".indexOf(a)!=-1}var m=/^[\w\-\$\:@\!%]+\+?$/i,o=/[\w\-:\$@]/,p={"[":"]","(":")","{":"}"},r=Array.prototype.splice,q=[],u=[],s=[];h.prototype={addChild:function(a,b){a=a||new h;a.parent= -this;d.isUndefined(b)?this.children.push(a):this.children.splice(b,0,a);return a},clone:function(){var a=new h;d.each(["abbreviation","counter","_name","_text","repeatCount","hasImplicitRepeat","start","end","content","padding"],function(b){a[b]=this[b]},this);a._attributes=d.map(this._attributes,function(a){return d.clone(a)});a._data=d.clone(this._data);a.children=d.map(this.children,function(b){b=b.clone();b.parent=a;return b});return a},remove:function(){if(this.parent)this.parent.children=d.without(this.parent.children, -this);return this},replace:function(){var a=this.parent,b=d.indexOf(a.children,this),c=d.flatten(arguments);r.apply(a.children,[b,1].concat(c));d.each(c,function(b){b.parent=a})},updateProperty:function(a,b){this[a]=b;d.each(this.children,function(c){c.updateProperty(a,b)});return this},find:function(a){return this.findAll(a)[0]},findAll:function(a){if(!d.isFunction(a))var b=a.toLowerCase(),a=function(a){return a.name().toLowerCase()==b};var c=[];d.each(this.children,function(b){a(b)&&c.push(b);c= -c.concat(b.findAll(a))});return d.compact(c)},data:function(a,b){if(arguments.length==2&&(this._data[a]=b,a=="resource"&&e("elements").is(b,"snippet")&&(this.content=b.data,this._text)))this.content=e("abbreviationUtils").insertChildContent(b.data,this._text);return this._data[a]},name:function(){var a=this.matchedResource();return e("elements").is(a,"element")?a.name:this._name},attributeList:function(){var a=[],b=this.matchedResource();e("elements").is(b,"element")&&d.isArray(b.attributes)&&(a= -a.concat(b.attributes));return g(a.concat(this._attributes))},attribute:function(a,b){if(arguments.length==2){var c=d.indexOf(d.pluck(this._attributes,"name"),a.toLowerCase());~c?this._attributes[c].value=b:this._attributes.push({name:a,value:b})}return(d.find(this.attributeList(),function(b){return b.name==a})||{}).value},matchedResource:function(){return this.data("resource")},index:function(){return this.parent?d.indexOf(this.parent.children,this):-1},_setRepeat:function(a){a?this.repeatCount= -parseInt(a,10)||1:this.hasImplicitRepeat=!0},setAbbreviation:function(b){var c=this;this.abbreviation=b=(b||"").replace(/\*(\d+)?$/,function(a,b){c._setRepeat(b);return""});var d=f(b);if(d)b=d.element,this.content=this._text=d.text;if(d=a(b))b=d.element,this._attributes=d.attributes;if((this._name=b)&&!m.test(this._name))throw"Invalid abbreviation";},toString:function(){var a=e("utils"),b=this.start,c=this.end,f=this.content,g=this;d.each(s,function(a){b=a(b,g,"start");f=a(f,g,"content");c=a(c,g, -"end")});var j=d.map(this.children,function(a){return a.toString()}).join(""),f=e("abbreviationUtils").insertChildContent(f,j,{keepVariable:!1});return b+a.padString(f,this.padding)+c},hasEmptyChildren:function(){return!!d.find(this.children,function(a){return a.isEmpty()})},hasImplicitName:function(){return!this._name&&!this.isTextNode()},isGroup:function(){return!this.abbreviation},isEmpty:function(){return!this.abbreviation&&!this.children.length},isRepeating:function(){return this.repeatCount> -1||this.hasImplicitRepeat},isTextNode:function(){return!this.name()&&!this.attributeList().length},isElement:function(){return!this.isEmpty()&&!this.isTextNode()},deepestChild:function(){if(!this.children.length)return null;for(var a=this;a.children.length;)a=d.last(a.children);return a}};s.push(function(a,b){return e("utils").replaceCounter(a,b.counter,b.maxCount)});return{parse:function(a,c){var c=c||{},f=b(a);if(c.contextNode){f._name=c.contextNode.name;var g={};d.each(f._attributes,function(a){g[a.name]= -a});d.each(c.contextNode.attributes,function(a){a.name in g?g[a.name].value=a.value:(a=d.clone(a),f._attributes.push(a),g[a.name]=a)})}d.each(q,function(a){a(f,c)});f=l(j(f));d.each(u,function(a){a(f,c)});return f},AbbreviationNode:h,addPreprocessor:function(a){d.include(q,a)||q.push(a)},removeFilter:function(a){preprocessor=d.without(q,a)},addPostprocessor:function(a){d.include(u,a)||u.push(a)},removePostprocessor:function(a){u=d.without(u,a)},addOutputProcessor:function(a){d.include(s,a)||s.push(a)}, -removeOutputProcessor:function(a){s=d.without(s,a)},isAllowedChar:function(a){a=String(a);return n(a)||~">+^[](){}".indexOf(a)}}}); -emmet.exec(function(e,d){function h(i,b){var c=e("resources"),a=e("elements"),g=e("abbreviationParser");d.each(d.clone(i.children),function(f){var j=c.getMatchedResource(f,b);if(d.isString(j))f.data("resource",a.create("snippet",j));else if(a.is(j,"reference")){j=g.parse(j.data,{syntax:b});if(f.repeatCount>1){var e=j.findAll(function(a){return a.hasImplicitRepeat});d.each(e,function(a){a.repeatCount=f.repeatCount;a.hasImplicitRepeat=!1})}var i=j.deepestChild();i&&d.each(f.children,function(a){i.addChild(a)}); -d.each(j.children,function(a){d.each(f.attributeList(),function(b){a.attribute(b.name,b.value)})});f.replace(j.children)}else f.data("resource",j);h(f,b)})}e("abbreviationParser").addPreprocessor(function(d,b){var c=b.syntax||emmet.defaultSyntax();h(d,c)})}); -emmet.exec(function(e,d){function h(a){for(var b=e("range"),c=[],a=e("stringStream").create(a);!a.eol();){if(a.peek()=="\\")a.next();else if(a.start=a.pos,a.match(g,!0)){c.push(b.create(a.start,g));continue}a.next()}return c}function i(a,b){var c=e("utils"),g=h(a);g.reverse();d.each(g,function(d){a=c.replaceSubstring(a,b,d)});return a}function b(a){return h(a.content).length?!0:!!d.find(a.attributeList(),function(a){return!!h(a.value).length})}function c(a,c,g){var h=a.findAll(function(a){return b(a)}); -b(a)&&h.unshift(a);h.length?d.each(h,function(a){a.content=i(a.content,c);d.each(a._attributes,function(a){a.value=i(a.value,c)})}):(a=a.deepestChild()||a,a.content=g?c:e("abbreviationUtils").insertChildContent(a.content,c))}var a=e("abbreviationParser"),g="$#";a.addPreprocessor(function(a,b){if(b.pastedContent){var c=e("utils"),g=d.map(c.splitByLines(b.pastedContent,!0),c.trim);a.findAll(function(a){if(a.hasImplicitRepeat)return a.data("paste",g),a.repeatCount=g.length})}});a.addPostprocessor(function(a, -b){!a.findAll(function(a){var b=a.data("paste"),f="";d.isArray(b)?f=b[a.counter-1]:d.isFunction(b)?f=b(a.counter-1,a.content):b&&(f=b);f&&c(a,f,!!a.data("pasteOverwrites"));a.data("paste",null);return!!b}).length&&b.pastedContent&&c(a,b.pastedContent)})});emmet.exec(function(e,d){function h(i){var b=e("tagName");d.each(i.children,function(c){if(c.hasImplicitName()||c.data("forceNameResolving"))c._name=b.resolve(c.parent.name());h(c)});return i}e("abbreviationParser").addPostprocessor(h)}); -emmet.define("cssParser",function(e,d){function h(a){return typeof a!=="undefined"}function i(){return{"char":f.chnum,line:f.linenum}}function b(a,b,c){var d=f,c=c||{};j.push({charstart:h(c["char"])?c["char"]:d.chnum,charend:h(c.charend)?c.charend:d.chnum,linestart:h(c.line)?c.line:d.linenum,lineend:h(c.lineend)?c.lineend:d.linenum,value:a,type:b||a})}function c(a,b){var c=f,d=b||{},g=h(d["char"])?d["char"]:c.chnum,d=h(d.line)?d.line:c.linenum;return{name:"ParseError",message:a+" at line "+(d+1)+ -" char "+(g+1),walker:c,tokens:j}}function a(a){var c=f,d=c.ch,g=i(),j=a?a+d:d,d=c.nextChar();for(a&&(g["char"]-=a.length);n(d)||m(d);)j+=d,d=c.nextChar();b(j,"identifier",g)}function g(){var d=f.ch;if(d===" "||d==="\t"){for(var g=f.ch,j="",e=i();g===" "||g==="\t";)j+=g,g=f.nextChar();b(j,"white",e)}else{if(d==="/"){var g=f,d=e=g.ch,h,s=i();h=g.nextChar();if(h!=="*")s.charend=s["char"],s.lineend=s.line,j=b(d,d,s);else{for(;!(e==="*"&&h==="/");)d+=h,e=h,h=g.nextChar();d+=h;g.nextChar();b(d,"comment", -s)}return j}if(d==='"'||d==="'"){g=f;d=e=j=g.ch;s=i();for(j=g.nextChar();j!==e;){if(j==="\n")if(h=g.nextChar(),h==="\\")d+=j+h;else throw c("Unterminated string",s);else d+=j==="\\"?j+g.nextChar():j;j=g.nextChar()}d+=j;g.nextChar();b(d,"string",s)}else if(d==="("){g=f;j=g.ch;e=0;d=j;h=i();for(j=g.nextChar();j!==")"&&!e;){if(j==="(")e++;else if(j===")")e--;else if(j===!1)throw c("Unterminated brace",h);d+=j;j=g.nextChar()}d+=j;g.nextChar();b(d,"brace",h)}else{if(d==="-"||d==="."||m(d)){j=f;e=j.ch; -d=i();h=e;var s=h===".",v,e=j.nextChar();v=!m(e);if(s&&v)d.charend=d["char"],d.lineend=d.line,g=b(h,".",d);else if(h==="-"&&v)g=a("-");else{for(;e!==!1&&(m(e)||!s&&e===".");)e==="."&&(s=!0),h+=e,e=j.nextChar();b(h,"number",d)}return g}if(n(d))return a();if(l(d))return g=f,d=g.ch,j=i(),h=g.nextChar(),h==="="&&l(d,!0)?(d+=h,b(d,"match",j),g.nextChar(),e=void 0):(j.charend=j["char"]+1,j.lineend=j.line,b(d,d,j)),e;if(d==="\n")b("line"),f.nextChar();else throw c("Unrecognized character");}}}var f,j=[], -l,n,m;f={lines:null,total_lines:0,linenum:-1,line:"",ch:"",chnum:-1,init:function(a){var b=f;b.lines=a.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n");b.total_lines=b.lines.length;b.chnum=-1;b.linenum=-1;b.ch="";b.line="";b.nextLine();b.nextChar()},nextLine:function(){this.linenum+=1;this.line=this.total_lines<=this.linenum?!1:this.lines[this.linenum];if(this.chnum!==-1)this.chnum=0;return this.line},nextChar:function(){for(this.chnum+=1;this.line.charAt(this.chnum)==="";){if(this.nextLine()=== -!1)return this.ch=!1;this.chnum=-1;return this.ch="\n"}return this.ch=this.line.charAt(this.chnum)},peek:function(){return this.line.charAt(this.chnum+1)}};n=function(a){return a=="&"||a==="_"||a==="-"||a>="a"&&a<="z"||a>="A"&&a<="Z"};m=function(a){return a!==!1&&a>="0"&&a<="9"};l=function(){for(var a="{}[]()+*=.,;:>~|\\%$#@^!".split(""),b="*^|$~".split(""),c={},d={},f=0;f")):null:a.match("--")?f(b("comment","--\>")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),f(c(1))):null;else if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),d.tokenize=b("meta","?>"),"meta";else{w=a.eat("/")?"closeTag":"openTag";a.eatSpace();for(v="";g=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)v+=g;d.tokenize=h;return"tag"}else return g== -"&"?(a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"))?"atom":"error":(a.eatWhile(/[^&<]/),"text")}function h(a,b){var c=a.next();return c==">"||c=="/"&&a.eat(">")?(b.tokenize=d,w=c==">"?"endTag":"selfcloseTag","tag"):c=="="?(w="equals",null):/[\'\"]/.test(c)?(b.tokenize=i(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function i(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=h;break}return"string"}} -function b(a,b){return function(c,f){for(;!c.eol();){if(c.match(b)){f.tokenize=d;break}c.next()}return a}}function c(a){return function(b,f){for(var g;(g=b.next())!=null;)if(g=="<")return f.tokenize=c(a+1),f.tokenize(b,f);else if(g==">")if(a==1){f.tokenize=d;break}else return f.tokenize=c(a-1),f.tokenize(b,f);return"meta"}}function a(){for(var a=arguments.length-1;a>=0;a--)k.cc.push(arguments[a])}function g(){a.apply(null,arguments);return!0}function f(){if(k.context)k.context=k.context.prev}function j(a){if(a== -"openTag")return k.tagName=v,g(o,l(k.startOfLine));else if(a=="closeTag")return a=!1,k.context?k.context.tagName!=v&&(s.implicitlyClosed.hasOwnProperty(k.context.tagName.toLowerCase())&&f(),a=!k.context||k.context.tagName!=v):a=!0,a&&(t="error"),g(n(a));return g()}function l(a){return function(b){if(b=="selfcloseTag"||b=="endTag"&&s.autoSelfClosers.hasOwnProperty(k.tagName.toLowerCase()))return m(k.tagName.toLowerCase()),g();if(b=="endTag"){m(k.tagName.toLowerCase());var b=k.tagName,c=s.doNotIndent.hasOwnProperty(b)|| -k.context&&k.context.noIndent;k.context={prev:k.context,tagName:b,indent:k.indented,startOfLine:a,noIndent:c}}return g()}}function n(a){return function(b){a&&(t="error");if(b=="endTag")return f(),g();t="error";return g(arguments.callee)}}function m(a){for(var b;;){if(!k.context)break;b=k.context.tagName.toLowerCase();if(!s.contextGrabbers.hasOwnProperty(b)||!s.contextGrabbers[b].hasOwnProperty(a))break;f()}}function o(b){if(b=="word")return t="attribute",g(p,o);if(b=="endTag"||b=="selfcloseTag")return a(); -t="error";return g(o)}function p(b){if(b=="equals")return g(r,o);s.allowMissing||(t="error");return b=="endTag"||b=="selfcloseTag"?a():g()}function r(b){if(b=="string")return g(q);if(b=="word"&&s.allowUnquoted)return t="string",g();t="error";return b=="endTag"||b=="selfCloseTag"?a():g()}function q(b){return b=="string"?g(q):a()}function u(a,b){if(a.sol())b.startOfLine=!0,b.indented=0;if(a.eatSpace())return null;t=w=v=null;var c=b.tokenize(a,b);b.type=w;if((c||w)&&c!="comment")for(k=b;;)if((b.cc.pop()|| -j)(w||c))break;b.startOfLine=!1;return t||c}var s={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!0,allowMissing:!0},v=null,w=null,k=null,t;return{parse:function(a,b){for(var b=b||0,c={tokenize:d,cc:[],indented:0,startOfLine:!0,tagName:null,context:null},f=e("stringStream").create(a),g=[];!f.eol();)g.push({type:u(f,c),start:f.start+b,end:f.pos+b}),f.start=f.pos;return g}}}); -emmet.define("string-score",function(){return{score:function(e,d,h){if(e==d)return 1;if(d=="")return 0;for(var i=0,b=d.length,c=e.length,a,g=1,f=0,j,l,n,m;f-1?m:Math.max(j,l);if(l===-1)if(h){g+=1-h;continue}else return 0;else j=0.1;e[l]===n&&(j+=0.1);l===0?(j+=0.6,f===0&&(a=1)):e.charAt(l-1)===" "&&(j+=0.8);e=e.substring(l+1,c);i+=j}e=i/b;b=(e*(b/c)+e)/2;b/=g;a&&b+0.15<1&&(b+=0.15);return b}}}); -emmet.define("utils",function(e,d){function h(b){this._data=[];this.length=0;b&&this.append(b)}var i="${0}";h.prototype={append:function(b){this._data.push(b);this.length+=b.length},toString:function(){return this._data.join("")},valueOf:function(){return this.toString()}};return{reTag:/<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,endsWithTag:function(b){return this.reTag.test(b)},isNumeric:function(b){typeof b=="string"&&(b=b.charCodeAt(0));return b&&b>47&& -b<58},trim:function(b){return(b||"").replace(/^\s+|\s+$/g,"")},getNewline:function(){var b=e("resources");if(!b)return"\n";b=b.getVariable("newline");return d.isString(b)?b:"\n"},setNewline:function(b){var c=e("resources");c.setVariable("newline",b);c.setVariable("nl",b)},splitByLines:function(b,c){var a=this.getNewline(),a=(b||"").replace(/\r\n/g,"\n").replace(/\n\r/g,"\n").replace(/\r/g,"\n").replace(/\n/g,a).split(a);c&&(a=d.filter(a,function(a){return a.length&&!!this.trim(a)},this));return a}, -normalizeNewline:function(b){return this.splitByLines(b).join(this.getNewline())},repeatString:function(b,c){for(var a=[],d=0;dd++;)a+="0";return a+b},unindentString:function(b,c){for(var a=this.splitByLines(b),d=0;db.length?b:b.substring(0,a)+c+b.substring(g)},narrowToNonSpace:function(b,c,a){c=e("range").create(c,a);for(a=/[\s\n\r\u00a0]/;c.startc.start;)if(c.end--,!a.test(b.charAt(c.end))){c.end++;break}return c},findNewlineBounds:function(b,c){for(var a=b.length,d=0,f=a-1,j=c-1;j>0;j--){var h= -b.charAt(j);if(h=="\n"||h=="\r"){d=j+1;break}}for(j=c;j":return b>c;case "gte":case ">=":return b>=c}}function i(b,c){d.isObject(b)&&"start"in b?(this.start=Math.min(b.start,b.end),this.end=Math.max(b.start,b.end)):d.isArray(b)?(this.start=b[0],this.end=b[1]):(c=d.isString(c)?c.length:+c,this.start=b,this.end=b+c)}i.prototype={length:function(){return Math.abs(this.end-this.start)}, -equal:function(b){return this.cmp(b,"eq","eq")},shift:function(b){this.start+=b;this.end+=b;return this},overlap:function(b){return b.start<=this.end&&b.end>=this.start},intersection:function(b){if(this.overlap(b)){var c=Math.max(b.start,this.start);return new i(c,Math.min(b.end,this.end)-c)}return null},union:function(b){if(this.overlap(b)){var c=Math.min(b.start,this.start);return new i(c,Math.max(b.end,this.end)-c)}return null},inside:function(b){return this.cmp(b,"lte","gt")},contains:function(b){return this.cmp(b, -"lt","gt")},include:function(){return this.cmp(loc,"lte","gte")},cmp:function(b,c,a){var d;b instanceof i?(d=b.start,b=b.end):d=b;return h(this.start,d,c||"<=")&&h(this.end,b,a||">")},substring:function(b){return this.length()>0?b.substring(this.start,this.end):""},clone:function(){return new i(this.start,this.length())},toArray:function(){return[this.start,this.end]},toString:function(){return"{"+this.start+", "+this.length()+"}"}};return{create:function(b,c){if(d.isUndefined(b)||b===null)return null; -if(b instanceof i)return b;if(d.isObject(b)&&"start"in b&&"end"in b)c=b.end-b.start,b=b.start;return new i(b,c)},create2:function(b,c){d.isNumber(b)&&d.isNumber(c)&&(c-=b);return this.create(b,c)}}}); -emmet.define("handlerList",function(e,d){function h(){this._list=[]}h.prototype={add:function(e,b){this._list.push(d.extend({order:0},b||{},{fn:e}))},remove:function(e){this._list=d.without(this._list,d.find(this._list,function(b){return b.fn===e}))},list:function(){return d.sortBy(this._list,"order").reverse()},listFn:function(){return d.pluck(this.list(),"fn")},exec:function(e,b){var b=b||[],c=null;d.find(this.list(),function(a){c=a.fn.apply(a,b);if(c!==e)return!0});return c}};return{create:function(){return new h}}}); -emmet.define("tokenIterator",function(e,d){function h(d){this.tokens=d;this._position=0;this.reset()}h.prototype={next:function(){if(this.hasNext()){var d=this.tokens[++this._i];this._position=d.start;return d}return null},current:function(){return this.tokens[this._i]},position:function(){return this._position},hasNext:function(){return this._i=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pose},eatSpace:function(){for(var d=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>d},skipToEnd:function(){this.pos=this.string.length},skipTo:function(d){d=this.string.indexOf(d,this.pos);if(d>-1)return this.pos=d,!0},skipToPair:function(d,e){for(var i=0,b,c=this.pos,a=this.string.length;c/,c={},a={},g=e("handlerList").create();return{setVocabulary:function(b,d){i={};d== -"system"?c=b:a=b},getVocabulary:function(b){return b=="system"?c:a},getMatchedResource:function(a,b){return g.exec(null,d.toArray(arguments))||this.findSnippet(b,a.name())},getVariable:function(a){return(this.getSection("variables")||{})[a]},setVariable:function(a,b){var c=this.getVocabulary("user")||{};if(!("variables"in c))c.variables={};c.variables[a]=b;this.setVocabulary(c,"user")},hasSyntax:function(a){return a in this.getVocabulary("user")||a in this.getVocabulary("system")},addResolver:function(a, -b){g.add(a,b)},removeResolver:function(a){g.remove(a)},getSection:function(b){if(!b)return null;b in i||(i[b]=e("utils").deepMerge({},c[b],a[b]));for(var g=i[b],h=d.rest(arguments),n;g&&(n=h.shift());)if(n in g)g=g[n];else return null;return g},findItem:function(a,b){for(var c=this.getSection(a);c;){if(b in c)return c[b];c=this.getSection(c["extends"])}},findSnippet:function(a,b,c){if(!a||!b)return null;var c=c||[],g=[b];~b.indexOf("-")&&g.push(b.replace(/\-/g,":"));var e=this.getSection(a),i=null; -d.find(["snippets","abbreviations"],function(b){var c=this.getSection(a,b);if(c)return d.find(g,function(a){if(c[a])return i=h(a,c[a],b)})},this);c.push(a);return!i&&e["extends"]&&!d.include(c,e["extends"])?this.findSnippet(e["extends"],b,c):i},fuzzyFindSnippet:function(a,b,c){var c=c||0.3,a=this.getAllSnippets(a),g=e("string-score"),b=b.replace(/:$/,"").replace(/:/g,"-"),h=d.map(a,function(a,c){return{key:c,score:g.score(a.nk,b,0.1)}});if((h=d.last(d.sortBy(h,"score")))&&h.score>=c)return a[h.key].parsedValue}, -getAllSnippets:function(a){var b="all-"+a;if(!i[b]){var c=[],g=[];do{var e=this.getSection(a);if(!e)break;d.each(["snippets","abbreviations"],function(a){var b={};d.each(e[a]||null,function(c,d){b[d]={nk:d.replace(/:$/,"").replace(/:/g,"-"),value:c,parsedValue:h(d,c,a),type:a}});c.push(b)});g.push(a);a=e["extends"]}while(a&&!d.include(g,a));i[b]=d.extend.apply(d,c.reverse())}return i[b]}}}); -emmet.define("actions",function(e,d){function h(b){return e("utils").trim(b.charAt(0).toUpperCase()+b.substring(1).replace(/_[a-z]/g,function(b){return" "+b.charAt(1).toUpperCase()}))}var i={};return{add:function(b,c,a){b=b.toLowerCase();a=a||{};if(!a.label)a.label=h(b);i[b]={name:b,fn:c,options:a}},get:function(b){return i[b.toLowerCase()]},run:function(b,c){d.isArray(c)||(c=d.rest(arguments));var a=this.get(b);return a?a.fn.apply(emmet,c):(emmet.log('Action "%s" is not defined',b),!1)},getAll:function(){return i}, -getList:function(){return d.values(this.getAll())},getMenu:function(b){var c=[],b=b||[];d.each(this.getList(),function(a){if(!a.options.hidden&&!d.include(b,a.name)){var g=h(a.name),f=c;if(a.options.label)for(var j=a.options.label.split("/"),g=j.pop(),e,i;e=j.shift();)i=d.find(f,function(a){return a.type=="submenu"&&a.name==e}),i||(i={name:e,type:"submenu",items:[]},f.push(i)),f=i.items;f.push({type:"action",name:a.name,label:g})}});return c},getActionNameForMenuTitle:function(b,c){var a=null;d.find(c|| -this.getMenu(),function(c){if(c.type=="action"){if(c.label==b||c.name==b)return a=c.name}else return a=this.getActionNameForMenuTitle(b,c.items)},this);return a||null}}}); -emmet.define("profile",function(e,d){function h(a){d.extend(this,g,a)}function i(a,b){switch(String(b||"").toLowerCase()){case "lower":return a.toLowerCase();case "upper":return a.toUpperCase()}return a}function b(b,c){return a[b.toLowerCase()]=new h(c)}function c(){b("xhtml");b("html",{self_closing_tag:!1});b("xml",{self_closing_tag:!0,tag_nl:!0});b("plain",{tag_nl:!1,indent:!1,place_cursor:!1});b("line",{tag_nl:!1,indent:!1,extraFilters:"s"})}var a={},g={tag_case:"asis",attr_case:"asis",attr_quotes:"double", -tag_nl:"decide",tag_nl_leaf:!1,place_cursor:!0,indent:!0,inline_break:3,self_closing_tag:"xhtml",filters:"",extraFilters:""};h.prototype={tagName:function(a){return i(a,this.tag_case)},attributeName:function(a){return i(a,this.attr_case)},attributeQuote:function(){return this.attr_quotes=="single"?"'":'"'},selfClosing:function(){return this.self_closing_tag=="xhtml"?" /":this.self_closing_tag===!0?"/":""},cursor:function(){return this.place_cursor?e("utils").getCaretPlaceholder():""}};c();return{create:function(a, -c){return arguments.length==2?b(a,c):new h(d.defaults(a||{},g))},get:function(b,c){if(!b&&c){var g=e("resources").findItem(c,"profile");g&&(b=g)}return!b?a.plain:b instanceof h?b:d.isString(b)&&b.toLowerCase()in a?a[b.toLowerCase()]:this.create(b)},remove:function(b){b=(b||"").toLowerCase();b in a&&delete a[b]},reset:function(){a={};c()},stringCase:i}}); -emmet.define("editorUtils",function(e){return{isInsideTag:function(d,e){for(var i=/^<\/?\w[\w\:\-]*.*?>/,b=e;b>-1;){if(d.charAt(b)=="<")break;b--}return b!=-1&&(i=i.exec(d.substring(b)))&&e>b&&e"&&g.endsWithTag(d.substring(0,h+1)))){i=h+1;break}}return i!=-1&&!a&&!c&&!b?d.substring(i).replace(/^[\*\+\>\^]+/,""):""},getImageSize:function(d){var e=function(){return d.charCodeAt(i++)};if(d.substr(0,8)==="\u0089PNG\r\n\u001a\n"){var i=d.indexOf("IHDR")+4;return{width:e()<<24|e()<<16|e()<<8|e(),height:e()<<24|e()<<16|e()<<8|e()}}else if(d.substr(0,4)==="GIF8")return i=6,{width:e()|e()<<8,height:e()|e()<<8};else if(d.substr(0,2)==="\u00ff\u00d8")for(var i=2,b=d.length;i< -b;){if(e()!=255)break;var c=e();if(c==218)break;var a=e()<<8|e();if(c>=192&&c<=207&&!(c&4)&&!(c&8))return i+=1,{height:e()<<8|e(),width:e()<<8|e()};else i+=a-2}},captureContext:function(d){if(String(d.getSyntax())in{html:1,xml:1,xsl:1}){var h=String(d.getContent()),i=e("htmlMatcher").find(h,d.getCaretPos());if(i&&i.type=="tag"){for(var d=/([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,i=i.open,h=i.range.substring(h).replace(/^<[\w\-\:]+/,""),i={name:i.name,attributes:[]}, -b;b=d.exec(h);)i.attributes.push({name:b[1],value:b[2]});return i}}return null},findExpressionBounds:function(d,h){for(var i=String(d.getContent()),b=i.length,c=d.getCaretPos()-1,a=c+1;c>=0&&h(i.charAt(c),c,i);)c--;for(;ac)return e("range").create([++c,a])},compoundUpdate:function(d,e){if(e){var i=d.getSelectionRange();d.replaceContent(e.data,e.start,e.end,!0);d.createSelection(e.caret,e.caret+i.end-i.start);return!0}return!1},detectSyntax:function(d,h){var i=h||"html"; -e("resources").hasSyntax(i)||(i="html");if(i=="html"&&(this.isStyle(d)||this.isInlineCSS(d)))i="css";return i},detectProfile:function(d){var h=d.getSyntax(),i=e("resources").findItem(h,"profile");if(i)return i;switch(h){case "xml":case "xsl":return"xml";case "css":if(this.isInlineCSS(d))return"line";break;case "html":return(i=e("resources").getVariable("profile"))||(i=this.isXHTML(d)?"xhtml":"html"),i}return"xhtml"},isXHTML:function(d){return d.getContent().search(/]+XHTML/i)!=-1},isStyle:function(d){var h= -String(d.getContent()),d=d.getCaretPos();return(h=e("htmlMatcher").tag(h,d))&&h.open.name.toLowerCase()=="style"&&h.innerRange.cmp(d,"lte","gte")},isInlineCSS:function(d){var h=String(d.getContent()),d=d.getCaretPos();return(h=e("xmlEditTree").parseFromPosition(h,d,!0))?(h=h.itemFromPosition(d,!0))&&h.name().toLowerCase()=="style"&&h.valueRange(!0).cmp(d,"lte","gte"):!1}}}); -emmet.define("abbreviationUtils",function(e,d){return{isSnippet:function(d){return e("elements").is(d.matchedResource(),"snippet")},isUnary:function(d){return d.children.length||d._text||this.isSnippet(d)?!1:(d=d.matchedResource())&&d.is_empty},isInline:function(d){return d.isTextNode()||!d.name()||e("tagName").isInlineLevel(d.name())},isBlock:function(d){return this.isSnippet(d)||!this.isInline(d)},isSnippet:function(d){return e("elements").is(d.matchedResource(),"snippet")},hasTagsInContent:function(d){return e("utils").matchesTag(d.content)}, -hasBlockChildren:function(e){return this.hasTagsInContent(e)&&this.isBlock(e)||d.any(e.children,function(d){return this.isBlock(d)},this)},insertChildContent:function(h,i,b){var b=d.extend({keepVariable:!0,appendIfNoChild:!0},b||{}),c=!1,a=e("utils"),h=a.replaceVariables(h,function(d,f,e){var l=d;f=="child"&&(l=a.padString(i,a.getLinePaddingFromPosition(h,e.start)),c=!0,b.keepVariable&&(l+=d));return l});!c&&b.appendIfNoChild&&(h+=i);return h}}}); -emmet.define("base64",function(){return{encode:function(e){for(var d=[],h,i,b,c,a,g,f=0,j=e.length;f>2,h=(h&3)<<4|i>>4,i=(i&15)<<2|b>>6,b&=63,isNaN(a)?i=b=64:isNaN(g)&&(b=64),d.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(i)+ -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b));return d.join("")},decode:function(e){var d,h,i,b,c,a=0,g=0,f=[],j=e.length;if(!e)return e;e+="";do d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(a++)),h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(a++)),b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(a++)),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e.charAt(a++)), -i=d<<18|h<<12|b<<6|c,d=i>>16&255,h=i>>8&255,i&=255,b==64?f[g++]=String.fromCharCode(d):c==64?f[g++]=String.fromCharCode(d,h):f[g++]=String.fromCharCode(d,h,i);while(a")){m=e+3;break}if(e=b.matches(m))if(e.type=="open"&&!e.selfClose)c.push(e.name);else if(e.type=="close"){if(!c.length)return e.name==a.name?e:null;if(d.last(c)==e.name)c.pop();else{for(var p=!1;c.length&&!p;)c.pop()==e.name&&(p=!0);if(!c.length&&!p)return e.name==a.name?e:null}}}}var c=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, -a=/^<\/([\w\:\-]+)[^>]*>/;return{find:function(a,c){for(var j=e("range"),l=h(a),n=null,m=null,o=c;o>=0;o--)if(n=l.open(o))if(n.selfClose){if(n.range.cmp(c,"lt","gt"))break}else{if(m=b(n,l)){if(j.create2(n.range.start,m.range.end).contains(c))break}else if(n.range.contains(c))break;n=null}else if(i(a,o,"--\>"))for(var p=o-1;p>=0;p--)if(i(a,p,"--\>"))break;else{if(i(a,p,"<\!--")){o=p;break}}else if(i(a,o,"<\!--")){p=o+4;for(n=a.length;p")){p+=3;break}n={range:e("range").create(o, -d.isNumber(p)?p-o:p[0]),type:"comment"};break}if(n)return p=o=null,m?(o=j.create2(n.range.start,m.range.end),p=j.create2(n.range.end,m.range.start)):o=p=j.create2(n.range.start,n.range.end),n.type=="comment"&&(j=o.substring(a),p.start+=j.length-j.replace(/^<\!--\s*/,"").length,p.end-=j.length-j.replace(/\s*--\>$/,"").length),{open:n,close:m,type:n.type=="comment"?"comment":"tag",innerRange:p,innerContent:function(){return this.innerRange.substring(a)},outerRange:o,outerContent:function(){return this.outerRange.substring(a)}, -range:!p.length()||!p.cmp(c,"lte","gte")?o:p,content:function(){return this.range.substring(a)},source:a}},tag:function(a,b){var c=this.find(a,b);if(c&&c.type=="tag")return c}}}); -emmet.define("tabStops",function(e,d){var h=100,i=0,b={replaceCarets:!1,escape:function(b){return"\\"+b},tabstop:function(b){return b.token},variable:function(b){return b.token}};e("abbreviationParser").addOutputProcessor(function(b,a){var d=0,f=e("tabStops"),j=e("utils"),h={tabstop:function(a){var b=parseInt(a.group);if(b==0)return"${0}";b>d&&(d=b);return a.placeholder?(b+=i,a=f.processText(a.placeholder,h),"${"+b+":"+a+"}"):"${"+(b+i)+"}"}},b=f.processText(b,h),b=j.replaceVariables(b,f.variablesResolver(a)); -i+=d+1;return b});return{extract:function(c,a){var g=e("utils"),f={carets:""},j=[],a=d.extend({},b,a,{tabstop:function(a){var b=a.token,c="";if(a.placeholder=="cursor")j.push({start:a.start,end:a.start+b.length,group:"carets",value:""});else{if("placeholder"in a)f[a.group]=a.placeholder;a.group in f&&(c=f[a.group]);j.push({start:a.start,end:a.start+b.length,group:a.group,value:c})}return b}});a.replaceCarets&&(c=c.replace(RegExp(g.escapeForRegexp(g.getCaretPlaceholder()),"g"),"${0:cursor}"));var c= -this.processText(c,a),h=g.stringBuilder(),i=0,g=d.map(j,function(a){h.append(c.substring(i,a.start));var b=h.length,d=f[a.group]||"";h.append(d);i=a.end;return{group:a.group,start:b,end:b+d.length}});h.append(c.substring(i));return{text:h.toString(),tabstops:d.sortBy(g,"start")}},processText:function(c,a){for(var a=d.extend({},b,a),g=e("utils").stringBuilder(),f=e("stringStream").create(c),j,h;j=f.next();)if(j=="\\"&&!f.eol())g.append(a.escape(f.next()));else{h=j;if(j=="$")if(f.start=f.pos-1,f.match(/^[0-9]+/))h= -a.tabstop({start:g.length,group:f.current().substr(1),token:f.current()});else if(j=f.match(/^\{([a-z_\-][\w\-]*)\}/))h=a.variable({start:g.length,name:j[1],token:f.current()});else if(j=f.match(/^\{([0-9]+)(:.+?)?\}/,!1)){f.skipToPair("{","}");h={start:g.length,group:j[1],token:f.current()};if(j=h.token.substring(h.group.length+2,h.token.length-1))h.placeholder=j.substr(1);h=a.tabstop(h)}g.append(h)}return g.toString()},upgrade:function(b,a){var g=0,f={tabstop:function(b){var c=parseInt(b.group); -c>g&&(g=c);return b.placeholder?"${"+(c+a)+":"+b.placeholder+"}":"${"+(c+a)+"}"}};d.each(["start","end","content"],function(a){b[a]=this.processText(b[a],f)},this);return g},variablesResolver:function(b){var a={},g=e("resources");return function(f,j){if(j=="child")return f;if(j=="cursor")return e("utils").getCaretPlaceholder();var i=b.attribute(j);if(!d.isUndefined(i)&&i!==f)return i;if(i=g.getVariable(j))return i;a[j]||(a[j]=h++);return"${"+a[j]+":"+j+"}"}},resetTabstopIndex:function(){i=0;h=100}}}); -emmet.define("preferences",function(e,d){var h={},i={},b=null,c=null;return{define:function(a,b,c){var e=a;d.isString(a)&&(e={},e[a]={value:b,description:c});d.each(e,function(a,b){i[b]=d.isObject(a)&&"value"in a&&d.keys(a).length<3?a:{value:a}})},set:function(a,b){var c=a;d.isString(a)&&(c={},c[a]=b);d.each(c,function(a,b){if(!(b in i))throw'Property "'+b+'" is not defined. You should define it first with `define` method of current module';if(a!==i[b].value){switch(typeof i[b].value){case "boolean":var c= -a;d.isString(c)?(c=c.toLowerCase(),a=c=="yes"||c=="true"||c=="1"):a=!!c;break;case "number":a=parseInt(a+"",10)||0;break;default:a!==null&&(a+="")}h[b]=a}else b in h&&delete h[b]})},get:function(a){if(a in h)return h[a];if(a in i)return i[a].value},getArray:function(a){a=this.get(a);if(d.isUndefined(a)||a===null||a==="")return null;a=d.map(a.split(","),e("utils").trim);return!a.length?null:a},getDict:function(a){var b={};d.each(this.getArray(a),function(a){a=a.split(":");b[a[0]]=a[1]});return b}, -description:function(a){return a in i?i[a].description:void 0},remove:function(a){d.isArray(a)||(a=[a]);d.each(a,function(a){a in h&&delete h[a];a in i&&delete i[a]})},list:function(){return d.map(d.keys(i).sort(),function(a){return{name:a,value:this.get(a),type:typeof i[a].value,description:i[a].description}},this)},load:function(a){d.each(a,function(a,b){this.set(b,a)},this)},exportModified:function(){return d.clone(h)},reset:function(){h={}},_startTest:function(){b=i;c=h;i={};h={}},_stopTest:function(){i= -b;h=c}}}); -emmet.define("filters",function(e,d){function h(b){return!b?[]:d.isString(b)?b.split(/[\|,]/g):b}var i={};return{add:function(b,c){i[b]=c},apply:function(b,c,a){var g=e("utils"),a=e("profile").get(a);d.each(h(c),function(c){(c=g.trim(c.toLowerCase()))&&c in i&&(b=i[c](b,a))});return b},composeList:function(b,c,a){c=e("profile").get(c);b=h(c.filters||e("resources").findItem(b,"filters")||"html");c.extraFilters&&(b=b.concat(h(c.extraFilters)));a&&(b=b.concat(h(a)));if(!b||!b.length)b=h("html");return b}, -extractFromAbbreviation:function(b){var c="",b=b.replace(/\|([\w\|\-]+)$/,function(a,b){c=b;return""});return[b,h(c)]}}}); -emmet.define("elements",function(e,d){function h(a){return{data:a}}var i={},b=/([\w\-]+)\s*=\s*(['"])(.*?)\2/g,c={add:function(a,b){var c=this;i[a]=function(){var d=b.apply(c,arguments);if(d)d.type=a;return d}},get:function(a){return i[a]},create:function(a){var b=[].slice.call(arguments,1),c=this.get(a);return c?c.apply(this,b):null},is:function(a,b){return a&&a.type===b}};c.add("element",function(a,c,f){var e={name:a,is_empty:!!f};if(c)if(e.attributes=[],d.isArray(c))e.attributes=c;else if(d.isString(c))for(;a= -b.exec(c);)e.attributes.push({name:a[1],value:a[3]});else d.each(c,function(a,b){e.attributes.push({name:b,value:a})});return e});c.add("snippet",h);c.add("reference",h);c.add("empty",function(){return{}});return c}); -emmet.define("editTree",function(e,d,h){function i(a,b){this.options=d.extend({offset:0},b);this.source=a;this._children=[];this._positions={name:0};this.initialize.apply(this,arguments)}function b(a,b,c){this.parent=a;this._name=b.value;this._value=c?c.value:"";this._positions={name:b.start,value:c?c.start:-1};this.initialize.apply(this,arguments)}var c=e("range").create;i.extend=h.extend;i.prototype={initialize:function(){},_updateSource:function(a,b,f){var j=c(b,d.isUndefined(f)?0:f-b),h=a.length- -j.length(),i=function(a){d.each(a,function(b,c){b>=j.end&&(a[c]+=h)})};i(this._positions);d.each(this.list(),function(a){i(a._positions)});this.source=e("utils").replaceSubstring(this.source,a,j)},add:function(a,c){var d=new b(a,c);this._children.push(d);return d},get:function(a){return d.isNumber(a)?this.list()[a]:d.isString(a)?d.find(this.list(),function(b){return b.name()===a}):a},getAll:function(a){d.isArray(a)||(a=[a]);var b=[],c=[];d.each(a,function(a){d.isString(a)?b.push(a):d.isNumber(a)&& -c.push(a)});return d.filter(this.list(),function(a,e){return d.include(c,e)||d.include(b,a.name())})},value:function(a,b,c){var e=this.get(a);if(e)return e.value(b);if(!d.isUndefined(b))return this.add(a,b,c)},values:function(a){return d.map(this.getAll(a),function(a){return a.value()})},remove:function(a){if(a=this.get(a))this._updateSource("",a.fullRange()),this._children=d.without(this._children,a)},list:function(){return this._children},indexOf:function(a){return d.indexOf(this.list(),this.get(a))}, -name:function(a){if(!d.isUndefined(a)&&this._name!==(a=String(a)))this._updateSource(a,this._positions.name,this._positions.name+this._name.length),this._name=a;return this._name},nameRange:function(a){return c(this._positions.name+(a?this.options.offset:0),this.name())},range:function(a){return c(a?this.options.offset:0,this.toString())},itemFromPosition:function(a,b){return d.find(this.list(),function(c){return c.range(b).inside(a)})},toString:function(){return this.source}};b.extend=h.extend;b.prototype= -{initialize:function(){},_pos:function(a,b){return a+(b?this.parent.options.offset:0)},value:function(a){if(!d.isUndefined(a)&&this._value!==(a=String(a)))this.parent._updateSource(a,this.valueRange()),this._value=a;return this._value},name:function(a){if(!d.isUndefined(a)&&this._name!==(a=String(a)))this.parent._updateSource(a,this.nameRange()),this._name=a;return this._name},namePosition:function(a){return this._pos(this._positions.name,a)},valuePosition:function(a){return this._pos(this._positions.value, -a)},range:function(a){return c(this.namePosition(a),this.toString())},fullRange:function(a){return this.range(a)},nameRange:function(a){return c(this.namePosition(a),this.name())},valueRange:function(a){return c(this.valuePosition(a),this.value())},toString:function(){return this.name()+this.value()},valueOf:function(){return this.toString()}};return{EditContainer:i,EditElement:b,createToken:function(a,b,c){a={start:a||0,value:b||"",type:c};a.end=a.start+a.value.length;return a}}}); -emmet.define("cssEditTree",function(e,d){function h(a,b){return e("range").create(a,b)}function i(a,b){var b=b||g|f,c=["white","line"];if((b&f)==f)for(;a.length&&d.include(c,d.last(a).type);)a.pop();if((b&g)==g)for(;a.length&&d.include(c,a[0].type);)a.shift();return a}function b(a){var b=["white","line",":"],c=[],e,j;a.nextUntil(function(){return!d.include(b,this.itemNext().type)});for(j=a.current().end;e=a.next();){if(e.type=="}"||e.type==";")return i(c,g|(e.type=="}"?f:0)),c.length?(j=c[0].start, -a=d.last(c).end):a=j,h(j,a-j);c.push(e)}if(c.length)return h(c[0].start,d.last(c).end-c[0].start)}function c(a){var b=e("stringStream").create(a),c=[],f=/[\s\u00a0,]/,g=function(){b.next();c.push(h(b.start,b.current()));b.start=b.pos};b.eatSpace();for(b.start=b.pos;a=b.next();)if(a=='"'||a=="'"){b.next();if(!b.skipTo(a))break;g()}else if(a=="("){b.backUp(1);if(!b.skipToPair("(",")"))break;b.backUp(1);g()}else if(f.test(a))c.push(h(b.start,b.current().length-1)),b.eatWhile(f),b.start=b.pos;g();return d.chain(c).filter(function(a){return!!a.length()}).uniq(!1, -function(a){return a.toString()}).value()}var a={styleBefore:"\n\t",styleSeparator:": ",offset:0},g=1,f=2,j=e("editTree").EditContainer.extend({initialize:function(c){d.defaults(this.options,a);var f=e("editTree"),g=e("tokenIterator").create(e("cssParser").parse(c)),j,r=[],q;for(j=g.position();q=g.next();){if(q.type=="{")break;r.push(q)}i(r);r.length?(j=r[0].start,r=d.last(r).end):r=j;j=h(j,r-j);this._positions.name=j.start;this._name=j.substring(c);if(!g.current()||g.current().type!="{")throw"Invalid CSS rule"; -for(this._positions.contentStart=g.position()+1;j=g.next();){if(r=j.type=="identifier")a:{r=g.tokens;q=g._i+1;for(var u=r.length;q1)f.styleBefore="\n"+d.last(e);f.styleSeparator=b.substring(f.nameRange().end,f.valuePosition());f.styleBefore=d.last(f.styleBefore.split("*/"));f.styleSeparator=f.styleSeparator.replace(/\/\*.*?\*\//g,"");a=f.range().end})},add:function(a,b,c){var f=this.list(),g=this._positions.contentStart,j=d.pick(this.options,"styleBefore", -"styleSeparator"),h=e("editTree");if(d.isUndefined(c))c=f.length;var i=f[c];if(i)g=i.fullRange().start;else if(i=f[c-1])i.end(";"),g=i.range().end;i&&(j=d.pick(i,"styleBefore","styleSeparator"));a=h.createToken(g+j.styleBefore.length,a);b=h.createToken(a.end+j.styleSeparator.length,b);h=new l(this,a,b,h.createToken(b.end,";"));d.extend(h,j);this._updateSource(h.styleBefore+h.toString(),g);this._children.splice(c,0,h);return h}}),l=e("editTree").EditElement.extend({initialize:function(a,b,c,d){this.styleBefore= -a.options.styleBefore;this.styleSeparator=a.options.styleSeparator;this._end=d.value;this._positions.end=d.start},valueParts:function(a){var b=c(this.value());if(a){var f=this.valuePosition(!0);d.each(b,function(a){a.shift(f)})}return b},end:function(a){if(!d.isUndefined(a)&&this._end!==a)this.parent._updateSource(a,this._positions.end,this._positions.end+this._end.length),this._end=a;return this._end},fullRange:function(a){a=this.range(a);a.start-=this.styleBefore.length;return a},toString:function(){return this.name()+ -this.styleSeparator+this.value()+this.end()}});return{parse:function(a,b){return new j(a,b)},parseFromPosition:function(a,b,c){c=this.extractRule(a,b,c);return!c||!c.inside(b)?null:this.parse(c.substring(a),{offset:c.start})},extractRule:function(a,b,c){for(var d="",f=a.length,g=-1,j;b>=0;){j=a.charAt(b);if(j=="{"){g=b;break}else if(j=="}"&&!c){b++;break}b--}for(;b=0;){j=a.charAt(b);if("{}/\\<>\n\r".indexOf(j)!= --1)break;b--}c=a.substring(b+1,g).replace(/^[\s\n\r]+/m,"");return e("range").create(g-c.length,d.length+c.length)}return null},baseName:function(a){return a.replace(/^\s*\-\w+\-/,"")},findParts:c}}); -emmet.define("xmlEditTree",function(e,d){var h={styleBefore:" ",styleSeparator:"=",styleQuote:'"',offset:0},i=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m,b=e("editTree").EditContainer.extend({initialize:function(a){d.defaults(this.options,h);this._positions.name=1;var b=null,f=e("xmlParser").parse(a),j=e("range");d.each(f,function(d){d.value=j.create(d).substring(a);switch(d.type){case "tag":if(/^<[^\/]+/.test(d.value))this._name=d.value.substring(1); -break;case "attribute":b&&this._children.push(new c(this,b));b=d;break;case "string":this._children.push(new c(this,b,d)),b=null}},this);b&&this._children.push(new c(this,b));this._saveStyle()},_saveStyle:function(){var a=this.nameRange().end,b=this.source;d.each(this.list(),function(c){c.styleBefore=b.substring(a,c.namePosition());if(c.valuePosition()!==-1)c.styleSeparator=b.substring(c.namePosition()+c.name().length,c.valuePosition()-c.styleQuote.length);a=c.range().end})},add:function(a,b,f){var j= -this.list(),h=this.nameRange().end,i=e("editTree"),m=d.pick(this.options,"styleBefore","styleSeparator","styleQuote");if(d.isUndefined(f))f=j.length;var o=j[f];if(o)h=o.fullRange().start;else if(o=j[f-1])h=o.range().end;o&&(m=d.pick(o,"styleBefore","styleSeparator","styleQuote"));b=m.styleQuote+b+m.styleQuote;a=new c(this,i.createToken(h+m.styleBefore.length,a),i.createToken(h+m.styleBefore.length+a.length+m.styleSeparator.length,b));d.extend(a,m);this._updateSource(a.styleBefore+a.toString(),h); -this._children.splice(f,0,a);return a}}),c=e("editTree").EditElement.extend({initialize:function(a,b,c){this.styleBefore=a.options.styleBefore;this.styleSeparator=a.options.styleSeparator;b="";a=a.options.styleQuote;if(c)b=c.value,a=b.charAt(0),a=='"'||a=="'"?b=b.substring(1):a="",a&&b.charAt(b.length-1)==a&&(b=b.substring(0,b.length-1));this.styleQuote=a;this._value=b;this._positions.value=c?c.start+a.length:-1},fullRange:function(a){a=this.range(a);a.start-=this.styleBefore.length;return a},toString:function(){return this.name()+ -this.styleSeparator+this.styleQuote+this.value()+this.styleQuote}});return{parse:function(a,c){return new b(a,c)},parseFromPosition:function(a,b,c){c=this.extractTag(a,b,c);return!c||!c.inside(b)?null:this.parse(c.substring(a),{offset:c.start})},extractTag:function(a,b,c){var d=a.length,h,n=e("range"),m=Math.min(2E3,d),o=null,p=function(b){var c;if(a.charAt(b)=="<"&&(c=a.substr(b,m).match(i)))return n.create(b,c[0])};for(h=b;h>=0;h--)if(o=p(h))break;if(o&&(o.inside(b)||c))return o;if(!o&&c)return null; -for(h=b;h=a++;)if(b.substr(a,f.length)==f){h=a+f.length;break}}return j!=-1&&h!=-1?e("range").create(j,h-j):null}function b(b,a,d,f){function j(b){return b.replace(RegExp("^"+p.escapeForRegexp(a)+"\\s*"), -function(a){m-=a.length;return""}).replace(RegExp("\\s*"+p.escapeForRegexp(d)+"$"),"")}var h=e("editorUtils"),n=h.outputInfo(b).content,m=b.getCaretPos(),o=null,p=e("utils");(o=i(n,m,a,d))&&o.overlap(f)?(f=o,o=j(f.substring(n))):(o=a+" "+f.substring(n).replace(RegExp(p.escapeForRegexp(a)+"\\s*|\\s*"+p.escapeForRegexp(d),"g"),"")+" "+d,m+=a.length+1);return o!==null?(o=p.escapeText(o),b.setCaretPos(f.start),b.replaceContent(h.unindent(b,o),f.start,f.end),b.setCaretPos(m),!0):!1}e("actions").add("toggle_comment", -function(c){var a=e("editorUtils").outputInfo(c);if(a.syntax=="css"){var d=c.getCaretPos(),f=e("htmlMatcher").tag(a.content,d);if(f&&f.open.range.inside(d))a.syntax="html"}if(a.syntax=="css"){f=e("range").create(c.getSelectionRange());a=e("editorUtils").outputInfo(c);if(!f.length()&&(d=e("cssEditTree").parseFromPosition(a.content,c.getCaretPos())))f=(f=h(d,c.getCaretPos()))?f.range(!0):e("range").create(d.nameRange(!0).start,d.source);f.length()||(f=e("range").create(c.getCurrentLineRange()),e("utils").narrowToNonSpace(a.content, -f));c=b(c,"/*","*/",f)}else{a=e("range").create(c.getSelectionRange());d=e("editorUtils").outputInfo(c);if(!a.length()&&(d=e("htmlMatcher").tag(d.content,c.getCaretPos())))a=d.outerRange;c=b(c,"<\!--","--\>",a)}return c})}); -emmet.exec(function(e){function d(d,e,b){function c(b){for(var c=b;c>=0;){var d=a.charAt(c);if(d=="\n"||d=="\r")break;c--}return a.substring(c,b)}for(var e=e||1,b=d.getCaretPos()+(b||0),a=String(d.getContent()),d=a.length,g=-1,f=/^\s+$/;b<=d&&b>=0;){b+=e;var j=a.charAt(b),l=a.charAt(b+1),n=a.charAt(b-1);switch(j){case '"':case "'":l==j&&n=="="&&(g=b+1);break;case ">":l=="<"&&(g=b+1);break;case "\n":case "\r":f.test(c(b-1))&&(g=b)}if(g!=-1)break}return g}e=e("actions");e.add("prev_edit_point",function(e){var i= -e.getCaretPos(),b=d(e,-1);b==i&&(b=d(e,-1,-2));return b!=-1?(e.setCaretPos(b),!0):!1},{label:"Previous Edit Point"});e.add("next_edit_point",function(e){var i=d(e,1);return i!=-1?(e.setCaretPos(i),!0):!1})}); -emmet.exec(function(e,d){function h(a,b,c,d){var f=e("range"),g=e("editorUtils").outputInfo(a).content,j=g.length,h,i=f.create(-1,0),l=f.create(a.getSelectionRange());h=l.start;for(var n=1E5;h>=0&&h0;){if(f=c(g,h,b)){if(i.equal(f))break;i=f.clone();if(h=d(f.substring(g),f.start,l.clone()))return a.createSelection(h.start,h.end),!0;else h=b?f.start:f.end-1}h+=b?-1:1}return!1}function i(a){var b=!0;return h(a,!1,function(a,c){if(b){b=!1;var d;a:{d=c;for(var e;d>=0;){if(e=f(a,d)){d=e;break a}d--}d= -null}return d}else return f(a,c)},function(a,b,c){return g(a,b,c,!1)})}function b(a){return h(a,!0,f,function(a,b,c){return g(a,b,c,!0)})}function c(b,c,f){var f=f||0,g=e("range"),h=[],k=-1,i="",l="",n,o;d.each(c,function(c){switch(c.type){case "tag":o=b.substring(c.start,c.end);/^<[\w\:\-]/.test(o)&&h.push(g.create({start:c.start+1,end:c.end}));break;case "attribute":k=c.start;i=b.substring(c.start,c.end);break;case "string":h.push(g.create(k,c.end-k)),n=g.create(c),l=n.substring(b),j(l.charAt(0))&& -n.start++,j(l.charAt(l.length-1))&&n.end--,h.push(n),i=="class"&&(h=h.concat(a(n.substring(b),n.start)))}});d.each(h,function(a){a.shift(f)});return d.chain(h).filter(function(a){return!!a.length()}).uniq(!1,function(a){return a.toString()}).value()}function a(a,b){var b=b||0,c=[],d=e("stringStream").create(a),f=e("range");d.eatSpace();d.start=d.pos;for(var g;g=d.next();)if(/[\s\u00a0]/.test(g))c.push(f.create(d.start+b,d.pos-d.start-1)),d.eatSpace(),d.start=d.pos;c.push(f.create(d.start+b,d.pos- -d.start));return c}function g(a,b,f,g){a=c(a,e("xmlParser").parse(a),b);g&&a.reverse();return(b=d.find(a,function(a){return a.equal(f)}))?(g=d.indexOf(a,b),g1)?g[1]:d.find(a,function(a){return a.end>f.end})}function f(a,b){var c;if(a.charAt(b)=="<"&&(c=a.substring(b,a.length).match(p)))return e("range").create(b,c[0])}function j(a){return a=='"'||a=="'"}function l(a){var b= -a.valueRange(!0),c=[a.range(!0),b],f=e("stringStream"),g=e("cssEditTree"),j=e("range"),h=a.value();d.each(a.valueParts(),function(a){var e=a.clone();c.push(e.shift(b.start));var i=f.create(a.substring(h));if(i.match(/^[\w\-]+\(/,!0)){i.start=i.pos;i.skipToPair("(",")");var l=i.current();c.push(j.create(e.start+i.start,l));d.each(g.findParts(l),function(a){c.push(j.create(e.start+i.start+a.start,a.substring(l)))})}});return d.chain(c).filter(function(a){return!!a.length()}).uniq(!1,function(a){return a.toString()}).value()} -function n(a,b,c){var f=null,e=null,g=a.list(),j,h;c?(g.reverse(),j=function(a){return a.range(!0).start<=b.start},h=function(a){return a.start=b.end},h=function(a){return a.end>b.start});for(;f=d.find(g,j);){a=l(f);c&&a.reverse();if(e=d.find(a,function(a){return a.equal(b)})){if(e=d.indexOf(a,e),e!=a.length-1){e=a[e+1];break}}else{e=d.filter(a,function(a){return a.inside(b.end)});if(e.length>1){e=e[1];break}if(e=d.find(a,h))break}e=null;b.start=b.end= -c?f.range(!0).start-1:f.range(!0).end+1}return e}function m(a,b,c){a=e("cssEditTree").parse(a,{offset:b});b=a.nameRange(!0);return c.endb.start)?b:a}var p=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,r=e("actions");r.add("select_next_item",function(a){return a.getSyntax()=="css"?h(a,!1,e("cssEditTree").extractRule,m):i(a)});r.add("select_previous_item", -function(a){return a.getSyntax()=="css"?h(a,!0,e("cssEditTree").extractRule,o):b(a)})}); -emmet.exec(function(e){function d(c,a){var a=String((a||"out").toLowerCase()),d=e("editorUtils").outputInfo(c),f=e("range").create(c.getSelectionRange()),d=d.content;b&&!b.range.equal(f)&&(b=null);if(b&&f.length())if(a=="in")if(b.type=="tag"&&!b.close)return!1;else if(b.range.equal(b.outerRange))b.range=b.innerRange;else{var j=e("utils").narrowToNonSpace(d,b.innerRange);if((b=i.find(d,j.start+1))&&b.range.equal(f)&&b.outerRange.equal(f))b.range=b.innerRange}else if(!b.innerRange.equal(b.outerRange)&& -b.range.equal(b.innerRange)&&f.equal(b.range))b.range=b.outerRange;else{if((b=i.find(d,f.start))&&b.range.equal(f)&&b.innerRange.equal(f))b.range=b.outerRange}else b=i.find(d,f.start);if(b&&!b.range.equal(f))return c.createSelection(b.range.start,b.range.end),!0;b=null;return!1}var h=e("actions"),i=e("htmlMatcher"),b=null;h.add("match_pair",d,{hidden:!0});h.add("match_pair_inward",function(b){return d(b,"in")},{label:"HTML/Match Pair Tag (inward)"});h.add("match_pair_outward",function(b){return d(b, -"out")},{label:"HTML/Match Pair Tag (outward)"});h.add("matching_pair",function(b){var a=String(b.getContent()),d=b.getCaretPos();a.charAt(d)=="<"&&d++;return(a=i.tag(a,d))&&a.close?(a.open.range.inside(d)?b.setCaretPos(a.close.range.start):b.setCaretPos(a.open.range.start),!0):!1},{label:"HTML/Go To Matching Tag Pair"})}); -emmet.exec(function(e){e("actions").add("remove_tag",function(d){var h=e("utils"),i=e("editorUtils").outputInfo(d),b=e("htmlMatcher").tag(i.content,d.getCaretPos());if(b){if(b.close){var c=h.narrowToNonSpace(i.content,b.innerRange),a=h.findNewlineBounds(i.content,c.start),a=h.getLinePadding(a.substring(i.content)),i=c.substring(i.content),i=h.unindentString(i,a);d.replaceContent(h.getCaretPlaceholder()+h.escapeText(i),b.outerRange.start,b.outerRange.end)}else d.replaceContent(h.getCaretPlaceholder(), -b.range.start,b.range.end);return!0}return!1},{label:"HTML/Remove Tag"})}); -emmet.exec(function(e){e("actions").add("split_join_tag",function(d,h){var i=e("htmlMatcher"),b=e("editorUtils").outputInfo(d,null,h),c=e("profile").get(b.profile);if(i=i.tag(b.content,d.getCaretPos())){if(i.close){var b=e("utils"),c=c.selfClosing()||" /",c=i.open.range.substring(i.source).replace(/\s*>$/,c+">"),a=d.getCaretPos();c.length+i.outerRange.start$/,">"),a=i.outerRange.start+g.length;g+=c+"";g=b.escapeText(g);d.replaceContent(g,i.outerRange.start,i.outerRange.end)}d.setCaretPos(a);i=!0}else i=!1;return i},{label:"HTML/Split\\Join Tag Declaration"})}); -emmet.define("reflectCSSValue",function(e,d){function h(c){var a=e("cssEditTree"),d=e("editorUtils").outputInfo(c),c=c.getCaretPos();if(a=a.parseFromPosition(d.content,c))if(d=a.itemFromPosition(c,!0)){var f=a.source,j=a.options.offset,c=c-j-d.range().start;b.exec(!1,[d]);if(f!==a.source)return{data:a.source,start:j,end:j+f.length,caret:j+d.range().start+c}}}function i(b){var b=e("cssEditTree").baseName(b),a;if(b=="opacity"||b=="filter")return/^(?:\-\w+\-)?(?:opacity|filter)$/;else if(a=b.match(/^border-radius-(top|bottom)(left|right)/))return RegExp("^(?:\\-\\w+\\-)?(?:"+ -b+"|border-"+a[1]+"-"+a[2]+"-radius)$");else if(a=b.match(/^border-(top|bottom)-(left|right)-radius/))return RegExp("^(?:\\-\\w+\\-)?(?:"+b+"|border-radius-"+a[1]+a[2]+")$");return RegExp("^(?:\\-\\w+\\-)?"+b+"$")}var b=e("handlerList").create();e("actions").add("reflect_css_value",function(b){return b.getSyntax()!="css"?!1:e("actionUtils").compoundUpdate(b,h(b))},{label:"CSS/Reflect Value"});b.add(function(b){var a=i(b.name());d.each(b.parent.list(),function(d){if(a.test(d.name())){var f;var j=b.name(), -h=b.value(),i=d.name();f=d.value();var m=e("cssEditTree"),o=e("utils"),j=m.baseName(j),i=m.baseName(i);f=j=="opacity"&&i=="filter"?f.replace(/opacity=[^)]*/i,"opacity="+Math.floor(parseFloat(h)*100)):j=="filter"&&i=="opacity"?(j=h.match(/opacity=([^)]*)/i))?o.prettifyNumber(parseInt(j[1])/100):f:h;d.value(f)}})},{order:-1});return{addHandler:function(c,a){b.add(c,a)},removeHandler:function(c){b.remove(c,options)}}}); -emmet.exec(function(e){e("actions").add("evaluate_math_expression",function(d){var h=e("actionUtils"),i=e("utils"),b=String(d.getContent()),c=e("range").create(d.getSelectionRange());c.length()||(c=h.findExpressionBounds(d,function(a){return i.isNumeric(a)||".+-*/\\".indexOf(a)!=-1}));if(c&&c.length()){h=c.substring(b);h=h.replace(/([\d\.\-]+)\\([\d\.\-]+)/g,"Math.round($1/$2)");try{var a=i.prettifyNumber((new Function("return "+h))());d.replaceContent(a,c.start,c.end);d.setCaretPos(c.start+a.length); -return!0}catch(g){}}return!1},{label:"Numbers/Evaluate Math Expression"})}); -emmet.exec(function(e,d){function h(b,a){var g=e("utils"),f=!1,j=!1,h=e("actionUtils").findExpressionBounds(b,function(a,b,c){return g.isNumeric(a)?!0:a=="."?!g.isNumeric(c.charAt(b+1))?!1:j?!1:j=!0:a=="-"?f?!1:f=!0:!1});if(h&&h.length()){var n=h.substring(String(b.getContent())),m=parseFloat(n);if(!d.isNaN(m)){m=g.prettifyNumber(m+a);if(/^(\-?)0+[1-9]/.test(n)){var o="";RegExp.$1&&(o="-",m=m.substring(1));m=m.split(".");m[0]=g.zeroPadString(m[0],i(n));m=o+m.join(".")}b.replaceContent(m,h.start,h.end); -b.createSelection(h.start,h.start+m.length);return!0}}return!1}function i(b){b=b.replace(/^\-/,"");return~b.indexOf(".")?b.split(".")[0].length:b.length}var b=e("actions");d.each([1,-1,10,-10,0.1,-0.1],function(c){var a=c>0?"increment":"decrement";b.add(a+"_number_by_"+String(Math.abs(c)).replace(".","").substring(0,2),function(a){return h(a,c)},{label:"Numbers/"+a.charAt(0).toUpperCase()+a.substring(1)+" number by "+Math.abs(c)})})}); -emmet.exec(function(e,d){var h=e("actions"),i=e("preferences");i.define("css.closeBraceIndentation","\n","Indentation before closing brace of CSS rule. Some users prefere indented closing brace of CSS rule for better readability. This preference\u2019s value will be automatically inserted before closing brace when user adds newline in newly created CSS rule (e.g. when \u201cInsert formatted linebreak\u201d action will be performed in CSS file). If you\u2019re such user, you may want to write put a value like \\n\\t in this preference."); -h.add("insert_formatted_line_break_only",function(b){var c=e("utils"),a=e("resources"),g=e("editorUtils").outputInfo(b),f=b.getCaretPos(),j=c.getNewline();if(d.include(["html","xml","xsl"],g.syntax)){if(a=a.getVariable("indentation"),(g=e("htmlMatcher").tag(g.content,f))&&!g.innerRange.length())return b.replaceContent(j+a+c.getCaretPlaceholder()+j,f),!0}else if(g.syntax=="css"&&(g=g.content,f&&g.charAt(f-1)=="{")){var h=i.get("css.closeBraceIndentation"),a=a.getVariable("indentation"),n=g.charAt(f)== -"}";if(!n)for(var m=f,o=g.length,p;ma.length?b.replaceContent(c+i,f,f,!0):b.replaceContent(c,f)}return!0},{hidden:!0})}); -emmet.exec(function(e){e("actions").add("merge_lines",function(d){var h=e("htmlMatcher"),i=e("utils"),b=e("editorUtils").outputInfo(d),c=e("range").create(d.getSelectionRange());if(!c.length()&&(h=h.find(b.content,d.getCaretPos())))c=h.outerRange;if(c.length()){b=c.substring(b.content);b=i.splitByLines(b);for(h=1;h=0;)if(d("src=",a,c)){if(a=a.substr(c).match(/^(src=(["'])?)([^'"<>\s]+)\1?/))b=a[3],c+=a[1].length;break}else if(d("url(",a,c)){if(a=a.substr(c).match(/^(url\((['"])?)([^'"\)\s]+)\1?/))b=a[3],c+=a[1].length;break}if(b)if(d("data:",b))if(a=String(i.prompt("Enter path to file (absolute or relative)"))){var g= -e("file"),f=g.createPath(i.getFilePath(),a);if(!f)throw"Can't save file";g.save(f,e("base64").decode(b.replace(/^data\:.+?;.+?,/,"")));i.replaceContent("$0"+a,c,c+b.length);i=!0}else i=!1;else i=h(i,b,c);else i=!1;return i},{label:"Encode\\Decode data:URL image"})}); -emmet.exec(function(e,d){function h(c){var a=c.getCaretPos(),g=e("editorUtils").outputInfo(c),f=e("xmlEditTree").parseFromPosition(g.content,a,!0);f&&(f.name()||"").toLowerCase()=="img"&&b(c,f.value("src"),function(b){if(b){var g=f.range(!0);f.value("width",b.width);f.value("height",b.height,f.indexOf("width")+1);e("actionUtils").compoundUpdate(c,d.extend(g,{data:f.toString(),caret:a}))}})}function i(c){var a=c.getCaretPos(),g=e("editorUtils").outputInfo(c),f=e("cssEditTree").parseFromPosition(g.content, -a,!0);if(f){var g=f.itemFromPosition(a,!0),j;g&&(j=/url\((["']?)(.+?)\1\)/i.exec(g.value()||""))&&b(c,j[2],function(b){if(b){var j=f.range(!0);f.value("width",b.width+"px");f.value("height",b.height+"px",f.indexOf("width")+1);e("actionUtils").compoundUpdate(c,d.extend(j,{data:f.toString(),caret:a}))}})}}function b(b,a,d){var f=e("actionUtils");if(a){if(/^data:/.test(a))return b=e("base64").decode(a.replace(/^data\:.+?;.+?,/,"")),d(f.getImageSize(b));var j=e("file"),h=j.locateFile(b.getFilePath(), -a);if(h===null)throw"Can't find "+a+" file";j.read(h,function(a,b){if(a)throw"Unable to read "+h+": "+a;d(f.getImageSize(String(b)))})}}e("actions").add("update_image_size",function(b){d.include(["css","less","scss"],String(b.getSyntax()))?i(b):h(b);return!0})}); -emmet.define("cssResolver",function(e,d){function h(a){var b=a&&a.charCodeAt(0);return a&&a=="."||b>47&&b<58}function i(a){a=e("utils").trim(a);if(~a.indexOf("/*")||/[\n\r]/.test(a))return!1;if(!/^[a-z0-9\-]+\s*\:/i.test(a))return!1;a=e("tabStops").processText(a,{replaceCarets:!0,tabstop:function(){return"value"}});return a.split(":").length==2}function b(a){a.charAt(0)=="-"&&!/^\-[\.\d]/.test(a)&&(a=a.replace(/^\-+/,""));if(a.charAt(0)=="#"){var b=a.replace(/^#+/,"")||"0";if(b.toLowerCase()=="t")a= -"transparent";else{var d=e("utils").repeatString,a=null;switch(b.length){case 1:a=d(b,6);break;case 2:a=d(b,3);break;case 3:a=b.charAt(0)+b.charAt(0)+b.charAt(1)+b.charAt(1)+b.charAt(2)+b.charAt(2);break;case 4:a=b+b.substr(0,2);break;case 5:a=b+b.charAt(0);break;default:a=b.substr(0,6)}q.get("css.color.short")&&(b=a.split(""),b[0]==b[1]&&b[2]==b[3]&&b[4]==b[5]&&(a=b[0]+b[2]+b[4]));switch(q.get("css.color.case")){case "upper":a=a.toUpperCase();break;case "lower":a=a.toLowerCase()}a="#"+a}}else a= -c(a);return a}function c(a){var b=q.getDict("css.keywordAliases");return a in b?b[a]:a}function a(a){return d.include(q.getArray("css.keywords"),c(a))}function g(a,b){var c=r[b];c||(c=d.find(r,function(a){return a.prefix==b}));return c&&c.supports(a)}function f(a,b){var c=[];d.each(r,function(b,d){g(a,d)&&c.push(d)});!c.length&&!b&&d.each(r,function(a,b){a.obsolete||c.push(b)});return c}function j(a,b){d.isString(b)&&(b={prefix:b});r[a]=d.extend({},p,b)}function l(a,b){if(b){var c=q.get(b+"."+a); -if(!d.isUndefined(c))return c}return q.get("css."+a)}function n(a,b,c){if(!d.isString(a))a=a.data;if(!i(a))return a;b&&(~a.indexOf(";")?a=a.split(";").join(" !important;"):a+=" !important");b=a.indexOf(":");a=a.substring(0,b).replace(/\s+$/,"")+l("valueSeparator",c)+e("utils").trim(a.substring(b+1));return a.replace(/\s*;\s*$/,l("propertyEnd",c))}function m(a){var b=q.getArray(a);d.each(q.getArray(a+"Addon"),function(a){a.charAt(0)=="-"?b=d.without(b,a.substr(1)):(a.charAt(0)=="+"&&(a=a.substr(1)), -b.push(a))});return b}var o=null,p={prefix:"emmet",obsolete:!1,transformName:function(a){return"-"+this.prefix+"-"+a},properties:function(){return m("css."+this.prefix+"Properties")||[]},supports:function(a){return d.include(this.properties(),a)}},r={},q=e("preferences");q.define("css.valueSeparator",": ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations.");q.define("css.propertyEnd",";","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations."); -q.define("stylus.valueSeparator"," ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations in Stylus dialect.");q.define("stylus.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in Stylus dialect.");q.define("sass.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in SASS dialect.");q.define("css.autoInsertVendorPrefixes", -!0,"Automatically generate vendor-prefixed copies of expanded CSS property. By default, Emmet will generate vendor-prefixed properties only when you put dash before abbreviation (e.g. -bxsh). With this option enabled, you don\u2019t need dashes before abbreviations: Emmet will produce vendor-prefixed properties for you.");var u=d.template("A comma-separated list of CSS properties that may have <%= vendor %> vendor prefix. This list is used to generate a list of prefixed properties when expanding -property abbreviations. Empty list means that all possible CSS values may have <%= vendor %> prefix."), -s=d.template("A comma-separated list of additional CSS properties for css.<%= vendor %>Preperties preference. You should use this list if you want to add or remove a few CSS properties to original set. To add a new property, simply write its name, to remove it, precede property with hyphen.
For example, to add foo property and remove border-radius one, the preference value will look like this: foo, -border-radius.");d.each({webkit:"animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius", -moz:"animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius", -ms:"accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, word-wrap, wrap-flow, wrap-margin, wrap-through, writing-mode", -o:"dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style"}, -function(a,b){q.define("css."+b+"Properties",a,u({vendor:b}));q.define("css."+b+"PropertiesAddon","",s({vendor:b}))});q.define("css.unitlessProperties","z-index, line-height, opacity, font-weight, zoom","The list of properties whose values \u200b\u200bmust not contain units.");q.define("css.intUnit","px","Default unit for integer values");q.define("css.floatUnit","em","Default unit for float values");q.define("css.keywords","auto, inherit","A comma-separated list of valid keywords that can be used in CSS abbreviations."); -q.define("css.keywordAliases","a:auto, i:inherit, s:solid, da:dashed, do:dotted, t:transparent","A comma-separated list of keyword aliases, used in CSS abbreviation. Each alias should be defined as alias:keyword_name.");q.define("css.unitAliases","e:em, p:%, x:ex, r:rem","A comma-separated list of unit aliases, used in CSS abbreviation. Each alias should be defined as alias:unit_value.");q.define("css.color.short",!0,"Should color values like #ffffff be shortened to #fff after abbreviation with color was expanded."); -q.define("css.color.case","keep","Letter case of color values generated by abbreviations with color (like c#0). Possible values are upper, lower and keep.");q.define("css.fuzzySearch",!0,"Enable fuzzy search among CSS snippet names. When enabled, every unknown snippet will be scored against available snippet names (not values or CSS properties!). The match with best score will be used to resolve snippet value. For example, with this preference enabled, the following abbreviations are equal: ov:h == ov-h == o-h == oh"); -q.define("css.fuzzySearchMinScore",0.3,"The minium score (from 0 to 1) that fuzzy-matched abbreviation should achive. Lower values may produce many false-positive matches, higher values may reduce possible matches.");q.define("css.alignVendor",!1,"If set to true, all generated vendor-prefixed properties will be aligned by real property name.");j("w",{prefix:"webkit"});j("m",{prefix:"moz"});j("s",{prefix:"ms"});j("o",{prefix:"o"});var v=["css","less","sass","scss","stylus"];e("resources").addResolver(function(a, -b){return d.include(v,b)&&a.isElement()?o.expandToSnippet(a.abbreviation,b):null});var w=e("expandAbbreviation");w.addHandler(function(a,b,c){if(!d.include(v,b))return!1;var e=a.getSelectionRange().end,f=w.findAbbreviation(a);return f&&(b=emmet.expandAbbreviation(f,b,c))?(f=e-f.length,c=e,a.getContent().charAt(e)==";"&&b.charAt(b.length-1)==";"&&c++,a.replaceContent(b,f,c),!0):!1});return o={addPrefix:j,supportsPrefix:g,prefixed:function(a,b){return g(a,b)?"-"+b+"-"+a:a},listPrefixes:function(){return d.map(r, -function(a){return a.prefix})},getPrefix:function(a){return r[a]},removePrefix:function(a){a in r&&delete r[a]},extractPrefixes:function(a){if(a.charAt(0)!="-")return{property:a,prefixes:null};for(var b=1,c=a.length,d,e=[];bbackground-color property with gradient first color as fallback for old browsers."); -e("expandAbbreviation").addHandler(function(a,b,c){c=e("editorUtils").outputInfo(a,b,c);if(!d.include(r,c.syntax))return!1;var f=a.getCaretPos(),g=c.content,c=m(g,f);if(c.property){var h=l(c.property);if(h){var i=c.rule.options.offset||0,o=i+c.rule.toString().length;if(/[\n\r]/.test(c.property.value())){var p=c.property.valueRange(!0).start+h.valueRange.end,g=e("utils").replaceSubstring(g,";",p),f=m(g,f);f.property&&(h=l(f.property),c=f)}c.property.end(";");var f=c.property.name(),g=e("resources"), -p=e("preferences"),q=g.findSnippet(b,f);!q&&p.get("css.fuzzySearch")&&(q=g.fuzzyFindSnippet(b,f,parseFloat(p.get("css.fuzzySearchMinScore"))));if(q){if(!d.isString(q))q=q.data;b=e("cssResolver").splitSnippet(q).name}else b=void 0;b&&c.property.name(b);j(c.property,h.gradient,h.valueRange);a.replaceContent(c.rule.toString(),i,o,!0);return!0}}return n(a,b)});e("reflectCSSValue").addHandler(function(a){var b=e("utils"),c=l(a);if(!c)return!1;var f=a.value(),j=function(a){return b.replaceSubstring(f,a, -c.valueRange)};d.each(a.parent.getAll(g(a.name())),function(b){if(b!==a){var d=b.value().match(/^\s*(\-([a-z]+)\-)?linear\-gradient/);d?b.value(j(p.toString(c.gradient,d[2]||""))):b.value().match(/\s*\-webkit\-gradient/)&&b.value(j(p.oldWebkitLinearGradient(c.gradient)))}});return!0});return p={parse:function(a){var b=null;e("utils").trim(a).replace(/^([\w\-]+)\((.+?)\)$/,function(a,c,f){c=c.toLowerCase().replace(/^\-[a-z]+\-/,"");if(c=="linear-gradient"||c=="lg"){for(var a=o[0],f=e("stringStream").create(e("utils").trim(f)), -c=[],j;j=f.next();)f.peek()==","?(c.push(f.current()),f.next(),f.eatSpace(),f.start=f.pos):j=="("&&f.skipTo(")");c.push(f.current());c=d.compact(d.map(c,h));if(c.length){if(q.test(c[0])||u.test(c[0]))a=c.shift();b={type:"linear",direction:a,colorStops:d.map(c,i)}}else b=null;return""}return a});return b},oldWebkitLinearGradient:function(c){d.isString(c)&&(c=this.parse(c));if(!c)return null;var f=d.map(c.colorStops,d.clone);d.each(f,function(a){if("position"in a)if(~a.position.indexOf(".")||a.unit== -"%")a.position=parseFloat(a.position)/(a.unit=="%"?100:1);else throw"Can't convert color stop '"+(a.position+(a.unit||""))+"'";});b(f);f=d.map(f,function(a,b){return!a.position&&!b?"from("+a.color+")":a.position==1&&b==f.length-1?"to("+a.color+")":"color-stop("+a.position.toFixed(2).replace(/\.?0+$/,"")+", "+a.color+")"});return"-webkit-gradient(linear, "+a(c.direction)+", "+f.join(", ")+")"},toString:function(a,b){if(a.type=="linear"){var c=(b?"-"+b+"-":"")+"linear-gradient",f=d.map(a.colorStops, -function(a){return a.color+("position"in a?" "+a.position+(a.unit||""):"")});a.direction&&(!s.get("css.gradient.omitDefaultDirection")||!d.include(o,a.direction))&&f.unshift(a.direction);return c+"("+f.join(", ")+")"}}}});emmet.exec(function(e,d){var h=e("handlerList").create(),i=e("resources");d.extend(i,{addGenerator:function(b,c,a){d.isString(b)&&(b=RegExp(b));h.add(function(a,d){var e;return(e=b.exec(a.name()))?c(e,a,d):null},a)}});i.addResolver(function(b,c){return h.exec(null,d.toArray(arguments))})}); -emmet.define("tagName",function(e,d){var h={empty:[],blockLevel:"address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6".split(","),inlineLevel:"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var".split(",")}, -i={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};return{resolve:function(b){b=(b||"").toLowerCase();return b in i?this.getMapping(b):this.isInlineLevel(b)?"span":"div"},getMapping:function(b){return i[b.toLowerCase()]},isInlineLevel:function(b){return this.isTypeOf(b,"inlineLevel")},isBlockLevel:function(b){return this.isTypeOf(b,"blockLevel")},isEmptyElement:function(b){return this.isTypeOf(b, -"empty")},isTypeOf:function(b,c){return d.include(h[c],b)},addMapping:function(b,c){i[b]=c},removeMapping:function(b){b in i&&delete i[b]},addElementToCollection:function(b,c){h[c]||(h[c]=[]);var a=this.getCollection(c);d.include(a,b)||a.push(b)},removeElementFromCollection:function(b,c){c in h&&(h[c]=d.without(this.getCollection(c),b))},getCollection:function(b){return h[b]}}}); -emmet.exec(function(e,d){function h(){return{element:g.get("bem.elementSeparator"),modifier:g.get("bem.modifierSeparator")}}function i(a){if(e("abbreviationUtils").isSnippet(a))return a;a.__bem={block:"",element:"",modifier:""};var f=b(a.attribute("class")).split(" "),g=/^[a-z]\-/i;a.__bem.block=d.find(f,function(a){return g.test(a)});if(!a.__bem.block)g=/^[a-z]/i,a.__bem.block=d.find(f,function(a){return g.test(a)})||"";(f=d.chain(f).map(function(b){var d;d=c(b,a,"element");d=c(d,a,"modifier");var f= -"",e="",g="",b=h();~d.indexOf(b.element)?(f=d.split(b.element),g=f[1].split(b.modifier),f=f[0],e=g.shift(),g=g.join(b.modifier)):~d.indexOf(b.modifier)&&(g=d.split(b.modifier),f=g.shift(),g=g.join(b.modifier));if(f||e||g){if(!f)f=a.__bem.block;d=f;var i=[];e&&(d+=b.element+e);i.push(d);g&&i.push(d+b.modifier+g);a.__bem.block=f;a.__bem.element=e;a.__bem.modifier=g;b=i}else b=d;return b}).flatten().uniq().value().join(" "))&&a.attribute("class",f);return a}function b(a){var b=e("utils"),a=(" "+(a|| -"")+" ").replace(/\s+/g," "),c=g.get("bem.shortElementPrefix");c&&(c=RegExp("\\s("+b.escapeForRegexp(c)+"+)","g"),a=a.replace(c,function(a,c){return" "+b.repeatString(h().element,c.length)}));return b.trim(a)}function c(a,b,c){var d=h(),f=RegExp("^("+d[c]+")+","g");if(f.test(a)){for(var e=0,f=a.replace(f,function(a){e=a.length/d[c].length;return""}),g=b;g.parent&&e--;)g=g.parent;if(!g||!g.__bem)g=b;if(g&&g.__bem)return a=g.__bem.block,c=="modifier"&&g.__bem.element&&(a+=d.element+g.__bem.element), -a+d[c]+f}return a}function a(b,c){b.name&&i(b,c);var g=e("abbreviationUtils");d.each(b.children,function(b){a(b,c);!g.isSnippet(b)&&b.start&&(f=!0)});return b}var g=e("preferences");g.define("bem.elementSeparator","__","Class name\u2019s element separator.");g.define("bem.modifierSeparator","_","Class name\u2019s modifier separator.");g.define("bem.shortElementPrefix","-","Symbol for describing short \u201cblock-element\u201d notation. Class names prefixed with this symbol will be treated as element name for parent\u2018s block name. Each symbol instance traverses one level up in parsed tree for block name lookup. Empty value will disable short notation."); -var f=!1;e("filters").add("bem",function(b,c){f=!1;b=a(b,c);f&&(b=e("filters").apply(b,"html",c));return b})}); -emmet.exec(function(e,d){function h(c,a,g){var f=e("utils"),j=b.get("filter.commentTrigger");if(j=="*"||d.find(j.split(","),function(a){return!!c.attribute(f.trim(a))}))j={node:c,name:c.name(),padding:c.parent?c.parent.padding:"",attr:function(a,b,d){return(a=c.attribute(a))?(b||"")+a+(d||""):""}},a=f.normalizeNewline(a?a(j):""),g=f.normalizeNewline(g?g(j):""),c.start=c.start.replace(//,">"+g)}function i(b,a,g){var f=e("abbreviationUtils");d.each(b.children,function(b){f.isBlock(b)&& -h(b,a,g);i(b,a,g)});return b}var b=e("preferences");b.define("filter.commentAfter",'\n<\!-- /<%= attr("id", "#") %><%= attr("class", ".") %> --\>',"A definition of comment that should be placed after matched element when comment filter is applied. This definition is an ERB-style template passed to _.template() function (see Underscore.js docs for details). In template context, the following properties and functions are availabe:\n
  • attr(name, before, after) \u2013 a function that outputsspecified attribute value concatenated with before and after strings. If attribute doesn't exists, the empty string will be returned.
  • node \u2013 current node (instance of AbbreviationNode)
  • name \u2013 name of current tag
  • padding \u2013 current string padding, can be used for formatting
"); -b.define("filter.commentBefore","","A definition of comment that should be placed before matched element when comment filter is applied. For more info, read description of filter.commentAfter property");b.define("filter.commentTrigger","id, class","A comma-separated list of attribute names that should exist in abbreviatoin where comment should be added. If you wish to add comment for every element, set this option to *");e("filters").add("c",function(c){var a= -d.template(b.get("filter.commentBefore")),e=d.template(b.get("filter.commentAfter"));return i(c,a,e)})});emmet.exec(function(e,d){function h(b){return b.replace(/([<>&])/g,function(b,a){return i[a]})}var i={"<":"<",">":">","&":"&"};e("filters").add("e",function c(a){d.each(a.children,function(a){a.start=h(a.start);a.end=h(a.end);a.content=h(a.content);c(a)});return a})}); -emmet.exec(function(e,d){function h(a){return a.parent&&!a.parent.parent&&!a.index()}function i(a,c){var d=e("abbreviationUtils");return c.tag_nl===!0||d.isBlock(a)?!0:!a.parent||!c.inline_break?!1:b(a.parent,c)}function b(a,b){var c=0,h=e("abbreviationUtils");return!!d.find(a.children,function(a){a.isTextNode()||!h.isInline(a)?c=0:h.isInline(a)&&c++;if(c>=b.inline_break)return!0})}function c(a,c){var h=e("abbreviationUtils");return!d.any(a.children,function(a){return h.isSnippet(a)?!1:!h.isInline(a)})? -b(a,c):!0}var a=e("preferences");a.define("format.noIndentTags","html","A comma-separated list of tag names that should not get inner indentation.");a.define("format.forceIndentationForTags","body","A comma-separated list of tag names that should always get inner indentation.");e("filters").add("_format",function f(b,l,n){var n=n||0,m=e("abbreviationUtils");d.each(b.children,function(b){if(m.isSnippet(b)){if(b.start=b.end="",!h(b)&&l.tag_nl!==!1&&i(b,l)&&(!b.parent.parent||!e("abbreviationUtils").isInline(b.parent)))b.start= -e("utils").getNewline()+b.start}else{b.start=b.end="%s";var j=e("utils"),r=e("abbreviationUtils"),q=r.isUnary(b),j=j.getNewline(),u=d.include(a.getArray("format.noIndentTags")||[],b.name())?"":e("resources").getVariable("indentation");if(l.tag_nl!==!1){var s=l.tag_nl===!0&&(l.tag_nl_leaf||b.children.length);s||(s=d.include(a.getArray("format.forceIndentationForTags")||[],b.name()));if(!b.isTextNode()){if(i(b,l)){if(!h(b)&&(!r.isSnippet(b.parent)||b.index()))b.start=j+b.start;if(r.hasBlockChildren(b)|| -b.children.length&&i(b.children[0],l)||s&&!q)b.end=j+b.end;if(r.hasTagsInContent(b)||s&&!b.children.length&&!q)b.start+=j+u}else if(r.isInline(b)&&b.parent&&e("abbreviationUtils").hasBlockChildren(b.parent)&&!h(b))b.start=j+b.start;else if(r.isInline(b)&&c(b,l))b.end=j+b.end;b.padding=u}}}f(b,l,n+1)});return b})}); -emmet.exec(function(e,d){function h(h,b){var c="",a=[],g=b.attributeQuote(),f=b.cursor();d.each(h.attributeList(),function(d){var h=b.attributeName(d.name);switch(h.toLowerCase()){case "id":c+="#"+(d.value||f);break;case "class":c+="."+e("utils").trim(d.value||f).replace(/\s+/g,".");break;default:a.push(":"+h+" => "+g+(d.value||f)+g)}});a.length&&(c+="{"+a.join(", ")+"}");return c}e("filters").add("haml",function b(c,a,g){var g=g||0,f=e("abbreviationUtils");g||(c=e("filters").apply(c,"_format",a)); -d.each(c.children,function(c){if(!f.isSnippet(c)&&c.parent){var d=e("abbreviationUtils"),n=e("utils"),m=h(c,a),o=a.cursor(),d=d.isUnary(c),p=a.self_closing_tag&&d?"/":"",r="",r="%"+a.tagName(c.name());r.toLowerCase()=="%div"&&m&&m.indexOf("{")==-1&&(r="");c.end="";c.start=n.replaceSubstring(c.start,r+m+p+" ",c.start.indexOf("%s"),"%s");!c.children.length&&!d&&(c.start+=o)}b(c,a,g+1)});return c})}); -emmet.exec(function(e,d){function h(e,b){var c=b.attributeQuote(),a=b.cursor();return d.map(e.attributeList(),function(d){return" "+b.attributeName(d.name)+"="+c+(d.value||a)+c}).join("")}e("filters").add("html",function b(c,a,g){var g=g||0,f=e("abbreviationUtils");g||(c=e("filters").apply(c,"_format",a));d.each(c.children,function(c){if(!f.isSnippet(c)&&c.parent){var d=e("abbreviationUtils"),n=e("utils"),m=h(c,a),o=a.cursor(),d=d.isUnary(c),p="",r="";if(!c.isTextNode()){var q=a.tagName(c.name()); -d?(p="<"+q+m+a.selfClosing()+">",c.end=""):(p="<"+q+m+">",r="")}c.start=n.replaceSubstring(c.start,p,c.start.indexOf("%s"),"%s");c.end=n.replaceSubstring(c.end,r,c.end.indexOf("%s"),"%s");!c.children.length&&!d&&!~c.content.indexOf(o)&&!e("tabStops").extract(c.content).tabstops.length&&(c.start+=o)}b(c,a,g+1)});return c})}); -emmet.exec(function(e,d){var h=/^\s+/,i=/[\n\r]/g;e("filters").add("s",function c(a){var g=e("abbreviationUtils");d.each(a.children,function(a){if(!g.isSnippet(a))a.start=a.start.replace(h,""),a.end=a.end.replace(h,"");a.start=a.start.replace(i,"");a.end=a.end.replace(i,"");a.content=a.content.replace(i,"");c(a)});return a})}); -emmet.exec(function(e,d){function h(e,b){d.each(e.children,function(c){if(c.content)c.content=c.content.replace(b,"");h(c,b)});return e}e("preferences").define("filter.trimRegexp","[\\s|\\u00a0]*[\\d|#|\\-|*|\\u2022]+\\.?\\s*","Regular expression used to remove list markers (numbers, dashes, bullets, etc.) in t (trim) filter. The trim filter is useful for wrapping with abbreviation lists, pased from other documents (for example, Word documents).");e("filters").add("t",function(d){var b= -RegExp(e("preferences").get("filter.trimRegexp"));return h(d,b)})});emmet.exec(function(e,d){var h={"xsl:variable":1,"xsl:with-param":1};e("filters").add("xsl",function b(c){var a=e("abbreviationUtils");d.each(c.children,function(c){if(!a.isSnippet(c)&&(c.name()||"").toLowerCase()in h&&c.children.length)c.start=c.start.replace(/\s+select\s*=\s*(['"]).*?\1/,"");b(c)});return c})}); -emmet.define("lorem",function(e,d){function h(a,b){return Math.round(Math.random()*(b-a)+a)}function i(a,b){for(var c=a.length,e=Math.min(c,b),g=[];g.length3&&b<=6?h(0,1):b>6&&b<=12?h(0,2):h(1,4);d.each(d.range(c), -function(b){b5&&(g[4]+=","),l+=g.length,j.push(b(g,".")));for(;l","!!!4t":'',"!!!4s":'',"!!!xt":'',"!!!xs":'',"!!!xxs":'', -c:"<\!-- |${child} --\>","cc:ie6":"<\!--[if lte IE 6]>\n\t${child}|\n","cc:ie":"<\!--[if IE]>\n\t${child}|\n","cc:noie":"<\!--[if !IE]><\!--\>\n\t${child}|\n<\!--"},abbreviations:{"!":"html:5",a:'',"a:link":'',"a:mail":'',abbr:'',acronym:'',base:'',basefont:"",br:"
",frame:"",hr:"
",bdo:'',"bdo:r":'',"bdo:l":'', -col:"",link:'',"link:css":'',"link:print":'',"link:favicon":'',"link:touch":'',"link:rss":'',"link:atom":'', -meta:"","meta:utf":'',"meta:win":'',"meta:vp":'',"meta:compat":'',style:"" + "" + d("htmlInput").value - if (source == "run" || autoRunCheck == "on") { - localStorage.setItem("writtenCodeHTML", d("htmlInput").value) - localStorage.setItem("writtenCodeCSS", d("cssInput").value) - localStorage.setItem("writtenCodeJS", d("jsInput").value) - d("htmlOutput").setAttribute('srcdoc', code) - } -} - -emmet.require('textarea').setup({ -use_tab: true // expand abbreviations by Tab key -}); +var d = document.getElementById.bind(document); +var g = document.querySelector.bind(document); +var autoRunCheck = localStorage.getItem("autoRun") +var setCodeHTML = localStorage.getItem("writtenCodeHTML") +var setCodeCSS = localStorage.getItem("writtenCodeCSS") +var setCodeJS = localStorage.getItem("writtenCodeJS") + +d("htmlInput").value = setCodeHTML +d("cssInput").value = setCodeCSS +d("jsInput").value = setCodeJS +updateCode() +showCode("html") + +if (autoRunCheck == "on") { + d("autoRun").style = "background-color: green" +} +else { + d("autoRun").style = "background-color: tomato" +} + +function autoRun() { + var autoRunCheck = localStorage.getItem("autoRun") + if (autoRunCheck == "on") { + localStorage.setItem("autoRun", "off") + d("autoRun").style = "background-color: tomato" + } + else { + localStorage.setItem("autoRun", "on") + d("autoRun").style = "background-color: green" + } +} + +function showCode(lang) { + $(".langButton").css("background-color", "#3b3c45") + $(".langButton").css("border", "none") + $(".langInput").css("display", "none") + if (lang == "html") { + d("htmlButton").style = "background-color: #27282e;border-bottom: white 2px solid;" + d("htmlInput").style = "display: block" + } + else if (lang == "css") { + d("cssButton").style = "background-color: #27282e;border-bottom: white 2px solid;" + d("cssInput").style = "display: block" + } + else { + d("jsButton").style = "background-color: #27282e;border-bottom: white 2px solid;" + d("jsInput").style = "display: block" + } +} + +function updateCode(source) { + var autoRunCheck = localStorage.getItem("autoRun") + var code = "" + "" + d("htmlInput").value + if (source == "run" || autoRunCheck == "on") { + localStorage.setItem("writtenCodeHTML", d("htmlInput").value) + localStorage.setItem("writtenCodeCSS", d("cssInput").value) + localStorage.setItem("writtenCodeJS", d("jsInput").value) + d("htmlOutput").setAttribute('srcdoc', code) + } +} + +emmet.require('textarea').setup({ +use_tab: true // expand abbreviations by Tab key +}); diff --git a/resources/js/canvasLib.js b/resources/js/canvasLib.js index 75ab488..6e83294 100644 --- a/resources/js/canvasLib.js +++ b/resources/js/canvasLib.js @@ -1,58 +1,58 @@ -var d = document.querySelector.bind(document) - -function random(e, t) { - return t++, Math.floor(Math.random() * (t - e)) + e -} -function arc(x, y, w, col, stroke) { - c.beginPath(); - c.arc(x, y, w, 0, Math.PI * 2, false); - c.fillStyle = col; - c.strokeStyle = col; - if (!stroke) { - c.fill(); - } else { - c.stroke() - } - c.closePath(); -} - -function stroke(x, y, x2, y2, w, col) { - c.beginPath(); - c.moveTo(x, y); - c.lineTo(x2, y2); - c.lineWidth = w; - c.strokeStyle = col; - c.stroke(); -} - -function rect(x, y, w, h, col, fill) { - c.beginPath(); - c.rect(x, y, w, h); - if (!fill) { - c.fillStyle = col; - c.fill() - } else { - c.strokeStyle = col - c.stroke() - } -} -function rotate(deg) { - c.rotate(deg*Math.PI/180) -} -function clear() { - c.clearRect(0, 0, can.width, can.height) -} -function image(img,x,y,w,h) { - c.drawImage(img,x,y,w,h) -} -function newImage(url) { - var img = new Image() - img.src = url + ".png" - return img -} -function zero(hms) { - if (hms < 10) { - return '0' + hms; - } - return hms; - } +var d = document.querySelector.bind(document) + +function random(e, t) { + return t++, Math.floor(Math.random() * (t - e)) + e +} +function arc(x, y, w, col, stroke) { + c.beginPath(); + c.arc(x, y, w, 0, Math.PI * 2, false); + c.fillStyle = col; + c.strokeStyle = col; + if (!stroke) { + c.fill(); + } else { + c.stroke() + } + c.closePath(); +} + +function stroke(x, y, x2, y2, w, col) { + c.beginPath(); + c.moveTo(x, y); + c.lineTo(x2, y2); + c.lineWidth = w; + c.strokeStyle = col; + c.stroke(); +} + +function rect(x, y, w, h, col, fill) { + c.beginPath(); + c.rect(x, y, w, h); + if (!fill) { + c.fillStyle = col; + c.fill() + } else { + c.strokeStyle = col + c.stroke() + } +} +function rotate(deg) { + c.rotate(deg*Math.PI/180) +} +function clear() { + c.clearRect(0, 0, can.width, can.height) +} +function image(img,x,y,w,h) { + c.drawImage(img,x,y,w,h) +} +function newImage(url) { + var img = new Image() + img.src = url + ".png" + return img +} +function zero(hms) { + if (hms < 10) { + return '0' + hms; + } + return hms; + } diff --git a/resources/js/insertNavbar.js b/resources/js/insertNavbar.js index bc79297..a3dda7e 100644 --- a/resources/js/insertNavbar.js +++ b/resources/js/insertNavbar.js @@ -1,94 +1,94 @@ -var c = document.createElement.bind(document); -var d = document.getElementById.bind(document); -var g = document.querySelector.bind(document); - -// Insert nav tag -var navigation = c("nav") - navigation.className = "navigation" -var navbarList = c("ul") - navbarList.className = "navbarList" - navigation.appendChild(navbarList) - document.body.appendChild(navigation) - - -// // Opacity -// var opacity = c("div") -// opacity.className = "opacityMenu lowerIndex menu" -// document.body.appendChild(opacity) - -// Hamburger Menu -var hamburger = c("i") -hamburger.className = "fas fa-bars fa-2x" -navigation.prepend(hamburger) - -// Search -var search = c("input") -search.className = "searchBar" -search.placeholder = "Enter a searchterm or url" -search.type = "text" -navigation.appendChild(search) - -g(".searchBar").addEventListener("keyup",searchEnter) -function searchEnter(key) { - if(key.key == "Enter") { - var search = g(".searchBar").value; - var containsDot = search.indexOf("."); - if (search !== "") { - if (containsDot > -1) { - open("http://" + search); - } - else { - open("https://www.google.com/search?q=" + search); - } - } - } - if (key.key == "Escape") { - closeSearch() - } -} - -// Create Navbar -Navbar.forEach(i=>{ - var navList = c("li") - navList.className = "navList" - var navLink = c("a"); - navList.appendChild(navLink); - if (i.link) { - navLink.href = i.link - } - if (i.name) { - navLink.innerHTML = i.name - } - if (i.desc) { - navLink.title = i.desc - } - if (i.icon) { - var navImg = c("img") - navImg.src = i.icon - navImg.className = "navImg" - navImg.alt = "img" - navLink.appendChild(navImg) - } - var dropdownList = c("ul") - dropdownList.className = "dropdownList" - dropdownList.style = "display: none;" - if (typeof i.dropdown == "object") { - i.dropdown.forEach(d=>{ - if (d.link) { - var dropdownListItem = c("li"); - dropdownListItem.className = "dropdownLi" - var dropdownLink = c("a"); - dropdownLink.href = d.link - dropdownLink.innerHTML = d.name - if (d.desc) { - dropdownLink.title = d.desc - } - dropdownListItem.appendChild(dropdownLink); - dropdownList.appendChild(dropdownListItem); - } - navList.appendChild(dropdownList) - }) - navLink.innerHTML = navLink.innerHTML + "" - } - navbarList.appendChild(navList); -}) +var c = document.createElement.bind(document); +var d = document.getElementById.bind(document); +var g = document.querySelector.bind(document); + +// Insert nav tag +var navigation = c("nav") + navigation.className = "navigation" +var navbarList = c("ul") + navbarList.className = "navbarList" + navigation.appendChild(navbarList) + document.body.appendChild(navigation) + + +// // Opacity +// var opacity = c("div") +// opacity.className = "opacityMenu lowerIndex menu" +// document.body.appendChild(opacity) + +// Hamburger Menu +var hamburger = c("i") +hamburger.className = "fas fa-bars fa-2x" +navigation.prepend(hamburger) + +// Search +var search = c("input") +search.className = "searchBar" +search.placeholder = "Enter a searchterm or url" +search.type = "text" +navigation.appendChild(search) + +g(".searchBar").addEventListener("keyup",searchEnter) +function searchEnter(key) { + if(key.key == "Enter") { + var search = g(".searchBar").value; + var containsDot = search.indexOf("."); + if (search !== "") { + if (containsDot > -1) { + open("http://" + search); + } + else { + open("https://www.google.com/search?q=" + search); + } + } + } + if (key.key == "Escape") { + closeSearch() + } +} + +// Create Navbar +Navbar.forEach(i=>{ + var navList = c("li") + navList.className = "navList" + var navLink = c("a"); + navList.appendChild(navLink); + if (i.link) { + navLink.href = i.link + } + if (i.name) { + navLink.innerHTML = i.name + } + if (i.desc) { + navLink.title = i.desc + } + if (i.icon) { + var navImg = c("img") + navImg.src = i.icon + navImg.className = "navImg" + navImg.alt = "img" + navLink.appendChild(navImg) + } + var dropdownList = c("ul") + dropdownList.className = "dropdownList" + dropdownList.style = "display: none;" + if (typeof i.dropdown == "object") { + i.dropdown.forEach(d=>{ + if (d.link) { + var dropdownListItem = c("li"); + dropdownListItem.className = "dropdownLi" + var dropdownLink = c("a"); + dropdownLink.href = d.link + dropdownLink.innerHTML = d.name + if (d.desc) { + dropdownLink.title = d.desc + } + dropdownListItem.appendChild(dropdownLink); + dropdownList.appendChild(dropdownListItem); + } + navList.appendChild(dropdownList) + }) + navLink.innerHTML = navLink.innerHTML + "" + } + navbarList.appendChild(navList); +}) diff --git a/resources/js/javall.js b/resources/js/javall.js index ddf25c5..6c83529 100644 --- a/resources/js/javall.js +++ b/resources/js/javall.js @@ -1,7 +1,7 @@ -// Console mark -console.log('%cDoor Guus van Meerveld', "color:#9c9c9c; font-size:30px;"); - -// Head tag -var shortcon = $("", {rel :'shortcut icon',href:'/resources/img/favicon.ico'}) - -$('head').append(shortcon) +// Console mark +console.log('%cDoor Guus van Meerveld', "color:#9c9c9c; font-size:30px;"); + +// Head tag +var shortcon = $("", {rel :'shortcut icon',href:'/resources/img/favicon.ico'}) + +$('head').append(shortcon) diff --git a/resources/js/navbar.json.js b/resources/js/navbar.json.js index 0b730e1..d62d02e 100644 --- a/resources/js/navbar.json.js +++ b/resources/js/navbar.json.js @@ -1,33 +1,33 @@ -Navbar = [ - { - icon: "/resources/img/favicon.ico", - desc: "Go to the homepage", - link: "/" - }, - { - name: "Contact", - desc: "Contact me", - link: "/contact" - }, - { - name: "Feedback", - desc: "Feedback for this website", - link: "/feedback" - }, - { - name: "Tools", - desc: "Tools for programming", - dropdown: [ - { - name: "Playground", - desc: "Test your HTML live!", - link: "/playground" - }, - { - name: "Minifier", - desc: "Minify your HTML/CSS/JavaScript", - link: "/minify" - } - ] - } -] +Navbar = [ + { + icon: "/resources/img/favicon.ico", + desc: "Go to the homepage", + link: "/" + }, + { + name: "Contact", + desc: "Contact me", + link: "/contact" + }, + { + name: "Feedback", + desc: "Feedback for this website", + link: "/feedback" + }, + { + name: "Tools", + desc: "Tools for programming", + dropdown: [ + { + name: "Playground", + desc: "Test your HTML live!", + link: "/playground" + }, + { + name: "Minifier", + desc: "Minify your HTML/CSS/JavaScript", + link: "/minify" + } + ] + } +]