projecte_ionic/node_modules/@stencil/core/sys/node/autoprefixer.js

8 lines
1.4 MiB
JavaScript
Raw Normal View History

2022-02-09 18:30:03 +01:00
!function(B,C){for(var e in C)B[e]=C[e]}(exports,function(B){var C={};function e(t){if(C[t])return C[t].exports;var s=C[t]={i:t,l:!1,exports:{}};return B[t].call(s.exports,s,s.exports,e),s.l=!0,s.exports}return e.m=B,e.c=C,e.d=function(B,C,t){e.o(B,C)||Object.defineProperty(B,C,{enumerable:!0,get:t})},e.r=function(B){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},e.t=function(B,C){if(1&C&&(B=e(B)),8&C)return B;if(4&C&&"object"==typeof B&&B&&B.__esModule)return B;var t=Object.create(null);if(e.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:B}),2&C&&"string"!=typeof B)for(var s in B)e.d(t,s,function(C){return B[C]}.bind(null,s));return t},e.n=function(B){var C=B&&B.__esModule?function(){return B.default}:function(){return B};return e.d(C,"a",C),C},e.o=function(B,C){return Object.prototype.hasOwnProperty.call(B,C)},e.p="",e(e.s=590)}([function(B,C,e){let t=e(11),s=e(5),r=e(1);B.exports=class extends t{check(){return!0}prefixed(B,C){return C+B}normalize(B){return B}otherPrefixes(B,C){for(let e of s.prefixes())if(e!==C&&B.includes(e))return!0;return!1}set(B,C){return B.prop=this.prefixed(B.prop,C),B}needCascade(B){return B._autoprefixerCascade||(B._autoprefixerCascade=!1!==this.all.options.cascade&&B.raw("before").includes("\n")),B._autoprefixerCascade}maxPrefixed(B,C){if(C._autoprefixerMax)return C._autoprefixerMax;let e=0;for(let C of B)C=r.removeNote(C),C.length>e&&(e=C.length);return C._autoprefixerMax=e,C._autoprefixerMax}calcBefore(B,C,e=""){let t=this.maxPrefixed(B,C)-r.removeNote(e).length,s=C.raw("before");return t>0&&(s+=Array(t).fill(" ").join("")),s}restoreBefore(B){let C=B.raw("before").split("\n"),e=C[C.length-1];this.all.group(B).up((B=>{let C=B.raw("before").split("\n"),t=C[C.length-1];t.length<e.length&&(e=t)})),C[C.length-1]=e,B.raws.before=C.join("\n")}insert(B,C,e){let t=this.set(this.clone(B),C);if(t)return B.parent.some((B=>B.prop===t.prop&&B.value===t.value))?void 0:(this.needCascade(B)&&(t.raws.before=this.calcBefore(e,B,C)),B.parent.insertBefore(B,t))}isAlready(B,C){let e=this.all.group(B).up((B=>B.prop===C));return e||(e=this.all.group(B).down((B=>B.prop===C))),e}add(B,C,e,t){let s=this.prefixed(B.prop,C);if(!this.isAlready(B,s)&&!this.otherPrefixes(B.value,C))return this.insert(B,C,e,t)}process(B,C){if(!this.needCascade(B))return void super.process(B,C);let e=super.process(B,C);e&&e.length&&(this.restoreBefore(B),B.raws.before=this.calcBefore(e,B))}old(B,C){return[this.prefixed(B,C)]}}},function(B,C,e){let{list:t}=e(4);B.exports={error(B){let C=new Error(B);throw C.autoprefixer=!0,C},uniq:B=>[...new Set(B)],removeNote:B=>B.includes(" ")?B.split(" ")[0]:B,escapeRegexp:B=>B.replace(/[$()*+-.?[\\\]^{|}]/g,"\\$&"),regexp(B,C=!0){return C&&(B=this.escapeRegexp(B)),new RegExp(`(^|[\\s,(])(${B}($|[\\s(,]))`,"gi")},editList(B,C){let e=t.comma(B),s=C(e,[]);if(e===s)return B;let r=B.match(/,\s*/);return r=r?r[0]:", ",s.join(r)},splitSelector:B=>t.comma(B).map((B=>t.space(B).map((B=>B.split(/(?=\.|#)/g)))))}},function(B,C){B.exports=function(B){let C;return"-webkit- 2009"===B||"-moz-"===B?C=2009:"-ms-"===B?C=2012:"-webkit-"===B&&(C="final"),"-webkit- 2009"===B&&(B="-webkit-"),[C,B]}},function(B,C,e){let t=e(11),s=e(12),r=e(18),n=e(1);B.exports=class extends t{static save(B,C){let e=C.prop,t=[];for(let s in C._autoprefixerValues){let n,o=C._autoprefixerValues[s];if(o===C.value)continue;let i=r.prefix(e);if("-pie-"===i)continue;if(i===s){n=C.value=o,t.push(n);continue}let a=B.prefixed(e,s),c=C.parent;if(!c.every((B=>B.prop!==a))){t.push(n);continue}let l=o.replace(/\s+/," ");if(c.some((B=>B.prop===C.prop&&B.value.replace(/\s+/," ")===l))){t.push(n);continue}let u=this.clone(C,{value:o});n=C.parent.insertBefore(C,u),t.push(n)}return t}check(B){let C=B.value;return!!C.includes(this.name)&&!!C.match(this.regexp())}regexp(){return this.regexpCache||(this.regexpCache=n.regexp(this.name))}replace(B,C){return B.replace(this.regexp(),`$1${C}$2`)}value(B){return B.raws.value&&B.raws.value.value===
/**
* @license Fraction.js v4.0.12 09/09/2015
* http://www.xarg.org/2014/03/rational-numbers-in-javascript/
*
* Copyright (c) 2015, Robert Eisele (robert@xarg.org)
* Dual licensed under the MIT or GPL Version 2 licenses.
**/!function(e){"use strict";var s={s:1,n:0,d:1};function r(B){function C(){var C=Error.apply(this,arguments);C.name=this.name=B,this.stack=C.stack,this.message=C.message}function e(){}return e.prototype=Error.prototype,C.prototype=new e,C}var n=u.DivisionByZero=r("DivisionByZero"),o=u.InvalidParameter=r("InvalidParameter");function i(B,C){return isNaN(B=parseInt(B,10))&&a(),B*C}function a(){throw new o}var c=function(B,C){var e,t=0,r=1,o=1,c=0,l=0,u=0,A=1,p=1,f=0,d=1,E=1,D=1,F=1e7;if(null==B);else if(void 0!==C)o=(t=B)*(r=C);else switch(typeof B){case"object":"d"in B&&"n"in B?(t=B.n,r=B.d,"s"in B&&(t*=B.s)):0 in B?(t=B[0],1 in B&&(r=B[1])):a(),o=t*r;break;case"number":if(B<0&&(o=B,B=-B),B%1==0)t=B;else if(B>0){for(B>=1&&(B/=p=Math.pow(10,Math.floor(1+Math.log(B)/Math.LN10)));d<=F&&D<=F;){if(B===(e=(f+E)/(d+D))){d+D<=F?(t=f+E,r=d+D):D>d?(t=E,r=D):(t=f,r=d);break}B>e?(f+=E,d+=D):(E+=f,D+=d),d>F?(t=E,r=D):(t=f,r=d)}t*=p}else(isNaN(B)||isNaN(C))&&(r=t=NaN);break;case"string":if(null===(d=B.match(/\d+|./g))&&a(),"-"===d[f]?(o=-1,f++):"+"===d[f]&&f++,d.length===f+1?l=i(d[f++],o):"."===d[f+1]||"."===d[f]?("."!==d[f]&&(c=i(d[f++],o)),(++f+1===d.length||"("===d[f+1]&&")"===d[f+3]||"'"===d[f+1]&&"'"===d[f+3])&&(l=i(d[f],o),A=Math.pow(10,d[f].length),f++),("("===d[f]&&")"===d[f+2]||"'"===d[f]&&"'"===d[f+2])&&(u=i(d[f+1],o),p=Math.pow(10,d[f+1].length)-1,f+=3)):"/"===d[f+1]||":"===d[f+1]?(l=i(d[f],o),A=i(d[f+2],1),f+=3):"/"===d[f+3]&&" "===d[f+1]&&(c=i(d[f],o),l=i(d[f+2],o),A=i(d[f+4],1),f+=5),d.length<=f){o=t=u+(r=A*p)*c+p*l;break}default:a()}if(0===r)throw new n;s.s=o<0?-1:1,s.n=Math.abs(t),s.d=Math.abs(r)};function l(B,C){if(!B)return C;if(!C)return B;for(;;){if(!(B%=C))return C;if(!(C%=B))return B}}function u(B,C){if(!(this instanceof u))return new u(B,C);c(B,C),B=u.REDUCE?l(s.d,s.n):1,this.s=s.s,this.n=s.n/B,this.d=s.d/B}u.REDUCE=1,u.prototype={s:1,n:0,d:1,abs:function(){return new u(this.n,this.d)},neg:function(){return new u(-this.s*this.n,this.d)},add:function(B,C){return c(B,C),new u(this.s*this.n*s.d+s.s*this.d*s.n,this.d*s.d)},sub:function(B,C){return c(B,C),new u(this.s*this.n*s.d-s.s*this.d*s.n,this.d*s.d)},mul:function(B,C){return c(B,C),new u(this.s*s.s*this.n*s.n,this.d*s.d)},div:function(B,C){return c(B,C),new u(this.s*s.s*this.n*s.d,this.d*s.n)},clone:function(){return new u(this)},mod:function(B,C){return isNaN(this.n)||isNaN(this.d)?new u(NaN):void 0===B?new u(this.s*this.n%this.d,1):(c(B,C),0===s.n&&0===this.d&&u(0,0),new u(this.s*(s.d*this.n)%(s.n*this.d),s.d*this.d))},gcd:function(B,C){return c(B,C),new u(l(s.n,this.n)*l(s.d,this.d),s.d*this.d)},lcm:function(B,C){return c(B,C),0===s.n&&0===this.n?new u:new u(s.n*this.n,l(s.n,this.n)*l(s.d,this.d))},ceil:function(B){return B=Math.pow(10,B||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):new u(Math.ceil(B*this.s*this.n/this.d),B)},floor:function(B){return B=Math.pow(10,B||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):new u(Math.floor(B*this.s*this.n/this.d),B)},round:function(B){return B=Math.pow(10,B||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):new u(Math.round(B*this.s*this.n/this.d),B)},inverse:function(){return new u(this.s*this.d,this.n)},pow:function(B){return B<0?new u(Math.pow(this.s*this.d,-B),Math.pow(this.n,-B)):new u(Math.pow(this.s*this.n,B),Math.pow(this.d,B))},equals:function(B,C){return c(B,C),this.s*this.n*s.d==s.s*s.n*this.d},compare:function(B,C){c(B,C);var e=this.s*this.n*s.d-s.s*s.n*this.d;return(0<e)-(e<0)},simplify:function(B){if(isNaN(this.n)||isNaN(this.d))return this;var C=this.abs().toContinued();function e(B){return 1===B.length?new u(B[0]):e(B.slice(1)).inverse().add(B[0])}B=B||.001;for(var t=0;t<C.length;t++){var s=e(C.slice(0,t+1));if(s.sub(this.abs()).abs().valueOf()<B)return s.mul(this.s)}return this},divisible:function(B,C){return c(B,C),!(!(s.n*this.d)||this.n*s.d%(s.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(B){var C,e="",t=this.n,s=this.d;return this.s<0&&(e+="-"),1===s?e+=t:(B&&(C=Math.floor(t/s))>0&&(e+=C,e+=" ",t%=s),e+=t,e+="/",e+=s),e},toLatex:function(B){var C,e="",t=this.n,s=this.d;return