You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
29 KiB
2 lines
29 KiB
2 months ago
|
function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.apply(this,arguments)}function t(e,t){const n=t.width,r=t.height,u=t.inlineSize,o=t.blockSize;switch(e){case 1:return null!=n?{type:3,value:n,unit:"px"}:{type:1};case 3:return null!=u?{type:3,value:u,unit:"px"}:{type:1};case 2:return null!=r?{type:3,value:r,unit:"px"}:{type:1};case 4:return null!=o?{type:3,value:o,unit:"px"}:{type:1};case 5:return null!=n&&null!=r&&r>0?{type:2,value:n/r}:{type:1};case 6:return null!=n&&null!=r?{type:4,value:r>=n?"portrait":"landscape"}:{type:1}}}function n(e,t){switch(e.type){case 1:case 2:case 3:case 4:return i(e,t);case 5:{const n=t.sizeFeatures.get(e.feature);return null==n?{type:1}:n}case 6:return e.value}}function r(e){return{type:5,value:e}}function u(e,t,n){return r(function(e,t,n){switch(n){case 1:return e===t;case 2:return e>t;case 3:return e>=t;case 4:return e<t;case 5:return e<=t}}(e,t,n))}function o(e,t,n){return null==e?t:null==t?e:n(e,t)}function s(e,t){switch(e){case"cqw":return t.cqw;case"cqh":return t.cqh;case"cqi":return 0===t.writingAxis?t.cqw:t.cqh;case"cqb":return 1===t.writingAxis?t.cqw:t.cqh;case"cqmin":return o(s("cqi",t),s("cqb",t),Math.min);case"cqmax":return o(s("cqi",t),s("cqb",t),Math.max)}}function l(e,{treeContext:t}){switch(e.unit){case"px":return e.value;case"rem":return e.value*t.rootFontSize;case"em":return e.value*t.fontSize;case"cqw":case"cqh":case"cqi":case"cqb":case"cqmin":case"cqmax":return o(e.value,s(e.unit,t),((e,t)=>e*t))}return null}function c(e,t){switch(e.type){case 2:return 0===e.value?0:null;case 3:return l(e,t)}return null}function i(e,t){switch(e.type){case 4:return function(e,t){const o=n(e.left,t),s=n(e.right,t),l=e.operator;if(4===o.type&&4===s.type||5===o.type&&5===s.type)return i=o,a=s,1===l?r(i.value===a.value):{type:1};var i,a;if(3===o.type||3===s.type){const e=c(o,t),n=c(s,t);if(null!=e&&null!=n)return u(e,n,l)}else if(2===o.type&&2===s.type)return u(o.value,s.value,l);return{type:1}}(e,t);case 2:return function(e,t){const n=i(e.left,t);return 5!==n.type||!0!==n.value?n:i(e.right,t)}(e,t);case 3:return function(e,t){const n=i(e.left,t);return 5===n.type&&!0===n.value?n:i(e.right,t)}(e,t);case 1:{const n=i(e.value,t);return 5===n.type?{type:5,value:!n.value}:{type:1}}case 5:return a(n(e,t));case 6:return a(e.value)}}function a(e){switch(e.type){case 5:return e;case 2:case 3:return{type:5,value:e.value>0}}return{type:1}}const f=Array.from({length:4},(()=>Math.floor(256*Math.random()).toString(16))).join(""),p=S("container"),y=S("container-type"),h=S("container-name"),v=`data-cqs-${f}`,d=`data-cqc-${f}`,m=S("cqw"),w=S("cqh"),g=S("cqi"),b=S("cqb");function S(e){return`--cq-${e}-${f}`}const x=Symbol();function q(e,t){const n={value:t,errorIndices:[],index:-1,at(r){const u=n.index+r;return u>=e.length?t:e[u]},consume:e=>(n.index+=e,n.value=n.at(0),n.value),reconsume(){n.index-=1},error(){n.errorIndices.push(n.index)}};return n}function C(e){return q(e,{type:0})}function*$(e){const t=[];let n=!1;for(const b of e){const e=b.codePointAt(0);n&&10!==e&&(n=!1,t.push(10)),0===e||e>=55296&&e<=57343?t.push(65533):13===e?n=!0:t.push(e)}const r=q(t,-1),{at:u,consume:o,error:s,reconsume:l}=r;function c(){return String.fromCodePoint(r.value)}function i(){return{type:13,value:c()}}function a(){for(;z(u(1));)o(1)}function f(){for(;-1!==r.value;)if(o(1),42===u(0)&&47===u(1))return void o(1);s()}function p(){const[e,t]=function(){let e=0,t="",n=u(1);for(43!==n&&45!==n||(o(1),t+=c());k(u(1));)o(1),t+=c();if(46===u(1)&&k(u(2)))for(e=1,o(1),t+=c();k(u(1));)o(1),t+=c();if(n=u(1),69===n||101===n){const n=u(2);if(k(n))for(e=1,o(1),t+=c();k(u(1));)o(1),t+=c();else if((45===n||43===n)&&k(u(3)))for(e=1,o(1),t+=c(),o(1),t+=c();k(u(1));)o(1),t+=c()}return[t,e]}(),n=u(1);return d(n,u(1),u(2))?{type:15,value:e,flag:t,unit:w()}:37===n?(o(1),{type:16,value:e}):{type:17,value:e,flag:t}}function y(){const e=w();let t=u(1);if("url"===e.toLowerCase()&&40===t){for(o(1)
|