From 682b42ac668ca74ca5d0966662b8318caf5a50ab Mon Sep 17 00:00:00 2001 From: Maxim Date: Wed, 10 May 2017 21:39:31 +0300 Subject: [PATCH] #28 Fix example for media queries prefixes --- dist/bundle.js | 2 +- src/js/options.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 0497646..23f7758 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,4 +1,4 @@ -!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=18)}([function(e,t,r){(function(t){function r(e,t){var r=e[1]||"",i=e[3];if(!i)return r;if(t){var o=n(i),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+new t(JSON.stringify(e)).toString("base64")+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i=0&&w.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),o(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),o(e,t),t}function c(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function u(e,t){var r,n,i;if(t.singleton){var o=y++;r=b||(b=s(t)),n=f.bind(null,r,o,!1),i=f.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(t),n=d.bind(null,r,t),i=function(){a(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(t),n=h.bind(null,r),i=function(){a(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}function f(e,t,r,n){var i=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function d(e,t,r){var n=r.css,i=r.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(n=k(n)),i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var p={},g=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},m=g(function(){return window&&document&&document.all&&!window.atob}),v=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e.call(this,r)),t[r]}}(function(e){return document.querySelector(e)}),b=null,y=0,w=[],k=r(16);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},void 0===t.singleton&&(t.singleton=m()),void 0===t.insertInto&&(t.insertInto="head"),void 0===t.insertAt&&(t.insertAt="bottom");var r=i(e);return n(r,t),function(e){for(var o=[],a=0;a color: tomato;\n .b {\n color: salmon;\n }\n}\n",value:2},{hint:"Use 4 spaces",code:".a {\n color: tomato;\n .b {\n color: salmon;\n }\n}\n",value:4},{hint:"Use tabs",code:".a {\n color: tomato;\n .b {\n color: salmon;\n }\n}\n",value:"tab"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"string-quotes",variants:[{hint:"Use single quotes",code:"a {\n content: 'x'; \n}",value:"single"},{hint:"Use double quotes",code:'a {\n content: "x"; \n}',value:"double"},{hint:"Skip (allow any type of quotes)",dismiss:!0}]},{key:"no-duplicate-selectors",variants:[{hint:"Disallow duplicate selectors within a stylesheet",code:".foo {}\n.bar {}\n",value:!0},{hint:"Allow duplicate selectors",dismiss:!0,code:".foo {}\n.bar {}\n.foo {}"}]},{key:"color-hex-case",variants:[{hint:"Use lowercase in colors",code:"a {\n color: #fff;\n}",value:"lower"},{hint:"Use uppercase in colors",code:"a {\n color: #FFF;\n}",value:"upper"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"color-hex-length",variants:[{hint:"Expand hexadecimal colors",code:"a {\n color: #ffffff;\n}",value:"long"},{hint:"Use shorthands for hexadecimal colors",code:"a {\n color: #fff;\n}",value:"short"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"color-named",variants:[{hint:"Use color names always where possible",code:"a {\n color: white;\n}",value:"always-where-possible"},{hint:"Never use color names",code:"a {\n color: #fff;\n}",value:"never"},{hint:"Skip (use code or name)",code:"a {\n color: #fff;\n background: gray\n}",dismiss:!0}]},{key:"color-no-hex",variants:[{hint:"Allow hex colors",dismiss:!0,code:"a {\n color: #fff;\n}"},{hint:"Disallow hex colors",code:"a {\n color: black;\n color: rgb(0,0,0);\n}",value:!0}]},{key:"selector-no-qualifying-type",variants:[{hint:"Disallow qualifying a selector by type",code:".foo {\n margin: 0\n}",value:!0},{hint:"Allow qualifying a selector by type)",dismiss:!0,code:"a.foo {\n margin: 0\n}"}]},{key:"selector-no-id",variants:[{hint:"Disallow id selectors",code:".foo {}",value:!0},{hint:"Allow id selector",dismiss:!0,code:"#foo {}"}]},{key:"selector-no-combinator",variants:[{hint:"Disallow combinators in selectors",code:".foo {}",value:!0},{hint:"Allow combinators",dismiss:!0,code:" a > b + c ~ d e { color: pink; }\n/** ↑ ↑ ↑ ↑\n * These are combinators */"}]},{key:"selector-no-attribute",variants:[{hint:"Disallow attribute selectors",code:".foo {}",value:!0},{hint:"Allow attribute selectors",dismiss:!0,code:"[foo] {}"}]},{key:"selector-combinator-space-after",variants:[{hint:"Require a single space after the combinators of selectors",code:"a + b { color: pink; }",value:"always"},{hint:"Disallow whitespace after the combinators of selectors",code:"a +b { color: pink; }",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-attribute-quotes",variants:[{hint:"Require quotes for attribute values",code:'[target="_blank"] {}',value:"always"},{hint:"Disallow quotes for attribute values",code:"[target=_blank] {}",value:"never"},{hint:"Skip (allow any type of syntax)",code:'[target=_blank] {}\n\n[title="flower"] {}',dismiss:!0}]},{key:"selector-attribute-operator-space-before",variants:[{hint:"Require a single space before operators within attribute selectors",code:'[target = "_blank"] {}',value:"always"},{hint:"Disallow whitespace before operators within attribute selectors",code:'[target= "_blank"] {}',value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-attribute-operator-space-after",variants:[{hint:"Require a single space after operators within attribute selectors",code:'[target = "_blank"] {}',value:"always"},{hint:"Disallow whitespace after operators within attribute selectors",code:'[target ="_blank"] {}',value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-attribute-brackets-space-inside",variants:[{hint:"Require a single space on the inside of the brackets within attribute selectors",code:"[ target=_blank ] {}",value:"always"},{hint:"Disallow whitespace on the inside of the brackets within attribute selectors",code:"[target=_blank] {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"declaration-block-trailing-semicolon",variants:[{hint:"Require trailing semicolon within declaration blocks",code:"a { color: pink; }\na { background: orange; color: pink; }",value:"always"},{hint:"Disallow trailing semicolon within declaration blocks",code:"a { color: pink }\na { background: orange; color: pink }",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"declaration-no-important",variants:[{hint:"Disallow !important within declarations",code:"a {\n color: pink; \n}",value:!0},{hint:"Allow important",dismiss:!0,code:"a {\n color: pink !important; \n}"}]},{key:"declaration-colon-space-before",variants:[{hint:"Require a single space before the colon of declarations",code:"a {\n color : pink; \n}",value:"always"},{hint:"Disallow whitespace before the colon of declarations",code:"a {\n color: pink; \n}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"declaration-colon-space-after",variants:[{hint:"Require a single space after the colon of declarations",code:"a { color: pink }",value:"always"},{hint:"Disallow whitespace after the colon of declarations",code:"a { color:pink }",value:"never"},{hint:"Require only in single lines",code:"a {\n color: pink;\n box-shadow:0 0 0 1px #5b9dd9, \n 0 0 2px 1px rgba(30, 140, 190, 0.8); \n}",value:"always-single-line"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"property-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for properties",code:"a { \n transform: scale(1); \n}",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"a { \n -webkit-transform: scale(1); \n}"}]},{key:"value-no-vendor-prefix",hint:"",variants:[{code:"a {\n display: flex; \n}",hint:"Disallow vendor prefixes for values",value:!0},{hint:"Allow prefixes",code:"a {\n display: -webkit-flex; \n}",dismiss:!0}]},{key:"number-leading-zero",variants:[{hint:"Require leading zero for fractional numbers",code:"a {\n line-height: 0.5; \n}",value:"always"},{hint:"Disallow leading zero for fractional numbers",code:"a {\n line-height: .5; \n}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"function-url-quotes",variants:[{hint:"Use url quotes",code:'a {\n background: url("x.jpg"); \n}',value:"always"},{hint:"Don' use url quotes",code:"a {\n background: url(x.jpg); \n}",value:"never"},{hint:"Skip (allow any syntax)",code:'p {\n background: url("x.jpg"); \n}\n\na {\n background: url(x.jpg); \n}',dismiss:!0}]},{key:"function-url-data-uris",variants:[{hint:"Require data URIs for urls",code:'a {\n background-image:\n url("data:image/gif;base64,R0lGODlh="); \n}',value:"always"},{hint:"Disallow data URIs for urls",code:"a {\n background-image: url(image.gif); \n}",value:"never"},{hint:"Skip (allow any type of urls)",code:'a {\n background-image:\n url("data:image/gif;base64,R0lGODlh="); \n}\n\na {\n background-image: url(image.gif); \n}',dismiss:!0}]},{key:"font-weight-notation",variants:[{hint:"Numeric font weight notation",code:"a {\n font-weight: 700; \n}",value:"numeric"},{hint:"Named font weight notation",code:"a {\n font-weight: bold; \n}",value:"named-where-possible"},{hint:"Skip(allow any type of notation)",code:"a {\n font-weight: 700; \n}\n\nspan {\n font-weight: normal; \n}",dismiss:!0}]},{key:"font-family-name-quotes",variants:[{hint:"Use font family name quotes always where required",value:"always-where-required",code:'a {\n font-family: Times New Roman,\n Times, serif; \n}\na {\n font-family: "Hawaii 5-0"; \n}'},{hint:"Use font family name quotes always where recommended",value:"always-where-recommended",code:'a {\n font-family: "Times New Roman",\n Times, serif;\n}\na {\n font-family: Arial, sans-serif;\n}'},{hint:"Use font family name quotes always unless keyword",value:"always-unless-keyword",code:'a {\n font-family: "Arial", sans-serif;\n}'},{hint:"Skip (allow any type of syntax)",dismiss:!0}]},{key:"comment-whitespace-inside",variants:[{hint:"Require whitespace on the inside of comment markers",code:"/* comment */",value:"always"},{hint:"Disallow whitespace on the inside of comment markers",code:"/*comment*/",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"comment-empty-line-before",variants:[{hint:"Require an empty line before comments",code:"a {}\n\n/* comment */",value:"always"},{hint:"Disallow an empty line before comments",code:"a {}\n/* comment */",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"at-rule-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for at-rules",code:"@keyframes { 0% { top: 0; } }",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"@-webkit-keyframes { 0% { top: 0; } }"}]},{key:"rule-empty-line-before",variants:[{hint:"Require an empty line before rules",code:"a {}\n\nb {}",value:"always"},{hint:"Disallow an empty line before rules",code:"a {}\nb {}",value:"never"},{hint:"Require in multi-line",code:"a {\n color: red;\n}\n\nb {\n color: blue;\n}",value:"always-multi-line"},{hint:"Disallow in multi-line",code:"a {\n color: red;\n}\nb {\n color: blue;\n}",value:"never-multi-line"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-pseudo-element-colon-notation",variants:[{hint:"Specify single colon notation for applicable pseudo-elements",code:"a:before { color: pink; }",value:"single"},{hint:"Specify double colon notation for applicable pseudo-elements",code:"a::before { color: pink; }",value:"double"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-pseudo-class-parentheses-space-inside",variants:[{hint:"Require a single space inside of the parentheses within pseudo-class selectors",code:'input:not( [type="submit"] ) {}',value:"always"},{hint:"Disallow whitespace on the inside of the parentheses within pseudo-class selectors",code:'input:not([type="submit"]) {}',value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for selectors",code:"input::placeholder {}",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"input::-moz-placeholder {}"}]},{key:"selector-no-universal",variants:[{hint:"Disallow the universal selector",code:".foo {}",value:!0},{hint:"Allow universal selector",dismiss:!0,code:"* {}"}]},{key:"selector-no-type",variants:[{hint:"Disallow type selectors",code:".foo {}",value:!0},{hint:"Allow type selectors",dismiss:!0,code:"a {}"}]},{key:"media-feature-range-operator-space-before",variants:[{hint:"Require a single space before the range operator in media features",code:"@media (max-width >=600px) {}",value:"always"},{hint:"Disallow whitespace before the range operator in media features",code:"@media (max-width>=600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-range-operator-space-after",variants:[{hint:"Require a single space after the range operator in media features",code:"@media (max-width>= 600px) {}",value:"always"},{hint:"Disallow whitespace after the range operator in media features",code:"@media (max-width>=600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-parentheses-space-inside",variants:[{hint:"Require a single space on the inside of the parentheses within media features",code:"@media ( max-width: 300px ) {}",value:"always"},{hint:"Disallow whitespace on the inside of the parentheses within media features",code:"@media (max-width: 300px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-name-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for media feature names",code:"@media (min-device-pixel-ratio: 1) {}",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"@media (-webkit-min-device-pixel-ratio: 1) {}",value:!1}]},{key:"media-feature-colon-space-before",variants:[{hint:"Require a single space before the colon in media features",code:"@media (max-width :600px) {}",value:"always"},{hint:"Disallow whitespace before the colon in media features",code:"@media (max-width:600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-colon-space-after",variants:[{hint:"Require a single space after the colon in media features",code:"@media (max-width: 600px) {}",value:"always"},{hint:"Disallow whitespace after the colon in media features",code:"@media (max-width:600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]}]}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=r(7),s=r(6);r.n(s);r.d(t,"a",function(){return u});var l=function(){function e(e,t){for(var r=0;r .config").textContent=JSON.stringify(this.config,null,4)}},{key:"nextStep",value:function(){this.viewConfig(),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"nextStep",this).call(this)}},{key:"createCodeNode",value:function(e){var t=document.createElement("pre"),r=document.createElement("code");return t.className=e.className,r.innerHTML=e.code||"",t.appendChild(r),t}},{key:"getVariantNode",value:function(e,t){var r=this.createNode(this.classes.variants.item),n=this.createNode(this.classes.variants.hint),i=this.createCodeNode({className:this.classes.variants.code,code:e.code});return n.innerHTML=e.hint||"",r.dataset.inx=t,r.appendChild(n),r.addEventListener("click",this.variantClickHandler.bind(this)),void 0!==e.code&&(r.appendChild(i),this.highlightCode(i)),r}},{key:"getProgressNode",value:function(){var e=this.createNode(this.classes.common.progress);return e.innerHTML="Option "+(this.stepInx+1)+" of "+this.steps.length,e}},{key:"variantClickHandler",value:function(e){var t=this.getStep(),r=e.currentTarget.dataset.inx,n=t.variants[r],i=n.value;if(n.dismiss===!0)return void this.nextStep();t.key&&this.setVal(t.key,i),t.callback&&(this.config=t.callback(this.config,i)),this.nextStep()}},{key:"getResult",value:function(){document.querySelector(".generator").remove()}},{key:"setVal",value:function(e,t){for(var r=e.split("."),n=this.config;r.length>1;){var i=r.shift();if(Object.prototype.hasOwnProperty.call(n,i)||(n[i]={}),!this.constructor.isObject(n[i]))throw new Error("Part of path "+e+" is not an object");n=n[i]}n.rules[r.shift()]=t}},{key:"highlightCode",value:function(e){hljs.highlightBlock(e)}}]),t}(a.a)},function(e,t,r){var n=r(11);"string"==typeof n&&(n=[[e.i,n,""]]);r(1)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){var n=r(12);"string"==typeof n&&(n=[[e.i,n,""]]);r(1)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){r(15)(r(14))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",function(){return o});var i=function(){function e(e,t){for(var r=0;r=this.steps.length)return this.renderResult();this.renderStep()}},{key:"renderStep",value:function(){this.render(this.getStepNode())}},{key:"renderResult",value:function(){this.render(this.getResultNode())}},{key:"render",value:function(e){this.clearRoot(),this.root.appendChild(e)}},{key:"createNode",value:function(e){var t=document.createElement("div");return t.className=e,t}},{key:"clearRoot",value:function(){for(;this.root.firstChild;)this.root.removeChild(this.root.firstChild)}},{key:"setVal",value:function(e,t){for(var r=e.split("."),n=this.config;r.length>1;){var i=r.shift();if(n.hasOwnProperty(i)||(n[i]={}),!this.constructor.isObject(n[i]))throw new Error("Part of path "+e+" is not an object");n=n[i]}n[r.shift()]=t}},{key:"getStepNode",value:function(){var e=this,t=document.createDocumentFragment(),r=this.createNode(this.classes.common.hint),n=this.createNode(this.classes.variants.root),i=this.getProgressNode();return this.getStep().variants.forEach(function(t,r){var i=e.getVariantNode(t,r);n.appendChild(i)}),r.innerHTML=this.getStep().hint||"",t.appendChild(r),t.appendChild(n),t.appendChild(i),t}},{key:"getVariantNode",value:function(e,t){var r=this.createNode(this.classes.variants.item),n=this.createNode(this.classes.variants.hint),i=this.createNode(this.classes.variants.code);return n.innerHTML=e.hint||"",i.innerHTML=e.code||"",r.dataset.inx=t,r.appendChild(n),r.appendChild(i),r.addEventListener("click",this.variantClickHandler.bind(this)),r}},{key:"getProgressNode",value:function(){var e=this.createNode(this.classes.common.progress);return e.innerHTML=this.stepInx+1+" / "+this.steps.length,e}},{key:"getResultNode",value:function(){var e=this.createNode(this.classes.result.root),t=this.createNode(this.classes.result.hint),r=this.createNode(this.classes.result.config);return e.appendChild(t),e.appendChild(r),t.innerHTML=this.result.hint,r.textContent=this.getResult(),e}},{key:"variantClickHandler",value:function(e){var t=this.getStep(),r=e.currentTarget.dataset.inx,n=t.variants[r].value;t.key&&this.setVal(t.key,n),t.callback&&(this.config=t.callback(this.config,n)),this.nextStep()}},{key:"getStep",value:function(){return this.steps[this.stepInx]}},{key:"getResult",value:function(){return JSON.stringify(this.config,null,4)}},{key:"handleOptions",value:function(e){if(this.root=document.querySelector(e.selector),this.steps=e.steps,this.config=e.config||{},this.result=Object.assign({hint:""},e.result),this.classes=this.getClasses(),this.stepInx=0,!this.root)throw new Error("Can't find element by selector")}},{key:"getClasses",value:function(){return{common:{root:"oncogene",hint:"oncogene__hint",progress:"oncogene__progress"},variants:{root:"oncogene-variants",hint:"oncogene-variants__hint",item:"oncogene-variants__item",code:"oncogene-variants__code"},result:{root:"oncogene-result",hint:"oncogene-result__hint",config:"oncogene-result__config"}}}}],[{key:"checkOptions",value:function(e){var t=this,r=["selector","steps"],n=["result","classes"];if(!e)throw new Error("You should specify options");if(r.forEach(function(t){if(!e.hasOwnProperty(t))throw new Error("You should specify "+t)}),n.forEach(function(r){if(!t.isUndefined(e[r])&&!t.isObject(e[r]))throw new Error("options."+r+" should be an object")}),!this.isArray(e.steps))throw new Error("Steps should be an array");e.steps.forEach(function(e,r){var n=r+1;if(t.isUndefined(e.key)&&t.isUndefined(e.callback))throw new Error("Step "+n+" should have key or callback");if(!t.isUndefined(e.callback)&&!t.isFunction(e.callback))throw new Error("Callback of "+n+" step should be a function");if(!t.isArray(e.variants))throw new Error("Step "+n+" should have array of variants");if(e.variants.length<2)throw new Error("Step "+n+" should have at least two variants");e.variants.forEach(function(e,r){var i=r+1;if(t.isUndefined(e.hint)&&t.isUndefined(e.code))throw new Error("Variant "+i+" of step "+n+" should have hint or code");if(t.isUndefined(e.value))throw new Error("Variant "+i+" of step "+n+" should have a value")})})}},{key:"isObject",value:function(e){return e===Object(e)&&!this.isFunction(e)}},{key:"isUndefined",value:function(e){return void 0===e}},{key:"isFunction",value:function(e){return"function"==typeof e}},{key:"isString",value:function(e){return"string"==typeof e}},{key:"isArray",value:function(e){return Array.isArray(e)}}]),e}()},function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function o(e){var t,r,i,o,a,s,l=e.length;a=n(e),s=new f(3*l/4-a),i=a>0?l-4:l;var c=0;for(t=0,r=0;t>16&255,s[c++]=o>>8&255,s[c++]=255&o;return 2===a?(o=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,s[c++]=255&o):1===a&&(o=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,s[c++]=o>>8&255,s[c++]=255&o),s}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,r){for(var n,i=[],o=t;ou?u:l+a));return 1===n?(t=e[r-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=i,t.toByteArray=o,t.fromByteArray=l;for(var c=[],u=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return Z(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return N(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:k(e,t,r,n,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):k(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function k(e,t,r,n,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}var c;if(i){var u=-1;for(c=r;cs&&(r=s-l),c=r;c>=0;c--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=r){var l,c,u,f;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],128==(192&l)&&(f=(31&o)<<6|63&l)>127&&(a=f);break;case 3:l=e[i+1],c=e[i+2],128==(192&l)&&128==(192&c)&&(f=(15&o)<<12|(63&l)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(f=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return B(n)}function B(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function I(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(e,t,r,n,i){return i||D(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,i){return i||D(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,r,n,52,8),r+8}function Y(e){if(e=H(e).replace(te,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function H(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(e){for(var t=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function $(e){return G.toByteArray(Y(e))}function Q(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e){return e!==e}/*! +!function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=18)}([function(e,t,r){(function(t){function r(e,t){var r=e[1]||"",i=e[3];if(!i)return r;if(t){var o=n(i),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}function n(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+new t(JSON.stringify(e)).toString("base64")+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},i=0;i=0&&w.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),o(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),o(e,t),t}function c(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function u(e,t){var r,n,i;if(t.singleton){var o=y++;r=b||(b=s(t)),n=f.bind(null,r,o,!1),i=f.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(t),n=d.bind(null,r,t),i=function(){a(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(t),n=h.bind(null,r),i=function(){a(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}function f(e,t,r,n){var i=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function d(e,t,r){var n=r.css,i=r.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(n=k(n)),i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var p={},g=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},m=g(function(){return window&&document&&document.all&&!window.atob}),v=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e.call(this,r)),t[r]}}(function(e){return document.querySelector(e)}),b=null,y=0,w=[],k=r(16);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},void 0===t.singleton&&(t.singleton=m()),void 0===t.insertInto&&(t.insertInto="head"),void 0===t.insertAt&&(t.insertAt="bottom");var r=i(e);return n(r,t),function(e){for(var o=[],a=0;a color: tomato;\n .b {\n color: salmon;\n }\n}\n",value:2},{hint:"Use 4 spaces",code:".a {\n color: tomato;\n .b {\n color: salmon;\n }\n}\n",value:4},{hint:"Use tabs",code:".a {\n color: tomato;\n .b {\n color: salmon;\n }\n}\n",value:"tab"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"string-quotes",variants:[{hint:"Use single quotes",code:"a {\n content: 'x'; \n}",value:"single"},{hint:"Use double quotes",code:'a {\n content: "x"; \n}',value:"double"},{hint:"Skip (allow any type of quotes)",dismiss:!0}]},{key:"no-duplicate-selectors",variants:[{hint:"Disallow duplicate selectors within a stylesheet",code:".foo {}\n.bar {}\n",value:!0},{hint:"Allow duplicate selectors",dismiss:!0,code:".foo {}\n.bar {}\n.foo {}"}]},{key:"color-hex-case",variants:[{hint:"Use lowercase in colors",code:"a {\n color: #fff;\n}",value:"lower"},{hint:"Use uppercase in colors",code:"a {\n color: #FFF;\n}",value:"upper"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"color-hex-length",variants:[{hint:"Expand hexadecimal colors",code:"a {\n color: #ffffff;\n}",value:"long"},{hint:"Use shorthands for hexadecimal colors",code:"a {\n color: #fff;\n}",value:"short"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"color-named",variants:[{hint:"Use color names always where possible",code:"a {\n color: white;\n}",value:"always-where-possible"},{hint:"Never use color names",code:"a {\n color: #fff;\n}",value:"never"},{hint:"Skip (use code or name)",code:"a {\n color: #fff;\n background: gray\n}",dismiss:!0}]},{key:"color-no-hex",variants:[{hint:"Allow hex colors",dismiss:!0,code:"a {\n color: #fff;\n}"},{hint:"Disallow hex colors",code:"a {\n color: black;\n color: rgb(0,0,0);\n}",value:!0}]},{key:"selector-no-qualifying-type",variants:[{hint:"Disallow qualifying a selector by type",code:".foo {\n margin: 0\n}",value:!0},{hint:"Allow qualifying a selector by type",dismiss:!0,code:"a.foo {\n margin: 0\n}"}]},{key:"selector-no-id",variants:[{hint:"Disallow id selectors",code:".foo {}",value:!0},{hint:"Allow id selector",dismiss:!0,code:"#foo {}"}]},{key:"selector-no-combinator",variants:[{hint:"Disallow combinators in selectors",code:".foo {}",value:!0},{hint:"Allow combinators",dismiss:!0,code:" a > b + c ~ d e { color: pink; }\n/** ↑ ↑ ↑ ↑\n * These are combinators */"}]},{key:"selector-no-attribute",variants:[{hint:"Disallow attribute selectors",code:".foo {}",value:!0},{hint:"Allow attribute selectors",dismiss:!0,code:"[foo] {}"}]},{key:"selector-combinator-space-after",variants:[{hint:"Require a single space after the combinators of selectors",code:"a + b { color: pink; }",value:"always"},{hint:"Disallow whitespace after the combinators of selectors",code:"a +b { color: pink; }",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-attribute-quotes",variants:[{hint:"Require quotes for attribute values",code:'[target="_blank"] {}',value:"always"},{hint:"Disallow quotes for attribute values",code:"[target=_blank] {}",value:"never"},{hint:"Skip (allow any type of syntax)",code:'[target=_blank] {}\n\n[title="flower"] {}',dismiss:!0}]},{key:"selector-attribute-operator-space-before",variants:[{hint:"Require a single space before operators within attribute selectors",code:'[target = "_blank"] {}',value:"always"},{hint:"Disallow whitespace before operators within attribute selectors",code:'[target= "_blank"] {}',value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-attribute-operator-space-after",variants:[{hint:"Require a single space after operators within attribute selectors",code:'[target = "_blank"] {}',value:"always"},{hint:"Disallow whitespace after operators within attribute selectors",code:'[target ="_blank"] {}',value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-attribute-brackets-space-inside",variants:[{hint:"Require a single space on the inside of the brackets within attribute selectors",code:"[ target=_blank ] {}",value:"always"},{hint:"Disallow whitespace on the inside of the brackets within attribute selectors",code:"[target=_blank] {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"declaration-block-trailing-semicolon",variants:[{hint:"Require trailing semicolon within declaration blocks",code:"a { color: pink; }\na { background: orange; color: pink; }",value:"always"},{hint:"Disallow trailing semicolon within declaration blocks",code:"a { color: pink }\na { background: orange; color: pink }",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"declaration-no-important",variants:[{hint:"Disallow !important within declarations",code:"a {\n color: pink; \n}",value:!0},{hint:"Allow important",dismiss:!0,code:"a {\n color: pink !important; \n}"}]},{key:"declaration-colon-space-before",variants:[{hint:"Require a single space before the colon of declarations",code:"a {\n color : pink; \n}",value:"always"},{hint:"Disallow whitespace before the colon of declarations",code:"a {\n color: pink; \n}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"declaration-colon-space-after",variants:[{hint:"Require a single space after the colon of declarations",code:"a { color: pink }",value:"always"},{hint:"Disallow whitespace after the colon of declarations",code:"a { color:pink }",value:"never"},{hint:"Require only in single lines",code:"a {\n color: pink;\n box-shadow:0 0 0 1px #5b9dd9, \n 0 0 2px 1px rgba(30, 140, 190, 0.8); \n}",value:"always-single-line"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"property-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for properties",code:"a { \n transform: scale(1); \n}",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"a { \n -webkit-transform: scale(1); \n}"}]},{key:"value-no-vendor-prefix",hint:"",variants:[{code:"a {\n display: flex; \n}",hint:"Disallow vendor prefixes for values",value:!0},{hint:"Allow prefixes",code:"a {\n display: -webkit-flex; \n}",dismiss:!0}]},{key:"number-leading-zero",variants:[{hint:"Require leading zero for fractional numbers",code:"a {\n line-height: 0.5; \n}",value:"always"},{hint:"Disallow leading zero for fractional numbers",code:"a {\n line-height: .5; \n}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"function-url-quotes",variants:[{hint:"Use url quotes",code:'a {\n background: url("x.jpg"); \n}',value:"always"},{hint:"Don' use url quotes",code:"a {\n background: url(x.jpg); \n}",value:"never"},{hint:"Skip (allow any syntax)",code:'p {\n background: url("x.jpg"); \n}\n\na {\n background: url(x.jpg); \n}',dismiss:!0}]},{key:"function-url-data-uris",variants:[{hint:"Require data URIs for urls",code:'a {\n background-image:\n url("data:image/gif;base64,R0lGODlh="); \n}',value:"always"},{hint:"Disallow data URIs for urls",code:"a {\n background-image: url(image.gif); \n}",value:"never"},{hint:"Skip (allow any type of urls)",code:'a {\n background-image:\n url("data:image/gif;base64,R0lGODlh="); \n}\n\na {\n background-image: url(image.gif); \n}',dismiss:!0}]},{key:"font-weight-notation",variants:[{hint:"Numeric font weight notation",code:"a {\n font-weight: 700; \n}",value:"numeric"},{hint:"Named font weight notation",code:"a {\n font-weight: bold; \n}",value:"named-where-possible"},{hint:"Skip(allow any type of notation)",code:"a {\n font-weight: 700; \n}\n\nspan {\n font-weight: normal; \n}",dismiss:!0}]},{key:"font-family-name-quotes",variants:[{hint:"Use font family name quotes always where required",value:"always-where-required",code:'a {\n font-family: Times New Roman,\n Times, serif; \n}\na {\n font-family: "Hawaii 5-0"; \n}'},{hint:"Use font family name quotes always where recommended",value:"always-where-recommended",code:'a {\n font-family: "Times New Roman",\n Times, serif;\n}\na {\n font-family: Arial, sans-serif;\n}'},{hint:"Use font family name quotes always unless keyword",value:"always-unless-keyword",code:'a {\n font-family: "Arial", sans-serif;\n}'},{hint:"Skip (allow any type of syntax)",dismiss:!0}]},{key:"comment-whitespace-inside",variants:[{hint:"Require whitespace on the inside of comment markers",code:"/* comment */",value:"always"},{hint:"Disallow whitespace on the inside of comment markers",code:"/*comment*/",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"comment-empty-line-before",variants:[{hint:"Require an empty line before comments",code:"a {}\n\n/* comment */",value:"always"},{hint:"Disallow an empty line before comments",code:"a {}\n/* comment */",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"at-rule-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for at-rules",code:"@keyframes { 0% { top: 0; } }",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"@-webkit-keyframes { 0% { top: 0; } }"}]},{key:"rule-empty-line-before",variants:[{hint:"Require an empty line before rules",code:"a {}\n\nb {}",value:"always"},{hint:"Disallow an empty line before rules",code:"a {}\nb {}",value:"never"},{hint:"Require in multi-line",code:"a {\n color: red;\n}\n\nb {\n color: blue;\n}",value:"always-multi-line"},{hint:"Disallow in multi-line",code:"a {\n color: red;\n}\nb {\n color: blue;\n}",value:"never-multi-line"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-pseudo-element-colon-notation",variants:[{hint:"Specify single colon notation for applicable pseudo-elements",code:"a:before { color: pink; }",value:"single"},{hint:"Specify double colon notation for applicable pseudo-elements",code:"a::before { color: pink; }",value:"double"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-pseudo-class-parentheses-space-inside",variants:[{hint:"Require a single space inside of the parentheses within pseudo-class selectors",code:'input:not( [type="submit"] ) {}',value:"always"},{hint:"Disallow whitespace on the inside of the parentheses within pseudo-class selectors",code:'input:not([type="submit"]) {}',value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"selector-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for selectors",code:"input::placeholder {}",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"input::-moz-placeholder {}"}]},{key:"selector-no-universal",variants:[{hint:"Disallow the universal selector",code:".foo {}",value:!0},{hint:"Allow universal selector",dismiss:!0,code:"* {}"}]},{key:"selector-no-type",variants:[{hint:"Disallow type selectors",code:".foo {}",value:!0},{hint:"Allow type selectors",dismiss:!0,code:"a {}"}]},{key:"media-feature-range-operator-space-before",variants:[{hint:"Require a single space before the range operator in media features",code:"@media (max-width >=600px) {}",value:"always"},{hint:"Disallow whitespace before the range operator in media features",code:"@media (max-width>=600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-range-operator-space-after",variants:[{hint:"Require a single space after the range operator in media features",code:"@media (max-width>= 600px) {}",value:"always"},{hint:"Disallow whitespace after the range operator in media features",code:"@media (max-width>=600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-parentheses-space-inside",variants:[{hint:"Require a single space on the inside of the parentheses within media features",code:"@media ( max-width: 300px ) {}",value:"always"},{hint:"Disallow whitespace on the inside of the parentheses within media features",code:"@media (max-width: 300px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-name-no-vendor-prefix",variants:[{hint:"Disallow vendor prefixes for media feature names",code:"@media (min-resolution: 96dpi) {}",value:!0},{hint:"Allow prefixes",dismiss:!0,code:"@media (-webkit-min-device-pixel-ratio: 1) {}",value:!1}]},{key:"media-feature-colon-space-before",variants:[{hint:"Require a single space before the colon in media features",code:"@media (max-width :600px) {}",value:"always"},{hint:"Disallow whitespace before the colon in media features",code:"@media (max-width:600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]},{key:"media-feature-colon-space-after",variants:[{hint:"Require a single space after the colon in media features",code:"@media (max-width: 600px) {}",value:"always"},{hint:"Disallow whitespace after the colon in media features",code:"@media (max-width:600px) {}",value:"never"},{hint:"Skip (inherit from standard config)",dismiss:!0}]}]}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=r(7),s=r(6);r.n(s);r.d(t,"a",function(){return u});var l=function(){function e(e,t){for(var r=0;r .config").textContent=JSON.stringify(this.config,null,4)}},{key:"nextStep",value:function(){this.viewConfig(),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"nextStep",this).call(this)}},{key:"createCodeNode",value:function(e){var t=document.createElement("pre"),r=document.createElement("code");return t.className=e.className,r.innerHTML=e.code||"",t.appendChild(r),t}},{key:"getVariantNode",value:function(e,t){var r=this.createNode(this.classes.variants.item),n=this.createNode(this.classes.variants.hint),i=this.createCodeNode({className:this.classes.variants.code,code:e.code});return n.innerHTML=e.hint||"",r.dataset.inx=t,r.appendChild(n),r.addEventListener("click",this.variantClickHandler.bind(this)),void 0!==e.code&&(r.appendChild(i),this.highlightCode(i)),r}},{key:"getProgressNode",value:function(){var e=this.createNode(this.classes.common.progress);return e.innerHTML="Option "+(this.stepInx+1)+" of "+this.steps.length,e}},{key:"variantClickHandler",value:function(e){var t=this.getStep(),r=e.currentTarget.dataset.inx,n=t.variants[r],i=n.value;if(n.dismiss===!0)return void this.nextStep();t.key&&this.setVal(t.key,i),t.callback&&(this.config=t.callback(this.config,i)),this.nextStep()}},{key:"getResult",value:function(){document.querySelector(".generator").remove()}},{key:"setVal",value:function(e,t){for(var r=e.split("."),n=this.config;r.length>1;){var i=r.shift();if(Object.prototype.hasOwnProperty.call(n,i)||(n[i]={}),!this.constructor.isObject(n[i]))throw new Error("Part of path "+e+" is not an object");n=n[i]}n.rules[r.shift()]=t}},{key:"highlightCode",value:function(e){hljs.highlightBlock(e)}}]),t}(a.a)},function(e,t,r){var n=r(11);"string"==typeof n&&(n=[[e.i,n,""]]);r(1)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){var n=r(12);"string"==typeof n&&(n=[[e.i,n,""]]);r(1)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,r){r(15)(r(14))},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",function(){return o});var i=function(){function e(e,t){for(var r=0;r=this.steps.length)return this.renderResult();this.renderStep()}},{key:"renderStep",value:function(){this.render(this.getStepNode())}},{key:"renderResult",value:function(){this.render(this.getResultNode())}},{key:"render",value:function(e){this.clearRoot(),this.root.appendChild(e)}},{key:"createNode",value:function(e){var t=document.createElement("div");return t.className=e,t}},{key:"clearRoot",value:function(){for(;this.root.firstChild;)this.root.removeChild(this.root.firstChild)}},{key:"setVal",value:function(e,t){for(var r=e.split("."),n=this.config;r.length>1;){var i=r.shift();if(n.hasOwnProperty(i)||(n[i]={}),!this.constructor.isObject(n[i]))throw new Error("Part of path "+e+" is not an object");n=n[i]}n[r.shift()]=t}},{key:"getStepNode",value:function(){var e=this,t=document.createDocumentFragment(),r=this.createNode(this.classes.common.hint),n=this.createNode(this.classes.variants.root),i=this.getProgressNode();return this.getStep().variants.forEach(function(t,r){var i=e.getVariantNode(t,r);n.appendChild(i)}),r.innerHTML=this.getStep().hint||"",t.appendChild(r),t.appendChild(n),t.appendChild(i),t}},{key:"getVariantNode",value:function(e,t){var r=this.createNode(this.classes.variants.item),n=this.createNode(this.classes.variants.hint),i=this.createNode(this.classes.variants.code);return n.innerHTML=e.hint||"",i.innerHTML=e.code||"",r.dataset.inx=t,r.appendChild(n),r.appendChild(i),r.addEventListener("click",this.variantClickHandler.bind(this)),r}},{key:"getProgressNode",value:function(){var e=this.createNode(this.classes.common.progress);return e.innerHTML=this.stepInx+1+" / "+this.steps.length,e}},{key:"getResultNode",value:function(){var e=this.createNode(this.classes.result.root),t=this.createNode(this.classes.result.hint),r=this.createNode(this.classes.result.config);return e.appendChild(t),e.appendChild(r),t.innerHTML=this.result.hint,r.textContent=this.getResult(),e}},{key:"variantClickHandler",value:function(e){var t=this.getStep(),r=e.currentTarget.dataset.inx,n=t.variants[r].value;t.key&&this.setVal(t.key,n),t.callback&&(this.config=t.callback(this.config,n)),this.nextStep()}},{key:"getStep",value:function(){return this.steps[this.stepInx]}},{key:"getResult",value:function(){return JSON.stringify(this.config,null,4)}},{key:"handleOptions",value:function(e){if(this.root=document.querySelector(e.selector),this.steps=e.steps,this.config=e.config||{},this.result=Object.assign({hint:""},e.result),this.classes=this.getClasses(),this.stepInx=0,!this.root)throw new Error("Can't find element by selector")}},{key:"getClasses",value:function(){return{common:{root:"oncogene",hint:"oncogene__hint",progress:"oncogene__progress"},variants:{root:"oncogene-variants",hint:"oncogene-variants__hint",item:"oncogene-variants__item",code:"oncogene-variants__code"},result:{root:"oncogene-result",hint:"oncogene-result__hint",config:"oncogene-result__config"}}}}],[{key:"checkOptions",value:function(e){var t=this,r=["selector","steps"],n=["result","classes"];if(!e)throw new Error("You should specify options");if(r.forEach(function(t){if(!e.hasOwnProperty(t))throw new Error("You should specify "+t)}),n.forEach(function(r){if(!t.isUndefined(e[r])&&!t.isObject(e[r]))throw new Error("options."+r+" should be an object")}),!this.isArray(e.steps))throw new Error("Steps should be an array");e.steps.forEach(function(e,r){var n=r+1;if(t.isUndefined(e.key)&&t.isUndefined(e.callback))throw new Error("Step "+n+" should have key or callback");if(!t.isUndefined(e.callback)&&!t.isFunction(e.callback))throw new Error("Callback of "+n+" step should be a function");if(!t.isArray(e.variants))throw new Error("Step "+n+" should have array of variants");if(e.variants.length<2)throw new Error("Step "+n+" should have at least two variants");e.variants.forEach(function(e,r){var i=r+1;if(t.isUndefined(e.hint)&&t.isUndefined(e.code))throw new Error("Variant "+i+" of step "+n+" should have hint or code");if(t.isUndefined(e.value))throw new Error("Variant "+i+" of step "+n+" should have a value")})})}},{key:"isObject",value:function(e){return e===Object(e)&&!this.isFunction(e)}},{key:"isUndefined",value:function(e){return void 0===e}},{key:"isFunction",value:function(e){return"function"==typeof e}},{key:"isString",value:function(e){return"string"==typeof e}},{key:"isArray",value:function(e){return Array.isArray(e)}}]),e}()},function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function o(e){var t,r,i,o,a,s,l=e.length;a=n(e),s=new f(3*l/4-a),i=a>0?l-4:l;var c=0;for(t=0,r=0;t>16&255,s[c++]=o>>8&255,s[c++]=255&o;return 2===a?(o=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,s[c++]=255&o):1===a&&(o=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,s[c++]=o>>8&255,s[c++]=255&o),s}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,r){for(var n,i=[],o=t;ou?u:l+a));return 1===n?(t=e[r-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=i,t.toByteArray=o,t.fromByteArray=l;for(var c=[],u=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=h.length;d=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return Z(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return N(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:k(e,t,r,n,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):k(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function k(e,t,r,n,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}var c;if(i){var u=-1;for(c=r;cs&&(r=s-l),c=r;c>=0;c--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=r){var l,c,u,f;switch(s){case 1:o<128&&(a=o);break;case 2:l=e[i+1],128==(192&l)&&(f=(31&o)<<6|63&l)>127&&(a=f);break;case 3:l=e[i+1],c=e[i+2],128==(192&l)&&128==(192&c)&&(f=(15&o)<<12|(63&l)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(f=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return B(n)}function B(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function I(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(e,t,r,n,i){return i||D(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,i){return i||D(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,r,n,52,8),r+8}function Y(e){if(e=H(e).replace(te,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function H(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(e){for(var t=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function $(e){return G.toByteArray(Y(e))}function Q(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e){return e!==e}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/src/js/options.js b/src/js/options.js index 9dda063..c54107e 100644 --- a/src/js/options.js +++ b/src/js/options.js @@ -539,7 +539,7 @@ const options = { key: 'media-feature-name-no-vendor-prefix', variants: [{ hint: 'Disallow vendor prefixes for media feature names', - code: '@media (min-device-pixel-ratio: 1) {}', + code: '@media (min-resolution: 96dpi) {}', value: true }, { hint: 'Allow prefixes',